/* ============================================================
   Star Asian School — Global CSS
   Theme: Deep Red #B01C1C + Navy #1a237e + Gold #c9a84c
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────── */
:root {
  /* Theme Colors */
  --red:          #B01C1C;
  --red-dark:     #8a1515;
  --red-light:    #d42828;
  --red-pale:     rgba(176,28,28,0.10);
  --red-glow:     rgba(176,28,28,0.25);
  --navy:         #1a237e;
  --navy-dark:    #0d1554;
  --navy-light:   #283593;
  --navy-pale:    rgba(26,35,126,0.10);
  --gold:         #c9a84c;
  --gold-light:   #e8c97a;
  --gold-dark:    #9a7a2e;
  --gold-pale:    rgba(201,168,76,0.12);
  --gold-glow:    rgba(201,168,76,0.30);

  /* Neutrals */
  --white:        #ffffff;
  --off-white:    #f8f7f5;
  --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;
  --black:        #0a0a0a;

  /* Text */
  --text-primary:   #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;

  /* Glassmorphism (light theme) */
  --glass-bg:       rgba(255,255,255,0.72);
  --glass-bg-dark:  rgba(255,255,255,0.55);
  --glass-border:   rgba(176,28,28,0.15);
  --glass-border-gold: rgba(201,168,76,0.25);
  --glass-blur:     blur(20px) saturate(160%);
  --glass-blur-sm:  blur(12px) saturate(140%);

  /* Shadows */
  --shadow-xs:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.10);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.14);
  --shadow-xl:    0 20px 60px rgba(0,0,0,0.16);
  --shadow-red:   0 8px 32px rgba(176,28,28,0.20);
  --shadow-gold:  0 8px 32px rgba(201,168,76,0.20);
  --shadow-navy:  0 8px 32px rgba(26,35,126,0.20);

  /* Layout */
  --nav-h:         70px;
  --ticker-h:      36px;
  --total-top:     calc(var(--ticker-h) + var(--nav-h));
  --container-max: 1260px;
  --radius-xs:     6px;
  --radius-sm:     10px;
  --radius:        14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --radius-2xl:    40px;
  --section-pad:   clamp(60px, 8vw, 110px) clamp(16px, 5vw, 60px);

  /* Typography */
  --ff-head:    'Playfair Display', Georgia, 'Times New Roman', serif;
  --ff-body:    'Nunito', 'Segoe UI', Arial, sans-serif;
  --fs-xs:      0.72rem;
  --fs-sm:      0.85rem;
  --fs-base:    1rem;
  --fs-lg:      1.125rem;
  --fs-xl:      1.25rem;
  --fs-2xl:     1.5rem;
  --fs-3xl:     1.875rem;
  --fs-4xl:     2.25rem;
  --fs-5xl:     3rem;
  --fw-light:   300;
  --fw-normal:  400;
  --fw-medium:  500;
  --fw-semi:    600;
  --fw-bold:    700;
  --fw-extra:   800;
  --fw-black:   900;
  --lh-tight:   1.2;
  --lh-snug:    1.4;
  --lh-normal:  1.6;
  --lh-relaxed: 1.8;

  /* Transitions */
  --transition:   0.30s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-size: 16px;
}

body {
  font-family: var(--ff-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Images ─────────────────────────────────────────────── */
img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ── Links ──────────────────────────────────────────────── */
a {
  color: var(--red);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--red-dark); }

/* ── Lists ──────────────────────────────────────────────── */
ul, ol { list-style: none; }

/* ── Forms ──────────────────────────────────────────────── */
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

/* ── Selection ──────────────────────────────────────────── */
::selection { background: var(--red); color: var(--white); }

/* ── Focus ──────────────────────────────────────────────── */
:focus-visible {
  outline: 2.5px solid var(--red);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* ── Accessibility ──────────────────────────────────────── */
.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;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 10000;
  padding: 10px 20px;
  background: var(--red); color: var(--white);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-bold);
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 10px; color: var(--white); }

/* ── Typography ─────────────────────────────────────────── */
h1 { font-family: var(--ff-head); font-size: clamp(2.2rem, 5.5vw, 4.5rem); font-weight: var(--fw-black); line-height: var(--lh-tight); }
h2 { font-family: var(--ff-head); font-size: clamp(1.7rem, 3.8vw, 2.9rem); font-weight: var(--fw-bold);  line-height: var(--lh-tight); }
h3 { font-family: var(--ff-head); font-size: clamp(1.2rem, 2.4vw, 1.65rem);font-weight: var(--fw-semi);  line-height: var(--lh-snug); }
h4 { font-family: var(--ff-head); font-size: clamp(1rem, 2vw, 1.25rem);    font-weight: var(--fw-semi);  line-height: var(--lh-snug); }
p  { color: var(--text-secondary); line-height: var(--lh-relaxed); }

/* ── Layout Helpers ─────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
}

.section {
  padding: var(--section-pad);
  position: relative;
}

.section-bg-alt { background-color: var(--off-white); }
.section-bg-dark {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: var(--white);
}
.section-bg-dark p { color: rgba(255,255,255,0.80); }

/* ── Section Labels / Headings ──────────────────────────── */
.section-label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-xs); font-weight: var(--fw-extra);
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}
.section-label::before {
  content: '';
  display: inline-block; width: 28px; height: 2px;
  background: var(--red); border-radius: 2px;
}

.section-title { margin-bottom: 14px; color: var(--text-primary); }
.section-title span { color: var(--red); }
.section-title-white { color: var(--white); }
.section-title-white span { color: var(--gold); }

.section-subtitle {
  max-width: 640px;
  color: var(--text-secondary);
  font-size: var(--fs-lg);
  line-height: var(--lh-relaxed);
  margin-bottom: 48px;
}

.gold-line {
  width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
  margin: 16px 0 28px;
}
.gold-line-center {
  margin-inline: auto;
}

/* ── Grid Helpers ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-center .section-label { justify-content: center; }
.text-center .section-subtitle { margin-inline: auto; }
.text-center .gold-line { margin-inline: auto; }

/* ── Page Hero (inner pages) ────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--red-dark) 100%);
  padding: calc(var(--total-top) + 40px) clamp(16px,5vw,60px) 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.page-hero-title {
  font-family: var(--ff-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--fw-black);
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
}
.page-hero-title span { color: var(--gold); }
.page-hero-sub {
  color: rgba(255,255,255,0.75);
  font-size: var(--fs-lg);
  position: relative;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb-nav {
  padding: 14px clamp(16px,5vw,60px);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  max-width: var(--container-max); margin: 0 auto;
  font-size: var(--fs-sm); color: var(--text-muted);
}
.breadcrumb-item a { color: var(--red); font-weight: var(--fw-semi); }
.breadcrumb-item a:hover { color: var(--red-dark); }
.breadcrumb-item + .breadcrumb-item::before {
  content: '/'; color: var(--gray-400); padding-right: 6px;
}
.breadcrumb-item.active { color: var(--text-secondary); }

/* ── Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Print ──────────────────────────────────────────────── */
@media print {
  .ticker-bar, .site-header, .float-sidebar, .breadcrumb-nav,
  .site-footer, #scrollTopBtn { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}
