:root {
    /* Exact Green from Mockup */
    --primary-color: #16a34a;
    /* Green 600 */
    --primary-hover: #15803d;
    /* Green 700 */
    --primary-light: #dcfce7;
    /* Green 100 */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --card-bg: #ffffff;
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    /* Slate 200 */

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

[data-theme="dark"] {
    --bg-color: #0f172a;
    /* Slate 900 */
    --card-bg: #1e293b;
    /* Slate 800 */
    --text-main: #f8fafc;
    /* Slate 50 */
    --text-muted: #94a3b8;
    /* Slate 400 */
    --border-color: #334155;
    /* Slate 700 */

    --primary-light: #064e3b;
    /* Dark Green */
    --primary-color: #22c55e;
    /* Brighter Green for Dark Mode */

    --shadow-card: 0 4px 6px -1px rgb(0 0 0 / 0.5);
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .featured-wrapper,
[data-theme="dark"] .big-content,
[data-theme="dark"] .std-card,
[data-theme="dark"] .big-card,
[data-theme="dark"] .main-footer,
[data-theme="dark"] .category-strip,
[data-theme="dark"] .single-wrapper,
[data-theme="dark"] .btn-contact {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .cat-pill {
    background-color: #334155;
    color: var(--text-muted);
}

[data-theme="dark"] .cat-pill.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .big-thumb {
    background: #334155;
}

[data-theme="dark"] .big-thumb::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Ensure text on input is readable if any */
input,
textarea {
    background: var(--bg-color);
    color: var(--text-main);
    border-color: var(--border-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

/* Header */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1150px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.kbd-badge {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.divider-v {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.icon-action {
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
}

.icon-action:hover {
    color: var(--text-main);
}

.btn-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    background: white;
}

.btn-contact:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Category Bar */
.category-strip {
    background: #f8fafc;
    /* Match body bg often */
    padding: 1rem 0 2rem 0;
}

.cat-list {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cat-pill {
    padding: 0.5rem 1.25rem;
    background: #f1f5f9;
    /* Gray 100 */
    color: var(--text-muted);
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.cat-pill:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.cat-pill.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
    /* fake internal border */
    background: white;
    /* As per print, looks like white bg with green border */
}

/* Feature Layout */
.layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Featured Card */
.featured-wrapper {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    /* Ensure no underline */
    color: inherit;
    /* Inherit text color */
}

/* ... existing hover styles ... */

.big-content {
    padding: 3rem;
    /* Adjusted based on feedback */
    background: white;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .big-content {
        padding: 1.5rem;
        /* Smaller padding on mobile */
    }

    .big-title {
        font-size: 1.75rem;
    }
}

.featured-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.big-card {
    /* Reset old styles */
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    background: transparent;
}

.big-thumb {
    aspect-ratio: 21/9;
    height: auto;
    background: #e2e8f0;
    position: relative;
    overflow: hidden;
    /* For zoom scale */
}

/* ... existing styles ... */

.big-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.featured-wrapper:hover .big-thumb img {
    transform: scale(1.05);
    /* Subtle zoom */
}

/* Gradient Overlay for sophistication */
.big-thumb::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
    opacity: 0.6;
    transition: opacity 0.3s;
}

.featured-wrapper:hover .big-thumb::after {
    opacity: 0.8;
}

.big-content {
    padding: 2.5rem;
    background: white;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .big-content {
        padding: 1.5rem;
    }

    .big-title {
        font-size: 1.5rem;
    }
}

.meta-line {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
}

.big-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 0.75rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    transition: color 0.2s;
}

.featured-wrapper:hover .big-title {
    color: var(--primary-color);
}

.big-desc {
    font-size: 1.1rem;
    color: #475569;
    /* Slate 600 */
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 90%;
}

.btn-green {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.75rem;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.3);
}

.btn-green:hover {
    background: var(--primary-hover);
    transform: translateX(4px);
    /* Move button slightly right or just shadow */
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.4);
}

.btn-green ion-icon {
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.btn-green:hover ion-icon {
    transform: translateX(3px);
}

/* Sidebar Tabs */
.sidebar {
    /* No bg? Print shows tabs on top */
}

.tabs-header {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
}

.tab-item.active {
    background: white;
    color: var(--text-main);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
}

.side-post {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.side-thumb {
    width: 80px;
    height: 80px;
    background: #f1f5f9;
    border-radius: 4px;
    flex-shrink: 0;
}

.side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.side-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.side-cat {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.side-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
}

/* Main Section */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sec-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.page-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 900px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}


.std-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.std-thumb {
    height: 200px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.std-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.std-body {
    padding: 1.5rem;
}

.std-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.std-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-outline {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5rem;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0;
    background: white;
}

.foot-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.foot-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.foot-col ul {
    list-style: none;
}

.foot-col li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.socials a {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-right: 1rem;
}

/* Empty State */
.empty-box {
    text-align: center;
    padding: 4rem;
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: white;
}

/* Search Modal */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    padding-top: 10vh;
}

.search-box {
    width: 100%;
    max-width: 600px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    border: 1px solid var(--border-color);
    overflow: hidden;
    position: relative;
    z-index: 1001;
    height: fit-content;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-header ion-icon {
    font-size: 1.5rem;
    color: var(--text-muted);
}

.search-header input {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-main);
    width: 100%;
    font-weight: 500;
}

.search-header input:focus {
    outline: none;
}

.search-tips {
    padding: 1rem 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-color);
}

.search-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    display: none;
    border-bottom: 1px solid var(--border-color);
}

.search-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: var(--bg-color);
}

.search-item img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f5f9;
}

.search-item-title {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

/* =========================================
   VISUAL ENHANCEMENTS & ANIMATIONS
   ========================================= */

/* 1. Entrance Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-entrance {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* opacity: 0; */
    /* Star invisible */
}

/* Stagger delays */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* 2. Enhanced Card Hovers */
.featured-wrapper {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}

.featured-wrapper:hover {
    transform: translateY(-6px) scale(1.005);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border-color: rgba(22, 163, 74, 0.2);
    /* Slight green tint on border */
}

.std-card {
    transition: all 0.3s ease-out;
    border: 1px solid var(--border-color);
}

.std-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08);
    /* More diffuse shadow */
    border-color: var(--primary-color);
}

/* 3. Button Polish */
.btn-green {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-green::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn-green:hover::after {
    left: 100%;
    transition: 0.5s ease-in-out;
}

/* 4. Sidebar Interaction */
.side-post {
    transition: transform 0.2s ease, background 0.2s;
    padding: 0.5rem;
    margin: 0 -0.5rem 1rem -0.5rem;
    /* Negative margin to allow padding hover w/o layout shift */
    border-radius: 8px;
}

.side-post:hover {
    background: #f8fafc;
    /* Light highlight */
    transform: translateX(4px);
}

[data-theme="dark"] .side-post:hover {
    background: #1e293b;
}

/* 5. Category Pills */
.cat-pill {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* General Smoothness */
html {
    scroll-behavior: smooth;
}

.big-thumb img,
.std-thumb img,
.side-thumb img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s;
}

.featured-wrapper:hover .big-thumb img,
.std-card:hover .std-thumb img {
    transform: scale(1.06);
    filter: brightness(1.05);
    /* Make it pop */
}

/* Responsive Header */
.mobile-toggle,
.mobile-close,
.mobile-only-action {
    display: none;
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--card-bg);
        flex-direction: column;
        padding: 5rem 2rem;
        gap: 2rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-links.mobile-open {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        font-weight: 600;
        display: block;
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        cursor: pointer;
        color: var(--text-main);
        order: 3;
        /* Ensure it's on the right */
        margin-left: 1rem;
    }

    .mobile-close {
        display: block;
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        cursor: pointer;
        color: var(--text-muted);
    }

    .mobile-only-action {
        display: block;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .desktop-only {
        display: none !important;
        /* Force hide desktop elements */
    }

    .header-actions {
        gap: 0.75rem;
    }

    /* Adjust Search Trigger for Mobile */
    .search-trigger {
        font-size: 1.25rem;
        /* Icon only essentially */
    }
}

.search-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}