/* ============================================================================
   PREMIUM COLOR GRADING SYSTEM - JAPANESE EDUCATION WEBSITE
   ============================================================================
   
   This CSS file provides a modern, premium color grading system that enhances
   the visual design of the education website while preserving all HTML structure.
   
   Color Palette:
   - Primary: #1E3A8A (Deep Indigo Blue)
   - Secondary: #7C3AED (Modern Purple)
   - Accent: #EF4444 (Soft Japanese Red)
   - Background: #F8FAFC (Soft Clean White)
   - Text: #111827 (Dark Modern Text)
   
   ============================================================================ */

:root {
    /* NEW PREMIUM COLOR SYSTEM */
    --primary-new: #1E3A8A;           /* Deep Indigo Blue */
    --secondary-new: #7C3AED;         /* Modern Purple */
    --accent-new: #EF4444;            /* Soft Japanese Red */
    --bg-new: #F8FAFC;                /* Soft Clean White */
    --text-new: #111827;              /* Dark Modern Text */
    
    /* Extended Color Palette */
    --primary-light: #3B5BDB;         /* Light Indigo */
    --primary-lighter: #5B7FE8;       /* Lighter Indigo */
    --secondary-light: #A78BFA;       /* Light Purple */
    --accent-light: #F87171;          /* Light Red */
    --accent-lighter: #FCA5A5;        /* Lighter Red */
    
    /* Neutral Grays - Premium Refined */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Premium Gradients */
    --gradient-primary: linear-gradient(135deg, #1E3A8A 0%, #3B5BDB 100%);
    --gradient-secondary: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%);
    --gradient-accent: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    --gradient-soft: linear-gradient(135deg, #F8FAFC 0%, #F3F4F6 100%);
    --gradient-mixed: linear-gradient(135deg, #1E3A8A 0%, #7C3AED 50%, #EF4444 100%);
    
    /* Enhanced Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(30, 58, 138, 0.05);
    --shadow-sm: 0 2px 4px 0 rgba(30, 58, 138, 0.08);
    --shadow-md: 0 4px 12px 0 rgba(30, 58, 138, 0.12);
    --shadow-lg: 0 12px 24px 0 rgba(30, 58, 138, 0.15);
    --shadow-xl: 0 20px 40px 0 rgba(30, 58, 138, 0.2);
    --shadow-2xl: 0 30px 60px 0 rgba(30, 58, 138, 0.25);
    --shadow-glow: 0 0 30px rgba(124, 58, 237, 0.15);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================================
   GLOBAL OVERRIDES - Maintain existing structure, enhance colors
   ============================================================================ */

body {
    background-color: var(--bg-new);
    color: var(--text-new);
}

/* ============================================================================
   NAVBAR & HEADER ENHANCEMENTS
   ============================================================================ */

.navbar {
    background: linear-gradient(180deg, #FFFFFF 0%, #F9FAFB 100%);
    border-bottom: 1px solid rgba(30, 58, 138, 0.08);
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.06);
    transition: all var(--transition-base);
}

.navbar:hover {
    box-shadow: 0 4px 16px rgba(30, 58, 138, 0.1);
}

.navbar-brand {
    color: var(--primary-new);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--secondary-new);
}

/* ============================================================================
   BUTTON ENHANCEMENTS
   ============================================================================ */

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #1E3A8A 0%, #2E4A9E 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #7C3AED 0%, #8B5CF6 100%);
}

.btn-secondary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-md);
}

.btn-accent {
    background: var(--gradient-accent);
    color: white;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, #EF4444 0%, #F97316 100%);
}

.btn-outline {
    border: 2px solid var(--primary-new);
    color: var(--primary-new);
    background: transparent;
    transition: all var(--transition-base);
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary-new);
    color: white;
    box-shadow: var(--shadow-md);
}

/* ============================================================================
   SECTION BACKGROUNDS & SEPARATIONS
   ============================================================================ */

.section {
    position: relative;
    transition: background-color var(--transition-base);
}

.section:nth-child(odd) {
    background: var(--bg-new);
}

.section:nth-child(even) {
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
}

.section-header {
    color: var(--text-new);
}

.section-header h2 {
    background: linear-gradient(135deg, var(--primary-new) 0%, var(--secondary-new) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.section-tag {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(239, 68, 68, 0.1) 100%);
    color: var(--secondary-new);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 9999px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================================================
   CARD & COMPONENT ENHANCEMENTS
   ============================================================================ */

.card {
    background: white;
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-bottom: 1px solid rgba(30, 58, 138, 0.08);
    padding: 20px;
    color: var(--primary-new);
    font-weight: 700;
}

.card-body {
    padding: 24px;
    color: var(--text-new);
}

.card-footer {
    background: linear-gradient(180deg, #F9FAFB 0%, #F3F4F6 100%);
    border-top: 1px solid rgba(30, 58, 138, 0.08);
    padding: 16px 24px;
}

/* ============================================================================
   FEATURE CARDS & BOXES
   ============================================================================ */

.feature-card {
    background: white;
    border: 1px solid rgba(30, 58, 138, 0.08);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.feature-card:hover {
    border-color: rgba(124, 58, 237, 0.3);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

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

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-new);
    font-size: 28px;
    margin-bottom: 16px;
    transition: all var(--transition-base);
}

.feature-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary-new) 0%, var(--secondary-new) 100%);
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* ============================================================================
   TESTIMONIAL & QUOTE SECTIONS
   ============================================================================ */

.testimonial {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-left: 4px solid var(--secondary-new);
    border-radius: 8px;
    padding: 24px;
    transition: all var(--transition-base);
}

.testimonial:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.testimonial-author {
    color: var(--primary-new);
    font-weight: 700;
}

/* ============================================================================
   PROGRESS BARS & INDICATORS
   ============================================================================ */

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.progress-bar::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

.progress-track {
    background: var(--gray-200);
    border-radius: 9999px;
    height: 8px;
    overflow: hidden;
}

/* ============================================================================
   BADGE & LABEL ENHANCEMENTS
   ============================================================================ */

.badge {
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 6px 12px;
    transition: all var(--transition-base);
}

.badge-primary {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(59, 91, 219, 0.1) 100%);
    color: var(--primary-new);
    border: 1px solid rgba(30, 58, 138, 0.2);
}

.badge-secondary {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1) 0%, rgba(167, 139, 250, 0.1) 100%);
    color: var(--secondary-new);
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.badge-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(52, 211, 153, 0.1) 100%);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(251, 191, 36, 0.1) 100%);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    color: var(--accent-new);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ============================================================================
   INPUT & FORM ENHANCEMENTS
   ============================================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
    background: white;
    color: var(--text-new);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-new);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
    background: linear-gradient(135deg, rgba(248, 250, 252, 1) 0%, rgba(243, 244, 246, 1) 100%);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

/* ============================================================================
   LINK & ANCHOR ENHANCEMENTS
   ============================================================================ */

a {
    color: var(--primary-new);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
}

a:hover {
    color: var(--secondary-new);
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

a:hover::after {
    width: 100%;
}

/* ============================================================================
   DIVIDER & SEPARATOR ENHANCEMENTS
   ============================================================================ */

hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
    margin: 32px 0;
}

/* ============================================================================
   HERO SECTION ENHANCEMENTS
   ============================================================================ */

.hero {
    background: linear-gradient(135deg, var(--bg-new) 0%, #EFF6FF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--text-new);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero h1 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--gray-600);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 32px;
    max-width: 600px;
}

/* ============================================================================
   TABLE ENHANCEMENTS
   ============================================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

thead {
    background: linear-gradient(135deg, var(--primary-new) 0%, var(--secondary-new) 100%);
    color: white;
}

thead th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    letter-spacing: 0.5px;
}

tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

tbody tr:hover {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(124, 58, 237, 0.05) 100%);
}

tbody td {
    padding: 16px;
    color: var(--text-new);
}

/* ============================================================================
   LIST ENHANCEMENTS
   ============================================================================ */

ul, ol {
    color: var(--text-new);
}

li {
    margin-bottom: 12px;
    line-height: 1.8;
}

ul li::marker {
    color: var(--primary-new);
    font-weight: 700;
}

ol li::marker {
    color: var(--secondary-new);
    font-weight: 700;
}

/* ============================================================================
   BLOCKQUOTE ENHANCEMENTS
   ============================================================================ */

blockquote {
    border-left: 4px solid var(--secondary-new);
    padding-left: 24px;
    margin: 24px 0;
    color: var(--gray-600);
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.8;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05) 0%, rgba(30, 58, 138, 0.05) 100%);
    padding: 20px 24px;
    border-radius: 8px;
}

/* ============================================================================
   CODE & SYNTAX ENHANCEMENTS
   ============================================================================ */

code {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(124, 58, 237, 0.08) 100%);
    color: var(--primary-new);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

pre {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    color: #E5E7EB;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

pre code {
    background: none;
    color: inherit;
    padding: 0;
}

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

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .feature-card {
        padding: 24px;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature-card {
        padding: 16px;
    }
    
    .card {
        border-radius: 8px;
    }
}

/* ============================================================================
   ANIMATION & TRANSITION UTILITIES
   ============================================================================ */

.fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

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

.slide-in-left {
    animation: slideInLeft var(--transition-slow) ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scale-in {
    animation: scaleIn var(--transition-slow) ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-primary {
    color: var(--primary-new);
}

.text-secondary {
    color: var(--secondary-new);
}

.text-accent {
    color: var(--accent-new);
}

.text-muted {
    color: var(--gray-500);
}

.bg-primary {
    background: var(--primary-new);
    color: white;
}

.bg-secondary {
    background: var(--secondary-new);
    color: white;
}

.bg-accent {
    background: var(--accent-new);
    color: white;
}

.bg-light {
    background: var(--bg-new);
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

.shadow-xl {
    box-shadow: var(--shadow-xl);
}

.rounded-sm {
    border-radius: 4px;
}

.rounded-md {
    border-radius: 8px;
}

.rounded-lg {
    border-radius: 12px;
}

.rounded-xl {
    border-radius: 16px;
}

.rounded-full {
    border-radius: 9999px;
}

.transition-fast {
    transition: all var(--transition-fast);
}

.transition-base {
    transition: all var(--transition-base);
}

.transition-slow {
    transition: all var(--transition-slow);
}

/* ============================================================================
   SMOOTH SCROLLING & PERFORMANCE
   ============================================================================ */

html {
    scroll-behavior: smooth;
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */

@media print {
    body {
        background: white;
        color: black;
    }
    
    .no-print {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================================================
   DARK MODE SUPPORT (Optional - for future enhancement)
   ============================================================================ */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-new: #0F172A;
        --text-new: #F1F5F9;
        --gray-50: #1E293B;
        --gray-100: #334155;
        --gray-200: #475569;
    }
    
    body {
        background: var(--bg-new);
        color: var(--text-new);
    }
    
    .card {
        background: #1E293B;
        border-color: rgba(124, 58, 237, 0.2);
    }
}

/* =========================================
   HYPER-PREMIUM SPATIAL ENHANCEMENTS
   ========================================= */

/* 1. Physical Grain & Deep Space Base */
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    position: relative;
    overflow-x: hidden;
}

/* Subtle, static noise for high-end materiality */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 9999;
}

/* 2. Drifting Aurora Glows */
.aurora-container {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: aurora-drift 20s infinite alternate var(--ease-spatial);
}

.aurora-purple { top: -10%; left: -10%; width: 50vw; height: 50vw; background: #8B5CF6; }
.aurora-blue { top: 40%; right: -20%; width: 60vw; height: 60vw; background: var(--primary); animation-delay: -5s; }
.aurora-cyan { bottom: -20%; left: 20%; width: 40vw; height: 40vw; background: #06B6D4; animation-delay: -10s; }

@keyframes aurora-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(8%, 12%) scale(1.1); }
}

/* 3. Hyper-Glass 3.0 & Shine Sweep */
.card, .service-card, .course-card, .header.scrolled {
    background: rgba(2, 2, 5, 0.75) !important;
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}
/* Ensure nav links are visible when header is scrolled (white/transparent) */
.header.scrolled .desktop-menu a,
.header.scrolled .mobile-menu a {
    color: #111 !important; /* dark text */
    text-shadow: none !important;
}
.header.scrolled .desktop-menu a:hover,
.header.scrolled .mobile-menu a:hover {
    color: var(--primary) !important; /* accent on hover */
}
.stat-box {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-spatial);
    transform-style: preserve-3d;
}

/* Simulating light passing over glass */
.card::after, .service-card::after, .course-card::after, .stat-box::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.04) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: shine-sweep 8s infinite;
    pointer-events: none;
}

@keyframes shine-sweep {
    0% { left: -150%; }
    20%, 100% { left: 200%; }
}

/* 4. Non-Sync Floating Elements */
@keyframes spatial-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.spatial-float {
    /* Duration injected via JS to ensure they are out of sync */
    animation: spatial-float var(--float-duration, 6s) var(--ease-spatial) infinite;
}

/* 5. Silver-Chrome Typography */
h1, h2, .section-title {
    background: linear-gradient(to bottom, #FFFFFF 30%, #94A3B8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

/* 6. Logo Heartbeat */
.logo i.fa-mountain {
    display: inline-block;
    animation: heartbeat 3s infinite var(--ease-spatial);
    filter: drop-shadow(0 0 12px rgba(6, 182, 212, 0.5));
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* 7. Magnetic Buttons - Base Styles */
.btn, .nav-cta {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s var(--ease-spatial);
    border: 1px solid rgba(212, 175, 55, 0.3); /* Ascent Gold hint */
}

.btn:hover, .nav-cta:hover {
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.3); /* Soft Gold Glow */
    border-color: rgba(212, 175, 55, 0.8);
}

/* 8. Scroll Reveal Base State */
.spatial-reveal {
    opacity: 0;
    transform: scale(0.92) translateY(40px);
    transition: opacity 0.8s var(--ease-spatial), transform 0.8s var(--ease-spatial);
    will-change: opacity, transform;
}

.spatial-reveal.is-revealed {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ==========================================================
   9. MOBILE CORE LAYOUT OPTIMIZATIONS
   ========================================================== */
@media (max-width: 768px) {
    /* Prevent horizontal scrolling & zoom overflow */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        -webkit-text-size-adjust: 100%;
        touch-action: manipulation; /* Prevents 300ms click delay */
    }

    /* Adjust tap highlight for touch devices */
    * {
        -webkit-tap-highlight-color: transparent !important;
    }

    /* Force sensible image scaling */
    img, svg, video, iframe {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Increase touch targets for links & buttons */
    a, button, .btn, .nav-cta, .gallery-filter {
        min-height: 44px !important; 
        min-width: 44px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Reset paddings for grids on mobile to avoid overflow */
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .services-grid, .courses-grid, .stats-grid, .testimonials-grid {
        gap: 16px !important;
        padding: 8px 0 !important;
    }
}

/* ==========================================================================
   📱 APEX CONSULTANCY: MOBILE & TABLET RESPONSIVE SYSTEM
   ========================================================================== */

/* 1. FLUID TYPOGRAPHY (Smoothly scales down for phones) */
h1, .chrome-text {
    /* clamp(minimum size, preferred scaling size, maximum size) */
    font-size: clamp(2rem, 8vw, 4rem) !important; 
    line-height: 1.2;
}

h2 { font-size: clamp(1.5rem, 5vw, 2.5rem); }
p { font-size: clamp(0.9rem, 2vw, 1.1rem); }

/* ==========================================================================
   THE CORE MOBILE BREAKPOINT (Screens smaller than 768px - Phones & Small Tablets)
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* 2. UNIVERSAL CONTAINER PADDING */
    /* Prevents text from touching the absolute edges of the phone screen */
    section, .premium-container, .glass-wrapper {
        padding-left: 20px !important;
        padding-right: 20px !important;
        overflow-x: hidden; /* Prevents horizontal scrolling/wobble */
    }

    /* 3. STACKING THE 3D GRIDS (Jobs, Courses, Services) */
    /* Converts side-by-side desktop grids into vertical, scrollable lists */
    .grid-container, 
    .job-listings, 
    .course-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 25px; /* Adds breathing room between stacked cards */
    }

    /* Make all glass cards take up the full width of the phone */
    .glass-card, 
    .job-card {
        width: 100% !important;
        margin: 0 !important;
        box-sizing: border-box;
    }

    /* 4. FIXING THE SPATIAL VISA TIMELINE FOR MOBILE */
    /* Moves the vertical line to the left, instead of the middle */
    .spatial-track::before {
        left: 25px; 
    }

    .track-item, 
    .track-item:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px; /* Make room for the line on the left */
        margin-bottom: 40px;
    }

    .track-marker {
        left: 0;
        transform: none;
        width: 40px;
        height: 40px;
    }

    .track-glass-card {
        width: 100%;
        margin-top: 10px;
    }

    /* 5. PERFORMANCE TUNING FOR MOBILE CHIPS */
    /* High blur values can make cheap phones lag. We lower it slightly for mobile. */
    .glass-card, 
    .track-glass-card {
        backdrop-filter: blur(15px); /* Reduced from 30px for buttery smooth scrolling */
        -webkit-backdrop-filter: blur(15px); /* Safari support */
    }

    /* 6. HIDE DESKTOP MENU, SHOW MOBILE TRIGGER */
    .desktop-menu { display: none !important; }
    .mobile-toggle { display: flex !important; }
}

/* ==========================================================================
   TINY PHONES (iPhone SE, Older Androids - Screens smaller than 400px)
   ========================================================================== */
@media screen and (max-width: 400px) {
    .glass-card {
        padding: 15px; /* Tighter padding to save screen real estate */
    }
}

/* ==========================================================================
   LIQUID SCROLL & GPU ACCELERATION PROTOCOL
   ========================================================================== */

/* 1. Base Scroll Physics */
html {
    scroll-behavior: smooth;
    /* Forces momentum-based "flick" scrolling on iPhones */
    -webkit-overflow-scrolling: touch !important; 
}

/* 2. Lock the X-Axis (Kills the "Wobble") */
body {
    width: 100%;
    overflow-x: hidden;
}

/* 3. GPU Hardware Acceleration for Glass Cards */
.glass-card, 
.track-glass-card,
.job-card {
    /* translateZ(0) tricks the phone into using the dedicated graphics chip */
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
    
    /* Tells the browser to prepare memory for these specific changes */
    will-change: transform, opacity;
    
    /* Performance limit on shadows to save memory on scroll */
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2); 
}

/* 4. The Mobile-Specific Blur Override */
@media screen and (max-width: 768px) {
    .glass-card, 
    .track-glass-card,
    .job-card {
        /* Drop the blur down to 10px on mobile. 
           It still looks premium but stops the processor from choking. */
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        
        /* Disable hover animations on mobile so they don't misfire while scrolling */
        transition: none !important; 
    }
}

/* ==========================================================================
   BULLETPROOF MOBILE FAILSAFES
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Hard lock the body width and prevent ANY accidental horizontal scrolling */
    body {
        overflow-x: hidden;
    }

    /* Ensure absolute positioned background elements never cause overflow */
    .aurora-container, .hero::before, .hero::after {
        max-width: 100%;
        overflow: hidden !important;
    }

    /* Force all grids and flex containers to respect max-width */
    .container, .hero-container, .grid-container, .services-grid, .courses-grid {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Prevent inputs from zooming on iOS */
    input, select, textarea {
        font-size: 16px !important;
    }
}
