html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    padding-top: 96px;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(80px);
    animation-name: floatShape;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

body::before {
    width: 300px;
    height: 300px;
    bottom: 80px;
    left: -50px;
    background: linear-gradient(to right, #6366f1, #a5b4fc);
    opacity: 0.35;
    animation-duration: 20s;
}

body::after {
    width: 400px;
    height: 400px;
    top: -50px;
    right: -50px;
    background: linear-gradient(to left, #14b8a6, #99f6e4);
    opacity: 0.3;
    animation-duration: 25s;
    animation-direction: alternate-reverse;
}

/* =====================================================
   Global Base Styles
   ===================================================== */

/* Box sizing reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* =====================================================
   Typography
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.3;
    color: #222;
}

p {
    margin: 0 0 1em;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* =====================================================
   Layout Containers
   ===================================================== */
body > header {
    height: 96px;
    position: fixed;
    isolation: isolate;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000; /* ⬅ strong but reasonable */

    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

header nav,
header .dropdown,
header .menu {
    position: relative;
    z-index: 1;
}

body > header::before {
    content: "";
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0.55) 0%,
        rgba(255, 255, 255, 0.35) 45%,
        rgba(255, 255, 255, 0.25) 100%
    );

    z-index: -1;
    pointer-events: none;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    height: 100%;
    align-items: center;
    gap: 12px;
}

main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
    position: relative;
    z-index: auto; /* ⬅ lock ALL page content under header */
}

/* =====================================================
   Navigation
   ===================================================== */
nav a {
    padding: 8px 14px;
    border-radius: 6px;

    text-decoration: none;
    font-weight: 500;
    color: #333;

    border: 1px solid transparent;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
}

nav a:hover {
    background-color: #f2f4f7;
    border-color: #d0d7de;
    color: #000;
}

nav a:hover,
nav a:focus {
    text-decoration: none;
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.nav-logo {
    position: absolute;
    left: 20px;              /* match nav padding */
    top: 50%;
    transform: translateY(-50%);

    padding: 0;
    border: none;
    background: none;
    z-index: 10001;          /* above glass */
}

.nav-center {
    margin: auto;
}

.nav-logo:hover,
.nav-logo:focus {
    background: none;
    box-shadow: none;
    outline: none;
}

.nav-logo img {
    height: 110px;
    width: auto;
    display: block;
}

.search-header {
    margin-bottom: 2rem;
}

.search-section {
    margin-bottom: 3rem;
}

.no-results {
    text-align: center;
    opacity: 0.7;
}

/* ===============================
   Knowledge Hub Dropdown
   =============================== */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;

    border: 1px solid transparent;
    border-radius: 6px;
    transition: background-color 0.2s ease,
                border-color 0.2s ease;
}

/* Main link (looks like other nav items) */
.nav-dropdown-link {
    padding: 8px 14px 8px 14px;
    border-radius: 6px 0 0 6px;
    font-weight: 500;
    color: #333;
    border: none;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
}

.nav-dropdown-link:hover {
    background-color: #f2f4f7;
    border-color: #d0d7de;
    color: #000;
}

/* Caret button */
.nav-dropdown-caret {
    padding: 8px 14px 8px 5px;
    border-radius: 0 6px 6px 0;
    background: none;
    border: none;
    cursor: pointer;
}

.caret {
    display: inline-block;
    margin-left: 6px;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
}

.nav-dropdown:hover .caret {
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

.nav-dropdown-menu {
    position: absolute;        /* ⬅ change from fixed */
    top: 100%;                 /* directly below nav item */
    left: 50%;                 /* start at center */
    transform: translateX(-50%);
    z-index: 10002;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    display: none;
    margin-top: 0;
    border-radius: 8px;
    min-width: 180px;
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 14px;
    color: #111827;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    transition:
        font-size 0.25s ease,
        background-position 0.6s ease,
        color 0.25s ease;
}

.nav-dropdown-menu a:hover {
    font-size: 1.05rem; /* subtle increase */
    background-image: linear-gradient(
        90deg,
        #4f46e5,
        #14b8a6,
        #4f46e5
    );
    background-size: 200% 100%;
    background-position: 100% 0;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: navGradientShift 1.6s linear infinite;
}

@keyframes navGradientShift {
    from {
        background-position: 0% 0;
    }
    to {
        background-position: 200% 0;
    }
}

/* Show dropdown on hover (desktop) */
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}

.nav-dropdown:hover {
    background-color: #f2f4f7;
    border-color: #d0d7de;
}

.enquiry-float {
    position: fixed;
    bottom: 92px; /* stacked above WhatsApp */
    right: 20px;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    z-index: 9999;
    display: block;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.enquiry-float img {
    display: block;        /* prevents inline gaps */
    width: 85px;   /* 🔼 enlarged logo */
    height: auto;
}

.enquiry-float:hover {
    transform: scale(1.08);
}

/* Tooltip */
.enquiry-float::after {
    content: "Make an enquiry";
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%) translateX(10px);

    background: #1a73e8;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;

    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.enquiry-float:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    z-index: 9999;
    animation: whatsapp-pulse 2.5s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float img {
    width: 28px;
    height: 28px;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.whatsapp-float::after {
    content: "Contact us";
    position: absolute;
    right: 70px;
    background: #25D366;        /* WhatsApp green */
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px); /* start slightly to the right */
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.whatsapp-float:hover::after {
    opacity: 1;
    transform: translateX(0);   /* slide left into place */
}

/* =====================================================
   Footer
   ===================================================== */

footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

/* =====================================================
   Basic Utilities
   ===================================================== */

.programme-banner-header {
    background: url('/assets/images/programme-banner.png') center/cover no-repeat;
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.programme-banner-header::before,
.programme-banner-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3); /* overlay for readability */
    z-index: 0;
}

/* Banner Text */
.programme-banner-header h1,
.programme-banner-header p {
    position: relative;
    z-index: 1;
    margin: 0.2em 0;
    color: #ffffff; /* bright white for contrast */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7); /* extra readability */
}

.programme-banner-header h1 {
    font-size: 3rem; /* large, banner-style */
    font-weight: 800;
    line-height: 1.1;
}

.programme-banner-header p {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
}

.hidden {
    display: none;
}

/* =====================================================
   Hero Section
   ===================================================== */
.hero-image {
    min-height: 420px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-start;   /* ← key change */
    padding-top: 300px;        /* control vertical position */    
    justify-content: center;
}

/* =========================
   Hero Carousel
========================= */
.hero-carousel {
    position: relative;
    min-height: 420px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    padding-top: 300px;
    justify-content: center;
}

/* Each slide */
.hero-slide {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 0;
}

/* Active slide */
.hero-slide.active {
    opacity: 1;
}

.hero-search-pill {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 90%;
    max-width: 700px;
    background-color: #ffffff;
    border-radius: 999px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.hero-search-pill input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    flex: 1;              /* <-- ensure it expands */
    min-width: 0;         /* <-- prevents flex bugs */
    font-size: 18px;
    border: none;
    outline: none;
    padding: 14px 18px;
    border-radius: 999px;
}

.hero-search-pill button span {
    display: inline-block; /* IMPORTANT */
    transform: translate(2px, -2px);
    position: relative;
    top: 1.5px;   /* move UP */
    left: -1px;   /* move RIGHT */
}

.hero-search-pill button {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background-color: #ffffff;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;              /* ⬅ important */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.hero-search-pill button:hover {
    background-color: #d1d5db;   /* slightly darker grey */
}

/* =========================
   Hero Search Ripple
========================= */

/* Ripple ring */
.hero-search-pill::before {
    content: "";
    position: absolute;
    
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;

    border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.35);
    animation: search-ripple 2.2s infinite;
    z-index: -1;
}

/* Stop ripple when user clicks / focuses */
.hero-search-pill:focus-within::before {
    animation: none;
    box-shadow: none;
}

@keyframes search-ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0.55);
    }
    70% {
        box-shadow: 0 0 0 18px rgba(0, 102, 204, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 204, 0);
    }
}

@media (max-width: 480px) {
    .hero-image {
        min-height: 300px;
    }

    .hero-search-pill {
        padding: 8px;
    }
}

/* =====================================================
   Quick Tiles (Oblong Style)
   ===================================================== */
.quick-tile {
    background-color: #ffffff;
    border-radius: 999px; /* oblong / pill shape */
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: center; /* <-- KEY */
    gap: 14px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease,
                box-shadow 0.2s ease;
}

.quick-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

.tile-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.tile-label {
    font-weight: 600;
    font-size: 17px;
    text-align: center;
}

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

@media (max-width: 480px) {
    .quick-tiles {
        grid-template-columns: 1fr;
    }

    .quick-tile {
        padding: 18px 22px;
    }
}

/* =========================
   Discover Training Section
========================= */
.discover-pill {
    display: inline-block;
    margin: 0 auto 28px;
    padding: 3px;              /* thicker gradient ring */
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        #6366f1,
        #22c55e,
        #06b6d4
    );
}

.discover-pill span {
    display: block;
    padding: 18px 44px;        /* ⬅ BIGGER pill */
    border-radius: 999px;
    background: #ffffff;
    font-size: 1.6rem;         /* ⬅ larger text */
    font-weight: 700;
    color: #111827;
    letter-spacing: 0.3px;
}

.discover-training {
    padding: 50px 20px 60px;
    text-align: center;
    background: transparent;
}

.discover-title {
    font-size: 2.8rem;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 12px;
}

.discover-subtitle {
    max-width: 680px;
    margin: 0 auto 40px;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #6b7280;
}

.discover-video-frame {
    max-width: 900px;
    margin: 40px auto 0;
    background: transparent;          /* transparent section background */
    border: 2px solid #000;            /* black 2px border */
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.discover-video-frame:hover {
    box-shadow: 0 22px 48px rgba(0,0,0,0.45);
    transform: translateY(-2px);
}

/* 16:9 ratio box */
.discover-video-ratio {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
}

/* Video fills the box */
.discover-video {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
    object-fit: cover;
}

/* =========================
   How Training Works
========================= */
.how-training-works {
    padding: 90px 0;
    text-align: center;
    background: transparent;
}

.how-training-works h2 {
    font-size: 2.2rem;
}

.training-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 60px;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
}

.training-step .step-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.training-step {
    position: relative;
}

.step-icon {
    position: relative;
    z-index: 2;
    transition: transform 0.25s ease;
    cursor: default; /* keep normal cursor */
}

.training-step:hover .step-icon {
    transform: scale(1.35);
}

.training-steps::before {
    content: "";
    position: absolute;
    top: 40px; /* vertical center — keep this */
    left: calc(16.66% + 15px);
    right: calc(16.66% + 15px);
    height: 4px;
    background: linear-gradient(
        to right,
        #6366f1,
        #22c55e,
        #06b6d4
    );
    border-radius: 999px;
    z-index: 1;
}

.training-step p {
    color: #555;
    font-size: 1.3rem;
    line-height: 1.6;
}

/* =========================
   FEATURED CONTENT (HOME)
========================= */
.home-carousel-article.hidden,
.home-carousel-infographic.hidden {
    display: none;
}

/* Placeholder image area */
.placeholder-image {
    width: 100%;
    height: 180px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Soft shimmer */
.placeholder-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        transparent 30%,
        rgba(255,255,255,0.4) 50%,
        transparent 70%
    );
    animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* Placeholder text badge */
.placeholder-badge {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.75);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    backdrop-filter: blur(4px);
}

.featured-content {
    padding: 40px 0;
    text-align: center;
}

.featured-content h2 {
    font-size: 1.8rem;   /* was default ~1.5 */
    font-weight: 700;
    margin-bottom: 28px;
}

/* =========================
   Featured Sections Centering
========================= */

.featured-articles,
.featured-infographics {
    text-align: center;
    margin-bottom: 0;
}

/* =========================
   Home CTA Buttons
========================= */

.home-cta {
    padding: 4rem 1rem;
    display: flex;
    justify-content: center;
    background: transparent;
}

.cta-box {
    max-width: 900px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.cta-box h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.cta-box p {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================
   HOME CTA
========================= */

.home-cta .cta-primary,
.home-cta .cta-secondary {
    background-color: #0066cc;        /* blue by default */
    color: #ffffff;              /* ← white text */
    padding: 14px 26px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 2px solid #0066cc;
    /* stability */
    box-shadow: none;
    transform: none;
    transition: background-color 0.2s ease,
                color 0.2s ease;
}

.home-cta .cta-primary:hover,
.home-cta .cta-secondary:hover {
    background-color: #004a99;        /* darker blue */
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

/* Mobile fallback */
@media (max-width: 480px) {
    .home-cta {
        flex-wrap: wrap; /* stack only on very small screens */
    }

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

/* =========================
   Site Footer
========================= */

.site-footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

/* Upper footer */
.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px 20px 10px; 
    align-items: flex-start;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-col h4 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.footer-col p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}

/* Only justify the About Humanology column text */
.footer-col:first-child p {
    text-align: justify;
}

/* Links */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
    color: #0066cc;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Facebook link */
.facebook-link {
    font-size: 14px;
    color: #0066cc;
    font-weight: 500;
}

/* Bottom footer */
.footer-bottom {
    border-top: 1px solid #e0e0e0;
    padding: 10px 20px 0px;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.footer-bottom a.footer-privacy-link {
    color: #4d4d4d;
    text-decoration: none;
}

.footer-bottom a.footer-privacy-link:hover {
    color: #2563eb;
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Shared pill button style (Footer + Home CTA) */
.footer-about-btn,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 18px;
    border-radius: 999px;
    border: 2px solid #0066cc;

    background-color: #0066cc;
    color: #ffffff;

    font-weight: 600;
    font-size: 14px;
    text-decoration: none;

    transition: background-color 0.2s ease,
                color 0.2s ease,
                transform 0.2s ease,
                box-shadow 0.2s ease;
}

.footer-about-btn:hover,
.cta-button:hover {
    background-color: #004a99;        /* darker blue */
    color: #ffffff;
    transform: none;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-col.footer-about {
    align-items: center;
}

.footer-about h4 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
    justify-content: center; /* override left alignment */
}

.footer-socials a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.footer-socials a:hover {
    background-color: #e5e7eb;
    transform: translateY(-2px);
}

.footer-socials img {
    width: 18px;
    height: 18px;
}

/* About column layout */
.footer-about {
    text-align: center; /* center everything in this column */
}

/* Row 1 spacing */
.footer-about-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px; /* ✅ space between button and icons */
    margin-bottom: 12px;
}

.footer-about-bottom p {
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
    text-align: center;
}

.facebook-embed iframe {
    max-width: 100%;
    border-radius: 8px;
}

.facebook-card {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.facebook-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 12px;
}

.facebook-card p {
    font-size: 14px;
    color: #555;
    margin-bottom: 12px;
}

.footer-about-btn {
    margin-left: auto;
    margin-right: auto;
}

.fb-fallback .footer-about-btn {
    margin-bottom: 14px;
}

/* WhatsApp app-style icon (footer) */
.whatsapp-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;

    width: 64px;
    height: 64px;

    background-color: #25D366;
    border-radius: 16px; /* app-like */
    text-decoration: none;

    justify-content: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.whatsapp-cta img {
    width: 50px;
    height: 50px;
}

.whatsapp-cta span {
    font-size: 12px;
    color: #ffffff;
    font-weight: 500;
}

.whatsapp-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.35);
}

.footer-whatsapp {
    display: flex;
    flex-direction: column;
    align-items: center;   /* 🔥 THIS is the key */
    gap: 12px;
}

.footer-col:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.programme-filter {
    margin: 30px auto 10px;
    display: flex;
    justify-content: center; /* 🔥 CENTER */
}

.programme-filter select {
    width: 100%;
    max-width: 420px;      /* ✅ reasonable width */
    padding: 12px 44px 12px 16px; /* extra space for arrow */
    font-size: 16px;
    border-radius: 0px; /* 🔥 fully pill-shaped */
    border: 1px solid #d0d7de;
    background-color: #ffffff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5 7l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 14px;
}

.programme-indicators {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.programme-indicators .indicator {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    white-space: nowrap;
}

.programme-indicators .indicator.article {
    background: #e0f2fe;
    color: #0369a1;
}

.programme-indicators .indicator.infographic {
    background: #ecfeff;
    color: #0f766e;
}

/* Grid */
.programme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 🔥 FORCE 3 columns */
    gap: 24px;
    margin-top: 20px;
}

/* Card */
.programme-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.programme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Fixed image */
.programme-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.programme-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Content */
.programme-content {
    padding: 16px;
}

.programme-content h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.programme-content p {
    font-size: 14px;
    color: #555;
}

/* Toolbar container */
.programme-toolbar {
    display: flex;
    align-items: center;
    justify-content: center; /* 🔥 center the whole group */
    gap: 12px;              /* distance between search & filter */
    margin: 30px 0 20px;
}

/* Search bar: truly centred to page */
.programme-search {
    width: 100%;
    max-width: 520px;
    height: 52px;
    padding: 0 16px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #d0d7de;
}

/* Filter stays on the right */
.programme-filter-small {
    width: 170px;           /* ⬅ slightly smaller */
    height: 52px;
    padding: 0 42px 0 16px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #d0d7de;
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23666' d='M5 7l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

.programme-search,
.programme-filter-small {
    height: 52px;          /* 🔥 identical height */
    padding: 0 16px;
    font-size: 16px;
    border-radius: 12px;
    border: 1px solid #d0d7de;
}

.no-programmes {
    grid-column: 1 / -1;   /* span full grid width */
    text-align: center;
    margin: 40px 0;
    margin-top: 40px;
    font-size: 18px;
    color: #666;
}

/* Mobile stacking */
@media (max-width: 640px) {
    .programme-toolbar {
        position: static;
        flex-direction: column;
        gap: 12px;
    }

    .programme-search {
        position: static;
        transform: none;
        max-width: 100%;
    }

    .programme-filter-small {
        width: 100%;
        margin-left: 0;
    }
}

.programme-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.copy-link-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-link-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.copy-link-btn.copied {
    opacity: 1;
    color: #16a34a; /* success green */
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.gallery-grid img,
.gallery-grid video {
  width: 100%;
  border-radius: 8px;
}

/* ============================
   Programme Hero Card
============================ */

.programme-hero-card {
  display: flex;
  gap: 32px;
  padding: 32px;
  background: #f7f8fc;
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  max-width: 1200px;
  margin: 0 auto 64px;
}

/* IMAGE */
.programme-hero-image {
  flex: 0 0 320px;
}

.programme-hero-image img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 20px;
}

/* CONTENT */
.programme-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.programme-hero-content h1 {
  font-size: 2.2rem;
  margin: 0 0 12px;
}

/* META */
.programme-meta {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0px;
}

.programme-meta span {
  margin-right: 8px;
}

/* DIVIDER LINE */
.programme-divider {
  border: none;
  height: 1px;
  background: #ddd;
  margin: 24px 0;
}

/* DESCRIPTION */
.programme-hero-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.programme-hero-content p {
  color: #444;
  line-height: 1.6;
  max-width: 90%;
}

/* Programme sections spacing */
.programme-video,
.programme-outline,
.programme-gallery,
.programme-trainers,
.programme-resources {
    margin-top: 64px;
}

.programme-category-link {
    color: #2563eb;
    text-decoration: none;
}

.programme-category-link:hover {
    opacity: 0.75;
}

/* =========================
   Programme Outline
========================= */
.programme-outline {
    margin-top: 64px;
}

.outline-pdf {
  width: 100%;
  height: 80vh;        /* 🔥 80% of viewport height */
  border: none;
}

/* Hidden PDF container */
.outline-content {
    margin-top: 24px;
}

.programme-outline-intro h3 {
    background: linear-gradient(to right, #6366f1, #22c55e, #06b6d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

.outline-preview {
    position: relative;
    max-height: 220px;        /* controls how many lines show */
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.outline-preview iframe {
    width: 100%;
    height: 600px;            /* full PDF height */
    border: none;
}

/* Blur effect */
.outline-preview.blurred iframe {
    filter: blur(6px);
}

/* Gradient fade at bottom */
.outline-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0) 40%,
        rgba(255,255,255,0.85) 100%
    );
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Expanded state */
.outline-preview.expanded {
    max-height: 800px; /* or 100vh if you want */
}

.outline-preview.expanded iframe {
    filter: none;
}

.outline-preview.expanded .outline-fade {
    display: none;
}

/* Right-aligned download */
.outline-download {
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.outline-download a {
    font-weight: 500;
    color: #0066cc;
}

.programme-outline-header {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1rem;
}

/* Visually centred title */
.programme-outline-header h2 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

.outline-toggle-btn {
  line-height: 1;
  padding: 0.55rem 1.3rem; /* slightly taller */
  border-radius: 999px;
  border: 2px solid #1a73e8;
  background: transparent;
  color: #1a73e8;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

/* Centre all programme section titles */
.programme-video h2,
.programme-outline h2,
.programme-gallery h2,
.programme-trainers h2,
.programme-resources h2 {
  text-align: center;
}

.outline-toggle-btn:hover {
  background-color: #1a73e8;
  color: #ffffff;
}

@media (max-width: 640px) {
  .programme-outline-header {
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
  }

  .programme-outline-header h2 {
    position: static;
    transform: none;
  }
}

/* =========================
   TRAINERS GRID
========================= */

.trainer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 220px));
    gap: 32px;
    max-width: 1000px;      /* controls how wide the row can stretch */
    margin: 0 auto;         /* centres the entire grid */
    margin-left: auto;
    margin-right: auto;
}

.trainer-grid.centered {
    justify-content: center;
}

/* =========================
   TRAINER CARD
========================= */

.trainer-card {
    max-width: 220px;
    text-align: center;
}

/* IMAGE */
.trainer-image {
    width: 100%;
    height: 220px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    margin-bottom: 12px;
}

.trainer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* NAME */
.trainer-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

/* SPECIALTY */
.trainer-overlay strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 4px;
}

/* BIO */
.trainer-overlay p {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    margin: 0;
}

/* =========================
   RESPONSIVE
========================= */

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

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

@media (max-width: 480px) {
    .trainer-grid {
        grid-template-columns: 1fr;
    }
}

.trainer-specialty {
    margin: 6px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #0066cc;
    text-align: center;
}

.trainer-bio {
    font-size: 13px;
    line-height: 1.5;
    color: #555;
    text-align: center;
}

/* =========================
   RESOURCES GRID
========================= */

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Shared resource card */
.resource-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Infographic image */
.resource-card[data-type="infographic"] img {
    width: 100%;
    max-height: 220px;      /* 🔥 prevents giant images */
    object-fit: contain;    /* 🔥 keep full image visible */
    border-radius: 12px;
    margin-bottom: 12px;
}

/* =========================
   RESOURCE FILTER BUTTONS
========================= */

.resource-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 24px 0 32px;
}

.resource-filters button {
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 999px;
    border: 2px solid #1a73e8;
    background: transparent;
    color: #1a73e8;
    cursor: pointer;
    transition: all 0.25s ease;
}

.resource-filters button:hover {
    background: #1a73e8;
    color: #ffffff;
}

/* Active filter */
.resource-filters .active {
    background: #1a73e8;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(26,115,232,0.35);
}

/* ==============================
   Programme Enquiry CTA
============================== */
.programme-enquiry-cta {
    margin-top: 5rem;
    padding: 4rem 2rem;
    background: #ffffff;              /* white box */
    color: #111827;                   /* dark text */
    border-radius: 28px;              /* curved edges */
    font-weight: 600;
}

.programme-enquiry-cta .enquiry-alt,
.programme-enquiry-cta .enquiry-alt a {
    font-weight: 400;
}

.programme-enquiry-cta h2 {
    color: #111827;
}

.programme-enquiry-cta p,
.programme-enquiry-cta .enquiry-points li {
    color: #374151;
    opacity: 1; /* cancel dark-CTA opacity */
}

.programme-enquiry-cta .enquiry-alt {
    color: #4b5563;
}

.programme-enquiry-cta .enquiry-alt a {
    color: #2563eb;
    text-decoration: underline;
}

/* =========================
   ENQUIRY PAGE BACKGROUND
========================= */
.enquiry-page {
    padding: 4rem 1rem;
}

.enquiry-wrapper {
    max-width: 860px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 28px;
    padding: 3.5rem 3rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.enquiry-header {
    text-align: center;
    margin-bottom: 3rem;
}

.enquiry-header h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #2563eb; /* blue */
    margin-bottom: 0.75rem;
}

.enquiry-context {
    color: #64748b;
    font-size: 1rem;
}

/* Form layout */
.enquiry-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-group.full {
    grid-column: 1 / -1;
}

/* Labels */
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #111827;
}

/* Match select styling to text inputs */
.enquiry-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23666' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
    padding-right: 48px;
    width: 100%;
    height: 48px;                 /* 🔑 match input height */
    padding: 0 48px 0 18px;       /* vertical centering */
    font-size: 1rem;
    line-height: 45px;            /* force text alignment */
    font-family: inherit;
    border: 1.5px solid #e1e6f0;
    border-radius: 14px;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    color: #9ca3af; /* default placeholder color */
}

/* Dropdown arrow */
.enquiry-form .form-group {
    position: relative;
}

/* Focus state */
.enquiry-form select:focus {
    outline: none;
    border-color: #4f6df5; /* match your theme */
    box-shadow: 0 0 0 3px rgba(79, 109, 245, 0.15);
}

/* When the user selects an actual option, make it black */
.enquiry-form select:valid {
    color: #111827; /* normal selected text */
}

.enquiry-form select option {
    color: #111827; /* dark grey for all options */
}

.enquiry-form select option[value=""] {
    color: #9ca3af; /* light grey for placeholder */
    padding: 0;
}

/* Inputs */
.enquiry-form input,
.enquiry-form textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    border-radius: 14px;
    border: 1.5px solid #e3e7f0;
    background: #ffffff;
    transition: all 0.2s ease;
}

.enquiry-form textarea {
    resize: none;        /* 🔒 disable drag */
    line-height: 1.6;
}

/* Focus state */
.enquiry-form input:focus,
.enquiry-form textarea:focus {
    outline: none;
    border-color: #7b7ff5;
    box-shadow: 0 0 0 4px rgba(123,127,245,0.15);
}

.captcha-group {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.form-actions {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-actions button {
    width: 100%;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 999px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    cursor: pointer;

    /* No movement, no purple glow */
    box-shadow: none;
    transition: filter 0.2s ease;
}

.form-actions button:hover {
    filter: brightness(1.05); /* subtle hover feedback */
}

.btn-secondary {
    text-align: center;
    padding: 14px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #d1d5db;
}

@media (max-width: 640px) {
    .enquiry-wrapper {
        padding: 2.5rem 1.5rem;
    }

    .enquiry-header h1 {
        font-size: 2rem;
    }
}

.enquiry-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.enquiry-content h2 {
    margin-top: 0;
    font-size: 2rem;
}

.enquiry-content p {
    margin: 1rem 0;
    max-width: 520px;
    opacity: 0.95;
}

.enquiry-points {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.enquiry-points li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

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

.enquiry-btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    font-size: 1.05rem;
    border-radius: 999px;
    text-decoration: none;
}

.enquiry-alt {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.enquiry-alt a {
    color: #ffffff;
    text-decoration: underline;
}

.programme-enquiry-cta .enquiry-btn {
    background: #2563eb;
    color: #ffffff;
    font-weight: 700;
    border-radius: 999px;
    padding: 14px 32px;
    margin-bottom: 16px;

    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    text-decoration: none;
    position: relative;
    overflow: hidden;

    /* smoother lift */
    transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
}

/* SHINE OVERLAY */
.programme-enquiry-cta .enquiry-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;

    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.35),
        transparent
    );

    transform: skewX(-20deg);
}

/* Hover: lift + shine sweep */
.programme-enquiry-cta .enquiry-btn:hover {
    transform: translateY(-4px);
}

.programme-enquiry-cta .enquiry-btn:hover::before {
    animation: button-shine 0.9s ease forwards;
}

/* Arrow */
.programme-enquiry-cta .enquiry-btn .arrow {
    display: inline-block;
    transition: transform 0.35s ease;
}

/* Arrow slide */
.programme-enquiry-cta .enquiry-btn:hover .arrow {
    transform: translateX(6px);
}

/* Shine animation */
@keyframes button-shine {
    from {
        left: -150%;
    }
    to {
        left: 150%;
    }
}

.required {
    color: #dc2626; /* red-600 */
    font-weight: 700;
    margin-left: 2px;
}

.enquiry-errors {
    background: #fff4e5;
    border: 1px solid #ffb74d;
    color: #8a4b00;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.enquiry-errors ul {
    margin: 0;
    padding-left: 1.2rem;
}

.enquiry-errors li {
    margin-bottom: 0.3rem;
}

.form-consent label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #334155;
}

.form-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
}

.enquiry-source-link:hover {
    text-decoration: underline;
}

.enquiry-success {
    text-align: center;
    max-width: 80%;
    margin: 1rem auto;
    padding: 2rem 1rem;
}

.enquiry-success h2 {
    margin-bottom: 0.75rem;
}

.enquiry-success p {
    margin-bottom: 2rem;
    color: #555;
}

.success-actions {
    display: flex;
    justify-content: center;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================
   Knowledge Hub Intro
   ========================= */
.info-header {
    background: linear-gradient(135deg, #4f46e5 0%, #312e81 100%);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.info-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
}

.info-thumb-wrapper {
    position: relative;
    padding-top: 140%;
    background: #f1f5f9;
    overflow: hidden;
}

.info-thumb-wrapper img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.5s;
}

.info-card:hover .info-thumb-wrapper img {
    transform: scale(1.03);
}

.info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 2rem 1rem 1rem;
    color: white;
}

.info-cat {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 0.25rem;
    display: block;
}

.info-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 600;
}

.knowledge-info-title {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0;
    font-weight: 600;
    color: #ffffff;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
    
.hub-intro {
    gap: 40px;
}

.hub-intro-text {
    background: url('/assets/images/knowledge-banner.png') center/cover no-repeat;
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.hub-intro-text::before,
.hub-intro-text::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.3); /* overlay for readability */
    z-index: 0;
}

/* Banner Text */
.hub-intro-text h1,
.hub-intro-text p {
    position: relative;
    z-index: 1;
    margin: 0.2em 0;
    color: #ffffff; /* bright white for contrast */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7); /* extra readability */
}

/* === Heading === */
.hub-intro-text h1 {
    font-family: "Space Grotesk", "MD Primer Bold", Rubik, Lato, system-ui, sans-serif;
    font-size: 3rem;           /* banner size */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;

    /* Gradient text */
    background: linear-gradient(90deg, #ffffff, #ffdd00, #ff0303);
    background-size: 300% 300%;
    animation: textFlow 8s ease-in-out infinite;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* Optional subtle shadow for glow depth */
    text-shadow: 2px 2px 10px rgba(0,0,0,0.35);
}

/* === Subheading === */
.hub-intro-text p {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
}

@keyframes textFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hub-intro-image img {
    max-width: 360px;
    width: 100%;
    height: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .hub-intro {
        flex-direction: column;
        text-align: left;
    }

    .hub-intro-image img {
        max-width: 280px;
    }
}

.knowledge-hub {
     background:
        radial-gradient(800px 400px at 80% 20%, rgba(99,102,241,0.06), transparent),
        radial-gradient(600px 300px at 10% 70%, rgba(34,197,94,0.05), transparent),
        #f8fafc;
    max-width: 1200px;
    margin: 40px auto;
    padding: 32px 32px;
    padding-top: 5px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

/* NEW / Fresh badge */
.hub-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    z-index: 5;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    backdrop-filter: blur(6px);
}

/* Color + vibe */
.hub-badge-new {
    background: linear-gradient(135deg, #ff7a18, #ffb347);
    color: #fff;
}

@keyframes softPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.hub-badge-new {
    animation: softPulse 2.5s ease-in-out infinite;
}

/* Mobile spacing */
@media (max-width: 768px) {
    .knowledge-hub {
        margin: 20px;
        padding: 24px 20px;
        border-radius: 16px;
    }
}

.hub-tabs {
  position: relative;
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6e6e6;
  margin-bottom: 32px;
}

.tab-buttons {
    display: flex;
    gap: 24px;
}

.hub-search {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
}

.hub-search input {
    width: 520px;
    max-width: 360px;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
}

.hub-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

@media (max-width: 900px) {
    .hub-search {
        position: static;
        transform: none;
        order: 2;
        width: 100%;
        margin: 16px 0;
    }

    .hub-tabs {
        flex-wrap: wrap;
    }
}

.tab-btn {
  padding: 14px 0;
  position: relative;
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
  font-weight: 500;
  transition: color 0.2s ease;
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  display: block;
  left: 0;
  right: 0;
  bottom: -4px;              /* sits exactly on divider */
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, #6366f1, #22c55e, #06b6d4);
  background-size: 200% 100%;
  animation: tabGradientFlow 3s ease infinite;
}

.tab-btn:hover {
  color: #222;
}

.tab-btn.active {
  font-weight: 600;
  background: linear-gradient(
    90deg,
    #6366f1,
    #22c55e,
    #06b6d4,
    #6366f1
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: tabGradientFlow 3s ease infinite;
}

@keyframes tabGradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hub-layout {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 48px;
}

.hub-sidebar {
  padding-left: 32px;
  border-left: 1px solid #eee;
}

.hub-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  padding: 0;
  border-bottom: 1px solid #eee;
}

.hub-card h2 {
    font-family: nyt-cheltenham,
                 cheltenham-fallback-georgia,
                 cheltenham-fallback-noto,
                 Georgia,
                 "Times New Roman",
                 Times,
                 serif;
    font-weight: 600;
    line-height: 1.25;
}

.hub-card img {
  width: 180px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.hub-text .author-name {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 6px;
}

.hub-text h2 {
    margin: 0 0 8px; /* 🔥 tighten title → excerpt */
    font-family: nyt-cheltenham, cheltenham-fallback-georgia,
                 cheltenham-fallback-noto, georgia,
                 "Times New Roman", times, serif;
}

.excerpt {
    margin: 0 0 10px;
    color: #444;
    line-height: 1.55;
}

.meta {
  font-size: 13px;
  color: #888;
}

/* Sidebar section titles */
.hub-sidebar h3 {
    font-family: "Space Grotesk", Rubik, Lato, system-ui, sans-serif;
    font-weight: 700;
    margin-bottom: 12px;

    background: linear-gradient(90deg, #667eea, #764ba2, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.sidebar-block {
  margin-bottom: 0px;
}

.sidebar-item {
  margin-bottom: 12px;
  font-size: 14px;
}

.sidebar-item span {
  text-decoration: none;
  display: block;
  color: #888;
  font-size: 12px;
}

.sidebar-item:hover span {
  text-decoration: none;
}

/* Remove underline from the link itself */
.sidebar-item-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Only underline the title on hover */
.sidebar-item-link:hover strong {
  text-decoration: underline;
}

/* Disable List cursor when Infographics tab is active */
.infographics-active .view-btn[data-view="list"] {
    cursor: not-allowed;
    opacity: 0.45; /* optional */
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-pill {
  background: #f2f2f2;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.topic-pill:hover {
    color: #fff;
    transform: translateY(-2px);

    background: linear-gradient(
        135deg,
        #6366f1,
        #22c55e,
        #06b6d4
    );
    background-size: 300% 300%;
    animation: pillFlow 2.5s ease infinite;

    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
}

@keyframes pillFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@media (max-width: 768px) {
  .hub-layout {
    grid-template-columns: 1fr;
  }

  .hub-sidebar {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #eee;
    padding-top: 32px;
  }
}

.see-more-topics {
  margin-top: 12px;
  padding: 0;
  background: none;
  border: none;
  font-size: 14px;
  color: #8a8a8a;
  cursor: pointer;
  text-align: left;
}

.see-more-topics:hover {
  text-decoration: underline;
}

.hub-cta {
    margin-top: 24px;
}

.hub-view-all {
    display: inline-block;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 14px 0; /* aligns with tab baseline */
    border-bottom: 1px solid transparent;
    white-space: nowrap;
}

.hub-view-all:hover {
    color: #111;
    text-decoration: none; /* 🔥 no underline */
}

/* =========================
   HUB ARTICLE CARDS
========================= */
.hub-article-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    transition: transform .25s ease, box-shadow .25s ease;
}

.hub-article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0,0,0,0.12);
}

.hub-card-thumb {
    border-radius: 14px;
    height: 180px;
    background: #f1f5f9;
    overflow: hidden;
}

.hub-card-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
    backface-visibility: hidden;
}

.hub-article-card:hover img {
    transform: scale(1.05);
}

.hub-card-body {
    padding: 18px 18px 20px;
    display: flex;
    flex-direction: column;
}

.hub-card-cat {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
}

.hub-card-title {
    font-size: 18px;
    line-height: 1.35;
    margin: 0 0 8px;
}

.hub-card-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.55;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.hub-card-meta {
    font-size: 13px;
    color: #888;
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* =========================
   HUB INFOGRAPHIC CARDS
========================= */
.hub-info-body {
    padding-top: 10px;
}

.hub-info-body h2 {
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 6px;
}

.hub-info-body .excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.hub-info-card {
    display: block;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    flex-direction: column;
}

.hub-info-card .info-thumb-wrapper {
    border-radius: 0;
}

.hub-info-card:hover .info-thumb-wrapper img {
    transform: scale(1.04);
    transition: transform 0.4s ease;
}

.hub-info-card:hover img {
    transform: scale(1.03);
}

.hub-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}

.hub-info-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #cbd5e1;
    display: block;
    margin-bottom: 4px;
}

.hub-info-title {
    font-size: 16px;
    line-height: 1.3;
    margin: 0;
}

/* =========================
   View Toggle Buttons
========================= */
.view-toggle {
    display: flex;
    gap: 6px;
}

.view-btn {
    border: 1px solid #ddd;
    background: transparent;
    padding: 6px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    color: #444;
}

.view-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

.tab-content {
    display: none;
}

/* =========================
   LIST VIEW (default)
========================= */

.hub-content.list-view .tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hub-content.list-view .hub-card {
    display: flex;
    align-items: stretch;
    min-height: 160px;
    gap: 24px;
    width: 100%;
    overflow: hidden;
    border-radius: 16px; /* match your card radius */
}

.hub-content.list-view .hub-card-body {
    flex: 1;
    order: 1;
}

.hub-content.list-view .hub-card-thumb {
    order: 2;
    flex-shrink: 0;
    width: 220px;
    align-self: stretch;   /* 🔥 THIS fixes the bottom gap */
    overflow: hidden;
}

.hub-content.list-view .hub-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 0; /* IMPORTANT: card controls rounding */
}

.hub-content.list-view .hub-card-link {
    display: block;
}

/* =========================
   INFOGRAPHIC LIST VIEW
   Match article list style
========================= */

.hub-content.list-view .hub-info-card {
    display: flex;
    align-items: stretch;
    gap: 24px;
    min-height: 160px;
    border-radius: 16px;
    overflow: hidden;
}

/* Text side */
.hub-content.list-view .hub-info-card .info-overlay {
    position: static;
    background: none;
    color: #111;
    padding: 18px;
    flex: 1;
}

/* Title */
.hub-content.list-view .hub-info-card .info-title {
    font-size: 18px;
    margin-bottom: 8px;
}

/* Meta */
.hub-content.list-view .hub-info-card .meta {
    font-size: 13px;
    color: #888;
}

/* Image side (RIGHT) */
.hub-content.list-view .hub-info-card .info-thumb-wrapper {
    order: 2;
    width: 220px;
    flex-shrink: 0;
    padding-top: 0;              /* 🔥 kill tall ratio */
    height: auto;
}

/* Image itself */
.hub-content.list-view .hub-info-card img {
    position: static;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================
   GRID VIEW
========================= */

.hub-content.grid-view .tab-content.active {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .hub-content.grid-view .tab-content.active {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hub-content.grid-view .tab-content.active {
        grid-template-columns: 1fr;
    }
}

.sidebar-view-toggle {
    margin-top: 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 6px;
}

.hub-content.grid-view .hub-card {
    flex-direction: column;
}

.hub-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hub-card-link:hover .hub-card {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
}

.hub-content.grid-view .hub-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.hub-content.grid-view .hub-text {
    padding: 0;
}

/* ===== ARTICLES ===== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    justify-content: center;      /* centers grid items */
    max-width: 1000px;            /* prevents over-stretching */
    margin: 0 auto;               /* centers the grid block */
}

.card-meta {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.article-sidebar-card .card-meta {
    font-size: 13px;
    color: #666;
}

.article-sidebar-card .sidebar-block {
    margin-top: 0.5rem;
}

.article-sidebar-card hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0.75rem 0;
}

.article-sidebar-card ul {
    padding-left: 1rem;
    margin: 0.25rem 0 0.5rem;
}

.article-sidebar-card li {
    margin-bottom: 0.25rem;
}

.article-category {
    display: inline-block;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    text-transform: uppercase;
    color: #2563eb;
    margin-bottom: 16px;
    text-decoration: none;
}

.article-category:hover {
    text-decoration: underline;
}

.article-card:hover {
    transform: translateY(-4px);
}

.article-thumb img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.article-info {
    padding: 14px;
}

.article-info h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.article-date {
    font-size: 0.9rem;   /* slightly larger */
    color: #777;
}

.article-back-top {
    display: inline-block;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 6px;
    text-decoration: none;
}

.article-back-top:hover {
    text-decoration: underline;
}

/* Full-width top section */
.article-intro {
    max-width: 1200px;
    margin: 0 auto 32px;
    padding: 0 20px;
}

.infographic-intro {
    padding-left: 0;
}

/* Two-column layout starts from hero image and content */
.article-body {
    display: flex;
    grid-template-columns: 2fr 1fr; /* main content */
    gap: 10px;
    max-width: 1200px;
    margin: 0;
    padding: 0 0 40px 20px;
}

.article-page-body {
    display: flex;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 40px 20px;
}

.article-main {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #ffffff;
    padding: 48px;
    border-radius: 16px;
    border: 1px solid #e5e7eb; /* soft perimeter */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #2563eb;
}

.article-main p:first-of-type {
    font-size: 1.15rem;
    line-height: 1.7;
    color: #1f2937;
}

.article-main p {
    margin-bottom: 1.6rem;
    white-space: normal;
    display: block;
    overflow-wrap: break-word;
    position: relative;
    margin-left: 0;
    padding-left: 0;
    text-indent: 0;
}

/* Sidebar stays visible on scroll */
.article-sidebar {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 100px;
    align-self: flex-start;   /* ensures sticky works inside grid */
    margin-left: auto;       /* pushes sidebar to far right */
    padding-right: 0;               /* remove internal spacing */
}

.article-related-resources {
    padding-left: 20px;
    background: transparent;
}

.related-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.related-inner h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.5rem;
}

.related-section-spacer {
    margin-top: 4rem;
}

.related-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ALWAYS 3 slots */
    gap: 1.5rem;
}

.related-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.08);
}

.related-card-image {
    height: 160px;              /* smaller, consistent */
    overflow: hidden;
    background: #e5e7eb;
}

.related-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card-body {
    padding: 1.25rem;
}

.card-type {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
}

.related-card h3 {
    font-size: 1.05rem;
    margin: 0.6rem 0 1rem;
    line-height: 1.4;
}

.related-card-cta {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

/* Hero image */
.article-hero img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* Article content */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    background: #ffffff;
}

/* Sidebar card */
.article-sidebar-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.article-sidebar-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.article-sidebar-card p,
.article-sidebar-card ul {
    margin: 0 0 12px;
    font-size: 0.95rem;
}

/* ===== HOME PAGE CAROUSEL: ARTICLES ===== */
.home-carousel-programme {
    display: block;
    text-decoration: none;
    color: inherit;
}

.home-carousel-programme-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.home-carousel-programme-info {
    padding: 0.5rem 0;
}

.home-carousel-articles {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 28px;
}

.home-carousel-article {
    min-width: 230px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease;
}

.home-carousel-article-thumb {
    height: 160px;          /* CRITICAL */
    overflow: hidden;
}

.home-carousel-article:hover {
    transform: translateY(-4px);
}

.home-carousel-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.home-carousel-article-info {
    padding: 14px;
}

.home-carousel-article-info h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.home-carousel-article-date {
    font-size: 0.9rem;
    color: #777;
    display: block;
}

/* ===== HOME PAGE CAROUSEL: INFOGRAPHICS ===== */
.home-carousel-infographics {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
    margin-top: 28px;
}

.home-carousel-infographic {
    min-width: 230px;             /* same as articles */
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-carousel-infographic img {
    width: 100%;
    height: 160px; /* match article thumb */
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.home-carousel-infographic-title {
    font-size: 1.1rem; /* same as article h3 */
    line-height: 1.4;
    font-weight: 500;
    text-align: center;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* truncate long titles */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================
   HOME PAGE CAROUSEL BUTTONS
   ================================ */

.carousel-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0 32px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #1a73e8;
    background-color: #ffffff;
    color: #1a73e8;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background-color: #1a73e8;
    color: #ffffff;
    transform: translateY(-2px);
}

.carousel-btn.active {
    background-color: #1a73e8;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(26,115,232,0.35);
}

.home-carousel-article-info h3,
.home-carousel-infographic-title {
    display: -webkit-box;        /* Chrome, Safari, Edge */
    display: -moz-box;           /* Firefox older versions */
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    -webkit-line-clamp: 2;       /* limit to 2 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3em;             /* approximate height of 2 lines */
    max-height: calc(1.4em * 2);  /* 👈 locks height */
}

.home-carousel-article,
.home-carousel-infographic {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.home-carousel-article:hover,
.home-carousel-infographic:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    position: relative;   /* ensure z-index works */
    z-index: 10;
}

.home-carousel-articles,
.home-carousel-infographics {
    overflow: visible;
    padding-top: 12px; /* space for hover lift */
}

/* ================================
   Article Page
================================ */

.article-layout {
    display: flex;
    gap: 32px;
    align-items: flex-start; /* ensures sidebar and main content start at same top */
}

/* Header */
.article-header {
    max-width: 760px;
    margin-bottom: 3rem;
}

.article-meta-top {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    opacity: 0.75;
}

.article-meta-top span {
    margin-right: 0.4rem;
}

.article-title {
    font-size: 2.75rem;
    font-weight: 800;
    max-width: 900px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 5px;
}

.article-page-title {
    font-size: 2.75rem;
    font-weight: 800;
    max-width: 900px;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0.5rem 0 1rem;
}

.article-meta-bottom {
    font-size: 0.95rem;
    color: #64748b;
}

/* Hero Image */
.article-hero {
    margin-top: 0;        /* 🔥 critical */
    margin-bottom: 3rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-family: source-serif-pro, Georgia, Cambria, "Times New Roman", Times, serif;
    font-size: 1.05rem;
    line-height: 1.75;
}

/* Related Programmes */
.article-programmes {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.article-programmes h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.article-programmes ul {
    list-style: none;
    padding: 0;
}

.article-programmes li {
    margin-bottom: 0.5rem;
}

.article-programmes a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
}

.article-footer-buttons {
    display: flex;
    justify-content: space-between; /* 2 buttons: left & right */
    margin: 40px 0;
}

/* On small screens, stack buttons vertically and center */
@media (max-width: 640px) {
    .article-footer-buttons {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
}

.article-footer-buttons .article-back-top:first-child:last-child {
    justify-content: center; /* only 1 button, center it */
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        margin-top: 3rem;
    }
}

/* Responsive: stack columns on small screens */
@media (max-width: 768px) {
    .article-body {
        grid-template-columns: 1fr;
        padding: 0 20px 20px;
    }

    .article-sidebar {
        position: static; /* disable sticky on mobile */
    }
}

.infographic-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.infographic-header {
    position: static;   /* IMPORTANT */
    z-index: auto;
    margin-top: 0;
    padding-top: 0;
}

.infographic-header h1 {
    text-align: center;
    margin-top: 5rem;
    margin-bottom: 1.5rem;
}

.infographic-zoom-container {
    width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* important */
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    position: relative;
}

/* Hover actions container */
.infographic-hover-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 2;
}

/* Show on hover */
.infographic-zoom-container:hover .infographic-hover-actions {
    opacity: 1;
    pointer-events: auto;
}

/* Buttons */
.info-action-btn {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease;
}

.info-action-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
}

.infographic-zoom-container img {
    max-width: 100%; /* 20px each side */
    margin: 0 auto; /* center it */
    display: block;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.25s ease;
}

.infographic-description {
    margin-top: 2.5rem;
    line-height: 1.7;
}

.infographic-desc {
    font-size: 0.9rem;
    color: #374151; /* dark gray */
    margin: 0.25rem 0 0.5rem;
    line-height: 1.3;
}

.infographic-date {
    font-size: 0.75rem;
    color: #6b7280; /* lighter gray */
    margin: 0;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#infographicLightbox {
    z-index: 20000;
}

.lightbox.hidden {
    display: none;
}

.lightbox-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.85);
}

#lightboxImage {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 20000;
    transform-origin: center center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-download-bttn {
    position: absolute;
    top: 12px;
    right: 12px;

    z-index: 5;

    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;

    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-download-bttn:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Shared button styling */
.lightbox-btn,
.lightbox-zoom-controls button {
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 16px;
}

.lightbox-btn:hover,
.lightbox-zoom-controls button:hover {
    background: rgba(0,0,0,0.85);
}

.lightbox-prog.hidden {
    display: none;
}

/* Download button (pill / oblong) */
.download-btn {
    position: absolute;
    top: 12px;
    right: 12px;

    padding: 8px 16px;
    border-radius: 999px; /* pill */
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;

    text-decoration: none;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;

    transition: opacity 0.2s ease, transform 0.2s ease;
}

.download-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-1px);
}

/* Zoom buttons (bottom center) */
.lightbox-zoom-controls {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

@keyframes zoomIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.related-programme-cta {
    align-self: stretch;
}

.related-programme-box {
    height: 100%;
    padding: 20px;
    border-radius: 14px;
    background: #f0f6ff;
    border: 1px solid #dbeafe;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.related-programme-box h4 {
    margin-bottom: 8px;
    color: #1e40af;
    font-size: 1.05rem;
}

.related-programme-box p {
    margin-bottom: 16px;
    color: #334155;
}

/* ---------- Article Cards ---------- */
.article-card-program {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
}

.article-card-program:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.article-thumb-program {
    border-radius: 12px;
    overflow: hidden;
}

.infographic-card {
    cursor: pointer;
}

.infographic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

.article-thumb-program img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.article-body-program {
    padding-top: 1rem;
}

.article-body-program h3 {
    margin: 0 !IMPORTANT;
}

.article-meta-program {
    font-size: .85rem;
    opacity: .7;
    display: flex;
    gap: .4rem;
}

/* ---------- Lightbox ---------- */
.lightbox-prog {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
}

.lightbox-prog img {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto;
}

.lightbox-prog.hidden {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

.lightbox-view-btn {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20000;

    background: #2563eb;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;

    box-shadow: 0 10px 30px rgba(0,0,0,.35);
    transition: transform .2s ease, box-shadow .2s ease;
}

.lightbox-view-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 14px 40px rgba(0,0,0,.45);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin: 2.5rem 0 1rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: #f1f5f9;
}

.page-btn.active {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}

/* Desktop only */
@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}