/* ======================================================
   SHIKKHA.DEV — GLOBAL STYLESHEET  (M3 Design System)
   ====================================================== */

/* --- Google Sans Font Face --- */
@font-face { font-family:'Google Sans'; src:url('Fonts/Google Sans.ttf') format('truetype'); font-weight:400; font-style:normal; }
@font-face { font-family:'Google Sans'; src:url('Fonts/Google Sans Medium.ttf') format('truetype'); font-weight:500; font-style:normal; }
@font-face { font-family:'Google Sans'; src:url('Fonts/Google Sans SemiBold.ttf') format('truetype'); font-weight:600; font-style:normal; }
@font-face { font-family:'Google Sans'; src:url('Fonts/Google Sans Bold.ttf') format('truetype'); font-weight:700; font-style:normal; }

/* --- Basic Reset --- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

/* ======================================================
   M3 DESIGN TOKENS
   ====================================================== */
:root {
    /* Primary — Google Blue (M3) */
    --info-lighter:   #D3E3FD;
    --info-light:     #8AB4F8;
    --info-main:      #1A73E8;
    --info-dark:      #1557B0;
    --info-darker:    #0C2375;

    /* Success — Green */
    --success-lighter: #DCFCE7;
    --success-light:   #86EFAC;
    --success-main:    #34A853;
    --success-dark:    #16A34A;
    --success-darker:  #166534;

    /* Warning — Yellow */
    --warning-lighter: #FEF9C3;
    --warning-light:   #FDE047;
    --warning-main:    #FBCC05;
    --warning-dark:    #B45309;
    --warning-darker:  #78350F;

    /* Error — Red */
    --error-lighter:  #FEE2E2;
    --error-light:    #FCA5A5;
    --error-main:     #EA4335;
    --error-dark:     #B91C1C;
    --error-darker:   #7F1D1D;

    /* Neutral Grey */
    --grey-50:  #F8FAFF;
    --grey-100: #F0F4FF;
    --grey-200: #E2E7F0;
    --grey-300: #C4C8D4;
    --grey-400: #8E929E;
    --grey-500: #5F6370;
    --grey-600: #44474E;
    --grey-700: #303338;
    --grey-800: #1C1F24;
    --grey-900: #191C20;

    --common-black: #000000;
    --common-white: #FFFFFF;

    /* --- Semantic Aliases --- */
    --primary-color:   var(--info-main);
    --secondary-color: var(--grey-500);
    --bg-light:        var(--grey-50);
    --bg-white:        var(--common-white);
    --text-dark:       var(--grey-900);
    --text-medium:     var(--grey-600);
    --text-light:      var(--grey-500);
    --border-color:    var(--grey-200);

    /* M3 Surface System */
    --surface:         #FAFCFF;
    --surface-low:     #F4F7FF;
    --surface-card:    #FFFFFF;
    --surface-high:    #E7EAF4;

    /* M3 Shape Scale */
    --r-xs:   4px;
    --r-sm:   8px;
    --r-md:   12px;
    --r-lg:   16px;
    --r-xl:   20px;
    --r-2xl:  28px;
    --r-full: 100px;

    /* M3 Motion */
    --ease:     cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.0, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(25,28,32,0.06);
    --shadow:    0 4px 20px rgba(25,28,32,0.08);
    --shadow-md: 0 8px 32px rgba(25,28,32,0.10);
    --shadow-lg: 0 16px 48px rgba(25,28,32,0.12);

    /* Legacy gradient (for backward compat) */
    --gradient: linear-gradient(135deg, var(--info-main), var(--info-light));

    /* Course player vars */
    --sidebar-width: 380px;
    --page-bg: var(--grey-50);
    --sidebar-bg: var(--common-white);
    --gap: 24px;
}

/* ======================================================
   BASE
   ====================================================== */
html { scroll-behavior: smooth; }

body {
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    background-color: var(--surface);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ======================================================
   HEADER & NAVIGATION
   ====================================================== */
.header {
    background-color: transparent;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1010;
    transition: all 0.35s var(--ease);
}

.header.header-solid {
    background-color: rgba(255,255,255,0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    padding: 14px 0;
}

.header.scrolled {
    background-color: rgba(255,255,255,0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
    padding: 14px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Google Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.dynamic-logo { height: 38px; width: auto; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-menu li a {
    color: var(--text-medium);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: var(--r-full);
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
    display: inline-block;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: var(--primary-color);
    background: var(--info-lighter);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ======================================================
   BUTTONS (M3)
   ====================================================== */
.btn {
    padding: 10px 22px;
    border-radius: var(--r-full);
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s var(--ease);
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    text-decoration: none;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(26,115,232,0.22);
}
.btn-primary:hover {
    background: var(--info-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26,115,232,0.30);
    color: #FFFFFF;
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-dark);
}
.btn-secondary:hover {
    background: var(--info-lighter);
    border-color: var(--info-light);
    color: var(--primary-color);
}

.btn-tonal {
    background: var(--info-lighter);
    color: var(--info-dark);
    border-color: transparent;
}
.btn-tonal:hover {
    background: #b8d0fb;
    color: var(--info-darker);
}

.btn-success {
    background: var(--success-main);
    color: #FFFFFF;
}
.btn-success:hover {
    background: var(--success-dark);
    color: #FFFFFF;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.8rem;
}

/* ======================================================
   HERO (legacy — used on some pages, index.php has own)
   ====================================================== */
.hero {
    background: linear-gradient(160deg, var(--info-lighter) 0%, var(--surface) 65%);
    padding: 160px 0 100px;
    overflow: hidden;
    position: relative;
}

.hero-container {
    display: flex;
    align-items: center;
    gap: 48px;
}

.hero-content { flex-basis: 50%; }

.hero-title {
    font-family: 'Google Sans', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.18;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: var(--text-dark);
}

.hero-title .line { display: block; }

.text-gradient {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 500px;
    margin-bottom: 36px;
    line-height: 1.75;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-title, .hero-subtitle, .hero-buttons {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeInUp 0.7s forwards var(--ease);
}
.hero-subtitle { animation-delay: 0.15s; }
.hero-buttons  { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.hero-image-container {
    flex-basis: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-hero-image {
    width: 80%;
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.hero-image-card {
    position: absolute;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(12px);
    padding: 14px;
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 4s ease-in-out infinite;
    z-index: 3;
    border: 1px solid var(--border-color);
}

.hero-image-card img { width: 40px; height: auto; }

@keyframes float {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

/* ======================================================
   SECTION COMMONS
   ====================================================== */
.stats, .why-us, .courses, .testimonials { padding: 90px 0; }

.section-title {
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    font-size: clamp(1.7rem, 2.8vw, 2.3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 52px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    line-height: 1.22;
}

/* ======================================================
   STATS
   ====================================================== */
.stats {
    padding: 0;
    margin-top: -56px;
    position: relative;
    z-index: 5;
}

.stats-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--surface-card);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-md);
    padding: 40px;
    gap: 20px;
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-right: 20px;
    border-right: 1px solid var(--border-color);
}

.stat-item:last-child { border-right: none; padding-right: 0; }

.stat-item i {
    font-size: 28px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
}

.stat-item h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-item p { font-size: 0.875rem; color: var(--text-light); }

/* ======================================================
   WHY US
   ====================================================== */
.why-us { background: var(--surface-card); }

.why-us-container {
    display: flex;
    align-items: center;
    gap: 64px;
}

.why-us-image { flex-basis: 50%; }
.why-us-image img { width: 100%; border-radius: var(--r-2xl); box-shadow: var(--shadow-md); }

.why-us-content { flex-basis: 50%; }
.why-us-content .section-title { text-align: left; margin-bottom: 28px; }
.why-us-content ul { list-style: none; }
.why-us-content li { display: flex; gap: 18px; margin-bottom: 24px; }
.why-us-content li i { font-size: 20px; color: var(--primary-color); padding-top: 4px; flex-shrink: 0; }
.why-us-content h4 { font-size: 1.05rem; font-weight: 600; color: var(--text-dark); margin-bottom: 4px; }
.why-us-content p { font-size: 0.9rem; color: var(--text-light); line-height: 1.65; }

/* ======================================================
   COURSE CARDS
   ====================================================== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.course-card {
    background: var(--surface-card);
    border-radius: var(--r-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(26,115,232,0.25);
}

.course-image { height: 190px; overflow: hidden; }
.course-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.course-card:hover .course-image img { transform: scale(1.04); }

.course-info { padding: 22px; }

.category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--info-dark);
    background: var(--info-lighter);
    padding: 4px 12px;
    border-radius: var(--r-full);
    margin-bottom: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.course-info h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.38;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.course-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 14px;
    margin-top: 4px;
}

.price {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

.enroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
    background: var(--info-lighter);
    padding: 7px 14px;
    border-radius: var(--r-full);
    transition: background 0.2s;
}
.enroll-btn:hover { background: #b8d0fb; }

/* ======================================================
   TESTIMONIALS
   ====================================================== */
.testimonials { background: var(--surface-low); }

.testimonial-card {
    max-width: 720px;
    margin: 0 auto;
    background: var(--surface-card);
    padding: 44px;
    border-radius: var(--r-2xl);
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.testimonial-card p {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 28px;
    line-height: 1.8;
}

.author-info { display: flex; align-items: center; justify-content: center; gap: 14px; }
.author-info img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--border-color); }
.author-info h4 { font-size: 1rem; font-weight: 600; color: var(--text-dark); margin-bottom: 2px; }
.author-info p { font-size: 0.82rem; color: var(--text-light); }

/* ======================================================
   FOOTER
   ====================================================== */
.footer {
    background: var(--surface-card);
    border-top: 1px solid var(--border-color);
    padding-top: 64px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 36px;
    margin-bottom: 48px;
}

.footer-about h3 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}
.footer-about p { font-size: 0.9rem; color: var(--text-light); max-width: 240px; line-height: 1.65; }

.footer h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.footer-links li { list-style: none; }
.footer-links li a {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 5px 0;
    transition: color 0.2s var(--ease);
}
.footer-links li a:hover { color: var(--primary-color); }

.footer-social { display: flex; gap: 10px; margin-top: 4px; }
.footer-social a {
    width: 38px;
    height: 38px;
    background: var(--surface-low);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 0.9rem;
    transition: all 0.2s var(--ease);
}
.footer-social a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ======================================================
   ANIMATIONS
   ====================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* ======================================================
   PAGE HEADER (courses, blogs, contact pages)
   ====================================================== */
.page-header {
    background: linear-gradient(160deg, var(--info-lighter) 0%, var(--surface) 60%);
    padding: 136px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(26,115,232,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.page-header h1 {
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    font-size: clamp(1.9rem, 3.5vw, 2.9rem);
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
    letter-spacing: -0.5px;
    line-height: 1.22;
    position: relative;
}

.page-header p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.72;
    position: relative;
}

/* ======================================================
   FILTER BAR
   ====================================================== */
.all-courses-page { padding-top: 60px; }

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    padding: 9px 22px;
    border: 1.5px solid var(--border-color);
    background: transparent;
    border-radius: var(--r-full);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-medium);
    transition: all 0.2s var(--ease);
}
.filter-btn:hover {
    background: var(--info-lighter);
    border-color: var(--info-light);
    color: var(--primary-color);
}
.filter-btn.active {
    background: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(26,115,232,0.28);
}
.course-card.hide { display: none; }

/* ======================================================
   FORMS (Application, Contact)
   ====================================================== */
.application-page-container {
    padding: 120px 0 72px;
    background: var(--surface-low);
}

.application-form-wrapper {
    max-width: 820px;
    margin: 0 auto;
    background: var(--surface-card);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.form-header {
    padding: 28px 36px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--info-lighter) 0%, var(--surface) 100%);
}

.form-header h1 {
    font-family: 'Google Sans', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-header p { color: var(--text-light); font-size: 0.95rem; }

#applicationForm { padding: 36px; }

.form-section { margin-bottom: 36px; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text-dark);
    letter-spacing: 0.02em;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--r-md);
    border: 1.5px solid var(--border-color);
    background: var(--surface-low);
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-card);
    box-shadow: 0 0 0 3px var(--info-lighter);
}

.form-group input.error { border-color: var(--error-main); }
.form-group textarea { resize: vertical; min-height: 100px; }

.form-footer {
    text-align: right;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.submit-btn {
    padding: 13px 36px;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: var(--r-full);
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    transition: all 0.2s var(--ease);
    box-shadow: 0 2px 10px rgba(26,115,232,0.25);
}
.submit-btn:hover {
    background: var(--info-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(26,115,232,0.32);
}

.success-modal-content {
    background: var(--surface-card);
    border-radius: var(--r-2xl);
    padding: 48px 36px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}
.success-modal-content .fa-check-circle { font-size: 56px; color: var(--success-main); margin-bottom: 20px; }
.success-modal-content h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; color: var(--text-dark); }
.success-modal-content p { color: var(--text-light); margin-bottom: 24px; font-size: 0.95rem; }
.success-modal-content button {
    width: 100%; padding: 13px;
    font-size: 0.95rem; font-weight: 700;
    border: none; border-radius: var(--r-full);
    background: var(--success-main); color: #fff;
    cursor: pointer;
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    transition: background 0.2s;
}
.success-modal-content button:hover { background: var(--success-dark); }

/* ======================================================
   MODALS (Application Terms)
   ====================================================== */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(25,28,32,0.55);
    backdrop-filter: blur(4px);
    display: none; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0;
    transition: opacity 0.3s var(--ease);
}
.modal-overlay.active { display: flex; opacity: 1; }

.modal-content {
    background: var(--surface-card);
    border-radius: var(--r-2xl);
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 700px;
    max-height: 90vh;
    display: flex; flex-direction: column;
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h2 { font-size: 1.15rem; font-weight: 700; }
.close-modal-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--grey-400); transition: color 0.2s; }
.close-modal-btn:hover { color: var(--error-main); }

.modal-body { padding: 24px 28px; overflow-y: auto; }
.modal-body .intro-text { line-height: 1.75; margin-bottom: 24px; color: var(--text-medium); }

.terms-list { list-style: none; padding: 0; }
.terms-list li { display: flex; gap: 16px; margin-bottom: 16px; line-height: 1.72; color: var(--text-dark); font-size: 0.95rem; }
.terms-list li span {
    flex-shrink: 0; display: inline-flex;
    justify-content: center; align-items: center;
    width: 24px; height: 24px;
    background: var(--info-lighter); border-radius: 50%;
    font-size: 0.8rem; font-weight: 700; color: var(--primary-color);
}

.agreement-box {
    margin-top: 24px; padding: 16px;
    background: var(--surface-low); border-radius: var(--r-lg);
    display: flex; align-items: flex-start; gap: 12px;
    border: 1px solid var(--border-color);
}
.agreement-box input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--primary-color); }
.agreement-box label { font-size: 0.9rem; color: var(--text-medium); cursor: pointer; }

.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.submit-application-btn {
    padding: 11px 28px; font-size: 0.95rem; font-weight: 700;
    border-radius: var(--r-full); border: none;
    background: var(--grey-200); color: var(--grey-400);
    cursor: not-allowed;
    transition: all 0.2s var(--ease);
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
}
.submit-application-btn:not(:disabled) {
    background: var(--primary-color); color: #fff; cursor: pointer;
    box-shadow: 0 2px 10px rgba(26,115,232,0.25);
}
.submit-application-btn:not(:disabled):hover {
    background: var(--info-dark);
    transform: translateY(-1px);
}

.page-wrapper.blur-active { filter: blur(5px); transition: filter 0.3s; }

/* ======================================================
   MOBILE NAV & SIDEBAR OVERLAY
   ====================================================== */
body.no-scroll { overflow: hidden; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1001; backdrop-filter: blur(2px);
}

.hamburger, .close-btn {
    display: none;
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-dark);
}

/* ======================================================
   COURSE PLAYER (keep existing structure, polish styles)
   ====================================================== */
.player-page-wrapper {
    display: flex;
    padding-top: 75px;
    background-color: var(--page-bg);
}

.player-sidebar-premium {
    width: var(--sidebar-width);
    height: calc(100vh - 75px);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.player-sidebar-premium .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.player-sidebar-premium .back-link {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.player-sidebar-premium .back-link:hover { color: var(--primary-color); }

.player-sidebar-premium .course-title-sidebar {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-dark);
    line-height: 1.4;
}

.player-sidebar-premium .course-progress .progress-text {
    display: flex; justify-content: space-between;
    font-size: 0.78rem; font-weight: 600;
    margin-bottom: 8px; color: var(--text-medium);
}

.player-sidebar-premium .progress-bar-container {
    height: 6px;
    background: var(--grey-100);
    border-radius: 3px;
    overflow: hidden;
}

.player-sidebar-premium .progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.4s var(--ease);
}

.module-list-premium { overflow-y: auto; flex-grow: 1; }
.lesson-list-premium { list-style: none; }

.lesson-list-premium .lesson-item {
    padding: 11px 20px;
    display: flex; align-items: center; gap: 12px;
    cursor: pointer; font-size: 0.85rem;
    border-left: 3px solid transparent;
    transition: all 0.15s var(--ease);
    color: var(--text-medium);
}

.lesson-list-premium .lesson-item:hover { background: var(--surface-low); }

.lesson-list-premium .lesson-item.active {
    background: var(--info-lighter);
    border-left-color: var(--primary-color);
    font-weight: 600;
    color: var(--primary-color);
}

.lesson-list-premium .lesson-item i { color: var(--grey-300); width: 18px; text-align: center; }
.lesson-list-premium .lesson-item.active i { color: var(--primary-color); }
.lesson-list-premium .lesson-item.completed i { color: var(--success-main); }

.player-main-content-premium {
    flex-grow: 1;
    height: calc(100vh - 75px);
    overflow-y: auto;
    padding: var(--gap);
}

.lesson-identity-top {
    display: flex; align-items: center;
    gap: 12px; margin-bottom: var(--gap);
}

.lesson-identity-top .counter-badge {
    flex-shrink: 0;
    background: var(--surface-high);
    color: var(--text-medium);
    padding: 4px 12px;
    border-radius: var(--r-full);
    font-size: 0.78rem;
    font-weight: 700;
}

.lesson-identity-top #lesson-title-main {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
}

.player-area { margin-bottom: var(--gap); }

.video-player-container-premium {
    width: 100%; aspect-ratio: 16/9;
    background: #000;
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-player-container-premium video { width: 100%; height: 100%; }

.player-meta-bar.final-version {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
}

.facebook-btn-styled { justify-self: center; }
#prev-lesson-btn { justify-self: start; }
#next-lesson-btn, #abedon-btn { justify-self: end; }

.btn-meta {
    display: flex; align-items: center;
    padding: 10px 18px;
    border-radius: var(--r-full);
    border: 1.5px solid var(--border-color);
    background: var(--surface-card);
    cursor: pointer;
    font-family: 'Google Sans', 'Hind Siliguri', sans-serif;
    transition: all 0.2s var(--ease);
    font-size: 0.85rem;
}
.btn-meta:hover:not(:disabled) { background: var(--surface-low); border-color: var(--grey-300); }
.btn-meta:disabled { opacity: 0.4; cursor: not-allowed; }

.nav-btn-styled { gap: 8px; }
.nav-btn-styled .main-text { font-weight: 700; font-size: 0.85rem; color: var(--text-dark); }
.nav-btn-styled i { font-size: 0.85rem; }

.facebook-btn-styled { color: #1877F2; gap: 8px; font-weight: 600; }

.abedon-btn {
    background: var(--error-main); color: white;
    border-color: var(--error-main); gap: 8px;
    justify-content: center; font-weight: 700;
}
.abedon-btn:hover { background: var(--error-dark); }

.mobile-lesson-toggle-main { display: none; }
.close-sidebar-btn { display: none; }

.player-sidebar-overlay {
    visibility: hidden; opacity: 0;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    transition: opacity 0.3s, visibility 0.3s;
}
.player-sidebar-overlay.active { visibility: visible; opacity: 1; }

/* ======================================================
   RESPONSIVE
   ====================================================== */
@media (max-width: 992px) {
    .hero-container, .why-us-container { flex-direction: column; }
    .hero-container { text-align: center; }
    .hero-content, .hero-image-container { flex-basis: auto; }
    .hero-image-container { max-width: 400px; margin: 0 auto; }
    .hero-subtitle { margin: 0 auto 30px; }
    .hero-buttons { justify-content: center; }
    .course-grid { grid-template-columns: 1fr 1fr; }
    .why-us-content .section-title { text-align: center; }
    .why-us-image { order: -1; }

    .player-page-wrapper { flex-direction: column; }
    .player-sidebar-premium {
        position: fixed; top: 0; right: -320px;
        width: 320px; height: 100vh; z-index: 1002;
        transition: transform 0.3s var(--ease);
    }
    .player-sidebar-premium.active { transform: translateX(-320px); }
    .close-sidebar-btn { display: block; }
    .lesson-identity-top #lesson-title-main { font-size: 1.1rem; }
    .mobile-lesson-toggle-main {
        display: block; margin-left: auto;
        font-size: 20px; background: none;
        border: none; cursor: pointer; color: var(--text-dark);
    }
}

@media (max-width: 768px) {
    .hamburger { display: flex; align-items: center; justify-content: center; }
    .header-actions .btn { display: none; }

    /* M3 Navigation Drawer */
    .nav-links {
        position: fixed; top: 0; right: -100%;
        width: 85%; max-width: 340px; height: 100vh;
        background: var(--surface-card);
        flex-direction: column; align-items: flex-start;
        padding: 80px 20px 40px;
        gap: 4px;
        border-radius: var(--r-2xl) 0 0 var(--r-2xl);
        box-shadow: -8px 0 32px rgba(25,28,32,0.15);
        transition: right 0.4s cubic-bezier(0.2, 0, 0, 1);
        z-index: 1002;
    }
    .nav-links.active { right: 0; }

    .nav-menu { flex-direction: column; width: 100%; gap: 4px; }
    .nav-menu li { width: 100%; }
    .nav-menu li a {
        display: flex; align-items: center; width: 100%;
        padding: 14px 20px; border-radius: var(--r-full);
        color: var(--text-dark); font-size: 1rem; font-weight: 600;
    }
    .nav-menu li a:hover, .nav-menu li a.active {
        background: var(--info-lighter); color: var(--primary-color);
    }

    .close-btn {
        display: flex; align-items: center; justify-content: center;
        position: absolute; top: 24px; right: 24px;
        width: 40px; height: 40px;
        border-radius: 50%; background: var(--surface-low);
        color: var(--text-dark); font-size: 1.3rem;
        transition: all 0.2s;
    }
    .close-btn:hover { background: var(--error-lighter); color: var(--error-main); transform: rotate(90deg); }

    .course-grid { grid-template-columns: 1fr; }

    .footer-container { flex-direction: column; }
    .footer-social { justify-content: center; }
    .footer-about { text-align: center; }
    .footer-about p { max-width: 100%; }

    .stats { margin-top: -48px; }
    .stats-wrapper {
        grid-template-columns: 1fr; padding: 28px 20px; gap: 16px;
    }
    .stat-item { border-right: none; border-bottom: 1px solid var(--border-color); padding-right: 0; padding-bottom: 16px; justify-content: center; }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }

    .form-grid { grid-template-columns: 1fr; }
    #applicationForm { padding: 24px; }
    .form-header { padding: 22px 24px; }

    .player-meta-bar.final-version { grid-template-columns: 1fr 1fr; }
    .facebook-btn-styled { grid-column: 1 / -1; order: 3; justify-self: center; }

    .modal-content { width: 92%; max-width: 450px; max-height: 95vh; position: fixed; top: 10px; }
    .modal-header { padding: 16px 20px; }
    .modal-header h2 { font-size: 1rem; }
    .modal-body { padding: 0 20px 20px; overflow-y: auto; }
    .modal-footer { padding: 16px 20px; }
    .submit-application-btn { width: 100%; padding: 12px; }

    .application-page-container { padding: 88px 0 48px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .page-header { padding: 110px 0 44px; }
}

/* ======================================================
   iOS / TOUCH HARDENING
   Fixes unresponsive buttons on iPad / iPhone Safari:
   - touch-action: manipulation removes the 300ms tap delay
   - cursor:pointer makes Safari fire `click` on non-native
     clickable elements (div/li with JS handlers or onclick)
   - tap-highlight gives visible touch feedback
   ====================================================== */
a, button, .btn, .btn-meta, .dept-btn, .lesson-item,
.hamburger, .close-btn, .close-sidebar-btn, .close-modal-btn,
.close-popup-btn, .mobile-lesson-toggle-main, .filter-btn,
[onclick], [role="button"] {
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(26, 115, 232, 0.15);
}

/* Disabled controls must not show the pointer affordance. */
button:disabled, .btn:disabled, .btn-meta:disabled {
    cursor: not-allowed;
    touch-action: auto;
}
