@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800;900&display=swap');

:root {
    /* Main Theme Colours (Vibrant Purple & Punchy Yellow) */
    --primary-1: #922c8b;
    --primary-2: #7a2273;
    --primary-glow: rgba(146, 44, 139, 0.5);

    --secondary-1: #FFD600;
    --secondary-2: #E6C200;
    --secondary-glow: rgba(255, 214, 0, 0.8);

    /* Header & Footer Specific Tints - Opacity boosted for a punchier yellow */
    --header-glass-yellow: rgba(255, 214, 0, 0.45);
    --header-glass-purple: rgba(146, 44, 139, 0.12);

    /* Backgrounds & Surfaces */
    --bg-color: #f1f5f9;
    --surface-glass: rgba(255, 255, 255, 0.4);

    /* Typography & Borders */
    --text-dark: #1e293b;
    --text-muted: #475569;
    --border-light: rgba(255, 255, 255, 0.5);
    --border-purple: rgba(146, 44, 139, 0.15);

    /* Dynamic Header Height */
    --header-height: 105px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- UTILITY: Animation Bypass --- */
.no-transition,
.no-transition * {
    transition: none !important;
    animation: none !important;
}

/* ==========================================
   BUTTONS & INPUTS
   ========================================== */
.btn-flat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-header-action {
    background: var(--header-glass-purple);
    border: 1px solid var(--border-purple);
    color: var(--primary-1);
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-header-action:hover {
    background: rgba(146, 44, 139, 0.15);
    box-shadow: 0 0 15px var(--primary-glow);
    border-color: var(--primary-1);
}

.btn-primary {
    background: var(--primary-1);
    color: #fff;
    box-shadow: 0 4px 10px rgba(146, 44, 139, 0.2);
}

.btn-primary:hover {
    background: var(--primary-2);
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-2px);
}

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

.standard-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: 1rem;
    background: var(--surface-glass);
    transition: all 0.3s ease;
    outline: none;
    backdrop-filter: blur(4px);
    color: var(--text-dark);
    font-weight: 600;
}

.standard-input:focus {
    border-color: var(--primary-1);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 15px var(--primary-glow);
}

.search-input-compact {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--surface-glass);
    transition: all 0.3s ease;
    outline: none;
    backdrop-filter: blur(4px);
    color: var(--text-dark);
    font-weight: 600;
}

.search-input-compact:focus {
    border-color: var(--primary-1);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* ==========================================
   SCROLLING HEADER ARCHITECTURE
   ========================================== */
.site-header {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: var(--header-glass-yellow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 5% 10px 2%;
    transition: top 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.3s ease, padding 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    flex: 1; 
}

.btn-sidebar-toggle { order: 1; }
.header-bird-logo { order: 2; height: 80px; width: auto; object-fit: contain; transition: all 0.3s ease; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)); }
.header-logo h2 { order: 3; font-size: 1.8rem; font-weight: 900; color: var(--primary-1); transition: all 0.3s ease; white-space: nowrap; letter-spacing: -0.5px; }

.btn-sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--primary-1);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    margin-right: 5px;
    border-radius: 8px;
}

.btn-sidebar-toggle:hover {
    color: var(--primary-2);
    text-shadow: 0 0 15px var(--primary-glow);
    background: var(--header-glass-purple);
}

.header-content-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: none;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding 0.3s ease, margin 0.3s ease;
    overflow: hidden;
    opacity: 1;
    max-height: 60px;
}

.header-top .action-cluster {
    display: flex;
    gap: 12px;
}

.site-header.scrolled {
    padding: 5px 5% 5px 2%;
    background: rgba(255, 214, 0, 0.65); /* Boosted to 65% for punchy solid feel */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.site-header.scrolled .header-top {
    max-height: 0;
    opacity: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.site-header.scrolled .header-bird-logo {
    height: 45px;
}

.site-header.scrolled .header-logo h2 {
    font-size: 1.4rem;
}

/* --- NAVIGATION LINKS --- */
.header-nav {
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
    padding: 6px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    margin: 0;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

.nav-links li {
    z-index: 2;
}

.nav-links a {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 999px;
    font-weight: 800;
    color: var(--primary-1);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-dark);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.nav-highlight {
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 0;
    background: var(--primary-1);
    border-radius: 999px;
    box-shadow: 0 4px 15px var(--primary-glow);
    z-index: 1;
    pointer-events: none;
    width: 0;
}

/* Nav text inside highlight pill */
.nav-links a.active {
    color: #fff;
    text-shadow: none;
}
.nav-links a.active:hover {
    color: #fff;
}

/* ==========================================
   MAIN LAYOUT & SIDEBAR ARCHITECTURE
   ========================================== */
.main-layout {
    display: flex;
    align-items: flex-start;
    min-height: calc(100vh - var(--header-height));
    position: relative;
    z-index: 1; /* Secures body content strictly below header stacking context */
}

.site-sidebar {
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    width: 260px;
    background: var(--header-glass-purple);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-purple);
    padding: 30px 20px;
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    z-index: 900;
}

.site-sidebar.collapsed {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right: none;
    opacity: 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 220px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--primary-1);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--primary-1);
    color: #fff; /* Changed to white for better contrast inside sidebar */
    box-shadow: 0 4px 15px var(--primary-glow);
}

.sidebar-section-title {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; 
    color: var(--text-muted); font-weight: 800; margin: 15px 0 5px 10px;
}

.content {
    flex: 1;
    padding: 40px 5%;
    transition: padding 0.4s ease;
    min-width: 0;
}

/* ==========================================
   MODALS (FROSTED GLASS & APP STORES)
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(30px);
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2), inset 0 0 20px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.modal-box.sm {
    max-width: 500px;
    text-align: center;
}

.modal-box.lg {
    max-width: 800px;
    padding: 0;
    overflow: hidden;
    display: flex;
}

.modal-overlay.show .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary-1);
    color: #fff;
    transform: rotate(90deg);
}

.modal-split-left {
    flex: 1.2;
    background: rgba(255, 255, 255, 0.4);
    padding: 35px;
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    overflow-y: auto;
}

.modal-split-right {
    flex: 0.8;
    background: rgba(255, 255, 255, 0.1);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.app-stores-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 25px;
}

.app-store-card {
    background: rgba(255, 255, 255, 0.5);
    padding: 25px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.app-store-card img {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
    border-radius: 12px;
}

/* ==========================================
   FOOTER (DETAILED GLASSY YELLOW)
   ========================================== */
.site-footer {
    background: var(--header-glass-yellow);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    padding: 60px 5% 20px 5%;
    color: var(--primary-1);
    z-index: 10;
    position: relative;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: 20px;
    color: var(--primary-1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col p {
    color: var(--text-dark);
    font-weight: 600;
    opacity: 0.8;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dark);
    font-weight: 600;
    opacity: 0.9;
}

.footer-col ul li i {
    color: var(--primary-1);
    width: 20px;
    text-align: center;
}

.footer-col ul li a {
    transition: all 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-1);
    padding-left: 5px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo img {
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.footer-logo h2 {
    font-size: 1.3rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.footer-bottom {
    border-top: 1px solid var(--border-purple);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    font-weight: 600;
    color: var(--text-dark);
    opacity: 0.7;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--header-glass-purple);
    color: var(--primary-1);
    transition: all 0.3s ease;
    border: 1px solid var(--border-purple);
    font-size: 1.1rem;
}

.social-links a:hover {
    background: var(--primary-1);
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
    transform: translateY(-3px);
}

/* ==========================================
   HOMEPAGE: SECTION HEADERS & ALERTS
   ========================================== */
.text-muted {
    color: var(--text-muted);
}

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

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 15px;
    border-radius: 12px;
    color: #ef4444;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

.dashboard-section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary-1);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.8rem;
    color: var(--text-dark);
    font-weight: 900;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-header.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    text-align: left;
    margin-bottom: 2.5rem;
}

.section-header.flex-header .section-subtitle {
    margin-bottom: 5px;
}

/* ==========================================
   HOMEPAGE: HERO CAROUSEL
   ========================================== */
.hero-carousel {
    position: relative;
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--surface-glass);
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.carousel-track {
    display: flex;
    height: 100%;
    width: 100%;
}

.hero-slide {
    flex: 0 0 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
}

.fallback-slide {
    background: linear-gradient(135deg, var(--primary-1), var(--primary-2));
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(22, 13, 33, 0.9) 0%, rgba(22, 13, 33, 0.2) 100%);
    z-index: 1;
}

.slide-content {
    z-index: 2;
    position: relative;
    padding-left: 80px;
    padding-right: 80px;
    max-width: 900px;
    text-align: left;
}

.hero-tag {
    display: inline-block;
    background: var(--primary-1);
    color: #fff;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 10px;
    line-height: 1.1;
    color: #ffffff;
    font-weight: 900;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary-1); /* The bright yellow pops well here */
    margin-bottom: 30px;
}

.hero-ref2 {
    opacity: 0.7;
    color: #fff;
    margin-left: 10px;
    font-weight: 400;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.carousel-btn:hover {
    background: var(--primary-1);
    border-color: var(--primary-1);
    box-shadow: 0 0 15px var(--primary-glow);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-indicator {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.hero-indicator.active {
    background: var(--secondary-1);
    transform: scale(1.4);
    box-shadow: 0 0 10px var(--secondary-glow);
}

/* ==========================================
   HOMEPAGE: RECENT NEWS & FEATURES GRID
   ========================================== */
.news-grid,
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.news-card,
.feature-card {
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    display: flex;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.news-card {
    flex-direction: column;
    overflow: hidden;
}

.feature-card {
    padding: 30px;
    align-items: flex-start;
    gap: 20px;
}

.news-card:hover,
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(146, 44, 139, 0.08);
    border-color: rgba(146, 44, 139, 0.2);
}

.news-img-box {
    height: 180px;
    position: relative;
    width: 100%;
}

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

.news-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-1);
    color: var(--text-dark); /* Adjusted for readability on brighter yellow */
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 2px 5px var(--secondary-glow);
}

.news-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
    font-weight: bold;
}

.news-date i {
    color: var(--primary-1);
    margin-right: 5px;
}

.news-title {
    font-size: 1.15rem;
    margin-top: 0;
    margin-bottom: 20px;
    flex-grow: 1;
    color: var(--primary-1);
    font-weight: 800;
}

.btn-align-start {
    align-self: flex-start;
}

.feature-icon {
    flex-shrink: 0;
    width: 65px;
    height: 65px;
    background: rgba(146, 44, 139, 0.1);
    border: 1px solid var(--border-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-1);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary-1);
    color: var(--text-dark); /* Keeps contrast strong inside the icon */
    box-shadow: 0 4px 15px var(--primary-glow);
}

.feature-text h3 {
    font-size: 1.15rem;
    color: var(--primary-1);
    margin-top: 0;
    margin-bottom: 8px;
    font-weight: 800;
}

.feature-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ==========================================
   HOMEPAGE: TESTIMONIALS
   ========================================== */
.testi-track-container {
    width: 100%;
    overflow-x: auto;
    padding: 15px 0 30px 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.testi-track-container::-webkit-scrollbar {
    display: none;
}

.testi-track {
    display: flex;
    gap: 20px;
    width: max-content;
}

.testi-card {
    flex: 0 0 350px;
    background: var(--surface-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    scroll-snap-align: start;
}

.testi-icon {
    color: var(--secondary-1);
    font-size: 2rem;
    margin-bottom: 15px;
}

.testi-quote {
    font-style: italic;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 20px;
    min-height: 80px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.testi-author {
    border-top: 1px solid var(--border-purple);
    padding-top: 15px;
}

.testi-author h4 {
    margin: 0 0 3px 0;
    color: var(--primary-1);
    font-size: 1rem;
    font-weight: 800;
}

.testi-author span {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--text-muted);
}

/* ==========================================
   TRAINING PAGE: MINIMAL COMPACT LIST
   ========================================== */
.course-category-clean {
    margin-bottom: 2.5rem;
}

.category-header-clean {
    font-size: 1.5rem;
    color: var(--primary-1);
    border-bottom: 2px solid var(--border-purple);
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-weight: 900;
    display: flex;
    align-items: center;
}

.course-text-list-clean {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    gap: 2px;
}

.course-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    text-decoration: none;
}

.course-item:last-child a {
    border-bottom: none;
}

.course-item a:hover {
    background: rgba(146, 44, 139, 0.04);
    border-radius: 8px;
}

.course-item a:hover .course-title-text {
    color: var(--primary-1);
}

.course-code-text {
    font-family: monospace;
    font-weight: 800;
    color: var(--primary-1);
    font-size: 0.95rem;
    min-width: 100px;
}

.course-title-text {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    flex: 1;
    transition: color 0.2s ease;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.ref2-chip {
    background: var(--header-glass-yellow);
    color: var(--text-dark);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================
   TRAINING DETAILS & CONTACT LAYOUTS
   ========================================== */
.compact-facts-card {
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 35px;
    border: 1px solid var(--border-light);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* ==========================================
   TRAINING PAGE: CALENDAR MODAL (GRID STYLE)
   ========================================== */
.calendar-container { width: 100%; margin-top: 10px; }
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; padding: 0 5px; }

.cal-btn { 
    background: var(--primary-1); color: white; border: none; cursor: pointer; 
    padding: 6px 18px; border-radius: 20px; font-weight: bold; font-size: 14px;
    transition: transform 0.2s, background 0.2s; box-shadow: 0 4px 10px rgba(146, 44, 139, 0.2);
}
.cal-btn:hover { background: var(--primary-2); transform: scale(1.05); }
.cal-btn:active { transform: scale(0.95); }

#calMonthYear { font-size: 1.3rem; color: var(--text-dark); margin: 0; font-weight: 900; }

.calendar-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px;
    margin-bottom: 8px; text-align: center; font-weight: 800; color: var(--primary-1);
    font-size: 0.85rem; text-transform: uppercase;
}

.calendar-grid { 
    display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; 
    transition: opacity 0.3s ease, transform 0.3s ease; 
}

.day-cell { 
    border: 1px solid var(--border-light); min-height: 65px; padding: 4px; 
    border-radius: 8px; font-size: 12px; background: var(--surface-glass); 
    position: relative; display: flex; flex-direction: column; gap: 3px;
    box-shadow: inset 0 2px 4px rgba(255,255,255,0.4);
}

.day-number { font-weight: 800; display: block; margin-bottom: 2px; color: var(--text-dark); text-align: right; }

.other-month { background-color: rgba(0,0,0,0.02); opacity: 0.6; }
.other-month .day-number { color: var(--text-muted); }
.today { border: 2px solid var(--secondary-1); background: rgba(255, 214, 0, 0.15); }

.event-bar { 
    height: 8px; border-radius: 4px; cursor: pointer; transition: transform 0.2s, opacity 0.2s; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.event-bar:hover { opacity: 0.8; transform: scaleY(1.3); z-index: 10; }

/* ==========================================
   TRAINING PAGE: CALENDAR LEGEND & SPLIT
   ========================================== */
.calendar-split-layout { display: flex; gap: 30px; width: 100%; align-items: stretch; }
.calendar-legend-panel { 
    width: 280px; flex-shrink: 0; border-right: 1px solid var(--border-light); 
    padding-right: 20px; max-height: 450px; overflow-y: auto; 
}
.calendar-grid-panel { flex: 1; min-width: 300px; }

.calendar-legend-panel::-webkit-scrollbar { width: 6px; }
.calendar-legend-panel::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 10px; }

.legend-item { 
    display: flex; align-items: flex-start; gap: 12px; padding: 12px; 
    border-radius: 12px; background: var(--surface-glass); border: 1px solid var(--border-light); 
    cursor: pointer; transition: all 0.2s ease; margin-bottom: 10px; 
}
.legend-item:hover { transform: translateX(5px); border-color: var(--primary-1); box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.legend-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }

/* ==========================================
   NEWS DETAILS GALLERY
   ========================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 4rem;
}

.gallery-item {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    background: var(--surface-glass);
}

.gallery-item:hover {
    transform: scale(1.03) translateY(-5px);
    border-color: var(--primary-1);
    box-shadow: 0 15px 30px rgba(146, 44, 139, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ==========================================
   THIRD-PARTY WIDGET OVERRIDES
   ========================================== */
/* Force the floating Common Ninja AI widget to the absolute front */
body > div[class*="commonninja"],
body > iframe[src*="commonninja"],
body > div[id*="commonninja"] {
    z-index: 20000 !important;
}

/* ==========================================
   MOBILE ARCHITECTURE (GLASSY DRAWER & PAGE OPTIMIZATIONS)
   ========================================== */

/* Base State - Hidden on Desktop */
.mobile-drawer-overlay,
.mobile-glass-drawer {
    display: none;
}

@media (max-width: 768px) {

    /* --- 1. Prevent Background Scrolling when Drawer is Open --- */
    body.drawer-open {
        overflow: hidden !important;
    }

    /* --- 2. Compact the Header & Hide Unnecessary Elements --- */
    .desktop-nav-container,
    .site-sidebar,
    .desktop-only-text,
    .desktop-only-btn {
        display: none !important;
    }

    /* Force the mobile header to never be fully opaque */
    .site-header,
    .site-header.scrolled {
        background: rgba(255, 214, 0, 0.55) !important; /* Increased opacity for punch on mobile header */
        backdrop-filter: blur(10px);
        padding: 10px 15px;
    }

    /* Align Logo on the right side of the text */
    .header-logo {
        gap: 10px;
        width: 100%;
        justify-content: flex-start;
    }

    .btn-sidebar-toggle {
        order: 1;
        z-index: 10000 !important;
        position: relative;
        padding: 15px; /* Massively increased for touch target */
        margin: -5px 0px -5px -5px;
    }

    .header-logo h2 {
        order: 2;
        font-size: 1.25rem;
        white-space: normal;
        line-height: 1.2;
        z-index: 2001;
        position: relative;
    }

    .header-bird-logo {
        order: 3;
        height: 40px;
        margin-left: auto;
        z-index: 2001;
        position: relative;
    }

    /* --- 3. Dimming Overlay --- */
    .mobile-drawer-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100dvh;
        background: rgba(15, 23, 42, 0.4);
        z-index: 9997; /* Sits precisely below the header */
        opacity: 0;
        visibility: hidden;
        pointer-events: none; /* Prevents invisible layer from swallowing clicks */
        transition: all 0.3s ease;
    }

    .mobile-drawer-overlay.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* --- 4. The Glass Drawer (Slides ABOVE Top Header) --- */
    .mobile-glass-drawer {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        max-width: 85vw;
        height: 100dvh;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        border-right: 1px solid rgba(255, 255, 255, 0.8);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: calc(var(--header-height) + 20px) 20px 30px 20px;
        transform: translateX(-100%);
        transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 9998; /* Sits precisely below the header */
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
    }

    .mobile-glass-drawer.open {
        transform: translateX(0);
    }

    /* --- INSTANT PRELOAD STATE --- */
    html.drawer-preload-open body {
        overflow: hidden !important;
    }

    html.drawer-preload-open .mobile-glass-drawer {
        transform: translateX(0) !important;
        transition: none !important;
    }

    html.drawer-preload-open .mobile-drawer-overlay {
        opacity: 1 !important;
        visibility: visible !important;
        transition: none !important;
    }

    html.drawer-preload-open .btn-sidebar-toggle .line:nth-child(1) {
        transform: translateY(7px) rotate(45deg) !important;
        transition: none !important;
    }

    html.drawer-preload-open .btn-sidebar-toggle .line:nth-child(2) {
        opacity: 0 !important;
        transition: none !important;
    }

    html.drawer-preload-open .btn-sidebar-toggle .line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg) !important;
        transition: none !important;
    }

    /* Vertical Navigation List */
    .drawer-main-nav .nav-links {
        flex-direction: column;
        width: 100%;
        padding: 8px;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.4);
        border: 1px solid var(--border-light);
        position: relative;
    }

    .drawer-main-nav .nav-links li {
        width: 100%;
        z-index: 2;
    }

    .drawer-main-nav .nav-links a {
        width: 100%;
        text-align: left;
        padding: 14px 20px;
        display: block;
    }

    /* The Tracking Highlight Pill */
    .drawer-main-nav .nav-highlight {
        position: absolute;
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        height: 0;
        top: 0;
        background: var(--primary-1);
        border-radius: 12px;
        box-shadow: 0 4px 15px var(--primary-glow);
        z-index: 1;
        pointer-events: none;
    }

    .drawer-action-nav {
        margin-top: 25px;
        padding-top: 25px;
        border-top: 1px solid var(--border-purple);
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .drawer-action-nav .btn-header-action {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 20px;
        border-radius: 12px;
    }

    /* ==========================================
       PAGE-SPECIFIC MOBILE VIEW OPTIMIZATIONS
       ========================================== */
    .content {
        padding: 25px 15px;
    }

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

    .section-title {
        font-size: 2rem;
    }

    .section-header.flex-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    /* Global Grids */
    .feature-card {
        padding: 20px !important;
    }

    .testi-card {
        flex: 0 0 85vw;
        padding: 20px;
    }

    .modal-box {
        padding: 25px;
        width: 95%;
    }

    .modal-box.lg {
        flex-direction: column;
        max-height: 90vh;
        overflow-y: auto;
        padding: 0;
    }

    .modal-split-left {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.5);
        padding: 25px;
    }

    .modal-split-right {
        padding: 25px;
    }

    /* --- INDEX.PHP --- */
    .hero-carousel {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        min-height: unset;
        border-radius: 16px;
    }

    .slide-content {
        padding: 0 15px;
        text-align: center;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 5px;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .hero-tag {
        font-size: 0.65rem;
        padding: 4px 10px;
        margin-bottom: 5px;
    }

    .hero-carousel .btn-primary {
        display: none;
    }

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }

    .prev-btn {
        left: 8px;
    }

    .next-btn {
        right: 8px;
    }

    .carousel-indicators {
        bottom: 8px;
    }

    .common-ninja-wrapper .commonninja_component {
        max-height: 400px;
        overflow-y: hidden;
    }

    .section-header.flex-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        margin-bottom: 1.5rem;
    }

    .header-text-block .section-title {
        font-size: 1.35rem;
        line-height: 1;
    }

    .header-text-block .section-subtitle {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    .small-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
        border-radius: 8px;
        margin-bottom: 2px;
    }

    /* --- NEWS.PHP --- */
    .news-section-heading { 
        font-size: 1.35rem !important; 
        margin-bottom: 1rem !important; 
    }

    .news-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .news-img-box {
        height: 200px !important; 
        width: 100% !important;
    }
    
    .news-body {
        padding: 20px !important;
    }
    
    .news-title {
        font-size: 1.15rem !important;
        margin-bottom: 12px !important;
    }

    /* --- CONTACT.PHP --- */
    .contact-grid {
        display: flex;
        flex-direction: column-reverse;
        gap: 25px;
    }

    .contact-map-container,
    .contact-map-container iframe {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        border-radius: 16px;
        min-height: unset !important;
    }

    /* --- ABOUT.PHP --- */
    .about-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .about-carousel-container {
        min-height: unset !important;
        aspect-ratio: 16 / 9;
    }

    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* --- NEWS_DETAILS.PHP --- */
    .article-hero-img-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .article-hero-img {
        max-height: unset !important;
        aspect-ratio: 16 / 10 !important;
        height: auto !important;
        margin-bottom: 1.5rem !important;
    }

    .article-body-box {
        padding: 20px !important;
        font-size: 1rem !important;
        margin-bottom: 2rem !important;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 12px !important;
        margin-bottom: 2rem !important;
    }

    .gallery-item {
        border-radius: 12px !important;
    }
    
    .gallery-item:hover {
        transform: none !important; /* Disable hover jump on touch devices */
        box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    }

    /* --- TRAINING_DETAILS.PHP --- */
    .training-hero-img {
        height: auto !important;
        aspect-ratio: 16 / 9;
        margin-bottom: 1.5rem !important;
    }

    .training-details-layout {
        flex-direction: column !important;
        gap: 25px !important;
    }

    .compact-facts-card {
        width: 100% !important;
        position: static !important;
    }

    #course-description-box {
        padding: 20px !important;
    }

    /* --- TRAINING.PHP --- */
    .training-controls {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 15px !important;
    }

    .training-controls > div { 
        width: 100% !important; 
    }

    #openCalendarBtn { 
        width: 100% !important; 
        justify-content: center; 
    }

    /* Course List Optimization for Mobile Grid */
    .course-item a {
        display: grid !important;
        grid-template-columns: 75px 1fr !important; 
        grid-template-rows: auto auto !important;
        row-gap: 8px !important;
        column-gap: 12px !important;
        padding: 14px 12px !important;
        align-items: start !important;
    }

    .course-code-text { 
        grid-column: 1 / 2;
        grid-row: 1 / 2;
        min-width: unset !important;
        font-size: 0.9rem !important;
        padding-top: 2px;
    }

    .course-title-text { 
        grid-column: 2 / 3;
        grid-row: 1 / 2;
        white-space: normal !important; 
        line-height: 1.4; 
    }

    .ref2-chip { 
        grid-column: 2 / 3;
        grid-row: 2 / 3;
        justify-self: flex-start; 
        margin: 0 !important;
    }

    .calendar-split-layout {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .calendar-legend-panel {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border-light);
        padding-right: 0 !important;
        max-height: 250px !important;
        padding-bottom: 15px !important;
    }

    .calendar-grid-panel {
        min-width: unset !important;
        width: 100% !important;
    }
}