/* =====================================================
   SCHOOLSTUDYSETU — style.css (Enhanced iOS Glass UI)
   Fully matches header.php enhanced version.
   Drop-in replacement — no PHP logic affected.
   ===================================================== */

/* ── Google Fonts (fallback if not in <head>) ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&family=Outfit:wght@300;400;600;700&display=swap');

/* ════════════════════════════════════════
   1. CSS VARIABLES
   ════════════════════════════════════════ */
:root {
    /* Brand */
    --primary:        #FF6B35;
    --primary-dark:   #e85a24;
    --secondary:      #004E89;
    --secondary-dark: #003a69;
    --accent:         #F7B801;
    --success:        #1BB3A3;
    --danger:         #E63946;
    --danger-dark:    #c42d39;
    --light:          #F8F9FB;
    --dark:           #1A1A2E;
    --gray:           #A0A0A0;
    --gray-light:     #E8EDF5;

    /* iOS Glass */
    --glass-bg:       rgba(255, 255, 255, 0.60);
    --glass-bg-heavy: rgba(255, 255, 255, 0.80);
    --glass-border:   rgba(255, 255, 255, 0.55);
    --glass-shadow:   0 8px 32px rgba(31, 38, 135, 0.12);
    --glass-blur:     blur(20px) saturate(180%);
    --glass-blur-sm:  blur(12px) saturate(150%);

    /* Shadows */
    --shadow:       0 4px 24px rgba(0, 0, 0, 0.08);
    --shadow-md:    0 10px 40px rgba(0, 0, 0, 0.10);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.15);
    --shadow-card:  0 2px 16px rgba(31, 38, 135, 0.10);

    /* Radii */
    --radius-sm:   8px;
    --radius-md:   14px;
    --radius-lg:   20px;
    --radius-xl:   28px;
    --radius-pill: 980px;

    /* Typography */
    --font-display: 'Poppins', sans-serif;
    --font-body:    'Outfit', sans-serif;

    /* Navbar */
    --nav-height: 64px;

    /* Easing */
    --spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ════════════════════════════════════════
   2. RESET & BASE
   ════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(145deg, #dce8ff 0%, #eef2ff 50%, #f5f0ff 100%);
    background-attachment: fixed;
    color: var(--dark);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.25s ease;
}

button { cursor: pointer; border: none; font-family: var(--font-display); }
img    { max-width: 100%; display: block; }
ul     { list-style: none; }

/* ════════════════════════════════════════
   3. NAVBAR  (matches header.php exactly)
   ════════════════════════════════════════ */
.navbar {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06), 0 8px 40px rgba(31,38,135,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background 0.3s ease, box-shadow 0.3s ease, height 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.90);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.12);
    height: 56px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.15rem;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.75rem;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 2px 6px rgba(255,107,53,0.35));
}

.logo-text {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.3px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50%       { transform: translateY(-7px) rotate(2deg); }
}

/* Hamburger */
.hamburger {
    display: none;
    background: rgba(255, 255, 255, 0.60);
    border: 1.5px solid rgba(255, 255, 255, 0.70) !important;
    border-radius: var(--radius-sm);
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--dark);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s var(--spring);
}

.hamburger:hover  { background: rgba(255,107,53,0.12); transform: scale(1.08); }
.hamburger.open   { background: rgba(255,107,53,0.15); }

/* Nav-right (desktop row / mobile drawer) */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Search bar */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar form {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.55);
    border: 1.5px solid rgba(255, 255, 255, 0.60);
    border-radius: var(--radius-pill);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.search-bar form:focus-within {
    background: rgba(255, 255, 255, 0.85);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.15), 0 2px 12px rgba(0,0,0,0.08);
    transform: scale(1.02);
}

.search-bar input {
    border: none !important;
    background: transparent !important;
    padding: 0.55rem 0.5rem 0.55rem 1rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--dark);
    width: 200px;
    outline: none !important;
    transition: width 0.35s ease;
}

.search-bar input:focus       { width: 240px; }
.search-bar input::placeholder { color: rgba(26,26,46,0.45); }

.search-bar button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s var(--spring), box-shadow 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(255,107,53,0.40);
}

.search-bar button:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(255,107,53,0.50);
}

/* Nav menu */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.nav-menu li a {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--dark);
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s, color 0.2s, transform 0.2s var(--spring);
    display: block;
    white-space: nowrap;
}

.nav-menu li a:hover {
    background: rgba(255,107,53,0.10);
    color: var(--primary);
    transform: translateY(-1px);
}

/* Auth buttons */
.login-btn, .signup-btn, .logout-btn {
    padding: 0.48rem 1.15rem !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 700 !important;
    color: white !important;
    letter-spacing: 0.2px;
    transition: transform 0.2s var(--spring), box-shadow 0.2s !important;
}

.login-btn  { background: linear-gradient(135deg, var(--primary),   var(--primary-dark))   !important; box-shadow: 0 3px 10px rgba(255,107,53,0.35); }
.signup-btn { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)) !important; box-shadow: 0 3px 10px rgba(0,78,137,0.35); }
.logout-btn { background: linear-gradient(135deg, var(--danger),    var(--danger-dark))    !important; box-shadow: 0 3px 10px rgba(230,57,70,0.35); }

.login-btn:hover, .signup-btn:hover, .logout-btn:hover {
    transform: translateY(-2px) scale(1.04) !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.20) !important;
}

/* Drawer brand strip (mobile only) */
.drawer-brand {
    display: none;
}

/* Overlay */
#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 40, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#overlay.visible { opacity: 1; }

/* ════════════════════════════════════════
   4. HERO
   ════════════════════════════════════════ */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #0067a5 50%, var(--primary) 100%);
    color: white;
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Animated dot grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.18) 1.5px, transparent 1.5px);
    background-size: 36px 36px;
    animation: drift 24s linear infinite;
    pointer-events: none;
}

/* Glowing orb */
.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(247,184,1,0.20) 0%, transparent 70%);
    top: -100px;
    right: -80px;
    border-radius: 50%;
    pointer-events: none;
    animation: pulse-orb 6s ease-in-out infinite;
}

@keyframes drift {
    from { transform: translate(0,0); }
    to   { transform: translate(36px, 36px); }
}

@keyframes pulse-orb {
    0%,100% { transform: scale(1);    opacity: 0.7; }
    50%      { transform: scale(1.15); opacity: 1; }
}

.hero-content {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.20);
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    opacity: 0.92;
    margin-bottom: 2.25rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ════════════════════════════════════════
   5. BUTTONS
   ════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.25s var(--spring), box-shadow 0.25s ease, background 0.25s;
    letter-spacing: 0.2px;
    text-decoration: none;
}

.btn:hover { transform: translateY(-3px); }

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 20px rgba(255,255,255,0.35);
}

.btn-primary:hover {
    background: #fff8f5;
    box-shadow: 0 8px 32px rgba(255,255,255,0.50);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.70);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: white;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 8px 24px rgba(255,255,255,0.30);
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

/* ════════════════════════════════════════
   6. SECTIONS & LAYOUT
   ════════════════════════════════════════ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--dark) 40%, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
    font-size: 1.05rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Classes section */
.classes-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

/* ════════════════════════════════════════
   7. GLASS CARDS
   ════════════════════════════════════════ */
.card,
.class-card,
.resource-card,
.stat-card,
.strength-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur-sm);
    -webkit-backdrop-filter: var(--glass-blur-sm);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s var(--spring), box-shadow 0.3s ease;
}

/* Class card */
.class-card {
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.class-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,107,53,0.06) 0%, rgba(0,78,137,0.06) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.class-card:hover::before { opacity: 1; }

.class-card h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.class-card p {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Hover lift for cards */
.class-card:hover,
.resource-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

/* Resource card */
.resource-card {
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.resource-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle at top right, rgba(255,107,53,0.08), transparent);
    border-radius: 0 var(--radius-lg) 0 80px;
}

.card-icon      { font-size: 2.5rem; margin-bottom: 1rem; }
.resource-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.35rem;
}

.resource-card p  { color: var(--gray); font-size: 0.92rem; margin-bottom: 1rem; }

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--gray);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.card-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.btn-small {
    padding: 0.55rem 1.1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-pill);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    flex: 1;
    text-align: center;
    transition: transform 0.2s var(--spring), box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(255,107,53,0.30);
}

.btn-small:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255,107,53,0.40);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(135deg, rgba(247,184,1,0.20), rgba(247,184,1,0.10));
    border: 1px solid rgba(247,184,1,0.30);
    color: #a07800;
    padding: 0.28rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Card grid layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.75rem;
    margin: 2rem 0;
}

/* ════════════════════════════════════════
   8. TABS
   ════════════════════════════════════════ */
.tab-container {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--gray-light);
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding-bottom: 0;
}

.tab-btn {
    padding: 0.85rem 1.4rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: var(--gray);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: color 0.25s, background 0.25s, border-color 0.25s;
}

.tab-btn:hover {
    color: var(--primary);
    background: rgba(255,107,53,0.05);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(255,107,53,0.06);
}

.tab-content              { display: none; }
.tab-content.active       { display: block; animation: fadeUp 0.3s var(--ease-out); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════════════════════════════════
   9. SUBJECT HEADER / BREADCRUMB
   ════════════════════════════════════════ */
.subject-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #0067a5 60%, var(--primary) 100%);
    color: white;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.subject-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

.subject-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    font-size: 0.88rem;
    opacity: 0.85;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.breadcrumb a { color: white; opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; }

/* ════════════════════════════════════════
   10. DASHBOARD
   ════════════════════════════════════════ */
.dashboard {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Stat card */
.stat-card {
    border-top: 4px solid var(--primary);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.stat-card:nth-child(2) { border-top-color: var(--secondary); }
.stat-card:nth-child(3) { border-top-color: var(--success); }
.stat-card:nth-child(4) { border-top-color: var(--accent); }

.stat-card::after {
    content: attr(data-icon);
    position: absolute;
    bottom: -10px;
    right: 10px;
    font-size: 4rem;
    opacity: 0.07;
    pointer-events: none;
    line-height: 1;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-label {
    color: var(--gray);
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

/* Strength tracker */
.strength-section {
    margin-top: 2rem;
    padding: 2rem;
}

.strength-section h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.strength-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

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

.strength-label {
    min-width: 100px;
    font-weight: 600;
    font-size: 0.88rem;
}

.strength-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-light);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 0.7s var(--ease-out);
}

.strength-bar-fill.good   { background: linear-gradient(90deg, var(--success), #a0e9a0); }
.strength-bar-fill.medium { background: linear-gradient(90deg, var(--accent), var(--primary)); }
.strength-bar-fill.weak   { background: linear-gradient(90deg, var(--primary), var(--danger)); }

.strength-pct {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 700;
    min-width: 40px;
    text-align: right;
    color: var(--dark);
}

/* ════════════════════════════════════════
   11. FORMS
   ════════════════════════════════════════ */
.form-container {
    max-width: 480px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    background: var(--glass-bg-heavy);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.form-container h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1.75rem;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1.5px solid rgba(0,0,0,0.10);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    color: var(--dark);
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(255,107,53,0.12);
}

.form-group input::placeholder { color: rgba(26,26,46,0.40); }

/* ════════════════════════════════════════
   12. FOOTER
   ════════════════════════════════════════ */
.footer {
    background: linear-gradient(135deg, var(--dark) 0%, #0f1428 100%);
    color: white;
    margin-top: 5rem;
    padding: 4rem 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.footer-section h3,
.footer-section h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 1.1rem;
    color: var(--accent);
}

.footer-section p  { color: rgba(255,255,255,0.65); font-size: 0.88rem; line-height: 1.7; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 0.6rem; }
.footer-section a  { color: rgba(255,255,255,0.70); font-size: 0.9rem; transition: color 0.2s; }
.footer-section a:hover { color: var(--accent); }

.social-links {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    transition: background 0.2s, transform 0.2s var(--spring);
}

.social-icon:hover {
    background: rgba(255,107,53,0.20);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.50);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* ════════════════════════════════════════
   13. UTILITY CLASSES
   ════════════════════════════════════════ */
.text-center  { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted   { color: var(--gray); }
.mt-1 { margin-top: 1rem; }  .mb-1 { margin-bottom: 1rem; }
.mt-2 { margin-top: 2rem; }  .mb-2 { margin-bottom: 2rem; }
.mt-3 { margin-top: 3rem; }  .mb-3 { margin-bottom: 3rem; }
.d-flex  { display: flex; }
.gap-1   { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.justify-center { justify-content: center; }
.align-center   { align-items: center; }

/* ════════════════════════════════════════
   14. MOBILE RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 768px) {

    /* Show hamburger */
    .hamburger { display: flex; }

    /* ── Slide-in drawer ── */
    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(78vw, 300px);
        height: 100dvh;
        background: rgba(250, 252, 255, 0.97);
        backdrop-filter: blur(30px) saturate(200%);
        -webkit-backdrop-filter: blur(30px) saturate(200%);
        border-left: 1px solid rgba(255,255,255,0.50);
        box-shadow: -8px 0 40px rgba(0,0,0,0.18);
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        transition: right 0.38s var(--spring);
        z-index: 2000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-right.active { right: 0; }

    /* Drawer safe-area top padding */
    .nav-right::before {
        content: '';
        display: block;
        height: max(56px, env(safe-area-inset-top));
        flex-shrink: 0;
    }

    /* Drawer brand strip */
    .drawer-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem 0.5rem;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        margin-bottom: 0.5rem;
        position: relative;
    }

    .drawer-brand-icon { font-size: 1.5rem; }

    .drawer-brand-text {
        font-family: var(--font-display);
        font-weight: 800;
        font-size: 1rem;
        background: linear-gradient(135deg, var(--secondary), var(--primary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .drawer-close {
        position: absolute;
        top: 50%;
        right: 12px;
        transform: translateY(-50%);
        background: rgba(0,0,0,0.06);
        border: none;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
        color: var(--dark);
        transition: background 0.2s;
    }

    .drawer-close:hover { background: rgba(230,57,70,0.12); }

    /* Search inside drawer */
    .search-bar {
        padding: 0.75rem 1.25rem 0.25rem;
        width: 100%;
    }

    .search-bar form { width: 100%; }
    .search-bar input { width: 100% !important; flex: 1; }

    /* Nav menu inside drawer */
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0.75rem 1.25rem;
        width: 100%;
    }

    .nav-menu li { width: 100%; }

    .nav-menu li a {
        padding: 0.85rem 1rem;
        border-radius: var(--radius-md);
        font-size: 0.98rem;
        display: flex;
        align-items: center;
        width: 100%;
        gap: 0.4rem;
    }

    .login-btn, .signup-btn, .logout-btn {
        border-radius: var(--radius-md) !important;
        padding: 0.85rem 1rem !important;
        text-align: center;
        justify-content: center;
        margin-top: 0.25rem;
    }

    /* Hero */
    .hero { padding: 3.5rem 1.25rem 3rem; }
    .cta-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; max-width: 300px; justify-content: center; }

    /* Grids → 1 col */
    .card-grid        { grid-template-columns: 1fr; gap: 1.25rem; }
    .dashboard-grid   { grid-template-columns: 1fr; }
    .classes-grid     { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 0.85rem; }
    .footer-container { grid-template-columns: 1fr; gap: 1.75rem; }

    /* Dashboard */
    .dashboard { padding: 0 1rem; margin: 2rem auto; }

    /* Form */
    .form-container { margin: 1.5rem 1rem; padding: 1.75rem 1.25rem; border-radius: var(--radius-lg); }

    /* Tab scroll */
    .tab-container { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; scrollbar-width: none; }
    .tab-container::-webkit-scrollbar { display: none; }
    .tab-btn { flex-shrink: 0; }

    /* Footer */
    .footer { padding: 3rem 1.25rem 1.25rem; margin-top: 3rem; }
    .footer-bottom { font-size: 0.8rem; }
}

/* ── Extra small phones ── */
@media (max-width: 375px) {
    :root { --nav-height: 58px; }
    .logo-text { font-size: 0.9rem; }
    .hero h1 { font-size: 1.75rem; }
    .classes-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Accessibility: reduce motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}