:root {
    --brown: #7a4a2e;
    --light-bg: #f7f4ef;
    --text-dark: #2b2b2b;
    --border: #e3ddd6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Georgia", serif;
    background: var(--light-bg);
    color: var(--text-dark);
}

/* Header */
.site-header {
    text-align: center;
    padding: 30px 20px 15px;
    border-bottom: 1px solid var(--border);
}

.header-container {
    display: flex;
    justify-content: space-between;
    /* Space out logo and menu/toggle */
    align-items: center;
    /* Vertical Center */
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    color: var(--brown);
    font-size: 32px;
    /* Slightly smaller for row layout */
    margin: 0;
}

.menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: absolute;
    right: 0;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--brown);
    margin: 4px 0;
    transition: 0.3s;
}

.main-nav {
    display: block;
    background: transparent;
    /* Transparent on desktop since it's in the header */
}

.nav-wrapper {
    display: flex;
    justify-content: flex-end;
    /* Align to the right */
    align-items: center;
    gap: 25px;
    flex-wrap: nowrap;
    /* Prevent wrapping on desktop */
    padding: 0;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--brown);
}

/* Trending */
.trending {
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.trending-container {
    display: flex;
    align-items: center;
    /* Vertical Center */
    justify-content: center;
    /* Horizontal Center */
    gap: 10px;
    padding: 10px 20px;
    margin: 0 auto;
    min-height: 40px;
    /* Ensure enough height for centering to be visible */
}

.trending-label {
    white-space: nowrap;
    color: var(--brown);
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.trending #trending-carousel {
    max-width: 800px;
    flex-grow: 1;
    overflow: hidden;
    /* Hide next slides */
    min-width: 0;
    /* Important for scroll calculations in flexbox */
}

.trending #trending-carousel .item {
    font-size: 14px;
    padding: 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

.trending #trending-carousel .item a {
    text-decoration: none;
    color: inherit;
}

.trending .owl-nav {
    display: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Page Headers & Breadcrumbs */
.page-title {
    padding: 30px 0;
    margin-bottom: 30px;
}

.breadcrumb {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    font-size: 14px;
    color: #888;
}

.breadcrumb li a {
    color: var(--brown);
    text-decoration: none;
}

.breadcrumb li+li::before {
    content: '/';
    margin-right: 10px;
    color: #ccc;
}

/* Article Page */
.article-container {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 40px;
}

.article-main h1 {
    font-size: 36px;
    color: var(--brown);
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #777;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-meta span i {
    color: var(--brown);
    margin-right: 5px;
}

.featured-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 4px;
    overflow: hidden;
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
}

.article-content p {
    margin-bottom: 25px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 20px;
}

.widget {
    margin-bottom: 40px;
}

.widget-title {
    font-size: 18px;
    color: var(--brown);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--brown);
}

.sidebar-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.sidebar-post img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-post h3 {
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.sidebar-post h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-post h3 a:hover {
    color: var(--brown);
}

/* Forms */
.form-card {
    background: #fff;
    padding: 30px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--brown);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--brown);
}

.btn-submit {
    background: var(--brown);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-submit:hover {
    background: #5d3822;
}

/* Tags & Sharing */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 30px 0;
}

.tag-btn {
    background: #f0ede8;
    color: var(--brown);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.3s;
}

.tag-btn:hover {
    background: var(--brown);
    color: #fff;
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.share-btn.fb {
    background: #3b5998;
}

.share-btn.tw {
    background: #1da1f2;
}

.share-btn.wa {
    background: #25d366;
}

.share-btn:hover {
    opacity: 0.8;
}

/* Grid Override for detail pages */
@media (max-width: 900px) {
    .article-container {
        grid-template-columns: 1fr;
    }
}

/* Grid */
.news-section {
    margin-bottom: 50px;
}

.section-title {
    font-size: 24px;
    color: var(--brown);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--brown);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card h2 {
    font-size: 20px;
    color: var(--brown);
    padding: 15px;
}

.news-card p {
    padding: 0 15px 10px;
    font-size: 15px;
    line-height: 1.6;
}

.meta {
    display: block;
    padding: 0 15px 15px;
    font-size: 13px;
    color: #777;
}

/* Footer */
.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--brown);
    font-size: 18px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-logo img {
    margin-bottom: 20px;
    display: block;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: var(--brown);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    list-style: none;
    padding: 0;
}

.footer-social a {
    color: var(--brown);
    font-size: 18px;
    transition: transform 0.3s;
    display: inline-block;
}

.footer-social a:hover {
    transform: translateY(-3px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.contact-info i {
    color: var(--brown);
    width: 20px;
}

.copyright-bar {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: #888;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive */
@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 28px;
    }

    .header-container {
        justify-content: space-between;
        padding: 0 10px;
    }

    .menu-toggle {
        display: block;
        position: static;
        /* Let flex handle positioning */
    }

    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        background: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .nav-wrapper {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .nav-wrapper a {
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid var(--border);
        text-align: left;
    }

    .site-header {
        position: relative;
    }

    /* Trending Mobile Refinement */
    .trending-container {
        padding: 8px 15px;
        /* Increased padding */
        gap: 8px;
        min-height: 40px;
        justify-content: flex-start;
        /* Left align on mobile to prevent cutoff */
        width: 100%;
        overflow: hidden;
    }

    .trending-label {
        font-size: 12px;
        /* Slightly larger for readability */
        flex-shrink: 0;
        /* Prevent the label from shrinking */
    }

    .trending #trending-carousel .item {
        font-size: 11px;
        min-height: 20px;
        text-align: left;
        /* Better for readability on narrow mobile screens */
    }

    .trending #trending-carousel {
        max-width: none;
    }
}