/* =============================================
   MyMintSave - Main Stylesheet
   ============================================= */

:root {
    --green: #16A34A;
    --green-hover: #15803D;
    --navy: #0F172A;
    --text: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --border: #E5E7EB;
    --accent: #F59E0B;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-md: 0 10px 15px rgba(0,0,0,0.06), 0 4px 6px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-btn: 10px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.3;
}

a {
    color: var(--green);
    text-decoration: none;
    transition: color 0.2s;
}

    a:hover {
        color: var(--green-hover);
    }

img {
    max-width: 100%;
    height: auto;
}

/* ---- Utility ---- */
.text-green {
    color: var(--green) !important;
}

.text-navy {
    color: var(--navy) !important;
}

.text-muted-custom {
    color: var(--text-muted) !important;
}

.bg-green {
    background-color: var(--green) !important;
}

.bg-navy {
    background-color: var(--navy) !important;
}

.bg-light-custom {
    background-color: var(--bg-light) !important;
}

/* ---- Buttons ---- */
.btn-primary-custom {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 12px 28px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

    .btn-primary-custom:hover {
        background: var(--green-hover);
        color: #fff;
        transform: translateY(-1px);
    }

.btn-outline-custom {
    background: transparent;
    color: var(--green);
    border: 2px solid var(--green);
    border-radius: var(--radius-btn);
    padding: 10px 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-outline-custom:hover {
        background: var(--green);
        color: #fff;
    }

/* ---- Header / Navbar ---- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

    .navbar-brand img {
        height: 56px;
        width: auto;
        max-width: none;
        flex-shrink: 0;
    }

.nav-link-custom {
    color: var(--text) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    padding: 8px 9px !important;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

    .nav-link-custom:hover, .nav-link-custom.active {
        color: var(--green) !important;
        background: transparent;
        text-decoration: underline;
        text-decoration-color: var(--green);
    }

.nav-dropdown-hover .dropdown-toggle::after {
    transition: transform 0.2s ease;
    vertical-align: 1px;
}

.nav-dropdown-hover:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.header-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--text);
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}

    .header-icon-btn:hover {
        background: var(--bg-light);
        color: var(--green);
    }

.header-search-form {
    position: relative;
}

.header-search-input {
    width: 0;
    opacity: 0;
    padding: 7px 0;
    border: none;
    border-bottom: 1.5px solid var(--border);
    background: transparent;
    font-size: 14px;
    color: var(--text);
    outline: none;
    transition: width 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
}

.header-search-form:hover .header-search-input,
.header-search-form:focus-within .header-search-input {
    width: 160px;
    opacity: 1;
    padding: 7px 8px;
}

.header-search-input:focus {
    border-bottom-color: var(--green);
}

.btn-header-cta {
    background: var(--green);
    color: #fff !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.02em;
    padding: 10px 20px;
    border-radius: var(--radius-btn);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}

    .btn-header-cta:hover {
        background: var(--green-hover);
        color: #fff;
        transform: translateY(-1px);
    }

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 8px;
    min-width: 200px;
    margin-top: 0 !important;
}

@media (min-width: 1200px) {
    .nav-dropdown-hover {
        position: relative;
    }

        .nav-dropdown-hover .dropdown-menu {
            margin-top: 8px !important;
        }

        .nav-dropdown-hover::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: -8px;
            height: 8px;
        }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text);
}

    .dropdown-item:hover, .dropdown-item:focus {
        background: rgba(22,163,74,0.08);
        color: var(--green);
    }

.dropdown-item-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--green);
}

.dropdown-item:hover .dropdown-item-icon {
    background: rgba(22,163,74,0.12);
}

.dropdown-divider {
    margin: 6px 4px;
    border-color: var(--border);
}

/* Hover-to-open dropdown for desktop, like most international nav menus.
   Falls back to Bootstrap's click toggle automatically on touch (no hover). */
@media (min-width: 1200px) {
    .nav-dropdown-hover .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
        pointer-events: none;
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
    }

        .nav-dropdown-hover:hover .dropdown-menu,
        .nav-dropdown-hover .dropdown-menu.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
            pointer-events: auto;
        }
}

/* ---- Hero Section ---- */
.hero-section {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 40%, #f8fafc 100%);
    padding: 80px 0 70px;
    border-bottom: 1px solid var(--border);
}

    .hero-section h1 {
        font-size: clamp(2rem, 5vw, 3.2rem);
        color: var(--navy);
    }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(22,163,74,0.1);
    color: var(--green);
    border: 1px solid rgba(22,163,74,0.2);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-num {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
}

.hero-stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

/* ---- Section Headers ---- */
.section-header {
    margin-bottom: 36px;
}

.section-label {
    display: inline-block;
    background: rgba(22,163,74,0.1);
    color: var(--green);
    border-left: 3px solid var(--green);
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: var(--navy);
    margin-bottom: 8px;
}

.section-link {
    color: var(--green);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

    .section-link:hover {
        color: var(--green-hover);
    }

/* ---- Category Cards ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

@media (max-width: 1200px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 900px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    display: block;
}

    .category-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--green);
        color: var(--green);
    }

.category-icon {
    margin-bottom: 12px;
    display: block;
}

    .category-icon svg {
        width: 32px;
        height: 32px;
        color: var(--green);
    }

.category-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
}

.category-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ---- Blog / Post Cards ---- */
.post-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .post-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
    }

.post-card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--bg-light);
}

.post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    display: block;
}

.post-card:hover .post-card-img {
    transform: scale(1.04);
}

.post-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dcfce7, #d1fae5);
    font-size: 2.5rem;
}

.post-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
}

    .post-card-title:hover {
        color: var(--green);
    }

.post-card-excerpt {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.post-card-meta-dot {
    color: var(--border);
}

/* Featured Post Card */
.post-card-featured {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.post-card-featured-img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.post-card-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.92) 40%, rgba(15,23,42,0.1) 100%);
}

.post-card-featured-body {
    position: relative;
    z-index: 1;
    padding: 28px;
    color: #fff;
}

    .post-card-featured-body .post-card-title {
        color: #fff;
        font-size: 20px;
    }

        .post-card-featured-body .post-card-title:hover {
            color: var(--accent);
        }

    .post-card-featured-body .post-card-meta {
        color: rgba(255,255,255,0.7);
        border-top-color: rgba(255,255,255,0.2);
    }

.post-card-featured-placeholder {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--navy), #1e3a5f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

/* ---- Sidebar ---- */
.sidebar {
    position: sticky;
    top: 80px;
}

.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-widget-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--green);
}

.sidebar-post {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

    .sidebar-post:last-child {
        margin-bottom: 0;
    }

.sidebar-post-img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-light);
}

.sidebar-post-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
}

    .sidebar-post-title:hover {
        color: var(--green);
    }

.sidebar-post-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.sidebar-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
}

    .sidebar-cat-item:hover {
        color: var(--green);
    }

    .sidebar-cat-item:last-child {
        border-bottom: none;
    }

.sidebar-cat-count {
    background: var(--bg-light);
    color: var(--text-muted);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 50px;
}

.sidebar-cat-icon svg {
    width: 18px;
    height: 18px;
    color: var(--green);
    flex-shrink: 0;
}

/* ---- Ad Slots ---- */
.ad-slot {
    background: var(--bg-light);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ad-slot:empty {
        display: none;
    }

.ad-slot-sidebar {
    min-height: 250px;
}

.ad-slot-in-content {
    min-height: 120px;
    margin: 32px 0;
}

.ad-slot-header {
    min-height: 90px;
}

.ad-slot-footer {
    min-height: 90px;
    margin-top: 32px;
}

/* ---- Newsletter ---- */
.newsletter-section {
    background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
    padding: 64px 0;
    margin: 60px 0 0;
}

    .newsletter-section h2 {
        color: #fff;
    }

    .newsletter-section p {
        color: rgba(255,255,255,0.75);
    }

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 480px;
}

.newsletter-input {
    flex: 1;
    padding: 12px 18px;
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-btn);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

    .newsletter-input::placeholder {
        color: rgba(255,255,255,0.5);
    }

    .newsletter-input:focus {
        border-color: var(--green);
    }

@media (max-width: 480px) {
    .newsletter-form {
        flex-direction: column;
    }
}

/* ---- Footer (NerdWallet-style light) ---- */
.site-footer {
    background: #FBF4E7;
    color: var(--text-muted);
    padding: 64px 0 0;
    border-top: 1px solid #EFE5D1;
}

.footer-logo img {
    height: 42px;
    width: auto;
}

.footer-tagline {
    font-family: 'Poppins', sans-serif;
    color: var(--navy);
    font-size: 1.3rem;
    font-weight: 800;
    margin-top: 14px;
    line-height: 1.25;
}

    .footer-tagline .text-green {
        color: var(--green);
    }

.footer-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 14px;
    max-width: 280px;
}

.footer-heading {
    font-family: 'Poppins', sans-serif;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green);
    display: inline-block;
}

.footer-link {
    display: block;
    color: var(--text-muted);
    font-size: 14.5px;
    padding: 6px 0;
    text-decoration: none;
    transition: color 0.2s;
}

    .footer-link:hover {
        color: var(--green);
    }

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.footer-social-link {
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #EFE5D1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 15px;
    transition: all 0.2s;
}

    .footer-social-link:hover {
        background: var(--green);
        border-color: var(--green);
        color: #fff;
        transform: translateY(-2px);
    }

.footer-app-badge img {
    height: 40px;
    width: auto;
}

.footer-bottom {
    border-top: 1px solid #EFE5D1;
    padding: 22px 0;
    margin-top: 44px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-disclaimer {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    font-size: 12.5px;
    color: var(--text-muted);
    border-left: 3px solid var(--green);
    margin-top: 36px;
}

/* ---- Blog Detail Page ---- */
.article-header {
    padding: 40px 0;
}

.article-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

    .article-breadcrumb a {
        color: var(--text-muted);
    }

        .article-breadcrumb a:hover {
            color: var(--green);
        }

.article-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--navy);
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    font-size: 14px;
    color: var(--text-muted);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-featured-img {
    border-radius: var(--radius);
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin: 28px 0;
    box-shadow: var(--shadow);
}

.article-body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}

    .article-body h2 {
        font-size: 1.5rem;
        color: var(--navy);
        margin: 36px 0 16px;
        padding-top: 8px;
        border-top: 2px solid var(--border);
    }

    .article-body h3 {
        font-size: 1.2rem;
        color: var(--navy);
        margin: 28px 0 12px;
    }

    .article-body p {
        margin-bottom: 20px;
    }

    .article-body ul, .article-body ol {
        margin: 0 0 20px 0;
        padding-left: 24px;
    }

    .article-body li {
        margin-bottom: 8px;
    }

    .article-body a {
        color: var(--green);
        font-weight: 500;
        border-bottom: 1px solid transparent;
    }

        .article-body a:hover {
            border-bottom-color: var(--green);
        }

    .article-body blockquote {
        border-left: 4px solid var(--green);
        background: var(--bg-light);
        padding: 16px 20px;
        margin: 28px 0;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        font-style: italic;
        color: var(--text-muted);
    }

    .article-body img {
        border-radius: var(--radius-sm);
        margin: 20px 0;
        box-shadow: var(--shadow-sm);
    }

    .article-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .article-body th, .article-body td {
        padding: 12px 16px;
        text-align: left;
        border: 1px solid var(--border);
        font-size: 15px;
        white-space: normal;
    }

    .article-body th {
        background: var(--bg-light);
        font-weight: 700;
        color: var(--navy);
    }

    .article-body tr:nth-child(even) {
        background: var(--bg-light);
    }

    /* In-content ad insertion */
    .article-body .in-content-ad {
        margin: 32px 0;
    }

/* FAQ Section */
.faq-section {
    margin: 48px 0;
}

    .faq-section h2 {
        font-size: 1.4rem;
        margin-bottom: 24px;
    }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    transition: background 0.2s;
}

    .faq-question:hover {
        background: var(--bg-light);
    }

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s;
    font-size: 15px;
    color: var(--text-muted);
}

.faq-item.open .faq-answer {
    max-height: 300px;
    padding: 0 20px 16px;
}

.faq-icon {
    font-size: 18px;
    transition: transform 0.3s;
    color: var(--green);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

/* Post Navigation */
.post-nav {
    display: flex;
    gap: 16px;
    margin: 48px 0;
}

.post-nav-card {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

    .post-nav-card:hover {
        border-color: var(--green);
        box-shadow: var(--shadow);
        color: var(--text);
    }

.post-nav-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.post-nav-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
}

.post-nav-card.next {
    text-align: right;
}

/* Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-pill {
    background: var(--bg-light);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 4px 14px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

    .tag-pill:hover {
        background: var(--green);
        color: #fff;
        border-color: var(--green);
    }

/* Author Box */
.author-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: var(--bg-light);
    margin: 36px 0;
}

.author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--border);
    flex-shrink: 0;
}

.author-avatar-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.author-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
}

.author-bio {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ---- Breadcrumbs ---- */
.breadcrumb-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    margin-bottom: 8px;
}

    .breadcrumb-custom a {
        color: var(--text-muted);
        text-decoration: none;
    }

        .breadcrumb-custom a:hover {
            color: var(--green);
        }

.breadcrumb-sep {
    color: var(--border);
    font-size: 12px;
}

.breadcrumb-current {
    color: var(--green);
    font-weight: 500;
}

/* ---- Search ---- */
.search-hero {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
}

.search-form-big {
    display: flex;
    gap: 0;
    max-width: 560px;
}

.search-input-big {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-btn) 0 0 var(--radius-btn);
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s;
}

    .search-input-big:focus {
        border-color: var(--green);
    }

.search-btn-big {
    background: var(--green);
    color: #fff;
    border: 2px solid var(--green);
    border-radius: 0 var(--radius-btn) var(--radius-btn) 0;
    padding: 0 24px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

    .search-btn-big:hover {
        background: var(--green-hover);
    }

/* ---- Pagination ---- */
.pagination-custom {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}

    .page-btn:hover, .page-btn.active {
        background: var(--green);
        color: #fff;
        border-color: var(--green);
    }

    .page-btn.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
    }

/* ---- Contact ---- */
.contact-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-label-custom {
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
    margin-bottom: 6px;
    display: block;
}

.form-control-custom {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    background: var(--white);
}

    .form-control-custom:focus {
        border-color: var(--green);
    }

    .form-control-custom.textarea {
        resize: vertical;
        min-height: 120px;
    }

/* ---- Page Not Found ---- */
.not-found-section {
    padding: 100px 0;
    text-align: center;
}

.not-found-code {
    font-size: 8rem;
    font-weight: 900;
    color: rgba(22,163,74,0.15);
    font-family: 'Poppins', sans-serif;
    line-height: 1;
}

/* ---- Success / Error Alerts ---- */
.alert-success-custom {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error-custom {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}

/* ---- Badges ---- */
.badge-featured {
    background: var(--accent);
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
}

.badge-editors-pick {
    background: var(--green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
}

.badge-draft {
    background: #fef9c3;
    color: #854d0e;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 50px;
}

.badge-published {
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 50px;
}

/* ---- Reading progress bar ---- */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--green), var(--accent));
    z-index: 9999;
    transition: width 0.1s;
}

/* ---- Responsive ---- */
/* Collapsed navbar covers up to xl (1199.98px) now that navbar-expand-xl is used.
   Search expands via hover/focus-within, which doesn't exist on touch and looks
   odd in a vertical collapsed menu — keep it visible and full-width instead. */
@media (max-width: 1199.98px) {
    .header-search-form {
        width: 100%;
    }

        .header-search-input,
        .header-search-form:hover .header-search-input,
        .header-search-form:focus-within .header-search-input {
            width: 100%;
            opacity: 1;
            padding: 8px 10px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-sm);
        }

    .btn-header-cta {
        width: 100%;
        text-align: center;
    }

    .navbar-collapse .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 48px 0;
    }

    .post-nav {
        flex-direction: column;
    }

    .author-box {
        flex-direction: column;
    }

    .article-body {
        font-size: 16px;
    }

        .article-body th, .article-body td {
            padding: 8px 10px;
            font-size: 13px;
        }

    .newsletter-section {
        padding: 48px 0;
    }
}

@media (max-width: 576px) {
    .site-header .navbar-brand img {
        height: 44px;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }
}

/* ---- Print ---- */
@media print {
    .site-header, .site-footer, .sidebar, .newsletter-section, .post-nav, .ad-slot {
        display: none !important;
    }

    .article-body {
        font-size: 12pt;
    }
}

/* ---- Mobile nav toggle: remove default focus box ---- */
.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}
