:root {
    --bg: #0b0e11;
    --panel: #ffffff;
    --muted: #6d7280;
    --border: rgba(17, 24, 39, 0.08);
    --accent: #0d9488;
    --accent-soft: rgba(13, 148, 136, 0.12);
    --accent-strong: #0f766e;
    --sidebar: #090b0f;
    --sidebar-line: rgba(255, 255, 255, 0.08);
    --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.12);
    --shadow-panel: 0 20px 60px rgba(15, 23, 42, 0.16);
}

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f7f7f9;
    color: #0f172a;
    min-height: 100vh;
    font-size: 16px; /* Base 16px prevents iOS zoom on input focus */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Responsive images */
img[src*="img/"] {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.app-body {
    background: #05070b;
}

.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, #05070b 0%, #101522 100%);
}

/* ============================================
   MOBILE-FIRST: HEADER (Base - Mobile)
   ============================================ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(9, 11, 15, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 64px;
    min-height: 64px;
}

.header-brand {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    margin-right: 16px;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.brand-logo {
    width: auto;
    height: 50px;
    max-width: 200px;
    max-height: 50px;
    object-fit: contain;
    border-radius: 0;
    display: block;
    flex-shrink: 0;
}

.brand-accent {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #15b392 0%, #0ea172 100%);
    box-shadow: 0 8px 20px rgba(14, 161, 114, 0.3);
}

.brand-text h1 {
    font-size: 18px;
    letter-spacing: 2px;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.brand-text .eyebrow {
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 8px;
    margin-bottom: 1px;
    display: none;
}

.header-nav {
    display: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-link i {
    font-size: 16px;
}

.nav-link:active {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(0.98);
}

.nav-link.active {
    background: rgba(13, 148, 136, 0.2);
    color: white;
    border: 1px solid rgba(13, 148, 136, 0.4);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Mobile: Hide some admin buttons on small screens */
@media (max-width: 768px) {
    .header-actions {
        gap: 4px;
    }
    
    .header-actions .ghost-button {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .header-actions .primary-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .mobile-hide-text {
        display: none;
    }
    
    /* Admin table mobile improvements */
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
    }
    
    /* Stack admin page headers on mobile */
    .panel > div:first-child {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .panel > div:first-child > div:last-child {
        width: 100%;
        margin-top: 12px;
    }
}

.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.mobile-menu-toggle:active {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(9, 11, 15, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 16px;
    flex-direction: column;
    gap: 8px;
    z-index: 99;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    display: none;
}

.mobile-nav.active {
    display: flex;
        transform: translateY(0);
}

.mobile-nav .nav-link {
    padding: 14px 20px;
    border-radius: 12px;
    width: 100%;
    font-size: 16px;
}

.primary-btn,
.ghost-button {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px;
}

.primary-btn:active,
.ghost-button:active {
    transform: scale(0.98);
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent-strong) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
}

.primary-btn:active {
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.ghost-button {
    background: transparent;
    color: var(--accent-strong);
    border: 1px solid rgba(14, 148, 136, 0.4);
}

.header-actions .primary-btn {
    display: none;
}

/* ============================================
   MOBILE-FIRST: CONTENT (Base - Mobile)
   ============================================ */
.page-content {
    padding: 16px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

.panel {
    background: var(--panel);
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.hero-panel {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: linear-gradient(135deg, #0f172a, #15203b, #0f766e);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 32px 24px;
}

/* Home landing hero background image */
.home-hero-panel {
    background-image:
        linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.75)),
        url('img/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1), transparent 60%),
                radial-gradient(circle at 80% 10%, rgba(255,255,255,0.15), transparent 60%);
    opacity: 0.7;
}

.hero-panel > * {
    position: relative;
    z-index: 1;
}

/* Blog hero animation - floating icons (ONLY for blog/Green Insights page) */
.blog-hero-panel .blog-hero-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.blog-hero-panel .blog-anim-icon {
    position: absolute;
    font-size: clamp(24px, 3vw, 48px);
    color: rgba(255, 255, 255, 0.25);
    opacity: 0;
    animation: floatBlogIcon var(--duration, 25s) var(--delay, 0s) infinite ease-in-out;
    left: var(--x, 50%);
    top: var(--y, 50%);
    transform: translate(-50%, -50%);
}

@keyframes floatBlogIcon {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(0) rotate(0deg) scale(0.8);
    }
    10% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) translateY(-30px) rotate(180deg) scale(1);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-60px) rotate(360deg) scale(0.8);
    }
}

/* Ensure blog hero content is above animation */
.blog-hero-panel .hero-copy {
    z-index: 2;
    position: relative;
}

/* Contact hero animation - floating icons (ONLY for contact/connect page) */
.contact-hero-panel .contact-hero-animation {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.contact-hero-panel .contact-anim-icon {
    position: absolute;
    font-size: clamp(24px, 3vw, 48px);
    color: rgba(255, 255, 255, 0.25);
    opacity: 0;
    animation: floatContactIcon var(--duration, 25s) var(--delay, 0s) infinite ease-in-out;
    left: var(--x, 50%);
    top: var(--y, 50%);
    transform: translate(-50%, -50%);
}

@keyframes floatContactIcon {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(0) rotate(0deg) scale(0.8);
    }
    10% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.5;
        transform: translate(-50%, -50%) translateY(-30px) rotate(180deg) scale(1);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(-60px) rotate(360deg) scale(0.8);
    }
}

/* Ensure contact hero content is above animation */
.contact-hero-panel .hero-copy {
    z-index: 2;
    position: relative;
}

/* ============================================
   NEWSLETTER SECTION (Above Footer)
   ============================================ */
.newsletter-section {
    background: linear-gradient(135deg, #0f172a 0%, #15203b 50%, #0f766e 100%);
    color: white;
    padding: 60px 20px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.newsletter-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.newsletter-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    text-align: center;
}

.newsletter-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(13, 148, 136, 0.2);
    border: 2px solid rgba(13, 148, 136, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #10b981;
}

.newsletter-text {
    max-width: 450px;
}

.newsletter-text h3 {
    font-size: clamp(24px, 4vw, 32px);
    margin-bottom: 12px;
    color: white;
    font-weight: 600;
}

.newsletter-text p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0;
}

.newsletter-form {
    width: 100%;
    max-width: 700px;
}

.newsletter-inputs {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.newsletter-field-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.newsletter-input {
    padding: 16px 20px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 52px;
    width: 100%;
    z-index: 1;
}

.newsletter-input::placeholder {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.newsletter-input:focus {
    outline: none;
    border-color: rgba(13, 148, 136, 0.8);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

.newsletter-floating-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: rgba(0, 0, 0, 0.6); /* Black before active */
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    background: transparent;
    padding: 0 8px;
    font-weight: 400;
    white-space: nowrap;
}

/* Label jumps to border center when active - no background, creates gap effect */
.newsletter-input:focus + .newsletter-floating-label,
.newsletter-input.has-value + .newsletter-floating-label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    font-size: 12px;
    color: white; /* White on active */
    background: transparent; /* No background */
    padding: 0 8px;
    font-weight: 500;
    left: 16px;
    z-index: 3;
}

/* Create gap effect in border using pseudo-element */
.newsletter-field-group::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 0;
    width: calc(100% - 32px);
    height: 2px;
    background: linear-gradient(135deg, #0f172a 0%, #15203b 50%, #0f766e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.newsletter-input:focus + .newsletter-floating-label {
    color: white;
    font-weight: 600;
}

.newsletter-submit-group {
    margin-top: 4px;
}

.newsletter-submit-btn {
    margin-top: 4px;
    width: 100%;
    min-height: 52px;
    background: linear-gradient(120deg, #10b981, #0d9488);
    border: none;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.3);
}

.newsletter-submit-btn:hover {
    background: linear-gradient(120deg, #059669, #0d9488);
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.4);
    transform: translateY(-2px);
}

.newsletter-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fecaca;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.newsletter-success {
    text-align: center;
    padding: 40px 20px;
}

.newsletter-success i {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
    display: block;
}

.newsletter-success h3 {
    font-size: 24px;
    margin-bottom: 8px;
    color: white;
}

.newsletter-success p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 16px;
}

@media (min-width: 769px) {
    .newsletter-content {
        flex-direction: row;
        text-align: left;
        align-items: center;
        gap: 48px;
    }
    
    .newsletter-icon {
        margin: 0 0 20px 0;
    }
    
    .newsletter-text {
        flex: 0 0 380px;
        max-width: 380px;
    }
    
    .newsletter-form {
        flex: 1;
        max-width: none;
    }
    
    .newsletter-inputs {
        flex-direction: row;
        align-items: flex-end;
        gap: 14px;
    }
    
    .newsletter-field-group {
        flex: 1;
        min-width: 0;
    }
    
    .newsletter-submit-group {
        flex: 0 0 auto;
        margin-top: 0;
    }
    
    .newsletter-submit-btn {
        width: auto;
        min-width: 160px;
        white-space: nowrap;
        margin-top: 0;
    }
}

.hero-copy {
    text-align: left;
}

.hero-copy h1 {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 20px;
    line-height: 1.3;
    text-align: left;
}

.hero-copy p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 15px;
    max-width: 100%;
    text-align: left;
}

.hero-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 0;
    flex-wrap: wrap;
}

.hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-content: flex-start;
    align-items: flex-start; /* prevent cards from stretching full height */
}

/* Hero Impact Stories */
.hero-impact-stories {
    width: 100%;
}

.hero-impact-stories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.hero-impact-controls {
    display: flex;
    gap: 8px;
}

.hero-impact-nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    backdrop-filter: blur(6px);
}

.hero-impact-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.hero-impact-nav-btn:active {
    transform: translateY(0);
}

.hero-impact-stories-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.hero-impact-stories-track {
    display: flex;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.hero-impact-story-card {
    min-width: 100%;
    padding: 24px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.hero-impact-story-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.hero-impact-story-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.9) 0%, rgba(15, 118, 110, 0.9) 100%);
    color: white;
    display: grid;
    place-items: center;
    font-size: 24px;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
    margin-bottom: 4px;
}

.hero-impact-story-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
}

.hero-impact-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-impact-story-card h4 {
    font-size: 20px;
    line-height: 1.3;
    color: white;
    margin: 0;
    font-weight: 600;
}

.hero-impact-story-card p {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.hero-impact-story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-impact-story-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.hero-impact-story-meta span i {
    font-size: 14px;
    color: rgba(13, 148, 136, 0.9);
}

.hero-impact-stories-indicators {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-impact-stories-indicators .hero-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.hero-impact-stories-indicators .hero-indicator.active,
.hero-impact-stories-indicators .hero-indicator:hover {
    background: white;
    border-color: white;
    transform: scale(1.2);
}

/* Contact page: info cards under "Our office is based..." */
.contact-info-stats {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.contact-info-stats .stat-card {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    border-radius: 18px;
    border: 1px solid rgba(13, 148, 136, 0.3);
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.3);
    color: #e5e7eb;
    padding: 18px 18px 20px 64px; /* leave space for icon on the left */
    position: relative;
}

.contact-card-icon {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    display: grid;
    place-items: center;
    font-size: 15px;
}

.contact-info-stats .stat-card h3 {
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 600;
}

.contact-info-stats .stat-card p {
    font-size: 14px;
    color: rgba(226, 232, 240, 0.9);
}

/* Use normal text instead of all‑caps labels in contact cards */
.contact-info-stats .eyebrow {
    text-transform: none;
    letter-spacing: 0;
    font-size: 12px;
    font-weight: 500;
    color: rgba(148, 163, 184, 0.95);
}

/* Wrapper for 2-column hero layout (mobile first) */
.hero-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.hero-left-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-right-column {
    width: 100%;
}

/* Legacy support - keep hero-lower for other pages */
.hero-lower {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-card {
    padding: 18px 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    height: auto;
    align-self: flex-start; /* keep each card only as tall as its content */
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px; /* center horizontally above text */
    background: rgba(15, 23, 42, 0.55);
    color: #e5f9f6;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}

.stat-icon i {
    font-size: 24px;
}

/* 2x2 icon grid for programme focus areas inside stat card */
.stat-pill-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    color: rgba(241, 245, 249, 0.9);
    font-size: 12px;
    white-space: nowrap;
}

.stat-pill i {
    font-size: 13px;
}

.stat-card h3 {
    font-size: clamp(30px, 3.2vw, 40px);
    margin-bottom: 4px;
}

.stat-card p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Inline title + number row inside stat cards */
.stat-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.stat-title-row .eyebrow {
    margin-bottom: 0;
}

.eyebrow {
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-bottom: 8px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid.two-col {
    grid-template-columns: 1fr;
}

.grid.three-col {
    grid-template-columns: 1fr;
}

/* Blog cards grid (Green Insights) */
.blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Blog card mobile styling */
.blog-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:active {
    transform: scale(0.98);
}


.blog-card h4 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #0f172a;
}

.blog-card .text-muted {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 4px;
}

.blog-card .text-muted i {
    margin-right: 6px;
    opacity: 0.7;
}

.blog-card > p {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 12px;
}

.blog-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.blog-card .btn {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.blog-card .btn i {
    margin-right: 4px;
}

.blog-card #card-meta,
.blog-card p.text-muted.small {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
}

.blog-card-image-wrapper {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
    margin-top: -24px;
    margin-bottom: 16px;
    height: 180px;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

.blog-card-image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* Start with low opacity for smooth fade-in */
.blog-card-image:not(.loaded) {
    opacity: 0.3;
}

.blog-card-image.loaded {
    opacity: 1;
}

/* For images that are already cached/loaded */
.blog-card-image[complete] {
    opacity: 1;
}

/* Ensure images load fully even if base64 is large */
.blog-card-image[src*="data:image"] {
    max-width: 100%;
    max-height: none;
}

.blog-card-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #94a3b8;
    font-size: 32px;
}

.blog-card-image-placeholder i {
    opacity: 0.5;
}

.insight-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card h3 {
    font-size: 22px;
    line-height: 1.3;
}

/* Stacked list with icons */
.stacked-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stacked-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.6;
    color: #475569;
}

.stacked-list li i {
    color: var(--accent);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.highlight-panel {
    background: #0f172a;
    color: white;
    border-radius: 20px;
    padding: 28px 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow-panel);
}

.highlight-panel h3 {
    font-size: 24px;
    margin-bottom: 16px;
    line-height: 1.3;
}

.highlight-panel p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255,255,255,0.85);
}

    .highlight-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        font-weight: 600;
        letter-spacing: 0.1em;
        margin-bottom: 16px;
        font-size: 10px;
    }

    .section-header-impact {
        flex-direction: row;
        align-items: center;
        gap: 24px;
    }

    .impact-story-card {
        padding: 40px;
    }

    .impact-story-card h4 {
        font-size: 28px;
    }

    .impact-story-card p {
        font-size: 17px;
    }

/* ============================================
   IMPACT STORIES (Rotating Banners)
   ============================================ */
.impact-stories-panel {
    background: var(--panel);
    border: 1px solid var(--border);
}

.section-header-impact {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-header-impact .eyebrow {
    color: var(--accent-strong);
    font-weight: 600;
}

.section-header-impact h3 {
    color: #0f172a;
    font-size: 28px;
    line-height: 1.3;
    margin: 0;
}

.impact-stories-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.impact-nav-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--accent-strong);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.impact-nav-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

.impact-nav-btn:active {
    transform: translateY(0);
}

.impact-stories-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.impact-stories-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.impact-story-card {
    min-width: 100%;
    padding: 32px;
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 16px;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.impact-story-card.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.impact-story-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    color: white;
    display: grid;
    place-items: center;
    font-size: 28px;
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.3);
    margin-bottom: 8px;
}

.impact-story-card h4 {
    font-size: 24px;
    line-height: 1.3;
    color: var(--accent-strong);
    margin: 0;
}

.impact-story-card p {
    font-size: 16px;
    line-height: 1.7;
    color: var(--muted);
    margin: 0;
}

.impact-story-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.impact-story-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-strong);
}

.impact-story-meta span i {
    font-size: 16px;
    color: var(--accent);
}

.impact-stories-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.impact-stories-indicators .indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.impact-stories-indicators .indicator.active,
.impact-stories-indicators .indicator:hover {
    background: var(--accent);
    transform: scale(1.2);
}

.feature-grid .feature-card {
    padding: 24px 20px;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #ffffff;
    overflow: hidden;
}

/* Icon and title header - side by side */
.feature-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.feature-card .feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: white;
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.feature-card:hover .feature-icon {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.35);
}

.feature-card h4 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

.text-link {
    color: var(--accent-strong);
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
}

/* ============================================
   FOOTER (Mobile First, fresh style)
   ============================================ */
.app-footer {
    margin-top: auto;
    padding: 40px 20px 24px;
    background: #020617; /* very dark - original color */
    color: rgba(241, 245, 249, 0.85);
    border-top: 1px solid rgba(30, 41, 59, 0.8);
}

.app-footer .footer-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.app-footer .footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.app-footer .footer-grid > div:first-child {
    grid-column: 1 / -1; /* About section spans full width */
}

.app-footer .footer-logo {
    width: auto;
    height: 56px;
    max-width: 280px;
    margin-bottom: 16px;
    display: block;
}

.app-footer .footer-grid h3 {
    font-size: 22px;
    margin: 0 0 8px;
    font-weight: 600;
}

.app-footer .footer-links,
.app-footer .footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.app-footer .footer-links a {
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.app-footer .footer-contact li {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin: 0;
    line-height: 1.6;
}

.app-footer .footer-contact li i {
    width: 18px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.app-footer .footer-contact li {
    color: rgba(241, 245, 249, 0.85);
    font-size: 14px;
}

.footer-socials {
    display: flex;
    gap: 14px;
    margin-top: 16px;
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: grid;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.footer-bottom {
    border-top: 1px solid rgba(30, 41, 59, 0.8);
    padding: 16px 20px;
    font-size: 13px;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.6;
    width: 100%;
}

.footer-bottom .footer-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    text-align: center;
}

.footer-bottom a {
    color: #D4AF37;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: #FFD700;
    text-decoration: underline;
}

/* ============================================
   DETAIL GRIDS (Mobile First)
   ============================================ */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 24px; /* larger gap between heading and cards */
}

/* Section header with CTA on the right (e.g. Flagship Initiatives) */
.section-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header > a {
    align-self: flex-start;
}

/* Thematic area cards (Programmes page) */
.thematic-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 16px;
}

.thematic-card {
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.thematic-card-media {
    width: 100%;
    min-height: 200px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thematic-card-media img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.thematic-card-body {
    padding: 20px 20px 24px;
}

.thematic-icon-overlay {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(13, 148, 136, 0.95);
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.thematic-card-body .eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--accent-strong);
}

.thematic-card-body .eyebrow i {
    font-size: 18px;
}

.value-card {
    background: var(--panel);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.value-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    display: grid;
    place-items: center;
    font-size: 20px;
}

/* ============================================
   LEADERSHIP CARDS (About page) - Mobile first
   ============================================ */
.leaders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 20px;
}

.leader-card {
    background: var(--panel);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    aspect-ratio: 1 / 1; /* entire card is square */
}

.leader-card:hover {
    border-color: rgba(13, 148, 136, 0.4);
    box-shadow: var(--shadow-panel);
    transform: translateY(-3px);
}

.leader-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.leader-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.leader-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 16px 8px;
    text-align: center;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.85) 40%, rgba(15, 23, 42, 0.0) 100%);
    color: #ffffff;
    z-index: 2;
}

.leader-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.8);
    line-height: 1.3;
}

.leader-office {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
    font-weight: 500;
}

/* Admin blog grid (Manage Blog Posts) */
.admin-blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
}

.admin-blog-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-blog-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.admin-blog-card-body {
    padding: 16px 16px 18px;
}

/* Leader modal */
.leader-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 110;
    padding: 20px;
}

.leader-modal-overlay.open {
    display: flex;
}

.leader-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 28px 24px;
    max-width: 960px;
    width: min(960px, 100%);
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-panel);
    position: relative;
}

.leader-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f4f4f5;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.leader-modal-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.leader-modal-office {
    font-size: 15px;
    color: var(--accent-strong);
    margin-bottom: 16px;
}

.leader-modal-bio {
    font-size: 15px;
    line-height: 1.7;
    color: #4b5563;
}

/* ============================================
   BLOG & MODAL STYLES (Mobile First)
   ============================================ */
.blog-modal-content {
    border-radius: 20px;
    overflow: hidden;
}

.blog-modal-header {
    background: linear-gradient(135deg, #0f172a, #0d9488);
    color: white;
    border-bottom: none;
    padding: 24px 20px;
}

.blog-modal-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.blog-modal-body {
    padding: 24px 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.blog-modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}

.blog-content {
    line-height: 1.7;
    font-size: 16px;
}

.blog-meta-actions .btn {
    font-size: 13px;
}

.blog-comments-list {
    max-height: 220px;
    overflow-y: auto;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 16px 0;
}

.feature-card-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    aspect-ratio: 16 / 9; /* landscape container */
    border-radius: 16px 16px 0 0;
    margin: 0 0 16px 0; /* no horizontal bleed on mobile to avoid overflow */
}

/* ============================================
   ADMIN & FORM STYLES (Mobile First)
   ============================================ */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
textarea,
select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px; /* Fully rounded ends (pill-shaped) */
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: white;
    color: #0f172a;
    -webkit-appearance: none;
    appearance: none;
    min-height: 48px; /* Touch target */
    box-sizing: border-box;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-control:disabled,
.form-select:disabled,
input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.form-label,
label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.4;
}

/* File inputs */
input[type="file"] {
    padding: 12px;
    font-size: 14px;
    min-height: 48px;
    cursor: pointer;
}

/* Checkboxes and radios */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin-right: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Textarea */
textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    border-radius: 20px; /* Slightly rounded for textareas (not fully pill-shaped) */
}

/* Select dropdown styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f172a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
}

.alert {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-panel);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    padding: 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 20px;
}

.modal-dialog {
    margin: 0.5rem;
}

/* Rich Text Editor */
.rich-text-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    padding: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.rich-text-editor {
    outline: none;
    font-family: inherit;
    font-size: 16px;
}

.rich-text-editor:focus {
    border-color: var(--accent);
}

.rich-text-editor p {
    margin-bottom: 12px;
}

.rich-text-editor h1,
.rich-text-editor h2,
.rich-text-editor h3 {
    margin-top: 20px;
    margin-bottom: 12px;
    font-weight: 600;
}

.rich-text-editor ul,
.rich-text-editor ol {
    margin-left: 20px;
    margin-bottom: 12px;
}

.rich-text-editor a {
    color: var(--accent-strong);
    text-decoration: underline;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.w-100 {
    width: 100%;
}

.mt-3 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

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

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

.small {
    font-size: 14px;
}

/* ============================================
   SMALL MOBILE LANDSCAPE: 481px and up
   ============================================ */
@media (min-width: 481px) {
    .header-container {
        padding: 0 20px;
    height: 70px;
    }
    
    .mobile-nav {
        top: 70px;
        padding: 24px 20px;
    }
    
    .page-content {
        padding: 32px 20px;
        gap: 28px;
    }
    
    .panel {
        padding: 28px 24px;
        border-radius: 24px;
    }
    
    .hero-panel {
        padding: 40px 32px;
        gap: 40px;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card h3 {
        font-size: 32px;
    }
    
    .hero-actions {
        flex-direction: row;
        gap: 16px;
        margin-top: 32px;
    }

    /* Contact page cards: keep stacked vertically on desktop as on mobile */
    .contact-info-stats {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
    
    .grid.two-col {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .section-header {
        flex-direction: row;
    align-items: center;
        gap: 24px;
    }

    .section-header > a {
        margin-left: auto;
    }
    
    .app-footer {
        padding: 40px 24px 28px;
    }
    
    .app-footer .footer-grid {
        flex-direction: row;
        justify-content: space-between;
        gap: 24px;
    }

    .leaders-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .admin-blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================
   TABLET & DESKTOP: 769px and up
   ============================================ */
@media (min-width: 769px) {
    .header-container {
        padding: 0 32px;
        height: 80px;
        max-width: 1400px;
    }
    
    .brand-text h1 {
        font-size: 24px;
        letter-spacing: 3px;
    }
    
    .brand-text .eyebrow {
        display: block;
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .brand-logo,
    .brand-accent {
        width: auto;
        height: 60px;
        max-width: 250px;
        max-height: 60px;
    }
    
    .header-nav {
    display: flex;
    align-items: center;
        gap: 4px;
        flex: 1;
    justify-content: flex-start;
    margin-left: 8px;
    }
    
    .nav-link {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.08);
    color: white;
        transform: translateY(-1px);
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    .header-actions .primary-btn {
        display: inline-flex;
    }
    
    .primary-btn,
    .ghost-button {
        padding: 12px 26px;
        font-size: 15px;
    }
    
    .primary-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 30px rgba(14, 165, 233, 0.3);
    }
    
    .page-content {
        padding: 32px 16px 56px;
        gap: 32px;
    max-width: 100%;
        margin: 0;
    }

    .panel {
        padding: 40px;
        border-radius: 28px;
    }
    
    .hero-panel {
        /* Desktop: copy on top, then buttons + stats in a row */
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 32px;
        padding: 48px 40px;
    }
    
    /* 2-column hero layout for home page */
    .home-hero-panel .hero-content-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 48px;
        row-gap: 0;
        align-items: start;
    }

    .home-hero-panel .hero-left-column {
        display: flex;
        flex-direction: column;
        gap: 32px;
    }

    .home-hero-panel .hero-right-column {
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .home-hero-panel .hero-actions {
        align-self: flex-start;
    }

    .home-hero-panel .hero-impact-stories {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

    /* Legacy support for other pages */
    .hero-lower {
        display: grid;
        grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
        column-gap: 40px;
        row-gap: 0;
        align-items: stretch;
    }

    .hero-actions {
        align-self: flex-start;
    }

    .hero-impact-stories {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        min-height: 100%;
    }

    .hero-impact-stories-container {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .hero-impact-story-card {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .hero-actions {
        flex-direction: row;
        gap: 18px;
        align-items: flex-start;
    }

    .hero-copy h1 {
        font-size: clamp(32px, 4vw, 48px);
        margin-bottom: 24px;
        line-height: 1.2;
    }
    
    .hero-copy p {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 24px;
        max-width: 90%;
    }

    /* Center the main hero text block on Home while keeping cards to the right */
    .home-hero-panel .hero-copy {
        max-width: 1100px;
        margin: 0;
        text-align: left;
    }

    /* Left align the main hero text block on About page as well */
    .about-hero-panel .hero-copy {
        max-width: 1100px;
        margin: 0;
        text-align: left;
    }
    
    /* Left align hero text on all other pages */
    .hero-panel .hero-copy {
        text-align: left;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px;
        align-content: flex-start;
        /* Ensure full-size cards on desktop (no scale down) */
        transform: none;
        transform-origin: initial;
    }

    .hero-impact-stories {
        max-width: 100%;
    }

    .hero-impact-story-card {
        padding: 24px;
    }

    .hero-impact-story-card h4 {
        font-size: 22px;
    }

    .hero-impact-story-card p {
        font-size: 15px;
    }

    .hero-impact-story-image {
        height: 240px;
    }

    /* About page hero: center the three cards on the page */
    .about-hero-panel .about-hero-stats {
        max-width: 1100px;
        margin: 0 auto;
    }
    
    .stat-card {
        padding: 24px;
        aspect-ratio: 1 / 1; /* make desktop stat cards square by default */
    display: flex;
    flex-direction: column;
        justify-content: flex-start;
    }

    /* Work page hero stats: horizontal rectangles fitting content */
    .work-hero-panel .work-hero-stats {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        justify-content: flex-start;
        align-items: flex-start;
    }

    .work-hero-panel .work-stat-card {
        aspect-ratio: auto;       /* override global square */
        padding: 18px 24px;
        border-radius: 18px;
    }
    
    /* Contact cards: portrait, just fit text (no square aspect) */
    .contact-info-stats .stat-card {
        aspect-ratio: auto;
        height: auto;
        display: block;
        padding: 18px 18px 20px 64px;
    }
    
    .stat-card h3 {
        font-size: 32px;
    }
    
    .stat-card p {
        font-size: 14px;
    }
    
    .eyebrow {
        font-size: 12px;
        letter-spacing: 0.3em;
    }
    
    .grid {
        gap: 24px;
    }
    
    .grid.two-col {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .grid.three-col {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
    
    .insight-card {
        padding: 32px;
        gap: 16px;
    }
    
    .insight-card h3 {
        font-size: 28px;
    }
    
    .highlight-panel {
        padding: 44px;
        border-radius: 28px;
    }
    
    .highlight-panel h3 {
        font-size: 34px;
        margin-bottom: 18px;
    }
    
    .highlight-panel p {
        font-size: 18px;
        line-height: 1.9;
    }
    
    .highlight-badge {
        padding: 10px 18px;
        font-size: 12px;
        margin-bottom: 18px;
    }
    
    .feature-grid .feature-card {
        padding: 28px;
        gap: 12px;
    }
    
    .feature-card .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .feature-card h4 {
        font-size: 24px;
    }
    
    .feature-card-cover {
        margin: -24px -20px 16px -20px; /* desktop bleed to card edges at top */
    }
    
    .app-footer {
        padding: 48px 48px 0;
    }
    
    .footer-bottom {
        padding: 18px 48px 32px;
    }
    
    .footer-bottom .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }
    
    .app-footer .footer-container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .app-footer .footer-grid {
        grid-template-columns: 2fr 1fr 1.1fr;
        gap: 60px;
        margin-bottom: 28px;
    }
    
    /* On desktop, About column should NOT span full width */
    .app-footer .footer-grid > div:first-child {
        grid-column: auto;
    }
    
    .app-footer .footer-grid h3 {
        font-size: 24px;
    }
    
    
    .detail-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 24px;
    }

    /* Leadership cards: 4 per row on desktop, centered if fewer */
    .leaders-grid {
        grid-template-columns: repeat(4, minmax(200px, 1fr));
        gap: 24px;
        justify-content: center;
    }

    /* Thematic cards: image one side, text the other (alternating) */
    .thematic-card {
        flex-direction: row;
        align-items: stretch;
    }

    .thematic-card.reverse {
        flex-direction: row-reverse;
    }

    .thematic-card-media {
        flex: 0 0 38%;
        min-height: 300px;
        aspect-ratio: 16 / 9;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thematic-card-media img {
        height: 100%;
        width: 100%;
        min-height: 300px;
        object-fit: cover;
        object-position: center;
    }

    .thematic-card-body {
        flex: 1;
        padding: 28px;
    }

    /* Blog cards: 4 per row on desktop */
    .blog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    /* Admin blog grid: 4 per row on desktop */
    .admin-blog-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .value-card {
        flex-direction: row;
        padding: 28px;
        gap: 18px;
        border-radius: 20px;
    }
    
    .value-icon {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
    
    /* Removed padding and image size restrictions to allow full-card image design */
    /* .leader-card {
        padding: 28px;
    }
    
    .leader-card img {
        width: 110px;
        height: 110px;
    } */
    
    .leader-card h4 {
        font-size: 20px;
    }
    
    .leader-card p {
        font-size: 15px;
    }
    
    .blog-modal-header {
        padding: 32px;
    }
    
    .blog-modal-title {
        font-size: 28px;
    }
    
    .blog-modal-body {
        padding: 32px;
    }
    
    .blog-modal-footer {
        padding: 20px 32px;
    }
    
    .modal-header {
        padding: 24px 32px;
    }
    
    .modal-body {
        padding: 32px;
    }
    
    .modal-footer {
        padding: 20px 32px;
    }
    
    .modal-dialog {
        margin: 1.75rem auto;
    }
    
    .modal-content {
        border-radius: 24px;
    }
}

/* ============================================
   LARGE DESKTOP: 1025px and up
   ============================================ */
@media (min-width: 1025px) {
    .header-container {
        gap: 32px;
    }
    
    .header-brand {
        gap: 16px;
    }
    
    .header-actions {
        gap: 12px;
    }
}

/* ============================================
   MOBILE SCROLLING & PERFORMANCE
   ============================================ */
* {
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Prevent text selection on UI elements */
.app-header,
.mobile-menu-toggle,
.primary-btn,
.ghost-button,
.nav-link {
    -webkit-user-select: none;
    user-select: none;
}

/* Smooth scrolling for mobile */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .nav-link:hover {
        background: transparent;
        transform: none;
    }
    
    .primary-btn:hover {
        transform: none;
        box-shadow: 0 12px 24px rgba(14, 165, 233, 0.25);
    }
    
    .nav-link:active,
    .primary-btn:active,
    .ghost-button:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    /* Larger touch targets on mobile */
    .nav-link,
    .primary-btn,
    .ghost-button,
    .mobile-menu-toggle {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better form inputs on mobile */
    input,
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .app-header,
    .mobile-nav,
    .header-actions,
    .app-footer {
        display: none;
    }
    
    .page-content {
        padding: 0;
    }
    
    .panel {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}

/* ============================================
   FIXES FOR SHARE MENU & OVERFLOW
   ============================================ */
/* Allow dropdowns to be visible outside the card */
.feature-grid .feature-card,
.blog-card, 
.admin-blog-card {
    overflow: visible !important; 
}

/* Re-apply hidden overflow specifically to the image wrapper 
   so the top corners stay rounded */
.blog-card-image-wrapper {
    border-radius: 16px 16px 0 0;
    overflow: hidden; 
}

/* Ensure the dropdown appears on top of other cards */
.dropdown-menu {
    z-index: 1050;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.1);
}
