/* GMC Website Stylesheet - Apple Liquid Glass Theme (Default Light Mode) */
@import url('fonts.css');

:root {
    /* Brand Colors requested: #55B848 & #2B499D */
    --green-primary: #55B848;
    --green-hover: #449c39;
    --secondary-color: #2B499D;
    --secondary-hover: #1e3678;
    --navy-deep: #1e293b;
    
    /* Light Mode Accent Colors */
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-amber: #fbbf24;
    
    /* Apple Liquid Glass Light Palette (Default) */
    --bg-main: #f8fafc;
    --bg-mesh: radial-gradient(circle at 10% 10%, rgba(85, 184, 72, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(43, 73, 157, 0.08) 0%, transparent 45%),
                linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    --glass-card-bg: rgba(255, 255, 255, 0.72);
    --glass-card-border: rgba(255, 255, 255, 0.85);
    --glass-card-border-subtle: rgba(43, 73, 157, 0.1);
    --glass-shadow: 0 10px 30px -5px rgba(43, 73, 157, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04), inset 0 1px 0 0 rgba(255, 255, 255, 0.9);
    --glass-shadow-hover: 0 20px 40px -10px rgba(43, 73, 157, 0.15), 0 4px 12px 0 rgba(0, 0, 0, 0.06), inset 0 1px 0 0 rgba(255, 255, 255, 1);
    --glass-blur: blur(20px) saturate(190%);
    
    /* Light Mode Text Colors */
    --text-heading: #2B499D;
    --text-body: #334155;
    --text-muted: #64748b;
    
    --google-font: 'DMSans', 'Inter', system-ui, -apple-system, sans-serif;
    --base-font-size: 16px;
    --border-radius: 14px;
    --container-padding: 20px;
    --section-spacing: 80px;
}

/* Dark Mode Overrides (when body has .dark-mode) */
body.dark-mode {
    /* Brand Colors for Dark Mode */
    --green-primary: #4ade80;
    --green-hover: #22c55e;
    --secondary-color: #38bdf8;
    --secondary-hover: #0ea5e9;
    --navy-deep: #0f172a;
    --primary-color: #38bdf8;
    
    /* Modern Dark Mode Palette */
    --bg-main: #0f172a;
    --bg-mesh: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(74, 222, 128, 0.12) 0%, transparent 50%),
                linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    
    /* Modern Dark Glass Cards */
    --glass-card-bg: rgba(30, 41, 59, 0.7);
    --glass-card-border: rgba(56, 189, 248, 0.3);
    --glass-card-border-subtle: rgba(56, 189, 248, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    --glass-shadow-hover: 0 12px 40px rgba(56, 189, 248, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
    --glass-blur: blur(16px) saturate(150%);
    
    /* Dark Mode Text Colors */
    --text-heading: #f1f5f9;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Additional Dark Mode Variables */
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-amber: #fbbf24;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
box-sizing: border-box;
}

html {
    font-size: var(--base-font-size);
    scroll-behavior: smooth;
}

body {
    font-family: var(--google-font);
    line-height: 1.6;
    color: var(--text-body);
    background: var(--bg-mesh);
    background-attachment: fixed;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Typography & Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-body);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Subtitle Overlines */
.subtitle-overline, .section-subtitle, .text-amber {
    color: var(--primary-color) !important;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--container-padding);
}

/* Section Styles */
section {
    padding: var(--section-spacing) 0;
    position: relative;
}

.bg-dark-section {
    background: rgba(241, 245, 249, 0.6);
}
body.dark-mode .bg-dark-section {
    background: rgba(30, 41, 59, 0.5) !important;
    border-top: 1px solid rgba(56, 189, 248, 0.1);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}

.section-title {
    text-align: left;
    margin-bottom: 3rem;
}

.section-title.text-center {
    text-align: center;
}

.section-title h2 {
    font-size: 2.25rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
    border-radius: 30px;
}

.btn-primary, .btn-cyan, .btn-green {
    background: linear-gradient(135deg, #55B848 0%, #449c39 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(85, 184, 72, 0.35);
}

.btn-primary:hover, .btn-cyan:hover, .btn-green:hover {
    background: linear-gradient(135deg, #46a139 0%, #38862d 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(85, 184, 72, 0.45);
}

.btn-secondary, .btn-amber, .btn-navy {
    background: linear-gradient(135deg, #2B499D 0%, #1e3678 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(43, 73, 157, 0.35);
}

.btn-secondary:hover, .btn-amber:hover, .btn-navy:hover {
    background: linear-gradient(135deg, #1e3678 0%, #152656 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(43, 73, 157, 0.45);
}

.btn-outline-navy {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1.5px solid #2B499D !important;
    color: #2B499D !important;
    backdrop-filter: var(--glass-blur);
}

body.dark-mode .btn-outline-navy {
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: var(--green-primary) !important;
    color: var(--text-body) !important;
}

.btn-outline-navy:hover {
    background: #2B499D !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Liquid Glass Cards */
.card, .project-card, .service-card, .info-card, .feature-card, .team-card, .tool-card, .value-card, .pillar-card, .benefit-card {
    background: var(--glass-card-bg) !important;
    border: 1px solid var(--glass-card-border-subtle) !important;
    border-radius: var(--border-radius) !important;
    padding: 1.75rem;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow) !important;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    color: var(--text-body) !important;
}

.card:hover, .project-card:hover, .service-card:hover, .info-card:hover, .tool-card:hover, .pillar-card:hover {
    transform: translateY(-6px);
    border-color: rgba(85, 184, 72, 0.4) !important;
    box-shadow: var(--glass-shadow-hover) !important;
}

.card-title, h3.card-title {
    color: var(--text-heading) !important;
    font-size: 1.35rem;
    font-weight: 800;
}

/* ===== Shared Page Components (theme-aware) ===== */
/* Icon box badge used on info / feature / service cards */
.info-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(85, 184, 72, 0.12);
    border: 1px solid rgba(85, 184, 72, 0.25);
    color: var(--green-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}
body.dark-mode .info-icon-box {
    background: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.25);
    color: var(--green-primary);
}

/* Category / badge pill */
.badge-primary {
    background: var(--green-primary) !important;
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
}

/* Outline accent button */
.btn-outline-cyan {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1.5px solid var(--green-primary) !important;
    color: var(--green-primary) !important;
    backdrop-filter: blur(8px);
}
body.dark-mode .btn-outline-cyan {
    background: rgba(56, 189, 248, 0.1) !important;
    border-color: var(--green-primary) !important;
    color: var(--green-primary) !important;
}
.btn-outline-cyan:hover {
    background: var(--green-primary) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

/* Project location meta row */
.project-location {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Call-to-action glass panel */
.cta-section {
    background: var(--glass-card-bg);
    border: 1px solid var(--glass-card-border-subtle);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    text-align: center;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: var(--glass-shadow);
}
.cta-section h2 {
    color: var(--text-heading);
}
.cta-section p {
    color: var(--text-muted);
}

/* In light mode, ensure headings tagged text-white on light surfaces stay readable.
   (Only applies outside dark-mode; dark surfaces keep their own colors.) */
body:not(.dark-mode) h1.text-white,
body:not(.dark-mode) h2.text-white,
body:not(.dark-mode) h3.text-white,
body:not(.dark-mode) h4.text-white,
body:not(.dark-mode) h5.text-white,
body:not(.dark-mode) h6.text-white {
    color: var(--text-heading) !important;
}

/* ===== Topbar (Above Navbar) ===== */
.site-topbar {
    background: linear-gradient(135deg, #2B499D 0%, #1e3678 100%);
    color: #ffffff;
    font-size: 0.85rem;
    padding: 0.45rem 0;
    position: relative;
    z-index: 1001;
}

body.dark-mode .site-topbar {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.topbar-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.topbar-link:hover {
    color: #55B848;
}

.topbar-link i {
    color: #55B848;
    font-size: 0.9rem;
}

body.dark-mode .topbar-link {
    color: var(--text-body);
}

.topbar-text strong {
    color: #ffffff;
    font-weight: 700;
}

body.dark-mode .topbar-text strong {
    color: var(--text-heading);
}

.topbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.25s ease;
}

.topbar-btn:hover {
    background: #55B848;
    border-color: #55B848;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(85, 184, 72, 0.4);
}

.topbar-btn-profile {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
}

.topbar-btn-profile:hover {
    background: #2B499D;
    border-color: #2B499D;
    box-shadow: 0 4px 12px rgba(43, 73, 157, 0.4);
}

@media (max-width: 768px) {
    .topbar-inner {
        justify-content: center;
    }
    .topbar-left {
        justify-content: center;
        gap: 1rem;
    }
    .topbar-text {
        display: none;
    }
    .topbar-link {
        font-size: 0.95rem;
    }
}

/* ===== Company Profile Reader ===== */
.company-profile-page {
    padding: 3rem 0 4rem;
}

.profile-hero {
    text-align: center;
    padding: 2.5rem 0 2rem;
}

.profile-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.profile-hero p {
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto;
}

.profile-reader-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 20px;
    box-shadow: 0 10px 40px -10px rgba(43, 73, 157, 0.15), 0 2px 8px rgba(0,0,0,0.05);
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

body.dark-mode .profile-reader-card {
    background: rgba(16, 30, 48, 0.8);
    border-color: rgba(30, 56, 87, 0.8);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
}

.profile-reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid rgba(43, 73, 157, 0.1);
    flex-wrap: wrap;
}

body.dark-mode .profile-reader-toolbar {
    border-bottom-color: #1e3857;
}

.profile-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.profile-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(43, 73, 157, 0.15);
    background: rgba(255, 255, 255, 0.7);
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

body.dark-mode .profile-toolbar-btn {
    background: rgba(9, 20, 36, 0.8);
    border-color: #1e3857;
    color: #cbd5e1;
}

.profile-toolbar-btn:hover {
    background: #55B848;
    border-color: #55B848;
    color: #ffffff;
}

.profile-toolbar-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.profile-page-indicator {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0 0.4rem;
    white-space: nowrap;
}

.profile-zoom-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 3rem;
    text-align: center;
}

.profile-reader-stage {
    position: relative;
    background: #e8edf4;
    min-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow: hidden;
}

body.dark-mode .profile-reader-stage {
    background: #050b13;
}

.profile-page-wrap {
    position: relative;
    transition: transform 0.35s ease, opacity 0.35s ease;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    border-radius: 4px;
    line-height: 0;
    background: #ffffff;
}

.profile-page-wrap canvas {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.profile-page-wrap.flipping {
    opacity: 0.4;
    transform: translateX(-30px) rotateY(6deg);
}

.profile-reader-stage.click-hint {
    cursor: pointer;
}

.profile-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(232, 237, 244, 0.9);
    z-index: 5;
    text-align: center;
    padding: 2rem;
}

body.dark-mode .profile-loading {
    background: rgba(5, 11, 19, 0.9);
}

.profile-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    color: #55B848 !important;
}

.profile-loading p {
    color: var(--text-muted);
    font-weight: 600;
}

.profile-reader-stage .click-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30%;
    z-index: 3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: rgba(43, 73, 157, 0.35);
    transition: all 0.25s ease;
}

body.dark-mode .profile-reader-stage .click-zone {
    color: rgba(255, 255, 255, 0.2);
}

.profile-reader-stage .click-zone.prev {
    left: 0;
}

.profile-reader-stage .click-zone.next {
    right: 0;
}

.profile-reader-stage .click-zone:hover {
    color: #55B848;
    background: rgba(85, 184, 72, 0.08);
}

.profile-thumbnail-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    overflow-x: auto;
    border-top: 1px solid rgba(43, 73, 157, 0.1);
    background: rgba(255, 255, 255, 0.5);
}

body.dark-mode .profile-thumbnail-strip {
    border-top-color: #1e3857;
    background: rgba(9, 20, 36, 0.5);
}

.profile-thumbnail {
    flex-shrink: 0;
    width: 56px;
    height: 72px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    background: #ffffff;
    padding: 0;
}

.profile-thumbnail canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-thumbnail:hover {
    opacity: 1;
}

.profile-thumbnail.active {
    border-color: #55B848;
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(85, 184, 72, 0.2);
}

.profile-thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.profile-thumbnail-strip::-webkit-scrollbar-thumb {
    background: rgba(43, 73, 157, 0.3);
    border-radius: 3px;
}

.profile-reader-error {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.profile-reader-error i {
    font-size: 3rem;
    color: #d97706;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .profile-reader-stage {
        min-height: 320px;
        padding: 0.75rem;
    }
    .profile-toolbar-btn {
        width: 34px;
        height: 34px;
    }
}

/* Header Styles - Liquid Glass */
.site-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(25px) saturate(190%) !important;
    -webkit-backdrop-filter: blur(25px) saturate(190%) !important;
    border-bottom: 1px solid rgba(43, 73, 157, 0.08) !important;
    box-shadow: 0 4px 20px rgba(43, 73, 157, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.9rem 0;
}

body.dark-mode .site-header {
    background: rgba(15, 23, 42, 0.9) !important;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15) !important;
}

.main-nav .nav {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav .nav-link {
    color: #334155 !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

body.dark-mode .main-nav .nav-link {
    color: var(--text-body) !important;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: #55B848 !important;
}

.main-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 3px;
    background: #55B848;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(85, 184, 72, 0.5);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #2B499D !important;
}

body.dark-mode .mobile-menu-toggle {
    color: var(--green-primary) !important;
}

/* Mobile Nav Drawer */
@media (max-width: 991px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(25px) saturate(190%);
        -webkit-backdrop-filter: blur(25px) saturate(190%);
        padding: 1.5rem;
        border-bottom: 1px solid rgba(43, 73, 157, 0.12);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    }
    
    body.dark-mode .main-nav {
        background: rgba(15, 23, 42, 0.95);
        border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    }
    
    .main-nav.active {
        display: block;
        animation: fadeIn 0.3s ease forwards;
    }
    
    .main-nav .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}

/* Mobile: Hide topbar and show its options inside the nav drawer */
@media (max-width: 991px) {
    .site-topbar {
        display: none;
    }
}

.mobile-nav-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: rgba(43, 73, 157, 0.06);
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

body.dark-mode .mobile-nav-link {
    background: rgba(56, 189, 248, 0.1);
    color: var(--text-body);
}

.mobile-nav-link i {
    color: var(--green-primary);
    width: 1.1rem;
    text-align: center;
    font-size: 0.95rem;
}

.mobile-nav-link:hover {
    background: var(--green-primary);
    color: #ffffff;
    transform: translateX(3px);
}

.mobile-nav-link:hover i {
    color: #ffffff;
}

/* Forms */
.form-control, .form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(43, 73, 157, 0.15) !important;
    border-radius: 10px !important;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.8) !important;
    color: #1e293b !important;
    transition: all 0.3s ease;
}

body.dark-mode .form-control, body.dark-mode .form-select {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(56, 189, 248, 0.2) !important;
    color: var(--text-body) !important;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #55B848 !important;
    box-shadow: 0 0 0 3px rgba(85, 184, 72, 0.2) !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(85, 184, 72, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 90% 80%, rgba(43, 73, 157, 0.12) 0%, transparent 50%),
                linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

body.dark-mode .hero-section {
    background: radial-gradient(circle at 50% 20%, rgba(74, 222, 128, 0.15) 0%, rgba(15, 23, 42, 1) 70%);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #2B499D !important;
    margin-bottom: 1.25rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
body.dark-mode .hero-title {
    color: var(--text-heading) !important;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.25rem;
    color: #475569;
    max-width: 650px;
}
body.dark-mode .hero-subtitle {
    color: var(--text-muted);
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, rgba(43, 73, 157, 0.06) 0%, rgba(85, 184, 72, 0.06) 100%);
    border-bottom: 1px solid rgba(43, 73, 157, 0.08);
    color: #2B499D;
    padding: 4.5rem 0 3.5rem;
    text-align: left;
}

body.dark-mode .page-hero {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--text-heading);
}

.page-hero-content h1 {
    color: #2B499D !important;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}
body.dark-mode .page-hero-content h1 {
    color: var(--text-heading) !important;
}

/* Footer */
.site-footer {
      background: #0f172a !important;
      color: #94a3b8 !important;
      padding: 4rem 0 2rem;
      border-top: 1px solid #1e293b;
  }

.site-footer h4 {
      color: #ffffff !important;
      font-size: 1.1rem;
      margin-bottom: 1.25rem;
  }

.site-footer a {
      color: #94a3b8;
      text-decoration: none;
      transition: color 0.3s ease;
  }

.site-footer a:hover {
      color: #55B848;
  }

.footer-bottom {
      border-top: 1px solid #1e293b;
      padding-top: 1.5rem;
      margin-top: 3rem;
      font-size: 0.85rem;
  }

.site-footer p {
      color: #94a3b8;
  }
.site-footer .text-muted {
      color: #94a3b8 !important;
  }
.site-footer .social-links a {
      width: 38px;
      height: 38px;
      border-radius: 50%;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.12);
      color: #94a3b8;
      margin-right: 0.5rem;
      transition: all 0.3s ease;
  }
.site-footer .social-links a:hover {
      background: #55B848;
      border-color: #55B848;
      color: #ffffff;
      transform: translateY(-3px);
  }
.site-footer .footer-contact p {
      display: flex;
      align-items: flex-start;
      gap: 0.6rem;
      margin-bottom: 0.75rem;
      font-size: 0.9rem;
  }
.site-footer .footer-contact p i {
      color: #55B848;
      margin-top: 0.2rem;
  }
.site-footer .footer-links ul {
      list-style: none;
      padding: 0;
      margin: 0;
  }
.site-footer .footer-links li {
      margin-bottom: 0.55rem;
  }
.site-footer .footer-links a {
      font-size: 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
  }
.site-footer .footer-links a::before {
      content: '\f105';
      font-family: 'Font Awesome 6 Free';
      font-weight: 900;
      font-size: 0.7rem;
      color: #55B848;
      transition: transform 0.3s ease;
  }
.site-footer .footer-links a:hover::before {
      transform: translateX(3px);
  }
[dir="rtl"] .site-footer .footer-links a::before {
      content: '\f104';
  }
[dir="rtl"] .site-footer .footer-links a:hover::before {
      transform: translateX(-3px);
  }

/* Footer Styling Improvements */
.site-footer {
    padding: 4rem 0 2rem;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #94a3b8;
    border-top: 1px solid rgba(43, 73, 157, 0.1);
}

.site-footer h4 {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-footer .footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer .footer-links ul li {
    margin-bottom: 0.75rem;
}

.site-footer .footer-links ul li a {
    color: #94a3b8;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 0;
}

.site-footer .footer-links ul li a:hover {
    color: var(--green-primary);
    padding-left: 8px;
}

.site-footer .footer-links ul li a::before {
    content: '→';
    position: absolute;
    left: -12px;
    opacity: 0;
    transition: all 0.3s ease;
    color: var(--green-primary);
}

.site-footer .footer-links ul li a:hover::before {
    opacity: 1;
    left: 0;
}

[dir="rtl"] .site-footer .footer-links ul li a {
    padding-right: 0;
}

[dir="rtl"] .site-footer .footer-links ul li a:hover {
    padding-right: 8px;
    padding-left: 0;
}

[dir="rtl"] .site-footer .footer-links ul li a::before {
    content: '←';
    right: -12px;
    left: auto;
}

[dir="rtl"] .site-footer .footer-links ul li a:hover::before {
    right: 0;
    left: auto;
}

.site-footer .footer-contact p {
    margin-bottom: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-footer .footer-contact p i {
    color: var(--green-primary);
    width: 20px;
    text-align: center;
}

.site-footer .footer-contact p a {
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.site-footer .footer-contact p a:hover {
    color: var(--green-primary);
}

.site-footer .social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.site-footer .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    transition: all 0.3s ease;
}

.site-footer .social-links a:hover {
    background: var(--green-primary);
    border-color: var(--green-primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(85, 184, 72, 0.4);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(43, 73, 157, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
}

/* Floating Theme Toggle (Left Side) */
.floating-theme-toggle {
    position: fixed;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    width: 3rem;
    padding: 0.8rem 0;
    border: 1px solid rgba(43, 73, 157, 0.2);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-theme-toggle i {
    font-size: 1.15rem;
    color: var(--secondary-color);
}

.floating-theme-toggle .floating-theme-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.08em;
}

.floating-theme-toggle:hover {
    transform: translateY(-50%) scale(1.06);
    border-color: #55B848;
    box-shadow: 0 8px 24px rgba(85, 184, 72, 0.25);
}

.floating-theme-toggle:hover i {
    color: #55B848;
}

body.dark-mode .floating-theme-toggle {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(56, 189, 248, 0.2);
}

body.dark-mode .floating-theme-toggle i {
    color: var(--accent-amber);
}

/* RTL adjustment: float on the right side in RTL mode */
[dir="rtl"] .floating-theme-toggle {
    left: auto;
    right: 1.25rem;
}

/* Hide the floating theme toggle on mobile/tablet (the toggle lives in the nav drawer instead) */
@media (max-width: 991px) {
    .floating-theme-toggle {
        display: none !important;
    }
    /* Ensure the mobile nav drawer sits above the theme toggle layer */
    .main-nav {
        z-index: 2100;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* RTL Support */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* ===== BLOG STYLES ===== */
/* Post cards */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}
.blog-card:hover {
    transform: translateY(-5px);
}

/* Featured post card */
.featured-post-card {
    border: 2px solid rgba(85, 184, 72, 0.3) !important;
}
.featured-post-card:hover {
    border-color: rgba(85, 184, 72, 0.6) !important;
}

/* Post content typography (rendered from TipTap) */
.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-body);
}
.blog-post-content p {
    margin-bottom: 1.5rem;
}
.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-heading);
}
.blog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}
.blog-post-content blockquote {
    border-left: 4px solid var(--green-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(85, 184, 72, 0.08);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: var(--text-muted);
}
[dir="rtl"] .blog-post-content blockquote {
    border-left: none;
    border-right: 4px solid var(--green-primary);
    border-radius: 12px 0 0 12px;
}
.blog-post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 12px;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.blog-post-content ul,
.blog-post-content ol {
    margin: 1rem 0 1.5rem;
    padding-left: 1.75rem;
}
.blog-post-content a {
    color: var(--secondary-color);
    text-decoration: underline;
}
.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}
.blog-post-content table th,
.blog-post-content table td {
    border: 1px solid var(--glass-card-border-subtle);
    padding: 0.75rem;
}
.blog-post-content table th {
    background: rgba(85, 184, 72, 0.1);
    font-weight: 700;
}
.blog-post-content ul[data-type="taskList"] {
    list-style: none;
    padding-left: 0;
}
.blog-post-content ul[data-type="taskList"] li {
    display: flex;
    gap: 0.5rem;
}

/* Author bio card */
.author-bio {
    background: var(--glass-card-bg) !important;
    border: 1px solid var(--glass-card-border-subtle) !important;
}

/* Post nav cards */
.post-nav-card:hover {
    border-color: rgba(85, 184, 72, 0.4) !important;
}

/* Comment cards */
.comment-card {
    background: var(--glass-card-bg) !important;
}

/* Post hero with background image */
.post-hero-has-image .page-hero-content h1 {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Tag pills in editor */
.badge-navy {
    background: #2B499D !important;
    color: #ffffff !important;
}
.post-tag {
    cursor: default;
}
.post-tag i {
    cursor: pointer;
    margin-left: 0.35rem;
    opacity: 0.7;
}
.post-tag i:hover {
    opacity: 1;
}

/* Preview banner */
.preview-banner {
    padding: 0.5rem 1rem;
    font-weight: 600;
}

/* ===== TIPTAP EDITOR (admin) ===== */
.editor-toolbar .btn {
    border-radius: 8px;
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
}
.editor-toolbar .btn:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
}
.prose-editor {
    min-height: 400px;
}
.prose-editor .ProseMirror {
    outline: none;
    min-height: 400px;
}
.prose-editor .ProseMirror p {
    margin-bottom: 1rem;
}
.prose-editor .ProseMirror h1,
.prose-editor .ProseMirror h2,
.prose-editor .ProseMirror h3 {
    margin: 1.25rem 0 0.75rem;
}
.prose-editor .ProseMirror img {
    max-width: 100%;
    border-radius: 8px;
}
.prose-editor .ProseMirror blockquote {
    border-left: 4px solid #55B848;
    padding-left: 1rem;
    margin: 1rem 0;
    color: #64748b;
    font-style: italic;
}
.prose-editor .ProseMirror pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
}
.prose-editor .ProseMirror ul {
    list-style: disc;
    padding-left: 1.5rem;
}
.prose-editor .ProseMirror ol {
    list-style: decimal;
    padding-left: 1.5rem;
}
.prose-editor .ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    color: #94a3b8;
    float: left;
    height: 0;
    pointer-events: none;
}
.prose-editor .ProseMirror table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}
.prose-editor .ProseMirror table th,
.prose-editor .ProseMirror table td {
    border: 1px solid #cbd5e1;
    padding: 0.5rem;
}
.prose-editor .ProseMirror ul[data-type="taskList"] {
    list-style: none;
    padding-left: 0;
}
.prose-editor .ProseMirror ul[data-type="taskList"] li {
    display: flex;
    gap: 0.5rem;
}

/* Dark Mode Improvements */
body.dark-mode {
    --primary-color: #38bdf8;
    --secondary-color: #4ade80;
    --bg-main: #0f172a;
    --bg-mesh: radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(74, 222, 128, 0.12) 0%, transparent 50%),
                linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --glass-card-bg: rgba(30, 41, 59, 0.7);
    --glass-card-border: rgba(56, 189, 248, 0.3);
    --glass-card-border-subtle: rgba(56, 189, 248, 0.15);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
    --glass-shadow-hover: 0 12px 40px rgba(56, 189, 248, 0.2), 0 4px 12px rgba(0, 0, 0, 0.3);
    --text-heading: #f1f5f9;
    --text-body: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-cyan: #22d3ee;
    --accent-purple: #a78bfa;
    --accent-amber: #fbbf24;
    --accent-green: #4ade80;
}

/* Force text color inheritance in dark mode */
body.dark-mode p,
body.dark-mode .text,
body.dark-mode .description,
body.dark-mode .content,
body.dark-mode .excerpt,
body.dark-mode .card-text,
body.dark-mode .card-body p,
body.dark-mode .card-body span,
body.dark-mode .card-body div {
    color: var(--text-body) !important;
}

body.dark-mode .card-title,
body.dark-mode .card-body h1,
body.dark-mode .card-body h2,
body.dark-mode .card-body h3,
body.dark-mode .card-body h4,
body.dark-mode .card-body h5,
body.dark-mode .card-body h6 {
    color: var(--text-heading) !important;
}

/* Global dark mode text override */
body.dark-mode {
    color: var(--text-body) !important;
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode li,
body.dark-mode td,
body.dark-mode .card-text,
body.dark-mode .card-body,
body.dark-mode .description,
body.dark-mode .excerpt,
body.dark-mode .content {
    color: var(--text-body) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .h1,
body.dark-mode .h2,
body.dark-mode .h3,
body.dark-mode .h4,
body.dark-mode .h5,
body.dark-mode .h6 {
    color: var(--text-heading) !important;
}

body.dark-mode .card {
    background: var(--glass-card-bg);
    border-color: var(--glass-card-border);
}

body.dark-mode .card:hover {
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(56, 189, 248, 0.4);
}

body.dark-mode .form-control,
body.dark-mode .form-select {
    background: rgba(30, 41, 59, 0.8) !important;
    border-color: rgba(56, 189, 248, 0.2) !important;
    color: var(--text-body) !important;
}

body.dark-mode .form-control:focus,
body.dark-mode .form-select:focus {
    background: rgba(30, 41, 59, 0.9) !important;
    border-color: var(--green-primary) !important;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.15);
}

body.dark-mode::-webkit-scrollbar {
    width: 10px;
}

body.dark-mode::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

body.dark-mode::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 5px;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.5);
}

body.dark-mode .modal-content {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.2);
    color: var(--text-body);
}

body.dark-mode .modal-header {
    border-bottom-color: rgba(56, 189, 248, 0.15);
}

body.dark-mode .modal-footer {
    border-top-color: rgba(56, 189, 248, 0.15);
}

body.dark-mode .dropdown-menu {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(56, 189, 248, 0.2);
}

body.dark-mode .dropdown-item {
    color: var(--text-body);
}

body.dark-mode .dropdown-item:hover {
    background: rgba(56, 189, 248, 0.1);
    color: var(--text-heading);
}

body.dark-mode .alert {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.2);
    color: var(--text-body);
}

body.dark-mode .alert-success {
    background: rgba(74, 222, 128, 0.15);
    border-color: rgba(74, 222, 128, 0.3);
    color: #bbf7d0;
}

body.dark-mode .alert-info {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.3);
    color: #bae6fd;
}

body.dark-mode .alert-warning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.3);
    color: #fef3c7;
}

body.dark-mode .alert-danger {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.3);
    color: #fecaca;
}

body.dark-mode .badge {
    background: rgba(56, 189, 248, 0.2);
    color: var(--text-heading);
}

body.dark-mode .badge.bg-success {
    background: rgba(74, 222, 128, 0.2) !important;
    color: #bbf7d0 !important;
}

body.dark-mode .badge.bg-primary {
    background: rgba(56, 189, 248, 0.2) !important;
    color: #bae6fd !important;
}

body.dark-mode .badge.bg-secondary {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #cbd5e1 !important;
}

body.dark-mode .page-link {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.2);
    color: var(--text-body);
}

body.dark-mode .page-link:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--green-primary);
    color: var(--text-heading);
}

body.dark-mode .page-item.active .page-link {
    background: var(--green-primary);
    border-color: var(--green-primary);
    color: white;
}

body.dark-mode .nav-tabs .nav-link {
    color: var(--text-muted);
    border-color: transparent;
}

body.dark-mode .nav-tabs .nav-link:hover {
    color: var(--text-body);
    border-color: rgba(56, 189, 248, 0.2);
}

body.dark-mode .nav-tabs .nav-link.active {
    color: var(--text-heading);
    background: rgba(30, 41, 59, 0.5);
    border-color: rgba(56, 189, 248, 0.3);
    border-bottom-color: transparent;
}

body.dark-mode .input-group-text {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(56, 189, 248, 0.2);
    color: var(--text-body);
}

body.dark-mode code,
body.dark-mode pre {
    background: rgba(15, 23, 42, 0.8);
    color: #e2e8f0;
}

body.dark-mode pre {
    border-color: rgba(56, 189, 248, 0.2);
}

body.dark-mode blockquote {
    border-left-color: var(--green-primary);
    color: var(--text-muted);
}

body.dark-mode hr {
    border-color: rgba(56, 189, 248, 0.15);
}

body.dark-mode a:hover {
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

body.dark-mode :focus-visible {
    outline: 2px solid var(--green-primary);
    outline-offset: 2px;
}

body.dark-mode ::selection {
    background: rgba(74, 222, 128, 0.3);
    color: white;
}

body.dark-mode * {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Dark Mode Text Elements */
body.dark-mode p,
body.dark-mode span,
body.dark-mode div,
body.dark-mode li,
body.dark-mode td,
body.dark-mode th,
body.dark-mode label,
body.dark-mode small {
    color: var(--text-body) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: var(--text-heading) !important;
}

body.dark-mode strong,
body.dark-mode b {
    color: var(--text-heading);
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary {
    color: var(--text-muted) !important;
}

body.dark-mode .text-primary {
    color: var(--accent-cyan) !important;
}

body.dark-mode .text-success {
    color: var(--accent-green) !important;
}

body.dark-mode .text-warning {
    color: var(--accent-amber) !important;
}

body.dark-mode .text-danger {
    color: #f87171 !important;
}

body.dark-mode .text-info {
    color: var(--accent-cyan) !important;
}

body.dark-mode .text-dark {
    color: var(--text-heading) !important;
}

body.dark-mode .text-light {
    color: #f1f5f9 !important;
}

body.dark-mode .text-white {
    color: #ffffff !important;
}

/* Dark Mode ensure all text colors are overridden */
body.dark-mode p,
body.dark-mode span,
body.dark-mode div:not(.card):not(.alert):not(.badge):not(.btn):not(.modal-content):not(.dropdown-menu),
body.dark-mode li,
body.dark-mode td,
body.dark-mode th,
body.dark-mode label,
body.dark-mode small,
body.dark-mode .description,
body.dark-mode .content,
body.dark-mode .text {
    color: var(--text-body) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .heading,
body.dark-mode .title {
    color: var(--text-heading) !important;
}

body.dark-mode a {
    color: var(--accent-cyan);
}

body.dark-mode a:hover {
    color: var(--accent-green);
}

body.dark-mode .footer-legal-links a {
    color: var(--text-muted);
}

body.dark-mode .footer-legal-links a:hover {
    color: var(--green-primary);
}

@media (max-width: 768px) {
    .footer-legal-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    .footer-bottom .row {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

/* Global Dark Mode Text Color Override - CRITICAL */
body.dark-mode {
    color: var(--text-body) !important;
}

body.dark-mode p,
body.dark-mode span,
body.dark-mode div:not(.card):not(.alert):not(.badge):not(.btn):not(.modal-content):not(.dropdown-menu):not(.nav):not(.form-control):not(.form-select),
body.dark-mode li,
body.dark-mode td,
body.dark-mode th,
body.dark-mode label,
body.dark-mode small,
body.dark-mode .text,
body.dark-mode .description,
body.dark-mode .excerpt,
body.dark-mode .content,
body.dark-mode .card-text,
body.dark-mode .card-body > p,
body.dark-mode .card-body > span,
body.dark-mode .card-body > div:not(.btn):not(.badge) {
    color: var(--text-body) !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode .h1,
body.dark-mode .h2,
body.dark-mode .h3,
body.dark-mode .h4,
body.dark-mode .h5,
body.dark-mode .h6,
body.dark-mode .heading,
body.dark-mode .title,
body.dark-mode strong,
body.dark-mode b,
body.dark-mode .card-title,
body.dark-mode .card-body > h1,
body.dark-mode .card-body > h2,
body.dark-mode .card-body > h3,
body.dark-mode .card-body > h4,
body.dark-mode .card-body > h5,
body.dark-mode .card-body > h6 {
    color: var(--text-heading) !important;
}

body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.btn-outline-navy):not(.btn-outline-cyan) {
    color: var(--accent-cyan);
}

body.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.btn-outline-navy):not(.btn-outline-cyan):hover {
    color: var(--accent-green);
}

body.dark-mode .text-muted,
body.dark-mode .text-secondary,
body.dark-mode small {
    color: var(--text-muted) !important;
}
