/* ==========================================
   CSS CUSTOM PROPERTIES
   ========================================== */
:root {
  --color-primary:    #4A7C59;
  --color-accent:     #C9763D;
  --color-warm-bg:    #FAF7F2;
  --color-dark:       #2C2C2C;
  --color-light-text: #6B6B6B;
  --color-gold:       #D4A847;
  --color-white:      #FFFFFF;

  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:      0.5rem;
  --shadow:      0 2px 12px rgba(0,0,0,0.08);
  --transition:  0.25s ease;

  --nav-height:  5rem;
  --max-width:   1100px;
  --section-pad: 4.5rem 1.5rem;
}

/* ==========================================
   RESET
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
ul  { list-style: none; }
a   { text-decoration: none; color: inherit; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-warm-bg);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--color-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p  { color: var(--color-light-text); }

.section-title    { text-align: center; margin-bottom: 0.5rem; }
.section-subtitle {
  text-align: center;
  color: var(--color-light-text);
  max-width: 620px;
  margin: 0 auto 3rem;
}

/* ==========================================
   LAYOUT
   ========================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
section { padding: var(--section-pad); }

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.btn-primary { background: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background: #3d6b4a; }

.btn-outline { border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: var(--color-white); }

.btn-outline-white { border-color: white; color: white; }
.btn-outline-white:hover { background: rgba(255,255,255,0.15); }

.btn-accent { background: var(--color-accent); color: var(--color-white); }
.btn-accent:hover { background: #b56632; }

.btn-gift {
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.btn-gift:hover { background: #b56632; }

/* ==========================================
   NAVIGATION
   ========================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-warm-bg);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  height: var(--nav-height);
}

[id] { scroll-margin-top: calc(var(--nav-height) + 1.5rem); }

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.65rem;
}
.nav-logo img {
  height: 52px;
  width: auto;
}
.nav-logo-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
}
.nav-logo-sub {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-light-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-dark);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--color-primary); }
.nav-links a.btn-gift,
.nav-links a.btn-gift:hover { color: var(--color-white); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================
   HERO (home page)
   ========================================== */
.hero {
  background: linear-gradient(140deg, #2e5c3e 0%, #4A7C59 65%, #5a8c69 100%);
  color: var(--color-white);
  padding: 6rem 1.5rem;
  text-align: center;
}
.hero h1 { color: var(--color-white); margin-bottom: 1rem; max-width: 800px; margin-left: auto; margin-right: auto; }
.hero p  { color: rgba(255,255,255,0.85); font-size: 1.15rem; max-width: 580px; margin: 0 auto 2.25rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-logo {
  height: 210px;
  width: auto;
  margin: 0 auto 2.25rem;
  display: block;
}

/* ==========================================
   PAGE HERO (inner pages)
   ========================================== */
.page-hero {
  background: linear-gradient(140deg, #2e5c3e 0%, #4A7C59 100%);
  padding: 3.5rem 1.5rem;
  text-align: center;
}
.page-hero h1 { color: var(--color-white); }
.page-hero p  { color: rgba(255,255,255,0.85); margin-top: 0.6rem; font-size: 1.05rem; }

/* ==========================================
   MISSION CALLOUT
   ========================================== */
.mission-callout {
  background: var(--color-primary);
  text-align: center;
  padding: 3rem 1.5rem;
}
.mission-callout blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: rgba(255,255,255,0.92);
  max-width: 760px;
  margin: 0 auto;
  line-height: 1.5;
}

/* ==========================================
   CARD GRID
   ========================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
}
.card-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.card h3   { margin-bottom: 0.4rem; }

/* ==========================================
   GALLERY STRIP
   ========================================== */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}
.gallery-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* ==========================================
   TEACHER CARDS
   ========================================== */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.teacher-card {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
}
.teacher-photo {
  aspect-ratio: 3/4;
  width: calc(100% - 2.5rem);
  margin: 1.5rem auto 0;
  overflow: hidden;
  background: #d8e8de;
  border-radius: var(--radius);
}
.teacher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.teacher-card .teacher-info { padding: 1.25rem 1.25rem 1.5rem; }
.teacher-card h3 { margin-bottom: 0.25rem; }

/* ==========================================
   SCHEDULE TIMELINE
   ========================================== */
.schedule-list { max-width: 620px; margin: 0 auto; }
.schedule-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid #e8e0d8;
  align-items: flex-start;
}
.schedule-item:last-child { border-bottom: none; }
.schedule-time {
  min-width: 110px;
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.88rem;
  padding-top: 0.1rem;
}
.schedule-item h3 { font-size: 1rem; margin-bottom: 0.2rem; }

/* ==========================================
   FORMS
   ========================================== */
.form-wrap {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  max-width: 680px;
  margin: 2rem auto 0;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-dark);
}
.form-group input[type="checkbox"],
.form-group input[type="radio"] { width: auto; }

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #d8d0c8;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--color-warm-bg);
  color: var(--color-dark);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-legend {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-dark);
  margin-bottom: 0.35rem;
}

.checkbox-group { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.25rem; }
.checkbox-group label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 400;
  cursor: pointer;
  line-height: 1.4;
}
.checkbox-group input[type="checkbox"] { margin-top: 0.2rem; flex-shrink: 0; accent-color: var(--color-primary); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.field-error { color: #c0392b; font-size: 0.82rem; margin-top: 0.3rem; display: none; }
.field-error.visible { display: block; }
.form-success { text-align: center; padding: 3rem 1.5rem; }
.form-success h3 { font-size: 1.5rem; color: var(--color-primary); margin-bottom: 0.75rem; }
.form-success p { color: var(--color-light-text); }

.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: #fff;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.14);
  padding: 1rem 1.25rem;
  max-width: 340px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
}
.toast.toast--visible {
  transform: translateY(0);
  opacity: 1;
}
.toast.toast--hiding {
  transform: translateY(120%);
  opacity: 0;
}
.toast-icon {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.05rem;
}
.toast-icon::after {
  content: '';
  display: block;
  width: 0.45rem;
  height: 0.25rem;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}
.toast-body strong { display: block; font-size: 0.95rem; color: var(--color-dark); margin-bottom: 0.2rem; }
.toast-body p { font-size: 0.85rem; color: var(--color-light-text); margin: 0; }

.child-row { position: relative; }
.child-row + .child-row { margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid #e8e2d9; }
.remove-child {
  position: absolute;
  top: 0;
  right: 0;
  background: none;
  border: none;
  color: var(--color-light-text);
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.remove-child:hover { color: #c0392b; }
.btn-add-child {
  background: none;
  border: 1.5px dashed var(--color-primary);
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0.25rem;
  margin-bottom: 1.25rem;
  display: inline-block;
  transition: background 0.15s;
}
.btn-add-child:hover { background: rgba(74,124,89,0.07); }

/* ==========================================
   TABLES
   ========================================== */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: var(--color-white); }
thead th {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.9rem 1.25rem;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
}
tbody td { padding: 0.85rem 1.25rem; border-bottom: 1px solid #ece6df; font-size: 0.95rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:nth-child(even) td { background: rgba(250,247,242,0.7); }

@media (max-width: 620px) {
  .table-wrap { box-shadow: none; background: transparent; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tbody tr {
    background: var(--color-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
  }
  tbody tr:nth-child(even) td { background: transparent; }
  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid #ece6df;
    padding: 0.7rem 1rem;
  }
  tbody tr td:last-child { border-bottom: none; }
  tbody td::before {
    content: attr(data-label);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-light-text);
    flex-shrink: 0;
    padding-top: 0.1rem;
    min-width: 4.5rem;
  }
}

/* ==========================================
   PLACEHOLDER LABELS
   ========================================== */
.placeholder {
  background: #fff3cd;
  border: 1px dashed var(--color-gold);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 0.85em;
  color: #856404;
  font-family: var(--font-body);
  font-style: normal;
}

/* ==========================================
   CTA BAND
   ========================================== */
.cta-band {
  background: var(--color-primary);
  color: white;
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.cta-band h2 { color: white; margin-bottom: 0.75rem; }
.cta-band p  { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 2rem; }

/* ==========================================
   GIFT FLOATING BUTTON
   ========================================== */
.gift-float {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  z-index: 200;
  box-shadow: 0 4px 18px rgba(0,0,0,0.22);
  border-radius: 2rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 1.5rem 2rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}
.footer-logo {
  height: 80px;
  width: auto;
  margin-bottom: 0.85rem;
  display: block;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.55; }

.footer-nav-head,
.footer-social-head { color: var(--color-white); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.75rem; display: block; }

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a { font-size: 0.9rem; transition: color var(--transition); }
.footer-nav a:hover { color: var(--color-white); }

.footer-social { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-social a { font-size: 0.9rem; transition: color var(--transition); }
.footer-social a:hover { color: var(--color-white); }

.footer-copy {
  grid-column: 1 / -1;
  font-size: 0.82rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  text-align: center;
}
.footer-copy a { color: var(--color-accent); transition: opacity var(--transition); }
.footer-copy a:hover { opacity: 0.8; }

/* ==========================================
   SECTION BACKGROUNDS
   ========================================== */
.bg-cream { background: var(--color-warm-bg); }
.bg-white  { background: var(--color-white); }
.section--flush { padding: 0; }

/* ==========================================
   CONTAINER VARIANTS
   ========================================== */
.container--narrow { max-width: 640px; }
.container--text   { max-width: 740px; }
.container--mid    { max-width: 860px; }
.container--wide   { max-width: 1000px; }
.container--center { text-align: center; }

/* ==========================================
   UTILITY
   ========================================== */
.text-center { text-align: center; }
.btn-full    { display: block; width: 100%; padding-top: 0.85rem; padding-bottom: 0.85rem; text-align: center; }
.btn-lg      { font-size: 1.05rem; padding: 0.85rem 2.5rem; }

/* ==========================================
   TEACHER CARD — ROLE LABEL
   ========================================== */
.teacher-role {
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}

/* ==========================================
   CARD VARIANTS
   ========================================== */
.card--center { text-align: center; }
.card-grid--constrained { max-width: 920px; margin-left: auto; margin-right: auto; }

/* ==========================================
   CONTACT PAGE LAYOUT
   ========================================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}
.contact-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-light-text);
  margin-bottom: 0.35rem;
}
.form-panel {
  background: var(--color-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.map-placeholder {
  background: #d8e8de;
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  text-align: center;
  padding: 1rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
  :root { --section-pad: 3rem 1.25rem; }

  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-warm-bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 2rem;
    gap: 1.1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  .nav-links.is-open { display: flex; }
  .nav-links .btn-gift { align-self: flex-start; }

  .contact-layout { grid-template-columns: 1fr; gap: 2rem; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-copy  { margin-top: 0; }

  .form-row { grid-template-columns: 1fr; }
  .form-wrap { padding: 1.5rem; }

  .gift-float { bottom: 1rem; right: 1rem; }
}

@media (max-width: 480px) {
  .hero { padding: 4rem 1.25rem; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* Honeypot spam trap — visually hidden but in DOM flow so bots see it */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}
