/* ===================================================
   SoCal Mental Math — Main Stylesheet v3
   Warm Modern: Sky Blue + Orange + Pink + White
   Student & Parent Friendly · Educational
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Noto+Sans+TC:wght@400;500;700&family=Fredoka+One&display=swap');

:root {
  --orange:     #FF6B35;
  --orange-d:   #e55a25;
  --sky:        #4DB8E8;
  --sky-d:      #2a9fd4;
  --sky-pale:   #E8F7FD;
  --pink:       #F06B9E;
  --pink-pale:  #FFF0F6;
  --yellow:     #FFB300;
  --teal:       #00B4A6;
  --teal-d:     #009e91;
  --navy:       #1E3A5F;
  --bg:         #F7FCFF;
  --bg2:        #EAF6FD;
  --card:       #FFFFFF;
  --text:       #2D2A26;
  --text-muted: #6A7A8A;
  --border:     rgba(77,184,232,0.18);
  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 4px 24px rgba(77,184,232,0.15);
  --shadow-lg:  0 12px 48px rgba(30,58,95,0.14);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Nunito','Noto Sans TC',sans-serif; background: var(--bg); color: var(--text); overflow-x: hidden; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

.tag { display: inline-block; background: var(--sky-pale); color: var(--sky-d); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; padding: 0.3rem 0.9rem; border-radius: 100px; margin-bottom: 0.75rem; }
.section-title { font-family: 'Fredoka One',sans-serif; font-size: clamp(1.9rem,3.5vw,2.6rem); color: var(--navy); line-height: 1.2; margin-bottom: 0.5rem; }
.section-sub { color: var(--text-muted); font-size: 1rem; max-width: 540px; line-height: 1.7; }
.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ─── BUTTONS ─── */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.8rem; border-radius: 100px; font-size: 0.95rem; font-weight: 800; cursor: pointer; transition: all 0.25s; border: 2px solid transparent; white-space: nowrap; font-family: 'Nunito',sans-serif; }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 4px 16px rgba(255,107,53,0.35); }
.btn-primary:hover { background: var(--orange-d); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,53,0.45); }
.btn-sky { background: var(--sky); color: #fff; box-shadow: 0 4px 16px rgba(77,184,232,0.35); }
.btn-sky:hover { background: var(--sky-d); transform: translateY(-2px); }
.btn-pink { background: var(--pink); color: #fff; box-shadow: 0 4px 16px rgba(240,107,158,0.3); }
.btn-pink:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 4px 16px rgba(0,180,166,0.3); }
.btn-teal:hover { background: var(--teal-d); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--orange); border-color: var(--orange); }
.btn-outline:hover { background: var(--orange); color: #fff; }
.btn-white { background: #fff; color: var(--orange); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.btn-white:hover { background: var(--sky-pale); transform: translateY(-2px); }

/* ─── TOP BAR ─── */
.top-bar { background: var(--navy); color: rgba(255,255,255,0.8); font-size: 0.78rem; padding: 0.45rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.top-bar a { color: rgba(255,255,255,0.8); transition: color 0.2s; }
.top-bar a:hover { color: var(--yellow); }
.top-bar-left { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.top-bar-right { display: flex; gap: 1rem; align-items: center; }
.lang-toggle { display: flex; gap: 0.4rem; }
.lang-toggle span { cursor: pointer; padding: 0.15rem 0.55rem; border-radius: 4px; transition: 0.2s; font-weight: 700; }
.lang-toggle span.active { background: var(--orange); color: #fff; }

/* ─── NAVBAR ─── */
.navbar { position: sticky; top: 0; z-index: 1000; background: rgba(247,252,255,0.97); backdrop-filter: blur(16px); border-bottom: 3px solid var(--sky-pale); padding: 0.6rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; box-shadow: 0 2px 20px rgba(77,184,232,0.12); }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.nav-logo img { height: 54px; width: auto; }
.nav-logo-text .nav-logo-en { font-family: 'Fredoka One',sans-serif; font-size: 1.05rem; color: var(--navy); display: block; }
.nav-logo-text .cn { font-family: 'Noto Sans TC',sans-serif; font-size: 0.68rem; color: var(--text-muted); display: block; }
.nav-menu { display: flex; align-items: center; gap: 0.15rem; list-style: none; }
.nav-menu a { display: block; padding: 0.55rem 0.9rem; font-size: 0.88rem; font-weight: 800; color: var(--navy); border-radius: 10px; transition: 0.2s; white-space: nowrap; }
.nav-menu a:hover, .nav-menu a.active { background: var(--sky-pale); color: var(--sky-d); }
.nav-menu .nav-cta a { background: var(--orange); color: #fff !important; padding: 0.55rem 1.3rem; border-radius: 100px; box-shadow: 0 3px 12px rgba(255,107,53,0.3); }
.nav-menu .nav-cta a:hover { background: var(--orange-d); transform: translateY(-1px); }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 6px; border-radius: 8px; transition: 0.2s; }
.hamburger:hover { background: var(--sky-pale); }
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; transition: 0.3s; }

/* ─── PAGE HERO ─── */
.page-hero { background: linear-gradient(135deg,var(--navy) 0%,#1a4a7a 100%); padding: 4rem 0 3.5rem; text-align: center; position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 70% 40%,rgba(77,184,232,0.2) 0%,transparent 55%),radial-gradient(circle at 20% 80%,rgba(255,107,53,0.12) 0%,transparent 45%); pointer-events: none; }
.page-hero-title { font-family: 'Fredoka One',sans-serif; font-size: clamp(2rem,4vw,3rem); color: #fff; margin-bottom: 0.5rem; position: relative; }
.page-hero-sub { color: rgba(255,255,255,0.65); font-size: 1rem; font-family: 'Noto Sans TC',sans-serif; position: relative; }

/* ─── CARD ─── */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform 0.3s,box-shadow 0.3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════
   FOOTER — DARK NAVY (as originally requested)
   ══════════════════════════════════════ */
.footer { background: var(--navy); color: rgba(255,255,255,0.75); padding-top: 0; }

.footer-locations { padding: 3.5rem 0 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-locations-title { font-family: 'Fredoka One',sans-serif; font-size: 1.5rem; color: #fff; text-align: center; margin-bottom: 0.2rem; }
.footer-locations-sub { font-family: 'Noto Sans TC',sans-serif; font-size: 0.8rem; color: rgba(255,255,255,0.45); text-align: center; margin-bottom: 2.5rem; }

/* 3-column grid — responsive */
.locations-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }

/* ── card (dark version – footer) ── */
.location-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); overflow: hidden;
  transition: 0.3s; display: flex; flex-direction: column;
}
.location-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(77,184,232,0.45); transform: translateY(-3px); }

/* ── card (light version – contact/body) ── */
.location-card-light {
  background: var(--card); border: 2px solid var(--sky-pale);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); transition: 0.3s; display: flex; flex-direction: column;
}
.location-card-light:hover { border-color: var(--sky); transform: translateY(-4px); }

/* map iframe wrapper */
.location-map-wrap { position: relative; width: 100%; height: 200px; overflow: hidden; }
.location-map-wrap iframe { width: 100%; height: 100%; border: none; display: block; }
.location-card-light .location-map-wrap { height: 220px; }

/* text below map */
.location-info { padding: 1.25rem 1.2rem 1.4rem; flex: 1; }
.location-name { font-family: 'Fredoka One',sans-serif; font-size: 1.1rem; color: var(--yellow); margin-bottom: 0.05rem; }
.location-card-light .location-name { color: var(--navy); }
.location-name-cn { font-family: 'Noto Sans TC',sans-serif; font-size: 0.72rem; color: rgba(255,255,255,0.4); margin-bottom: 0.85rem; }
.location-card-light .location-name-cn { color: var(--text-muted); }
.location-row { display: flex; align-items: flex-start; gap: 0.45rem; font-size: 0.8rem; color: rgba(255,255,255,0.68); margin-bottom: 0.38rem; line-height: 1.45; }
.location-card-light .location-row { color: var(--text-muted); }
.location-row .licon { flex-shrink: 0; font-size: 0.85rem; margin-top: 0.05rem; }
.location-row strong { color: rgba(255,255,255,0.92); }
.location-card-light .location-row strong { color: var(--text); }
.location-row .cn-sub { display: block; font-family: 'Noto Sans TC',sans-serif; font-size: 0.7rem; color: rgba(255,255,255,0.38); }
.location-card-light .location-row .cn-sub { color: var(--text-muted); opacity: 0.8; }
.loc-directions { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 0.9rem; font-size: 0.75rem; font-weight: 800; color: var(--sky); border: 1.5px solid rgba(77,184,232,0.4); padding: 0.3rem 0.85rem; border-radius: 100px; transition: 0.2s; }
.loc-directions:hover { background: var(--sky); color: #fff; border-color: var(--sky); }
.location-card-light .loc-directions { color: var(--sky-d); }

/* footer-top */
.footer-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; padding: 2.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand-logo { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand-logo img { height: 48px; width: auto; border-radius: 8px; }
.footer-brand-name { font-family: 'Fredoka One',sans-serif; font-size: 1.1rem; color: #fff; display: block; }
.footer-brand-cn { font-family: 'Noto Sans TC',sans-serif; font-size: 0.7rem; color: rgba(255,255,255,0.42); display: block; }
.footer-desc { font-size: 0.83rem; line-height: 1.75; margin-bottom: 1.2rem; }
.footer-social { display: flex; gap: 0.65rem; }
.social-btn { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 1rem; transition: 0.2s; color: #fff; }
.social-btn:hover { background: var(--orange); transform: translateY(-2px); }
.footer-col h4 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.9); margin-bottom: 1.2rem; font-weight: 800; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.55rem; }
.footer-col ul li a { font-size: 0.83rem; color: rgba(255,255,255,0.52); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--yellow); }
.footer-bottom { padding: 1.4rem 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.75rem; font-size: 0.77rem; color: rgba(255,255,255,0.32); }
.footer-bottom a { color: rgba(255,255,255,0.32); }
.footer-bottom a:hover { color: var(--yellow); }

/* ─── FLOATING BUTTONS ─── */
.float-contact { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999; display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-end; }
.float-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.7rem 1.2rem; border-radius: 100px; font-weight: 800; font-size: 0.875rem; color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.25); transition: 0.25s; white-space: nowrap; font-family: 'Nunito',sans-serif; }
.float-btn:hover { transform: scale(1.05); }
.float-btn.phone { background: var(--teal); }
.float-btn.enroll { background: var(--orange); }

/* ─── MOBILE RESPONSIVE ─── */
@media (max-width: 960px) {
  .nav-menu { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 2px solid var(--sky-pale); flex-direction: column; align-items: stretch; padding: 1rem 1.5rem 1.5rem; gap: 0.2rem; box-shadow: 0 8px 32px rgba(0,0,0,0.1); }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.75rem 1rem; border-radius: 10px; font-size: 1rem; }
  .hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .locations-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .float-btn .btn-label { display: none; }
  .float-btn { padding: 0.85rem; border-radius: 50%; width: 52px; height: 52px; justify-content: center; font-size: 1.2rem; }
  .top-bar { font-size: 0.7rem; }
  .top-bar-left { gap: 0.75rem; }
}

/* ─── POSTER GRID RESPONSIVE ─── */
@media (max-width: 768px) {
  .poster-grid,
  [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}
@media (min-width: 480px) and (max-width: 768px) {
  .poster-grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ══ FOOTER LOCATIONS — centered 3-col, not edge-to-edge ══ */
.footer-locations .locations-grid {
  max-width: 960px;
  margin: 0 auto;
}

/* ══ HERO VIDEO BACKGROUND responsive ══ */
@media (max-width: 640px) {
  .hero { min-height: 80vh; }
  .hero-inner { padding: 4rem 0 3rem; }
  .hero-stats-row { max-width: 100% !important; }
}

/* ══ FOOTER TOP — constrain brand/nav/contact cols ══ */
.footer-top {
  max-width: 960px;
  margin: 0 auto;
}

/* ══ Facebook feed column — match left column height ══ */
.why-section-grid {
  align-items: stretch !important; /* both cols equal height */
}
.why-section-grid > div:last-child {
  display: flex;
  flex-direction: column;
}
.why-section-grid > div:last-child > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
#fb-wrap {
  flex: 1;
  min-height: 700px;
}
/* FB iframe inside the plugin fills full width */
#fb-wrap iframe,
#fb-wrap span {
  width: 100% !important;
  max-width: 100% !important;
}

/* ══ Social buttons — branded, larger, with labels ══ */
.footer-social { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.social-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 100px;
  font-size: 0.82rem; font-weight: 700;
  color: #fff; transition: 0.25s;
  text-decoration: none;
  width: auto; height: auto; /* override old square style */
}
.social-label { font-family: 'Nunito', sans-serif; font-size: 0.8rem; font-weight: 800; }
.social-fb { background: #1877F2; }
.social-fb:hover { background: #0f5bbf; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(24,119,242,0.4); }
.social-ig { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-ig:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(220,39,67,0.4); }
.social-em { background: var(--teal); }
.social-em:hover { background: var(--teal-d); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,180,166,0.4); }
