/* ==========================================================================
   WILLIAM CAREY UNIVERSITY INDIA - STYLE SYSTEM
   Designed with premium, rich, and high-contrast collegiate aesthetics.
   Adheres to Modern CSS Architectural & Performance Guidelines.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* Declare Cascade Layers */
@layer reset, base, theme, components, utilities;

@layer reset {
  /* Dynamic box sizing */
  *, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* Core resets targeting specific elements */
  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    height: 100%;
  }

  body {
    min-height: 100dvh; /* Dynamic viewport height to prevent mobile bar breakage */
    text-rendering: optimizeSpeed;
    line-height: 1.6;
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
  }

  /* Form & Interactive elements reset */
  input, button, textarea, select {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
  }

  button, select {
    cursor: pointer;
  }

  img, picture, svg, video {
    display: block;
    max-width: 100%;
    height: auto;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  li {
    list-style: none;
  }

  /* Hide default scrollbars cleanly while preserving scrollability */
  ::selection {
    background-color: var(--color-accent-gold-alpha);
    color: var(--color-accent-gold-text);
  }
}

@layer base {
  /* Tier 1 & 2 Design Tokens & Themes */
  :root {
    color-scheme: light dark;

    /* Font Families */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Typography Scale (Fluid via clamp) */
    --fs-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
    --fs-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
    --fs-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
    --fs-md: clamp(1.125rem, 1.05rem + 0.3vw, 1.25rem);
    --fs-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
    --fs-xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
    --fs-h2: clamp(2rem, 1.7rem + 1.2vw, 3rem);
    --fs-h1: clamp(2.5rem, 2rem + 2.5vw, 4.5rem);

    /* Spacing System */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;

    /* Borders & Squircle Aesthetics */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    /* Brand Base Colors (Literal Tokens) */
    --brand-blue-dark: #071224;
    --brand-blue-navy: #0b1e3f;
    --brand-blue-royal: #14356e;
    --brand-blue-light: #f0f4fa;

    --brand-gold-primary: #d4af37;
    --brand-gold-hover: #bda02b;
    --brand-gold-light: #faf5e6;
    --brand-gold-glow: rgba(212, 175, 55, 0.15);

    /* Base Layer Shadows */
    --shadow-soft: 0 4px 30px rgba(0, 0, 0, 0.03);
    --shadow-medium: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-premium: 0 20px 50px rgba(7, 18, 36, 0.15);
    --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.2);
  }

  /* Light Theme Specific Tokens (applied automatically or via manual class override) */
  :root, [data-theme="light"] {
    --color-bg: #f9fbfc;
    --color-bg-subtle: #ffffff;
    --color-bg-card: rgba(255, 255, 255, 0.75);
    --color-text: #1a2333;
    --color-text-muted: #5e6b7e;
    --color-primary: var(--brand-blue-navy);
    --color-primary-hover: var(--brand-blue-royal);
    --color-accent-gold: var(--brand-gold-primary);
    --color-accent-gold-text: #8c7010;
    --color-accent-gold-alpha: rgba(212, 175, 55, 0.12);
    --color-border: rgba(11, 30, 63, 0.08);
    --color-border-hover: rgba(11, 30, 63, 0.15);
    --color-nav-bg: rgba(249, 251, 252, 0.85);
    --glass-opacity: 0.65;
    --glass-border: rgba(255, 255, 255, 0.8);
    --shadow-dynamic: var(--shadow-medium);
  }

  /* Dark Theme Specific Tokens */
  @media (prefers-color-scheme: dark) {
    :root {
      --color-bg: var(--brand-blue-dark);
      --color-bg-subtle: #0c182b;
      --color-bg-card: rgba(12, 24, 43, 0.65);
      --color-text: #e2e8f0;
      --color-text-muted: #94a3b8;
      --color-primary: #60a5fa;
      --color-primary-hover: #93c5fd;
      --color-accent-gold: var(--brand-gold-primary);
      --color-accent-gold-text: var(--brand-gold-primary);
      --color-accent-gold-alpha: rgba(212, 175, 55, 0.2);
      --color-border: rgba(255, 255, 255, 0.07);
      --color-border-hover: rgba(255, 255, 255, 0.15);
      --color-nav-bg: rgba(7, 18, 36, 0.85);
      --glass-opacity: 0.15;
      --glass-border: rgba(255, 255, 255, 0.05);
      --shadow-dynamic: var(--shadow-premium);
    }
  }

  /* Force Dark Theme if class is explicitly set */
  [data-theme="dark"] {
    --color-bg: var(--brand-blue-dark);
    --color-bg-subtle: #0c182b;
    --color-bg-card: rgba(12, 24, 43, 0.65);
    --color-text: #e2e8f0;
    --color-text-muted: #94a3b8;
    --color-primary: #60a5fa;
    --color-primary-hover: #93c5fd;
    --color-accent-gold: var(--brand-gold-primary);
    --color-accent-gold-text: var(--brand-gold-primary);
    --color-accent-gold-alpha: rgba(212, 175, 55, 0.2);
    --color-border: rgba(255, 255, 255, 0.07);
    --color-border-hover: rgba(255, 255, 255, 0.15);
    --color-nav-bg: rgba(7, 18, 36, 0.85);
    --glass-opacity: 0.15;
    --glass-border: rgba(255, 255, 255, 0.05);
    --shadow-dynamic: var(--shadow-premium);
  }

  /* Header and Paragraph Defaults */
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: light-dark(var(--brand-blue-navy), #ffffff);
  }

  p {
    font-size: var(--fs-base);
    color: var(--color-text-muted);
    text-wrap: pretty; /* Long-form text wrapping */
  }

  /* Custom Focus rings using focus-visible */
  button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--color-accent-gold);
    outline-offset: 4px;
  }
}

@layer theme {
  /* Shared Layout Structures & Premium Aesthetics */

  .section-padding {
    padding-block: var(--space-lg);
  }

  @media (min-width: 768px) {
    .section-padding {
      padding-block: var(--space-xl);
    }
  }

  /* Glassmorphism Panel Foundation */
  .glass-panel {
    background-color: var(--color-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-top: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dynamic);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
  }

  /* Premium Buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 0.8rem 1.8rem;
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: var(--radius-full);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
  }

  .btn-primary {
    background-color: var(--color-accent-gold);
    color: #0b1e3f; /* Keep high contrast */
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
  }

  .btn-primary:hover:not(:disabled) {
    background-color: var(--brand-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  }

  .btn-secondary {
    background-color: transparent;
    color: light-dark(var(--brand-blue-navy), #ffffff);
    border: 1px solid var(--color-border);
  }

  .btn-secondary:hover:not(:disabled) {
    background-color: var(--color-accent-gold-alpha);
    border-color: var(--color-accent-gold);
    transform: translateY(-2px);
  }

  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  /* Overlay and Subtle Glows */
  .ambient-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--color-accent-gold-alpha) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(40px);
  }
}

@layer components {
  /* ==========================================================================
     COMPONENT STYLES (Header, Footer, Hero, Calculator, Cards)
     ========================================================================== */

  /* 1. HEADER & NAVIGATION */
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--color-nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    transition: all 0.3s ease;
  }

  .nav-container {
    max-width: 1200px;
    margin-inline: auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .logo-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
  }

  .logo-crest {
    font-size: 1.8rem;
    font-family: var(--font-heading);
    color: var(--color-accent-gold);
    font-weight: 700;
  }

  .logo-text {
    display: flex;
    flex-direction: column;
  }

  .logo-title {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 700;
    color: light-dark(var(--brand-blue-navy), #ffffff);
    letter-spacing: 0.5px;
    line-height: 1.1;
  }

  .logo-subtitle {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
  }

  @media (max-width: 480px) {
    .logo-subtitle {
      display: none;
    }
    .logo-title {
      font-size: var(--fs-sm);
    }
    .logo-crest {
      font-size: 1.5rem;
    }
  }

  .desktop-menu {
    display: none;
    align-items: center;
    gap: var(--space-md);
  }

  @media (min-width: 1024px) {
    .desktop-menu {
      display: flex;
    }
  }

  .nav-menu-link {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
  }

  .nav-menu-link:hover {
    color: var(--color-accent-gold);
    background-color: var(--color-accent-gold-alpha);
  }

  .nav-menu-link.active {
    color: var(--color-accent-gold);
    font-weight: 600;
  }

  .nav-menu-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--space-sm);
    right: var(--space-sm);
    height: 2px;
    background-color: var(--color-accent-gold);
    border-radius: var(--radius-full);
  }

  .action-buttons {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  /* Hamburger Menu */
  .hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
  }

  @media (min-width: 1024px) {
    .hamburger-btn {
      display: none;
    }
  }

  .hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
  }

  .hamburger-btn[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Mobile Drawer Menu */
  .mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(80vw, 360px);
    height: 100dvh;
    background-color: var(--color-bg-subtle);
    border-left: 1px solid var(--color-border);
    padding: var(--space-xl) var(--space-md);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);

    /* Discrete animation setup for drawer reveal */
    display: none;
    opacity: 0;
    transform: translateX(100%);
    transition: display 0.3s allow-discrete, opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-drawer.open {
    display: flex;
    opacity: 1;
    transform: translateX(0);
  }

  @starting-style {
    .mobile-drawer.open {
      opacity: 0;
      transform: translateX(100%);
    }
  }

  .mobile-drawer-link {
    font-size: var(--fs-md);
    font-family: var(--font-heading);
    font-weight: 600;
    padding: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
    transition: color 0.2s ease;
  }

  .mobile-drawer-link:hover {
    color: var(--color-accent-gold);
  }

  /* Dark mode toggle icon */
  .theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border);
    transition: background-color 0.2s;
  }

  .theme-toggle-btn:hover {
    background-color: var(--color-accent-gold-alpha);
    border-color: var(--color-accent-gold);
  }

  /* 2. HERO LANDING SECTION */
  .hero-section {
    min-height: 85dvh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--space-xxl);
    overflow: hidden;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(to bottom, rgba(5,11,20,0.7) 30%, rgba(5,11,20,0.95) 100%);
  }

  /* Specific color-mix gradient overlay */
  .hero-gradient {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(to right, rgba(11, 30, 63, 0.8), rgba(7, 18, 36, 0.4));
  }

  .hero-media {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.85;
    filter: brightness(0.6) contrast(1.1);
  }

  .hero-container {
    max-width: 1200px;
    width: 100%;
    margin-inline: auto;
    padding: var(--space-lg) var(--space-md);
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
  }

  @media (min-width: 1024px) {
    .hero-container {
      grid-template-columns: 1.2fr 0.8fr;
    }
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-tagline {
    font-size: var(--fs-sm);
    color: var(--color-accent-gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
  }

  .hero-tagline::before {
    content: '';
    width: 30px;
    height: 2px;
    background-color: var(--color-accent-gold);
  }

  .hero-title {
    font-size: var(--fs-h1);
    color: #ffffff; /* High-contrast white always */
    font-weight: 700;
    text-wrap: balance;
  }

  .hero-desc {
    color: #cbd5e1;
    font-size: var(--fs-md);
    max-width: 600px;
  }

  .hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
  }

  .hero-quote-card {
    padding: var(--space-md);
    border-left: 4px solid var(--color-accent-gold);
    background-color: rgba(255,255,255,0.03);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
  }

  .quote-text {
    font-family: var(--font-heading);
    font-style: italic;
    color: #cbd5e1;
    font-size: var(--fs-base);
  }

  .quote-author {
    font-size: var(--fs-xs);
    color: var(--color-accent-gold);
    font-weight: 600;
    margin-top: var(--space-xs);
    text-transform: uppercase;
  }

  /* 3. FACTS & STATS ROW */
  .stats-section {
    position: relative;
    z-index: 20;
    margin-top: -4rem; /* Floating overlay */
    padding-inline: var(--space-md);
  }

  .stats-grid {
    max-width: 1200px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
  }

  @media (min-width: 768px) {
    .stats-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  .stat-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-sm);
    border-right: 1px solid var(--color-border);
  }

  .stat-card:last-child {
    border-right: none;
  }

  .stat-num {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--color-accent-gold-text);
  }

  .stat-label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* 4. ACADEMICS SECTION (DYNAMIC FILTER) */
  .container-width {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-md);
  }

  .section-header {
    text-align: center;
    margin-bottom: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
  }

  .section-title {
    font-size: var(--fs-h2);
    position: relative;
    padding-bottom: var(--space-xs);
  }

  .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-accent-gold);
    border-radius: var(--radius-full);
  }

  .section-subtitle {
    font-size: var(--fs-sm);
    color: var(--color-accent-gold-text);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
  }

  /* Filter Tabs */
  .filter-tabs-container {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
  }

  .filter-tabs {
    display: flex;
    gap: var(--space-xs);
    background-color: var(--color-bg-subtle);
    padding: 0.35rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
  }

  .filter-tab-btn {
    padding: 0.6rem 1.4rem;
    font-size: var(--fs-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
    white-space: nowrap;
  }

  .filter-tab-btn.active {
    background-color: var(--color-accent-gold);
    color: #0b1e3f;
    box-shadow: var(--shadow-soft);
  }

  .filter-tab-btn:hover:not(.active) {
    background-color: var(--color-accent-gold-alpha);
    color: var(--color-accent-gold-text);
  }

  .schools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  @media (min-width: 768px) {
    .schools-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (min-width: 1024px) {
    .schools-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .school-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-md);
    height: 100%;
  }

  .school-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent-gold);
    box-shadow: var(--shadow-dynamic);
  }

  .school-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
  }

  .school-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background-color: var(--color-accent-gold-alpha);
    color: var(--color-accent-gold-text);
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .school-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2;
  }

  .school-title {
    font-size: var(--fs-md);
    font-weight: 700;
  }

  .school-desc {
    font-size: var(--fs-sm);
    margin-bottom: var(--space-md);
    flex-grow: 1;
  }

  .school-courses-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-sm);
  }

  .school-course-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--fs-xs);
    color: var(--color-text);
    font-weight: 500;
  }

  .school-course-bullet {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background-color: var(--color-accent-gold);
  }

  /* 5. LEGACY OF WILLIAM CAREY (HISTORY FOCUS) */
  .legacy-section {
    background-color: var(--color-bg-subtle);
    overflow: hidden;
  }

  .legacy-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
  }

  @media (min-width: 1024px) {
    .legacy-grid {
      grid-template-columns: 1fr 1fr;
    }
  }

  .legacy-image-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-dynamic);
  }

  .legacy-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
    border-radius: var(--radius-lg);
    transition: transform 0.5s ease;
  }

  .legacy-image-container:hover .legacy-img {
    transform: scale(1.03);
  }

  .legacy-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 18, 36, 0.8), transparent);
    pointer-events: none;
  }

  .legacy-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .legacy-highlight-box {
    padding: var(--space-md);
    background-color: var(--color-bg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-accent-gold);
  }

  /* 6. DYNAMIC TUITION FEE CALCULATOR */
  .calculator-section {
    position: relative;
  }

  .calc-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  @media (min-width: 1024px) {
    .calc-layout {
      grid-template-columns: 1.1fr 0.9fr;
    }
  }

  .calc-form-panel {
    padding: var(--space-lg);
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
  }

  .form-label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: light-dark(var(--brand-blue-navy), #ffffff);
  }

  /* Modern customizable Select & Fields */
  .select-field, .input-field {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: var(--fs-sm);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-subtle);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .select-field:hover, .input-field:hover {
    border-color: var(--color-accent-gold);
  }

  .select-field:focus, .input-field:focus {
    border-color: var(--color-accent-gold);
    box-shadow: 0 0 10px var(--brand-gold-glow);
    outline: none;
  }

  .checkbox-group {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
  }

  .checkbox-custom {
    accent-color: var(--color-accent-gold);
    width: 18px;
    height: 18px;
  }

  /* Results Display Panel */
  .calc-results-panel {
    background-color: var(--brand-blue-navy);
    color: #ffffff;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
  }

  .calc-results-panel::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--color-accent-gold-alpha) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
  }

  .calc-results-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-md);
    z-index: 2;
  }

  .calc-results-title {
    color: #ffffff;
    font-size: var(--fs-lg);
  }

  .calc-results-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: var(--fs-xs);
  }

  .fee-breakdown {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    z-index: 2;
    margin-bottom: var(--space-lg);
  }

  .fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-sm);
  }

  .fee-name {
    color: rgba(255,255,255,0.8);
  }

  .fee-value {
    font-weight: 600;
    font-family: var(--font-body);
  }

  .fee-total-row {
    border-top: 2px solid var(--color-accent-gold);
    padding-top: var(--space-sm);
    margin-top: var(--space-xs);
  }

  .fee-total-label {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    color: #ffffff;
    font-weight: 700;
  }

  .fee-total-val {
    font-size: var(--fs-xl);
    color: var(--color-accent-gold);
    font-weight: 700;
    font-family: var(--font-body);
  }

  .calc-cta {
    z-index: 2;
    text-align: center;
  }

  /* 7. CONTACT & INQUIRY FORM */
  .contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  @media (min-width: 1024px) {
    .contact-layout {
      grid-template-columns: 0.9fr 1.1fr;
    }
  }

  .contact-info-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  .contact-card {
    padding: var(--space-md);
  }

  .contact-item {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .contact-icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background-color: var(--color-accent-gold-alpha);
    color: var(--color-accent-gold-text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .contact-details {
    display: flex;
    flex-direction: column;
  }

  .contact-label {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-accent-gold-text);
  }

  .contact-val {
    font-size: var(--fs-sm);
    color: var(--color-text);
    font-weight: 500;
  }

  .inquiry-form-panel {
    padding: var(--space-lg);
  }

  .textarea-field {
    resize: vertical;
    min-height: 120px;
  }

  /* AJAX Notification message states */
  .form-alert {
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    display: none;
    align-items: center;
    gap: var(--space-xs);
  }

  .form-alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.2);
  }

  .form-alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
  }

  /* 8. FOOTER */
  .site-footer {
    background-color: var(--brand-blue-navy);
    color: rgba(255,255,255,0.7);
    border-top: 2px solid var(--color-accent-gold);
    padding-top: var(--space-xl);
    padding-bottom: var(--space-md);
  }

  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  @media (min-width: 768px) {
    .footer-grid {
      grid-template-columns: 1.5fr 1fr 1fr 1fr;
    }
  }

  .footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .footer-logo-title {
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 700;
    line-height: 1.2;
  }

  .footer-heading {
    color: #ffffff;
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    position: relative;
    padding-bottom: var(--space-xs);
  }

  .footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-accent-gold);
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
  }

  .footer-link {
    font-size: var(--fs-xs);
    transition: all 0.2s ease;
  }

  .footer-link:hover {
    color: var(--color-accent-gold);
    padding-left: var(--space-xs);
  }

  .social-grid {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
  }

  .social-link {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background-color: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .social-link:hover {
    background-color: var(--color-accent-gold);
    color: #0b1e3f;
    transform: translateY(-3px);
  }

  .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    font-size: var(--fs-xs);
    text-align: center;
  }

  @media (min-width: 768px) {
    .footer-bottom {
      flex-direction: row;
      text-align: left;
    }
  }

  /* 9. SUBPAGE HERO ELEMENTS */
  .subpage-hero {
    min-height: 40dvh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--space-xl);
    overflow: hidden;
    background-size: cover;
    background-position: center;
  }

  .subpage-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-bg) 0%, rgba(11,30,63,0.85) 100%);
    z-index: 1;
  }

  .subpage-hero-content {
    z-index: 5;
    color: #ffffff;
  }

  .subpage-hero-title {
    font-size: var(--fs-h2);
    color: #ffffff;
    margin-bottom: var(--space-xs);
  }

  .breadcrumb {
    display: flex;
    gap: var(--space-xs);
    font-size: var(--fs-xs);
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    font-weight: 600;
  }

  .breadcrumb-active {
    color: var(--color-accent-gold);
  }
}

@layer utilities {
  /* Scroll Snap Carousel Utility */
  .scroll-snap-carousel {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: var(--space-sm);
  }

  .carousel-item {
    flex: 0 0 min(100%, 360px);
    scroll-snap-align: start;
  }

  /* Screen Reader text visibility */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .text-center { text-align: center; }
  .bold { font-weight: 700; }
  
  /* Scroll entrance triggers managed via JS */
  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  
  .reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESULT MODAL OVERLAY STYLES
   ========================================================================== */
.result-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(5, 11, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  transition: opacity 0.3s ease;
}

.result-modal-container {
  width: 100%;
  max-width: 440px;
  padding: var(--space-lg);
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-close-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 1.8rem;
  line-height: 1;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--color-accent-gold);
}

/* ==========================================================================
   ADMIN PANEL DASHBOARD STYLES
   ========================================================================== */
.admin-dashboard-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  background-color: var(--color-bg);
}

@media (min-width: 1024px) {
  .admin-dashboard-wrap {
    grid-template-columns: 240px 1fr;
  }
}

.admin-sidebar {
  background-color: var(--brand-blue-navy);
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.admin-sidebar-logo {
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  color: #ffffff;
  font-weight: 700;
  border-bottom: none;
  padding-bottom: 0;
  text-align: left;
}

.admin-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

@media (min-width: 1024px) {
  .admin-sidebar {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-right: 1px solid var(--color-border);
    border-bottom: none;
    gap: var(--space-md);
  }
  
  .admin-sidebar-logo {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: var(--space-xs);
    text-align: center;
  }
  
  .admin-nav {
    flex-direction: column;
  }
}

.admin-nav-link {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.8);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-weight: 500;
}

.admin-nav-link:hover, .admin-nav-link.active {
  color: var(--color-accent-gold);
  background-color: rgba(212, 175, 55, 0.15);
}

.admin-content-area {
  padding: var(--space-lg);
  overflow-y: auto;
}

.table-responsive {
  overflow-x: auto;
  margin-block: var(--space-md);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.admin-table th, .admin-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.admin-table th {
  font-weight: 700;
  color: light-dark(var(--brand-blue-navy), #ffffff);
  background-color: var(--color-bg-subtle);
}

.badge {
  display: inline-flex;
  padding: 0.2rem 0.6rem;
  font-size: 0.725rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.badge-success {
  background-color: rgba(34, 197, 94, 0.15);
  color: #166534;
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: #991b1b;
}

.badge-warning {
  background-color: rgba(249, 115, 22, 0.15);
  color: #c2410c;
}

/* ==========================================================================
   PRINTABLE TRANSCRIPT STYLES
   ========================================================================== */
.transcript-sheet {
  max-width: 800px;
  margin-inline: auto;
  background-color: #ffffff;
  color: #1a2333 !important;
  padding: var(--space-lg);
  border: 2px solid #0b1e3f;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-medium);
}

.transcript-header {
  text-align: center;
  border-bottom: 3px double #0b1e3f;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-md);
}

.transcript-title {
  font-size: 1.8rem;
  color: #0b1e3f !important;
  font-family: var(--font-heading);
  font-weight: 700;
}

.transcript-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-md);
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: var(--space-sm);
}

@media (min-width: 600px) {
  .transcript-meta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.meta-label {
  font-weight: 700;
  color: #475569;
}

.meta-val {
  color: #0b1e3f;
}

/* Print Media Query Rules */
@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
  }
  
  .site-header, .site-footer, .breadcrumb, .btn, .theme-toggle-btn, .ambient-glow, #main-site-footer, .no-print {
    display: none !important;
  }

  .transcript-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  @page {
    size: A4;
    margin: 1.5cm;
  }
}
