/* Allegro Music School — shared stylesheet
   Aligned to the Allegro Music School Brand Guide:
   colors, typography, and component treatments below mirror the live site. */
:root {
  /* Brand palette (from brand guide) */
  --allegro-blue: #1A2189;   /* primary brand color: headings, overlays, hovers */
  --logo-navy: #2A327C;      /* blue inside the logo artwork */
  --midnight: #111754;       /* footer ground */
  --gold: #FFD866;           /* headings on navy grounds only */
  --signal-red: #C00000;     /* accessible primary CTA buttons */
  --crimson: #DC3545;        /* testimonial accents */
  --ivory: #FFFDF8;          /* page background — warm off-white */
  --cloud: #F0F1FA;          /* banner headline text over photos; light panels */
  --ink: #212529;            /* body text — near-black on ivory */
  --ink-soft: #495057;
  --line: #d9deec;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(17, 23, 84, 0.08);
  /* Typography: native system stack (Bootstrap 5 default) — no webfonts */
  --font-stack: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-testimonial: "Source Sans Pro", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-stack);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }

a { color: var(--allegro-blue); }
a:hover { color: var(--logo-navy); }

/* Headings: system stack, weight 500, uppercase, Allegro Blue */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-stack);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--allegro-blue);
}

/* ---------- Top bar (phone + address) ---------- */
.top-bar { background: var(--midnight); color: var(--white); font-size: 0.88rem; }
.top-bar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0.35rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.25rem; flex-wrap: wrap;
}
.top-bar a { color: var(--gold); text-decoration: none; font-weight: 500; }
.top-bar a:hover { text-decoration: underline; color: var(--gold); }
.top-bar-addr { color: rgba(255,255,255,0.85); }
@media (max-width: 680px) {
  .top-bar-addr { display: none; } /* keep the slim bar slim on phones — tap-to-call stays */
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.brand-logo { height: 52px; width: auto; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 0.45rem 0.7rem; font-size: 1.1rem; cursor: pointer; color: var(--allegro-blue);
}
.site-nav ul { list-style: none; display: flex; gap: 0.25rem; align-items: center; }
.site-nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  display: block;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--allegro-blue); background: var(--cloud); }

/* dropdown — links rgba(0,0,0,.55) per brand guide */
.has-sub { position: relative; }
.has-sub > a::after { content: " ▾"; font-size: 0.7em; }
.sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 200px;
  padding: 0.4rem;
  flex-direction: column;
  gap: 0 !important;
}
.has-sub:hover .sub-menu, .has-sub:focus-within .sub-menu { display: flex; }
.sub-menu a { padding: 0.5rem 0.75rem; color: rgba(0, 0, 0, 0.55); font-weight: 400; }
.sub-menu a:hover { color: var(--allegro-blue); }

/* ---------- Hero carousel + photo overlay treatment ----------
   Photography sits under a 70% Allegro Blue wash — rgba(26,33,137,.7) —
   with light (Cloud) headline text stroked in black for legibility. */
.hero-carousel { position: relative; background: var(--midnight); }
.carousel { position: relative; height: min(62vh, 560px); overflow: hidden; }
.carousel .slide {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 0.6s ease;
}
.carousel .slide.active { opacity: 1; }
.carousel::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(26, 33, 137, 0.7);
  pointer-events: none;
}
.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(17, 23, 84, 0.55); color: #fff; border: none;
  font-size: 1.5rem; padding: 0.5rem 0.85rem; cursor: pointer; border-radius: 6px;
  z-index: 3;
}
.car-btn:hover { background: rgba(17, 23, 84, 0.85); }
.car-btn.prev { left: 0.75rem; }
.car-btn.next { right: 0.75rem; }
.hero-overlay-title {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 1.25rem;
}
.hero-overlay-title h1 {
  color: var(--cloud);
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}
.hero-cta { margin-top: 1.4rem; }
.hero-overlay-title .lede {
  color: var(--cloud);
  letter-spacing: 0.08em;
  margin-top: 0.5rem;
  text-transform: uppercase;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--allegro-blue);
  padding: 2.75rem 1.25rem 2.5rem;
}
.page-hero .inner { max-width: 1120px; margin: 0 auto; }
.page-hero h1 {
  color: var(--cloud);
  font-size: clamp(1.75rem, 3.5vw, 3.5rem);
  font-weight: 500;
}

/* ---------- Layout ---------- */
.section { padding: 3.25rem 1.25rem; }
section[id] { scroll-margin-top: 90px; } /* anchor links land below the sticky header */
.section.alt { background: var(--cloud); }
.section .inner { max-width: 1120px; margin: 0 auto; }
.section h2 {
  font-size: 1.64rem;
  margin-bottom: 1rem;
}
.section h3 { margin: 1.5rem 0 0.5rem; font-size: 1.15rem; }
.section p { margin-bottom: 1rem; max-width: 72ch; }
.section ul { margin: 0 0 1rem 1.4rem; }
.center { text-align: center; }
.center p { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.about-grid {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.85fr);
  grid-template-areas: "copy image";
  align-items: start;
}
.about-image {
  grid-area: image;
  justify-self: end;
}
.about-image img {
  width: auto;
  max-width: 100%;
  max-height: 32rem;
  margin-left: auto;
}
.about-copy { grid-area: copy; }
.about-copy h3 { margin-top: 0; }
.about-history {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}
.about-history h3, .about-history h4 { margin-top: 0; }
.about-history h4 { color: var(--ink); font-weight: 400; text-transform: none; }
.about-history p:last-child {
  margin-bottom: 0;
}
.about-alumni {
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
  padding-top: 1.25rem;
}
.about-alumni h3 { margin-top: 0; }
.about-alumni p:last-child { margin-bottom: 0; }
.preschool-heading { text-transform: none; }
.preschool-courses { margin-top: 1.25rem; }
.registration-callout { background: var(--white); border-bottom: 1px solid var(--line); }
.registration-callout .inner { max-width: 800px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; font-size: 1.15rem; }
.card h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.card p { font-size: 1rem; color: var(--ink); margin-bottom: 0.5rem; }
.class-card { display: flex; flex-direction: column; }
.class-card .card-action { margin-top: auto; margin-bottom: 0; padding-top: 0.5rem; }
.class-card .card-action .btn { width: 100%; }
.card-img {
  width: calc(100% + 3rem);
  margin: -1.5rem -1.5rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.card-img-plain { width: 100%; height: 260px; border-radius: 8px; margin: 0 auto 1rem; object-fit: cover; }
/* Quick-link photo tiles: photo under 70% Allegro Blue wash, gold uppercase label */
.section ul.news-links { list-style: none; margin: 0; padding: 0; text-align: left; }
.news-links li { padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.news-links li:last-child { border-bottom: none; }
.news-links a { text-decoration: none; font-weight: 500; }
.news-links a:hover { text-decoration: underline; }

a.quicklink-photo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  background-size: cover;
  background-position: center;
}
.tile-btn { position: relative; margin-top: 1rem; }
a.quicklink-photo:hover .tile-btn { background: rgba(255,255,255,0.18); }
a.quicklink-photo::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(26, 33, 137, 0.7);
  transition: background 0.3s ease;
}
a.quicklink-photo h3 {
  position: relative;
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  margin: 0;
}
a.quicklink-photo:hover::before { background: rgba(26, 33, 137, 0.55); }

/* ---------- Buttons ----------
   Primary CTA: Signal Red fill, white bold text, 12px corner radius,
   .75rem x 1.75rem padding, hover fades to Allegro Blue over .3s. */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}
.btn-primary, .btn-blue {
  background: var(--signal-red);
  color: var(--white);
}
.btn-primary:hover, .btn-blue:hover { background: var(--allegro-blue); color: var(--white); }
.btn-primary:focus-visible, .btn-blue:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.btn-secondary {
  border: 2px solid var(--allegro-blue);
  color: var(--allegro-blue);
  background: var(--white);
}
.btn-secondary:hover { background: var(--allegro-blue); color: var(--white); }
.btn-secondary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.btn-outline {
  border: 1px solid var(--white); color: var(--white); background: transparent;
  border-radius: 50rem; font-weight: 400; padding: 0.45rem 1.4rem;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); color: var(--white); }
.btn-row { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; }
table.pricing {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 1rem;
}
table.pricing th, table.pricing td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
table.pricing th { background: var(--allegro-blue); color: var(--white); font-weight: 500; text-transform: uppercase; }
table.pricing tr:nth-child(even) td { background: var(--cloud); }
table.pricing td.num { text-align: right; white-space: nowrap; }

/* ---------- Testimonials ----------
   Accents in Crimson: oversized Georgia quotation marks and attribution lines. */
.quote-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.4rem 1.5rem 1.4rem;
  box-shadow: var(--shadow);
  position: relative;
}
.quote-card::before {
  content: "\201C";
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 4rem;
  line-height: 1;
  color: var(--crimson);
  position: absolute;
  top: 0.6rem;
  left: 1.1rem;
}
.quote-card blockquote {
  font-family: var(--font-testimonial);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 0.7rem;
}
.quote-card cite {
  font-family: var(--font-testimonial);
  font-style: normal;
  font-weight: 400;
  color: var(--crimson);
  font-size: 1.15rem;
  display: block;
}

/* ---------- Google Reviews ---------- */
.gr-summary { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.gr-stars { color: var(--gold); font-size: 1.35rem; letter-spacing: 0.1em; text-shadow: 0 0 1px rgba(0,0,0,0.35); }
.gr-rating { font-weight: 700; color: var(--allegro-blue); font-size: 1.2rem; }
.gr-count { color: var(--ink-soft); }
.testimonial-actions { margin-top: 1.25rem; }
.testimonial-google-actions { margin-top: 2rem; }
.gr-grid { text-align: left; }
.gr-card .gr-head { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.6rem; }
.gr-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.gr-name { font-weight: 500; color: var(--ink); }
.gr-time { font-size: 0.85rem; color: var(--ink-soft); }
.gr-text { font-size: 0.98rem; }
.gr-actions { margin-top: 1.6rem; display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; }
.gr-fallback { max-width: 420px; margin: 0 auto; }

/* ---------- Events ---------- */
.event-card { display: flex; gap: 1.25rem; align-items: flex-start; margin-bottom: 1rem; }
.event-date {
  flex-shrink: 0;
  width: 74px; text-align: center;
  background: var(--allegro-blue); color: var(--white);
  border-radius: 10px; padding: 0.6rem 0.4rem;
}
.event-date .mon { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gold); }
.event-date .day { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.event-body h4 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.event-meta { font-size: 0.95rem; color: var(--ink-soft); margin-bottom: 0.4rem; }
.event-date .yr { font-size: 0.75rem; color: rgba(255,255,255,0.75); }
.event-date.past { background: var(--logo-navy); }

/* Collapsible Past Events — opens on the plus symbol */
details.past-events { margin-top: 2rem; }
details.past-events summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-stack);
  font-weight: 500;
  text-transform: uppercase;
  color: var(--allegro-blue);
  font-size: 1.64rem;
  user-select: none;
}
details.past-events summary::-webkit-details-marker { display: none; }
details.past-events summary h3 { margin: 0; font-size: 1.3rem; }
.sub-head { font-size: 1.3rem; margin: 1.25rem 0 0.5rem; }
.schedule-title { text-transform: none; }
.event-month { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; }
.news-card { max-width: 620px; margin: 0 auto; }
.news-entry + .news-entry { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.news-entry h3 { margin-top: 0; }
.pe-icon {
  width: 34px; height: 34px; flex-shrink: 0;
  border: 2px solid var(--allegro-blue);
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
}
.pe-icon::before {
  content: "+";
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1;
  color: var(--allegro-blue);
}
details.past-events[open] .pe-icon::before { content: "\2212"; }
details.past-events summary:hover .pe-icon { background: var(--cloud); }
.pe-list { margin-top: 1.25rem; }

/* ---------- Forms ---------- */
form.contact-form { display: grid; gap: 1rem; max-width: 640px; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
label { font-weight: 500; font-size: 1rem; color: var(--ink); display: block; margin-bottom: 0.3rem; }
input, select, textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-stack);
  font-size: 1rem;
  background: var(--white);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--allegro-blue); border-color: var(--allegro-blue); }
.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  min-height: 1.5rem;
  margin-top: 0.9rem;
  font-weight: 700;
}
.form-status.success { color: #176b3a; }
.form-status.error { color: #a40000; }
.form-help { color: var(--ink-soft); font-size: 0.95rem; margin: -0.1rem 0 0.4rem; }
fieldset.form-fieldset { border: 0; padding: 0; }
fieldset.form-fieldset legend { font-weight: 500; font-size: 1rem; color: var(--ink); margin-bottom: 0.3rem; }
.fieldset-note { font-weight: 400; color: var(--ink-soft); font-size: 0.95rem; }
button:disabled { cursor: wait; opacity: 0.7; }
/* Two-column form (desktop) — headings, notes, rows and the button span both columns */
form.form-2col { max-width: 960px; grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }
form.form-2col h2, form.form-2col h3, form.form-2col p,
form.form-2col .form-row, form.form-2col button { grid-column: 1 / -1; }
@media (max-width: 680px) {
  form.form-2col { grid-template-columns: 1fr; }
}

.checks { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin-top: 0.35rem; }
label.checkbox { font-weight: 400; display: flex; align-items: center; gap: 0.4rem; margin: 0; }
label.checkbox input { width: auto; }

/* ---------- Friends list ---------- */
.friends-list { columns: 2; list-style: disc; padding-left: 1.4rem; max-width: 720px; }
.friends-list li { margin-bottom: 0.4rem; break-inside: avoid; }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.gallery-item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  background: var(--cloud);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.gallery-item:hover img { transform: scale(1.04); }

/* ---------- Home gallery slider (3-up desktop, 1-up mobile) ---------- */
.hg-wrap { display: flex; align-items: center; gap: 0.6rem; }
.hg-viewport { overflow: hidden; flex: 1; border-radius: var(--radius); }
.hg-track { display: flex; transition: transform 0.5s ease; }
.hg-slide { flex: 0 0 33.3333%; padding: 0 0.4rem; box-sizing: border-box; }
.hg-slide img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.hg-btn {
  flex-shrink: 0;
  background: var(--allegro-blue); color: var(--white);
  border: none; border-radius: 8px;
  font-size: 1.2rem; padding: 0.55rem 0.8rem; cursor: pointer;
  transition: background 0.3s ease;
}
.hg-btn:hover { background: var(--midnight); }
@media (max-width: 680px) {
  .hg-slide { flex: 0 0 100%; }
}

/* ---------- Footer ----------
   Midnight ground; gold uppercase letter-spaced headings; white links. */
.site-footer { background: var(--midnight); color: var(--white); padding: 3rem 1.25rem 2rem; font-size: 1rem; }
.footer-inner { max-width: 1120px; margin: 0 auto; display: grid; gap: 2rem; }
.footer-simple { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1120px; }
.site-footer h4 {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.7rem;
}
.site-footer p { color: var(--white); }
.site-footer a { color: var(--white); text-decoration: none; }
.social-links a { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.15rem 0; }
.soc-icon { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; }
.footer-nav { list-style: none; margin: 0; padding: 0; }
.footer-nav li { margin-bottom: 0.35rem; }
.footer-nav .footer-subitem { padding-left: 1rem; font-size: 0.95rem; }
.contact-map { max-width: 760px; margin-top: 1.5rem; }
.contact-map iframe { display: block; width: 100%; height: 360px; border: 0; border-radius: 8px; }
.site-footer a:hover { text-decoration: underline; }
.footer-bottom {
  max-width: 1120px; margin: 2rem auto 0; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  font-size: 0.9rem; color: rgba(255,255,255,0.85);
}
.footer-bottom a { color: var(--white); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-simple { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .friends-list { columns: 1; }
}
@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 0.75rem; }
  .sub-menu { position: static; display: flex; border: none; box-shadow: none; padding-left: 1rem; }
  .header-inner { flex-wrap: wrap; }
  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .about-grid { grid-template-areas: "image" "copy"; }
  .about-image { justify-self: center; }
  .about-image img { width: 100%; max-height: none; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner, .footer-simple { grid-template-columns: 1fr; }
  .contact-map iframe { height: 280px; }
  .event-card { flex-direction: row; }
}
