/* =====================================================================
   UFI-SMS Public Website — Design System
   Signature: a "two-track" color code (Navy = General Education,
   Amber = Kindergarten) used consistently across nav, hero, and
   programs so parents instantly see both offerings at a glance.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&display=swap');

/* Defensive fix: guarantee no horizontal scroll on any device, regardless
   of the exact cause (negative-margin grid gutters, decorative
   absolutely-positioned elements, or minor cross-browser sub-pixel
   rounding differences). This is the standard, industry-wide safeguard —
   verified via real responsive testing at 375px/390px/393px/1024px
   viewports where a small (16–36px) overflow was previously found. */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video { max-width: 100%; height: auto; }

:root {
  --navy-900: #082A3D;
  --navy-800: #0B3B54;
  --navy-700: #14587A;
  --navy-100: #E7EEF2;
  --amber-600: #D9822B;
  --amber-500: #F2A65A;
  --amber-100: #FCEEDD;
  --teal-600: #17685F;
  --paper: #F6F8F9;
  --ink: #16232B;
  --muted: #5B6B76;
  --line: #E3E9EC;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-soft: 0 10px 30px rgba(11,59,84,.08);
  --shadow-lift: 0 20px 45px rgba(11,59,84,.14);
}

* { box-sizing: border-box; }

body.ufi-site {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.ufi-site h1, .ufi-site h2, .ufi-site h3, .ufi-site h4 {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- Announcement bar ---------- */
.ufi-announcement { padding: 10px 0; text-align: center; font-size: .92rem; font-weight: 600; }

/* ---------- Nav ---------- */
.ufi-nav {
  background: var(--navy-800);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,.12);
}
/* Use much more of the screen's actual width for the navbar specifically
   (Bootstrap's default .container caps out around ~1140-1320px even on
   a 1920px screen — nowhere near enough room for a long school name +
   6 nav items + 3 buttons on one line). This alone is most of the fix:
   giving the row genuinely enough space means nothing needs to shrink,
   wrap, or collide in the first place. */
.ufi-nav .container {
  max-width: 1720px;
}
.ufi-nav .navbar-brand {
  color: #fff !important;
  font-weight: 800;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: 24px;
}
/* Keep everything on a single straight line with clear breathing room
   between items — this is the deliberate final layout (not a fallback):
   the wider .container above gives enough room, so items sit side by
   side with real gaps instead of wrapping to a second row or being
   squeezed until they touch/overlap. */
.ufi-nav .navbar-collapse {
  flex-wrap: nowrap;
}
.ufi-nav .navbar-nav {
  flex-wrap: nowrap;
  gap: 4px;
}
.ufi-nav .nav-item {
  flex-shrink: 0;
  margin: 0 2px;
}
.ufi-nav .nav-link {
  color: rgba(255,255,255,.82) !important;
  font-weight: 600;
  font-size: .86rem;
  padding: 8px 12px !important;
  border-radius: 999px;
  transition: all .2s ease;
  white-space: nowrap;
}
.ufi-nav .navbar-nav .dropdown-toggle i,
.ufi-nav .navbar-nav .nav-link i { margin-left: 3px; }
.navbar-collapse > .d-flex {
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 8px !important;
  margin-right: 16px;
}
.ufi-nav .navbar-nav.mx-auto {
  margin-right: auto !important;
  margin-left: auto !important;
}
.ufi-nav .nav-link:hover, .ufi-nav .nav-link.active { color: #fff !important; background: rgba(255,255,255,.1); }
.ufi-nav .btn-ufi-cta {
  background: var(--amber-500);
  color: var(--navy-900) !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 9px 18px;
  border: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease;
}
.ufi-nav .btn-ufi-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(242,166,90,.4); color: var(--navy-900); }
.ufi-nav .dropdown-menu { border: none; border-radius: 14px; box-shadow: var(--shadow-lift); padding: 8px; margin-top: 10px; }
.ufi-nav .dropdown-item { border-radius: 8px; padding: 10px 14px; font-weight: 600; font-size: .9rem; }
.ufi-nav .dropdown-item:hover { background: var(--navy-100); }
.ufi-nav .dropdown-toggle::after { display: none; }

/* ---------- Hero ---------- */
.ufi-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(242,166,90,.16) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(23,104,95,.18) 0%, transparent 45%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #fff;
  padding: 90px 0 70px;
  position: relative;
  overflow: hidden;
}
.ufi-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  padding: 7px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  color: var(--amber-500); margin-bottom: 22px;
}
.ufi-hero h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); line-height: 1.25; margin-bottom: 18px; }
.ufi-hero p.lead { color: rgba(255,255,255,.82); font-size: 1.15rem; max-width: 640px; }
.ufi-hero-stats { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 40px; }
.ufi-hero-stats .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--amber-500); }
.ufi-hero-stats .stat-label { font-size: .82rem; color: rgba(255,255,255,.7); }

/* ---------- Buttons ---------- */
.btn-ufi-primary {
  background: var(--amber-500); border: none; color: var(--navy-900); font-weight: 700;
  padding: 13px 30px; border-radius: 999px; transition: all .2s ease;
}
.btn-ufi-primary:hover { background: var(--amber-600); transform: translateY(-2px); box-shadow: var(--shadow-lift); color: var(--navy-900); }
.btn-ufi-outline {
  background: transparent; border: 1.5px solid rgba(255,255,255,.5); color: #fff; font-weight: 700;
  padding: 12px 28px; border-radius: 999px; transition: all .2s ease;
}
.btn-ufi-outline:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

/* ---------- Sections ---------- */
.ufi-section { padding: 84px 0; }
.ufi-section-alt { background: #fff; }
.ufi-eyebrow {
  display: inline-block; color: var(--navy-700); background: var(--navy-100);
  font-weight: 700; font-size: .8rem; letter-spacing: .02em; padding: 6px 16px;
  border-radius: 999px; margin-bottom: 14px;
}
.ufi-section h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: var(--navy-900); }
.ufi-section .sub { color: var(--muted); font-size: 1.02rem; max-width: 620px; }

/* ---------- Two-Track signature (General / Kindergarten) ---------- */
.ufi-track-card {
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  height: 100%;
  color: #fff;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
  text-decoration: none;
  display: block;
}
.ufi-track-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); color: #fff; }
.ufi-track-card.general { background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); }
.ufi-track-card.kg { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); }
.ufi-track-card .track-icon { font-size: 2.6rem; margin-bottom: 18px; opacity: .95; }
.ufi-track-card h3 { color: #fff; font-size: 1.5rem; margin-bottom: 10px; }
.ufi-track-card p { color: rgba(255,255,255,.85); margin-bottom: 20px; }
.ufi-track-card .track-cta { font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.ufi-track-card .track-pattern {
  position: absolute; inset-inline-end: -40px; top: -40px; width: 160px; height: 160px;
  border-radius: 50%; background: rgba(255,255,255,.08);
}

/* ---------- Cards ---------- */
.ufi-card {
  background: #fff; border-radius: var(--radius-md); border: 1px solid var(--line);
  padding: 28px 24px; height: 100%; transition: transform .2s ease, box-shadow .2s ease;
}
.ufi-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.ufi-icon-circle {
  width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--navy-100); color: var(--navy-800); font-size: 1.4rem; margin-bottom: 16px;
}
.ufi-card.kg-flavor .ufi-icon-circle { background: var(--amber-100); color: var(--amber-600); }

.ufi-grade-pill {
  border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff;
  padding: 22px 14px; text-align: center; transition: all .2s ease; height: 100%;
}
.ufi-grade-pill:hover { border-color: var(--navy-700); box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.ufi-grade-pill.kg { border-color: var(--amber-100); }
.ufi-grade-pill.kg:hover { border-color: var(--amber-500); }

.ufi-news-card { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); background: #fff; transition: all .2s ease; height: 100%; }
.ufi-news-card:hover { box-shadow: var(--shadow-soft); transform: translateY(-4px); }

/* Full-frame poster display — shows the ENTIRE image with no cropping,
   regardless of its aspect ratio (letterboxed on a neutral background). */
.ufi-poster-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--navy-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: zoom-in;
}
.ufi-poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- Admissions CTA band ---------- */
.ufi-cta-band {
  background: linear-gradient(120deg, var(--navy-900), var(--navy-700));
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.ufi-cta-band::after {
  content: ''; position: absolute; inset-inline-end: -60px; bottom: -60px; width: 220px; height: 220px;
  background: rgba(242,166,90,.16); border-radius: 50%;
}

/* ---------- Footer ---------- */
.ufi-footer { background: var(--navy-900); color: rgba(255,255,255,.78); padding: 64px 0 24px; }
.ufi-footer h6 { color: #fff; font-weight: 700; margin-bottom: 18px; font-size: .95rem; }
.ufi-footer a { color: rgba(255,255,255,.72); text-decoration: none; }
.ufi-footer a:hover { color: var(--amber-500); }
.ufi-footer .footer-brand { font-weight: 800; font-size: 1.2rem; color: #fff; }
.ufi-footer hr { border-color: rgba(255,255,255,.12); }
.ufi-social {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-inline-end: 8px;
}
.ufi-social:hover { background: var(--amber-500); color: var(--navy-900); }

@media (max-width: 991px) {
  .ufi-hero { padding: 60px 0 50px; text-align: center; }
  .ufi-hero .ufi-hero-stats { justify-content: center; }
  .ufi-section { padding: 56px 0; }
}
