/* ==========================================================================
   LEARN WITH JC - GLOBAL COLOR PALETTE & DYNAMIC THEME SYSTEM (colors.css)
   Reusable across all pages of LearnWithJC
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. LIGHT THEME (DEFAULT ROOT VARIABLES)
   -------------------------------------------------------------------------- */
:root {
  /* Brand Primary Colors */
  --color-primary: #7CDA59;
  --color-primary-hover: #6BC548;
  --color-primary-active: #59B137;
  --color-primary-light: #F2FAF0;
  --color-primary-glow: rgba(124, 218, 89, 0.35);

  /* Brand Accent Colors */
  --color-accent-gold: #D1A958;
  --color-accent-gold-hover: #BE9645;
  --star-color: #D1A958;

  /* Global Surface & Layout Colors (Light Mode) */
  --site-bg: #FFFFFF;
  --header-bg: #7CDA59;
  --header-text: #FFFFFF;
  --header-border: rgba(255, 255, 255, 0.2);

  --color-heading: #18191C;
  --color-body-text: #525B6A;
  --color-text-muted: #64748b;
  --color-text-light: #FFFFFF;
  --color-border: #E2E8F0;

  /* Section Backgrounds */
  --section-bg-light: #F4FCF2;
  --section-bg-alt: #FAF5EA;
  --section-bg-white: #FFFFFF;

  /* Card System (Light Mode) */
  --card-bg: #FFFFFF;
  --card-bg-subtle: #F8FAF7;
  --card-border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --card-hover-shadow: 0 20px 40px rgba(124, 218, 89, 0.18);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.95);
  --glass-shadow: 0 20px 40px rgba(124, 218, 89, 0.12);

  /* Badge Colors */
  --badge-bg: #ECF9E7;
  --badge-text: #2C6B17;
  --badge-border: rgba(124, 218, 89, 0.4);

  /* Footer System */
  --footer-bg: #FFFFFF;
  --footer-text: #525B6A;
  --footer-border: #E2E8F0;
  --footer-heading: #18191C;

  /* Utility Variables Aliases */
  --primary-color: var(--color-primary);
  --primary-rgb: 124, 218, 89;
  --primary-hover: var(--color-primary-hover);
  --primary-light: var(--color-primary-light);
  --dark-color: #18191C;
  --dark-surface: #0F1012;
  --dark-text: var(--color-heading);
  --text-muted: var(--color-body-text);
  --border-color: var(--color-border);
  --bg-white: var(--card-bg);
  --bg-soft: var(--section-bg-light);

  /* Modern Theme Switch Toggle Control Colors */
  --theme-switch-bg: rgba(255, 255, 255, 0.25);
  --theme-switch-border: rgba(255, 255, 255, 0.4);
  --theme-thumb-bg: #FFFFFF;
  --theme-thumb-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  --theme-icon-sun: #D1A958;
  --theme-icon-moon: rgba(255, 255, 255, 0.7);
}

/* --------------------------------------------------------------------------
   2. DARK THEME OVERRIDES ([data-theme="dark"])
   -------------------------------------------------------------------------- */
[data-theme="dark"],
.dark-theme {
  --site-bg: #0B0C0E;
  --header-bg: #121418;
  --header-text: #FFFFFF;
  --header-border: rgba(255, 255, 255, 0.08);

  --color-heading: #F3F4F6;
  --color-body-text: #9CA3AF;
  --color-text-muted: #9CA3AF;
  --color-text-light: #FFFFFF;
  --color-border: rgba(255, 255, 255, 0.12);

  --color-primary-light: rgba(124, 218, 89, 0.15);
  --color-accent-gold-light: rgba(209, 169, 88, 0.15);

  --section-bg-light: #12141A;
  --section-bg-alt: #171A22;
  --section-bg-white: #0B0C0E;

  --card-bg: #16181F;
  --card-bg-subtle: #1C1F2A;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
  --card-hover-shadow: 0 20px 40px rgba(124, 218, 89, 0.25);

  --glass-bg: rgba(22, 24, 31, 0.88);
  --glass-border: rgba(124, 218, 89, 0.35);
  --glass-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);

  --badge-bg: rgba(124, 218, 89, 0.18);
  --badge-text: #7CDA59;
  --badge-border: rgba(124, 218, 89, 0.5);

  --footer-bg: #101216;
  --footer-text: #9CA3AF;
  --footer-border: rgba(255, 255, 255, 0.08);
  --footer-heading: #F3F4F6;

  /* Legacy Aliases in Dark Mode */
  --dark-color: #18191C;
  --dark-surface: #16181F;
  --dark-text: #F3F4F6;
  --text-muted: #9CA3AF;
  --border-color: rgba(255, 255, 255, 0.12);
  --bg-white: #16181F;
  --bg-soft: #12141A;

  /* Modern Theme Switch Toggle Control Colors in Dark Mode */
  --theme-switch-bg: rgba(255, 255, 255, 0.12);
  --theme-switch-border: rgba(124, 218, 89, 0.4);
  --theme-thumb-bg: #7CDA59;
  --theme-thumb-shadow: 0 0 15px rgba(124, 218, 89, 0.6);
  --theme-icon-sun: #6B7280;
  --theme-icon-moon: #0B0C0E;
}

/* --------------------------------------------------------------------------
   3. EXPLICIT DARK MODE STYLING & HIGH-CONTRAST OVERRIDES
   -------------------------------------------------------------------------- */
[data-theme="dark"] body {
  background-color: #0B0C0E !important;
  color: #9CA3AF !important;
}

/* Headings in Dark Mode */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .hero-title,
[data-theme="dark"] .about-hero-title,
[data-theme="dark"] .vision-title,
[data-theme="dark"] .why-study-header h2,
[data-theme="dark"] .why-card h3,
[data-theme="dark"] .mosaic-header-title,
[data-theme="dark"] .courses-title-group h2,
[data-theme="dark"] .instructors-title-group h2,
[data-theme="dark"] .why-us-header h2,
[data-theme="dark"] .why-us-card h3,
[data-theme="dark"] .about-title,
[data-theme="dark"] .stat-number,
[data-theme="dark"] .testimonials-header h2,
[data-theme="dark"] .become-info h2,
[data-theme="dark"] .section-title,
[data-theme="dark"] .client-name,
[data-theme="dark"] .testimonial-quote,
[data-theme="dark"] .footer-col-title,
[data-theme="dark"] .instructor-name,
[data-theme="dark"] .course-card-title,
[data-theme="dark"] .rating-score,
[data-theme="dark"] .instructor-rating,
[data-theme="dark"] .become-feature-item,
[data-theme="dark"] .category-title,
[data-theme="dark"] .vision-list li,
[data-theme="dark"] .why-card-icon,
[data-theme="dark"] .card-text h4 {
  color: #F3F4F6 !important;
}

[data-theme="dark"] .vision-list li i {
  color: #7CDA59 !important;
}

/* Paragraphs & Subtitles in Dark Mode */
[data-theme="dark"] p,
[data-theme="dark"] .hero-description,
[data-theme="dark"] .about-hero-subtitle,
[data-theme="dark"] .vision-desc,
[data-theme="dark"] .why-study-header p,
[data-theme="dark"] .why-card p,
[data-theme="dark"] .mosaic-header-desc,
[data-theme="dark"] .courses-title-group p,
[data-theme="dark"] .instructors-title-group p,
[data-theme="dark"] .why-us-header p,
[data-theme="dark"] .why-us-card p,
[data-theme="dark"] .about-description,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .testimonials-header p,
[data-theme="dark"] .become-info p,
[data-theme="dark"] .client-role,
[data-theme="dark"] .proof-text,
[data-theme="dark"] .hero-badge-text,
[data-theme="dark"] .card-text p,
[data-theme="dark"] .instructor-role,
[data-theme="dark"] .instructor-meta,
[data-theme="dark"] .course-meta,
[data-theme="dark"] .course-author,
[data-theme="dark"] .footer-contact-item span,
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .subscribe-text,
[data-theme="dark"] .breadcrumb-nav,
[data-theme="dark"] .breadcrumb-nav a {
  color: #9CA3AF !important;
}

/* Section Background Overrides in Dark Mode */
[data-theme="dark"] .hero-section {
  background: linear-gradient(180deg, #0B0C0E 0%, #12141A 100%) !important;
}

[data-theme="dark"] .about-hero-banner,
[data-theme="dark"] .why-study-section,
[data-theme="dark"] .popular-courses-section,
[data-theme="dark"] .testimonials-section,
[data-theme="dark"] .cta-banner-section {
  background-color: #12141A !important;
}

[data-theme="dark"] .vision-section,
[data-theme="dark"] .mosaic-section,
[data-theme="dark"] .courses-section,
[data-theme="dark"] .instructors-section,
[data-theme="dark"] .categories-section,
[data-theme="dark"] .stats-section,
[data-theme="dark"] .why-us-section,
[data-theme="dark"] .about-section,
[data-theme="dark"] .become-instructor-section {
  background-color: #0B0C0E !important;
}

/* Cards & Special Containers in Dark Mode */
[data-theme="dark"] .why-card,
[data-theme="dark"] .course-card,
[data-theme="dark"] .category-card,
[data-theme="dark"] .instructor-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .feature-card,
[data-theme="dark"] .floating-card,
[data-theme="dark"] .hero-badge,
[data-theme="dark"] .logo-container,
[data-theme="dark"] .floating-money-badge,
[data-theme="dark"] .floating-growth-badge,
[data-theme="dark"] .about-card-container,
[data-theme="dark"] .become-instructor-card,
[data-theme="dark"] .vision-image-wrapper {
  background-color: #16181F !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #F3F4F6 !important;
}

[data-theme="dark"] .become-feature-item i {
  background-color: #7CDA59 !important;
  color: #0B0C0E !important;
}

/* Secondary Buttons & Action Controls in Dark Mode */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-show-more,
[data-theme="dark"] .btn-see-all,
[data-theme="dark"] .btn-enroll,
[data-theme="dark"] .testimonial-arrow {
  background-color: #16181F !important;
  color: #F3F4F6 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-show-more:hover,
[data-theme="dark"] .btn-see-all:hover,
[data-theme="dark"] .btn-enroll:hover,
[data-theme="dark"] .testimonial-arrow:hover {
  border-color: #7CDA59 !important;
  color: #7CDA59 !important;
}

/* Footer in Dark Mode */
[data-theme="dark"] .footer {
  background-color: #101216 !important;
  color: #9CA3AF !important;
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .social-icon {
  background-color: #1C1F2A !important;
  color: #9CA3AF !important;
}

[data-theme="dark"] .social-icon:hover {
  background-color: #7CDA59 !important;
  color: #0B0C0E !important;
}

/* --------------------------------------------------------------------------
   4. MODERN UNIQUE THEME SWITCH TOGGLE BUTTON STYLES
   -------------------------------------------------------------------------- */
.theme-toggle-btn {
  position: relative;
  width: 62px;
  height: 32px;
  border-radius: 999px;
  background: var(--theme-switch-bg);
  border: 1.5px solid var(--theme-switch-border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  outline: none;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:hover {
  transform: scale(1.06);
  border-color: var(--color-primary);
  box-shadow: 0 0 14px var(--color-primary-glow), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn:active {
  transform: scale(0.96);
}

.theme-toggle-btn .theme-icon {
  font-size: 12px;
  z-index: 1;
  transition: transform 0.35s ease, opacity 0.35s ease, color 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.theme-toggle-btn .icon-sun {
  color: var(--theme-icon-sun);
}

.theme-toggle-btn .icon-moon {
  color: var(--theme-icon-moon);
}

/* Sliding Thumb Knob */
.theme-toggle-btn .theme-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: var(--theme-thumb-bg);
  box-shadow: var(--theme-thumb-shadow);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.theme-toggle-btn .theme-thumb i {
  font-size: 12px;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Dark Mode Toggle Active State */
[data-theme="dark"] .theme-toggle-btn .theme-thumb {
  transform: translateX(30px);
}

[data-theme="dark"] .theme-toggle-btn .theme-thumb i.fa-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle-btn .theme-thumb i.fa-moon {
  display: block;
  color: #0B0C0E;
}

:root:not([data-theme="dark"]) .theme-toggle-btn .theme-thumb i.fa-moon {
  display: none;
}

:root:not([data-theme="dark"]) .theme-toggle-btn .theme-thumb i.fa-sun {
  display: block;
  color: #D1A958;
}

/* ==========================================================================
   5. PREMIUM SITE-WIDE ANIMATIONS & TRANSITIONS SYSTEM (ULTRA-SMOOTH)
   ========================================================================== */

/* --------------------------------------------------------------------------
   A. Page Transition Curtain Overlay (GSAP Clip-Path & Fade)
   -------------------------------------------------------------------------- */
.page-transition-curtain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--primary-color, #7CDA59);
  z-index: 999999;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .page-transition-curtain {
  background-color: #12141A;
}

.curtain-logo {
  height: 48px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

body.page-loaded {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   B. Refined Navbar Glassmorphism & Scroll Hide/Show
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.header.nav-hidden {
  transform: translateY(-100%);
}

.header.scrolled {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .header.scrolled {
  background-color: rgba(18, 20, 24, 0.88) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   C. Modern GSAP Smooth Entrance Helpers (Base States)
   -------------------------------------------------------------------------- */
.img-clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.img-clip-reveal.active {
  clip-path: inset(0 0 0 0);
}

.zoom-on-hover {
  overflow: hidden;
}

.zoom-on-hover img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.zoom-on-hover:hover img {
  transform: scale(1.06);
}

/* --------------------------------------------------------------------------
   G. Micro-Hover Buttons & Arrow Movements
   -------------------------------------------------------------------------- */
.btn,
.btn-primary,
.btn-secondary,
.btn-login,
.btn-signup,
.btn-contact-submit,
.btn-see-all,
.btn-show-more,
.card-btn {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-login:hover,
.btn-signup:hover,
.btn-see-all:hover,
.btn-show-more:hover {
  transform: translateY(-3px);
}

.btn i,
a i,
button i {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn:hover i.fa-arrow-right,
a:hover i.fa-arrow-right,
button:hover i.fa-arrow-right,
.btn:hover i.fa-chevron-right,
a:hover i.fa-chevron-right {
  transform: translateX(5px);
}

.btn:hover i.fa-arrow-up-right-from-square,
a:hover i.fa-arrow-up-right-from-square,
button:hover i.fa-arrow-up-right-from-square {
  transform: translate(3px, -3px);
}

/* --------------------------------------------------------------------------
   H. Gentle Floating Parallax Animation
   -------------------------------------------------------------------------- */
.floating-gentle {
  animation: gentleFloat 5s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-12px);
  }
}

.floating-gentle-reverse {
  animation: gentleFloatReverse 5.5s ease-in-out infinite;
}

@keyframes gentleFloatReverse {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(12px);
  }
}
