/* ============================================================
   ROOT TOKENS
============================================================ */
:root {
    --primary: #0B1F4B;
    --secondary: #1769E0;
    --accent: #F4B942;
    --dark: #101828;
    --text: #475467;
    --light: #F8FAFC;
    --white: #FFFFFF;
    --border: #E4E7EC;
    --success: #12B76A;
    --font-primary: 'Plus Jakarta Sans', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-secondary);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    color: var(--dark);
    font-weight: 700;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--primary); color: #fff; }

/* ============================================================
   LAYOUT UTILITIES
============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.bg-light { background: var(--light); }

/* ============================================================
   BUTTONS (global)
============================================================ */
.btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: inherit;
}
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: #0f52b0; color: #fff; }
.btn-ghost { background: transparent; color: var(--dark); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--light); }
.btn-outline { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
.btn-outline:hover { background: var(--secondary); color: #fff; }
.btn-outline-light { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-outline-light:hover { background: #fff; color: var(--primary); }

/* ============================================================
   SITE HEADER / NAVBAR — MODERN
============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(228, 231, 236, 0.8);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(11, 31, 75, 0.08);
}

.header-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 90px;
}

/* ---------- Brand / Logo ---------- */
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    padding: 4px 0;
    transition: opacity 0.2s ease;
    max-width: 260px;
}
.brand:hover { opacity: 0.85; }
.brand-logo {
    height: 80px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* ---------- Desktop navigation ---------- */
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.nav-link {
    position: relative;
    display: inline-block;
    padding: 12px 16px;
    color: #122348;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: color 0.25s ease, background 0.25s ease;
    border-radius: 8px;
}
.nav-link:hover {
    color: #1769E0;
    background: rgba(23, 105, 224, 0.06);
}

/* Animated gradient underline */
.nav-link::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    background: linear-gradient(90deg, #F4B942, #1769E0);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover::after { transform: scaleX(1); }

.nav-link.active {
    color: #1769E0;
    background: rgba(23, 105, 224, 0.08);
}
.nav-link.active::after {
    transform: scaleX(1);
    background: #1769E0;
}

/* ---------- Auth buttons ---------- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.btn-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
    border: 1.5px solid transparent;
    font-family: inherit;
    cursor: pointer;
}
.btn-nav-ghost {
    background: #fff;
    color: #122348;
    border-color: #E4E7EC;
}
.btn-nav-ghost:hover {
    background: #F8FAFC;
    border-color: #1769E0;
    color: #1769E0;
    transform: translateY(-1px);
}
.btn-nav-primary {
    background: linear-gradient(135deg, #1769E0, #0B1F4B);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(23, 105, 224, 0.25);
}
.btn-nav-primary:hover {
    background: linear-gradient(135deg, #0f52b0, #08183a);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(23, 105, 224, 0.4);
}
.btn-nav-primary i { transition: transform 0.3s ease; }
.btn-nav-primary:hover i { transform: translateX(3px); }

/* ---------- Hamburger (mobile) ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1.5px solid #E4E7EC;
    border-radius: 12px;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s ease;
    flex-shrink: 0;
}
.hamburger:hover {
    border-color: #1769E0;
    background: #F8FAFC;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: #122348;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.2s;
}
.hamburger:hover span { background: #1769E0; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Overlay ---------- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 31, 75, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1100;
}
.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- Mobile drawer ---------- */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 340px;
    max-width: 88vw;
    background: #fff;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 0 60px rgba(11, 31, 75, 0.15);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.mobile-menu.active { transform: translateX(0); }

.mobile-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #F2F4F7;
    flex-shrink: 0;
}
.mobile-menu-head .brand-logo { height: 52px; }
.mobile-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #F8FAFC;
    border: 1px solid #E4E7EC;
    color: #122348;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.mobile-close:hover {
    background: #FEF3F2;
    border-color: #FEE4E2;
    color: #B42318;
}

.mobile-nav { flex: 1; padding: 12px 12px 0; }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; }

.mobile-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    color: #122348;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
}
.mobile-link span { flex: 1; }
.mobile-link i {
    color: #98A2B3;
    font-size: 0.8rem;
    transition: transform 0.25s ease, color 0.2s;
}
.mobile-link:hover {
    background: #F8FAFC;
    color: #1769E0;
}
.mobile-link:hover i {
    color: #1769E0;
    transform: translateX(4px);
}
.mobile-link.active {
    background: linear-gradient(135deg, rgba(23,105,224,0.1), rgba(11,31,75,0.06));
    color: #1769E0;
}
.mobile-link.active i { color: #1769E0; }

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid #F2F4F7;
    margin-top: 12px;
}
.mobile-actions .btn-nav {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 0.95rem;
}

.mobile-contact {
    padding: 16px 24px 28px;
    background: #F8FAFC;
    border-top: 1px solid #F2F4F7;
}
.mobile-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    color: #475467;
    font-size: 0.85rem;
    line-height: 1.5;
}
.mobile-contact i {
    color: #1769E0;
    font-size: 0.85rem;
    width: 16px;
    flex-shrink: 0;
}

/* Body lock when menu open */
body.menu-open { overflow: hidden; }

/* ============================================================
   HERO (legacy — index.php uses .idx-* self-contained styles)
============================================================ */
.hero { position: relative; height: 90vh; overflow: hidden; }
.hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1s ease;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(11,31,75,0.85) 0%, rgba(23,105,224,0.6) 100%);
}
.hero-content {
    position: relative; z-index: 2; height: 100%;
    display: flex; flex-direction: column;
    justify-content: center; align-items: flex-start;
    color: #fff;
}
.hero-badge {
    background: var(--accent); color: var(--dark);
    padding: 6px 16px; border-radius: 20px;
    font-size: 0.8rem; font-weight: 700;
    letter-spacing: 1px; margin-bottom: 20px;
}
.hero-content h1 { font-size: 3.5rem; color: #fff; margin-bottom: 20px; max-width: 700px; }
.hero-content .highlight { color: var(--accent); }
.hero-content p { font-size: 1.2rem; max-width: 600px; margin-bottom: 30px; opacity: 0.9; }
.hero-buttons { display: flex; gap: 15px; }
.hero-dots {
    position: absolute; bottom: 30px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 10px; z-index: 10;
}
.hero-dots span {
    width: 12px; height: 12px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer; transition: 0.3s;
}
.hero-dots span.active { background: var(--accent); }

/* ============================================================
   STATS SECTION
============================================================ */
.stats-section { background: var(--primary); padding: 50px 0; }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}
.stat-card h3 { color: var(--accent); font-size: 2.5rem; }
.stat-card p { color: rgba(255,255,255,0.8); }

/* ============================================================
   WHY CHOOSE US
============================================================ */
.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.why-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.experience-badge {
    position: absolute;
    bottom: -20px; right: -20px;
    background: var(--accent);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}
.experience-badge span {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    display: block;
}
.eyebrow {
    color: var(--secondary);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.85rem;
}
.why-content h2 { font-size: 2.2rem; margin: 15px 0 20px; }
.feature-list { list-style: none; margin: 25px 0; }
.feature-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.feature-list i { color: var(--success); }
.why-buttons { display: flex; gap: 15px; }

/* ============================================================
   SECTION HEADING
============================================================ */
.section-head { text-align: center; margin-bottom: 50px; }
.section-head h2 { font-size: 2rem; max-width: 700px; margin: 15px auto 0; }

/* ============================================================
   COURSE CARDS (generic, used on courses.php fallback)
============================================================ */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}
.course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: 0.3s;
}
.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}
.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.5s;
}
.course-card:hover .card-image img { transform: scale(1.05); }
.badge {
    position: absolute;
    top: 15px; left: 15px;
    background: var(--secondary);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.card-body { padding: 25px; }
.card-body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.card-meta {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 15px 0;
    font-size: 0.85rem;
    color: var(--text);
}
.card-link {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.card-link i { transition: 0.3s; }
.card-link:hover i { transform: translateX(5px); }

/* ============================================================
   SAVE COURSE — HEART BUTTON
============================================================ */
.crs-card-fav {
    border: none;
    cursor: pointer;
    background: rgba(255,255,255,0.95);
    color: #667085;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0;
    font-size: 1rem;
    font-family: inherit;
}
.crs-card-fav:hover {
    background: #F4B942;
    color: #101828;
    transform: scale(1.1);
}
.crs-card-fav.saved {
    background: #F4B942;
    color: #101828;
}
.crs-card-fav.saved:hover {
    background: #e0a430;
    transform: scale(1.1);
}
.crs-card-fav.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ============================================================
   MEDIA GALLERY
============================================================ */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}
.gallery-item {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4/5;
    box-shadow: 0 6px 20px rgba(11,31,75,0.1);
    transition: 0.35s;
    cursor: pointer;
}
.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(11,31,75,0.18);
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: 0.6s;
}
.gallery-item:hover img { transform: scale(1.08); }

/* ============================================================
   FOOTER (site-footer — basic fallback)
============================================================ */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}
.footer-col h4 { color: #fff; margin-bottom: 20px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.social-links { display: flex; gap: 15px; margin-top: 20px; }
.social-links a {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
}
.social-links a:hover { background: var(--accent); color: var(--dark); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
}
.footer-bottom a { color: var(--accent); }

/* Footer logo (optional) */
.footer-logo {
    height: 64px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    margin-bottom: 16px;
}

/* ============================================================
   TOAST NOTIFICATION
============================================================ */
#sc-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 22px;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 99999;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    font-family: var(--font-secondary);
    animation: scToastIn 0.3s ease;
}
#sc-toast.success { background: #12B76A; }
#sc-toast.error   { background: #F04438; }
@keyframes scToastIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
============================================================ */

/* Large desktop */
@media (min-width: 1321px) {
    .header-inner { padding: 0 40px; }
}

/* Small desktop / large tablet — switch to hamburger */
@media (max-width: 1100px) {
    .header-inner {
        min-height: 100px;
        padding: 0 24px;
    }
    .brand-logo { height: 78px; }
    .main-nav { display: none; }
    .hamburger { display: flex; }
    .header-actions { display: none; }
}

/* Tablet */
@media (max-width: 900px) {
    .header-inner { min-height: 92px; }
    .brand-logo { height: 70px; }

    .hero-content h1 { font-size: 2.4rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .why-grid,
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .course-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

/* Mobile */
@media (max-width: 640px) {
    .header-inner {
        min-height: 80px;
        padding: 0 18px;
    }
    .brand-logo { height: 60px; }
    .brand { max-width: 180px; }
    .hamburger {
        width: 40px;
        height: 40px;
    }
    .hamburger span { width: 18px; }

    .section { padding: 60px 0; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .stat-card h3 { font-size: 1.8rem; }

    .why-content h2 { font-size: 1.7rem; }
    .section-head h2 { font-size: 1.6rem; }

    .media-gallery { grid-template-columns: repeat(2, 1fr); }
    .footer-logo { height: 48px; }
}

/* Small mobile */
@media (max-width: 480px) {
    .header-inner {
        min-height: 72px;
        padding: 0 14px;
    }
    .brand-logo { height: 52px; }

    .mobile-menu { width: 100%; max-width: 100%; }

    .stats-grid { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 1.75rem; }
}

/* ============================================================
   REDUCED MOTION
============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .nav-link::after,
    .hamburger span,
    .mobile-menu,
    .nav-overlay { transition: none; }
    .btn-nav-primary:hover i { transform: none; }
}