:root {
    --primary-color: #333;
    --text-color: #666;
    --accent-color: #e06c53;
    --light-bg: #faece9;
    --border-color: #eaeaea;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Top Bar & Header */
.top-bar {
    background-color: var(--light-bg);
    padding: 5px 0;
    font-size: 0.85rem;
    color: var(--accent-color);
}

.site-header {
    padding: 30px 20px;
}

.logo-text {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.text-accent {
    color: #27ae60; /* Italian green touch */
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--primary-color);
}

/* Icons */
.icon-small {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.icon-tiny {
    width: 12px;
    height: 12px;
    vertical-align: middle;
    margin-right: 5px;
    opacity: 0.6;
}

.white-icon {
    filter: brightness(0) invert(1);
}

/* Hero Section */
.hero {
    display: flex;
    background-color: var(--light-bg);
    margin-top: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.hero-image-wrapper {
    flex: 1;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tags {
    margin-bottom: 15px;
}

.tag {
    border: 1px solid #ddd;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 5px;
    color: #999;
}

.hero h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.slider-dots {
    text-align: center;
    padding: 20px 0;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ddd;
    border-radius: 50%;
    margin: 0 4px;
}

.dot.active {
    background-color: var(--accent-color);
}

/* Main Content Layout */
.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 0.95rem;
}

.content-layout {
    display: flex;
    gap: 40px;
}

.articles-list {
    flex: 3;
}

.sidebar {
    flex: 1;
}

/* Articles */
.articles-list h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: normal;
}

.post-item {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.post-img {
    width: 250px;
    height: 300px;
    object-fit: cover;
}

.post-info {
    flex: 1;
}

.post-info h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 10px 0;
}

.post-meta {
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Sidebar Widgets */
.widget {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    margin-top: 10px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-right: none;
    outline: none;
}

.search-box button {
    background-color: var(--accent-color);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
}

/* Friends Section */
.friends-section {
    margin: 60px auto;
}

.friends-box {
    border: 1px solid #ebd8ce;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
}

.friends-box h3 {
    color: var(--primary-color);
    font-weight: normal;
    margin-bottom: 20px;
}

.friends-logo {
    max-width: 250px;
    margin-bottom: 20px;
}

.friends-box p {
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* Pre-footer Welcome */
.pre-footer-welcome {
    text-align: center;
    padding: 40px 20px;
    background-color: #fcfcfc;
    border-top: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.pre-footer-welcome h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 20px 20px;
    font-size: 0.9rem;
}

.footer-cols {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col {
    flex: 1;
}

.footer-col h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-style: italic;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
}

.disclaimer {
    color: #999;
    font-style: italic;
}

/* Cookie Modal (Right side) */
.cookie-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 300px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px;
    border-radius: 8px;
    z-index: 1000;
    display: none;
}

.cookie-modal h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.cookie-modal p {
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.btn-accept {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
    }
    .content-layout {
        flex-direction: column;
    }
    .post-item {
        flex-direction: column;
    }
    .post-img {
        width: 100%;
        height: 200px;
    }
    .footer-cols {
        flex-direction: column;
    }
    .cookie-modal {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 10px;
    }
}

/* Inner page styles */
/* ---------------------------------------
   NEW STYLES FOR INTERNAL PAGE
--------------------------------------- */

/* Article Header */
.single-article {
    margin-top: 40px;
    margin-bottom: 50px;
}

.article-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-meta {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Responsive Images */
.article-main-image {
    width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.article-inline-image {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 30px 0;
    display: block;
}

/* Article Text Formatting (h1-h6, p, span) */
.article-content {
    max-width: 850px;
    margin: 0 auto;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    color: var(--primary-color);
    margin-top: 35px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-content h1 { font-size: 2.2rem; }
.article-content h2 { font-size: 1.8rem; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.3rem; }
.article-content h5 { font-size: 1.1rem; }
.article-content h6 { font-size: 1rem; color: #777; }

.article-content p {
    margin-bottom: 22px;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.7;
}

.article-content span {
    font-weight: 600;
    color: var(--accent-color);
    background-color: rgba(224, 108, 83, 0.05);
    padding: 0 4px;
    border-radius: 3px;
}

/* Lists (ul, ol) */
.article-content ul,
.article-content ol {
    margin-bottom: 25px;
    margin-left: 20px;
    padding-left: 15px;
    font-size: 1.1rem;
}

.article-content ul li,
.article-content ol li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.article-content ul li::marker {
    color: var(--accent-color);
}

/* Table */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 35px 0;
    background-color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.article-content th,
.article-content td {
    border: 1px solid var(--border-color);
    padding: 15px;
    text-align: left;
}

.article-content th {
    background-color: var(--light-bg);
    color: var(--primary-color);
    font-weight: 600;
}

.article-content tr:nth-child(even) {
    background-color: #fafafa;
}

.article-content tr:hover {
    background-color: var(--light-bg);
}

/* Table of Contents (TOC) */
.toc {
    background-color: #fcfcfc;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 40px;
    display: table;
    min-width: 350px;
}

.toc h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc ul li {
    margin-bottom: 12px;
}

.toc a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s ease;
}

.toc a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Related Articles Linking Block */
.related-articles {
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
    margin-bottom: 50px;
}

.related-articles h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.related-card {
    display: flex;
    flex-direction: column;
    color: var(--primary-color);
    text-decoration: none;
    group:
}

.related-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.related-card:hover img {
    transform: translateY(-3px);
    opacity: 0.9;
}

.related-card h4 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin: 0;
    transition: color 0.3s ease;
}

.related-card:hover h4 {
    color: var(--accent-color);
}

/* Generic Forms (Comments & Contact) */
.forms-container {
    max-width: 850px;
    margin: 0 auto 70px;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
}

.form-wrapper {
    margin-bottom: 50px;
    background-color: #fcfcfc;
    padding: 35px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-wrapper h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.form-wrapper p {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 25px;
}

.custom-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-row input {
    flex: 1;
}

.custom-form input,
.custom-form textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-form input:focus,
.custom-form textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(224, 108, 83, 0.1);
}

.btn-submit {
    background-color: var(--accent-color);
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    align-self: flex-start;
    transition: background-color 0.3s, transform 0.1s;
}

.btn-submit:hover {
    background-color: #c95d46;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* Mobile Adjustments for new styles */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.9rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .toc {
        display: block;
        width: 100%;
    }
    
    .form-wrapper {
        padding: 20px;
    }
}