/* ════════════════════════════════════════════════════════════
   MAIN.CSS — DESIGN SYSTEM & UTILITIES  v4
   ────────────────────────────────────────────────────────────
   Single source of truth for static design tokens only.
   All brand/nav/footer/logo vars are injected by base.html.
   Button shadows use CSS color-mix() so they auto-update
   when the admin changes primary/secondary colours.

   Button style controlled by .btn-style-gradient or
   .btn-style-solid class on <body> (set from ThemeSettings).
   ════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════
   STATIC DESIGN TOKENS
   ════════════════════════════════════════════════════════════ */

:root {
  /* ── Static neutrals ──────────────────────────────────── */
  --elite-white:          #FFFFFF;
  --elite-gray:           #6B7280;
  --elite-gray-light:     #D1D5DB;
  --elite-gray-lighter:   #E5E7EB;

  /* ── Additional dark tokens ───────────────────────────── */
  --elite-dark-2:         #1B2432;
  --elite-navy:           #111C2B;
  --elite-navy-2:         #1F2B3C;

  /* ── Font variable aliases (set by base.html inline style) */
  --font-heading: 'Rajdhani';
  --font-body:    'Work Sans';

  /* ── Glassmorphism ────────────────────────────────────── */
  --glass-white:          rgba(255, 255, 255, 0.06);
  --glass-white-md:       rgba(255, 255, 255, 0.10);
  --glass-white-strong:   rgba(255, 255, 255, 0.14);

  --glass-dark:           rgba(14, 22, 33, 0.50);
  --glass-dark-md:        rgba(14, 22, 33, 0.70);
  --glass-dark-strong:    rgba(14, 22, 33, 0.88);

  --glass-navy:           rgba(17, 28, 43, 0.78);
  --glass-navy-md:        rgba(31, 43, 60, 0.88);
  --glass-navy-strong:    rgba(31, 43, 60, 0.96);

  /* ── Blur levels ──────────────────────────────────────── */
  --blur-esm:  blur(4px);
  --blur-sm:   blur(8px);
  --blur-md:   blur(16px);
  --blur-lg:   blur(24px);
  --blur-xl:   blur(40px);
  --blur-xxl:  blur(60px);

  /* ── Shadows (static) ─────────────────────────────────── */
  --shadow-glass-sm:
    0 4px 12px rgba(14, 22, 33, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);

  --shadow-glass-md:
    0 8px 28px rgba(14, 22, 33, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  --shadow-glass-lg:
    0 16px 48px rgba(14, 22, 33, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);

  --shadow-float:
    0 18px 48px rgba(14, 22, 33, 0.22),
    0 0 0 1px rgba(41, 25, 55, 0.08);

  /* ── Easing ───────────────────────────────────────────── */
  --elite-ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --elite-ease-bounce: cubic-bezier(0.3, 1.2, 0.5, 1);
  --elite-ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-apple:        cubic-bezier(0.22, 0.61, 0.36, 1);

  /* ── Layout ───────────────────────────────────────────── */
  --elite-container:   1440px;
  --elite-section-gap: clamp(4rem, 8vw, 8rem);
}


/* ════════════════════════════════════════════════════════════
   DARK MODE
   ════════════════════════════════════════════════════════════ */

.dark {
  --elite-gray:       #9CA3AF;
  --elite-gray-light: #6B7280;

  --glass-white:        rgba(255, 255, 255, 0.04);
  --glass-white-md:     rgba(255, 255, 255, 0.06);
  --glass-white-strong: rgba(255, 255, 255, 0.10);

  --shadow-glass-sm: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-glass-md: 0 8px 28px rgba(0, 0, 0, 0.55);
  --shadow-glass-lg: 0 18px 52px rgba(0, 0, 0, 0.65);
}

.dark body                        { color: #E5E7EB; }
.dark .elite-section-description  { color: #CBD5E1; }
.dark .elite-nav,
.dark .elite-mobile-nav,
.dark .elite-footer               { background: rgba(10, 25, 41, 0.98); }


/* ════════════════════════════════════════════════════════════
   RESET & BASE
   ════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--elite-dark, #0E1621);
  background: var(--elite-offwhite, #F5F6F8);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ════════════════════════════════════════════════════════════
   CONTAINER & LAYOUT
   ════════════════════════════════════════════════════════════ */

.elite-container {
  max-width: var(--elite-container);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}


/* ════════════════════════════════════════════════════════════
   SECTION HEADERS
   ════════════════════════════════════════════════════════════ */

.elite-section-header { margin-bottom: clamp(3rem, 6vw, 5rem); }
.elite-section-header--centered { text-align: center; }

.elite-section-label {
  display: inline-block;
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--elite-purple, #291937);
  margin-bottom: 1rem;
  position: relative;
  padding-left: 2rem;
}

.elite-section-label::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 1.25rem; height: 2px;
  background: linear-gradient(90deg,
    var(--elite-purple, #291937) 0%,
    var(--elite-purple-light, #4C3A68) 100%
  );
}

.elite-section-header--centered .elite-section-label { padding-left: 0; }
.elite-section-header--centered .elite-section-label::before { display: none; }

.elite-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--elite-dark, #0E1621);
  margin: 0 0 1rem;
}

.elite-section-description {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--elite-gray, #6B7280);
  max-width: 600px;
}

.elite-section-header--centered .elite-section-description {
  margin-left: auto;
  margin-right: auto;
}

.elite-section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--elite-purple, #291937);
  text-decoration: none;
  transition: gap 0.3s var(--elite-ease);
}
.elite-section-link:hover { gap: 0.75rem; }


/* ════════════════════════════════════════════════════════════
   BUTTONS — BASE STRUCTURE
   ════════════════════════════════════════════════════════════ */

.elite-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: clamp(0.875rem, 2vw, 1.125rem) clamp(1.5rem, 3vw, 2.5rem);
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s var(--elite-ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  border: none;
}

.elite-btn svg {
  width: clamp(16px, 3vw, 20px);
  height: clamp(16px, 3vw, 20px);
  transition: transform 0.3s var(--elite-ease);
  flex-shrink: 0;
}
.elite-btn:hover svg { transform: translateX(4px); }

/* Ripple effect */
.elite-btn--primary::before,
.elite-btn--secondary::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  transform: translate(-50%, -50%);
  transition: width 0.55s ease, height 0.55s ease;
}
.elite-btn--primary:hover::before,
.elite-btn--secondary:hover::before {
  width: 340px;
  height: 340px;
}

/* Keep text/icon above the ripple layer */
.elite-btn--primary span,   .elite-btn--primary svg,
.elite-btn--secondary span, .elite-btn--secondary svg {
  position: relative;
  z-index: 1;
}


/* ════════════════════════════════════════════════════════════
   PRIMARY BUTTON
   .btn-style-gradient → uses admin-selected gradient pair
   .btn-style-solid    → flat brand colour
   Default (no class)  → gradient, matching the model default
   ════════════════════════════════════════════════════════════ */

.elite-btn--primary {
  color: var(--elite-dark, #0E1621);
  box-shadow:
    0 8px 32px color-mix(in srgb, var(--btn-primary-gradient-from, var(--elite-yellow, #F2BC3A)) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

/* ── Gradient (default + explicit) ─────────────────────── */
body:not(.btn-style-solid) .elite-btn--primary,
.btn-style-gradient        .elite-btn--primary {
  background: linear-gradient(
    var(--btn-primary-gradient-dir, to right),
    var(--btn-primary-gradient-from, #F2BC3A),
    var(--btn-primary-gradient-to,   #D97706)
  );
}
body:not(.btn-style-solid) .elite-btn--primary:hover,
.btn-style-gradient        .elite-btn--primary:hover {
  background: linear-gradient(
    var(--btn-primary-gradient-dir, to right),
    color-mix(in srgb, var(--btn-primary-gradient-from, #F2BC3A) 85%, #ffffff),
    color-mix(in srgb, var(--btn-primary-gradient-to,   #D97706) 82%, #000000)
  );
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px color-mix(in srgb, var(--btn-primary-gradient-from, #F2BC3A) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

/* ── Solid ──────────────────────────────────────────────── */
.btn-style-solid .elite-btn--primary {
  background: var(--elite-yellow, #F2BC3A);
}
.btn-style-solid .elite-btn--primary:hover {
  background: color-mix(in srgb, var(--elite-yellow, #F2BC3A) 82%, #000000);
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px color-mix(in srgb, var(--elite-yellow, #F2BC3A) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}


/* ════════════════════════════════════════════════════════════
   SECONDARY BUTTON
   ════════════════════════════════════════════════════════════ */

.elite-btn--secondary {
  color: var(--elite-white, #FFFFFF);
  box-shadow:
    0 8px 32px color-mix(in srgb, var(--btn-secondary-gradient-from, var(--elite-purple, #291937)) 30%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

/* ── Gradient (default + explicit) ─────────────────────── */
body:not(.btn-style-solid) .elite-btn--secondary,
.btn-style-gradient        .elite-btn--secondary {
  background: linear-gradient(
    var(--btn-secondary-gradient-dir, to right),
    var(--btn-secondary-gradient-from, #291937),
    var(--btn-secondary-gradient-to,   #0A1929)
  );
}
body:not(.btn-style-solid) .elite-btn--secondary:hover,
.btn-style-gradient        .elite-btn--secondary:hover {
  background: linear-gradient(
    var(--btn-secondary-gradient-dir, to right),
    color-mix(in srgb, var(--btn-secondary-gradient-from, #291937) 75%, #ffffff),
    color-mix(in srgb, var(--btn-secondary-gradient-to,   #0A1929) 88%, #000000)
  );
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px color-mix(in srgb, var(--btn-secondary-gradient-from, #291937) 55%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

/* ── Solid ──────────────────────────────────────────────── */
.btn-style-solid .elite-btn--secondary {
  background: var(--elite-purple, #291937);
}
.btn-style-solid .elite-btn--secondary:hover {
  background: color-mix(in srgb, var(--elite-purple, #291937) 78%, #ffffff);
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px color-mix(in srgb, var(--elite-purple, #291937) 45%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}


/* ════════════════════════════════════════════════════════════
   OUTLINE BUTTON
   ════════════════════════════════════════════════════════════ */

.elite-btn--outline {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--elite-white, #FFFFFF);
  border: 2px solid rgba(255, 255, 255, 0.30);
  box-shadow:
    0 4px 16px rgba(255, 255, 255, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.elite-btn--outline:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--elite-dark, #0E1621);
  border-color: var(--elite-white, #FFFFFF);
  transform: translateY(-2px);
  box-shadow:
    0 8px 24px rgba(255, 255, 255, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}


/* ════════════════════════════════════════════════════════════
   TEXT BUTTON
   ════════════════════════════════════════════════════════════ */

.elite-btn--text {
  background: transparent;
  color: var(--elite-dark, #0E1621);
  border: none;
  padding: 0.5rem 0;
  border-radius: 0;
  box-shadow: none;
}
.elite-btn--text:hover {
  color: var(--elite-purple, #291937);
  transform: none;
  box-shadow: none;
}


/* ════════════════════════════════════════════════════════════
   LARGE BUTTON MODIFIER
   ════════════════════════════════════════════════════════════ */

.elite-btn--large {
  padding: clamp(1rem, 2.5vw, 1.375rem) clamp(2rem, 4vw, 3rem);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}


/* ════════════════════════════════════════════════════════════
   GLASSMORPHIC UTILITIES
   ════════════════════════════════════════════════════════════ */

.glass-card {
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.80);
  border-radius: 16px;
  box-shadow: var(--shadow-glass-md);
}

.glass-card-dark {
  background: var(--glass-navy);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  box-shadow: var(--shadow-glass-lg);
}

.glass-overlay {
  background: rgba(10, 25, 41, 0.60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}


/* ════════════════════════════════════════════════════════════
   ANIMATIONS
   ════════════════════════════════════════════════════════════ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -1000px 0; }
  100% { background-position:  1000px 0; }
}

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

@keyframes glow {
  0%, 100% { box-shadow: var(--shadow-glass-md); }
  50%       { box-shadow: 0 10px 32px color-mix(in srgb, var(--elite-purple, #291937) 20%, transparent); }
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
  .elite-btn            { width: 100%; max-width: 100%; }
  .elite-section-header { margin-bottom: 2.5rem; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .elite-container { padding: 0 2rem; }
}

@media (min-width: 1024px) {
  .elite-container { padding: 0 3rem; }
}

@media (min-width: 1440px) {
  :root { --elite-container: 1600px; }
}