/* =========================================================
   Fatima Matric Hr. Sec. School — site styles
   Built on Bootstrap 5.3. One palette (maroon + gold) for every page.
   ========================================================= */

:root {
  --fm-maroon: #6b1a26;
  --fm-maroon-dark: #4a0f19;
  --fm-maroon-soft: #f6ecec;
  --fm-gold: #c9962b;
  --fm-gold-light: #f2dfb1;
  --fm-cream: #fbf8f3;
  --fm-ink: #2b2424;
  --fm-muted: #6e6363;
  --fm-line: #eadfd3;
  --fm-radius: 1rem;
  --fm-shadow: 0 10px 30px rgba(74, 15, 25, .08);

  --bs-body-font-family: 'Mulish', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: var(--fm-ink);
  --bs-body-bg: var(--fm-cream);
  --bs-link-color: var(--fm-maroon);
  --bs-link-color-rgb: 107, 26, 38;
  --bs-link-hover-color: var(--fm-maroon-dark);
  --bs-link-hover-color-rgb: 74, 15, 25;
  --bs-border-color: var(--fm-line);
  --bs-emphasis-color: var(--fm-ink);
}

body { line-height: 1.7; }
a { text-decoration: none; }
img { max-width: 100%; }

h1, h2, h3, .font-serif {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--fm-maroon-dark);
  line-height: 1.2;
}
h1 { font-weight: 700; }
h2 { font-weight: 700; font-size: clamp(1.7rem, 2.6vw, 2.3rem); margin-bottom: 1rem; }
h3 { font-weight: 600; font-size: 1.25rem; }
.text-muted-fm { color: var(--fm-muted); }

.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: .5rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: 50rem; font-weight: 700; padding: .7rem 1.5rem; }
.btn-sm { padding: .45rem 1rem; }
.btn-maroon { --bs-btn-bg: var(--fm-maroon); --bs-btn-color: #fff; --bs-btn-border-color: var(--fm-maroon);
  --bs-btn-hover-bg: var(--fm-maroon-dark); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--fm-maroon-dark);
  --bs-btn-active-bg: var(--fm-maroon-dark); --bs-btn-active-color: #fff; }
.btn-outline-maroon { --bs-btn-color: var(--fm-maroon); --bs-btn-border-color: var(--fm-maroon);
  --bs-btn-hover-bg: var(--fm-maroon); --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: var(--fm-maroon);
  --bs-btn-active-bg: var(--fm-maroon); --bs-btn-active-color: #fff; }
.btn-gold { --bs-btn-bg: var(--fm-gold); --bs-btn-color: #2a1a05; --bs-btn-border-color: var(--fm-gold);
  --bs-btn-hover-bg: #b5841f; --bs-btn-hover-color: #fff; --bs-btn-hover-border-color: #b5841f;
  --bs-btn-active-bg: #b5841f; --bs-btn-active-color: #fff; }
.btn-outline-light { --bs-btn-hover-color: var(--fm-maroon); }

/* ---------- Top bar & navbar ---------- */
.topbar { background: var(--fm-maroon-dark); color: rgba(255,255,255,.85); font-size: .82rem; padding: .45rem 0; }
.topbar a { color: inherit; }
.topbar a:hover { color: var(--fm-gold-light); }

.site-nav { background: rgba(255,255,255,.97); border-bottom: 1px solid var(--fm-line); padding: .55rem 0; }
.brand-logo { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: 'Playfair Display', Georgia, serif; font-size: 1.12rem; color: var(--fm-maroon); white-space: normal; }
.brand-text small { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fm-gold); font-weight: 700; }
.site-nav .nav-link { font-weight: 600; color: var(--fm-ink); padding: .5rem .7rem !important; border-radius: .5rem; font-size: .95rem; white-space: nowrap; }
.site-nav .nav-link:hover { color: var(--fm-maroon); background: var(--fm-maroon-soft); }
.site-nav .nav-link.active { color: var(--fm-maroon); background: var(--fm-maroon-soft); }
.navbar-toggler { border-color: var(--fm-line); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(201,150,43,.35); }

/* ---------- Section helpers ---------- */
.section { padding: 4.5rem 0; }
.section-sm { padding: 3rem 0; }
.section-alt { background: #fff; border-top: 1px solid var(--fm-line); border-bottom: 1px solid var(--fm-line); }
.section-head { max-width: 720px; margin: 0 auto 2.5rem; text-align: center; }
.section-tag, .eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--fm-gold); margin-bottom: .6rem;
}
.lead { color: var(--fm-muted); font-size: 1.12rem; }

/* ---------- Home hero ---------- */
.home-hero { background: linear-gradient(135deg, var(--fm-maroon-dark), var(--fm-maroon)); color: #fff; padding: 4.5rem 0 6.5rem; position: relative; overflow: hidden; }
.home-hero::after { content: ''; position: absolute; inset: auto -10% -45% auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,150,43,.28), transparent 70%); pointer-events: none; }
.home-hero h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.home-hero .lead { color: rgba(255,255,255,.85); }
.home-hero .eyebrow { color: var(--fm-gold-light); }
.hero-badges .badge { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font-weight: 600; font-size: .85rem; padding: .5rem .85rem; border-radius: 50rem; }
.hero-figure { position: relative; z-index: 1; }
@media (min-width:1200px) and (max-width:1399.98px){ .site-nav .nav-link{ padding:.5rem .5rem !important; font-size:.9rem; } .brand-text strong{ font-size:1rem; } }
.hero-figure img { min-height: 320px; border-radius: 1.25rem; border: 6px solid rgba(255,255,255,.15); box-shadow: 0 25px 50px rgba(0,0,0,.25); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; background: #fff; }
.hero-figure figcaption { position: absolute; left: 1rem; bottom: 1rem; background: rgba(255,255,255,.95); color: var(--fm-maroon-dark);
  padding: .55rem .9rem; border-radius: .75rem; font-weight: 700; font-size: .9rem; box-shadow: var(--fm-shadow); }

.stats-card { background: #fff; border-radius: var(--fm-radius); box-shadow: var(--fm-shadow); margin-top: -3.5rem; position: relative; z-index: 2; }
.stat { text-align: center; padding: 1.6rem .5rem; }
.stat strong { display: block; font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--fm-maroon); line-height: 1.1; }
.stat span { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fm-muted); font-weight: 700; }
@media (min-width: 768px) { .stat + .stat { border-left: 1px solid var(--fm-line); } }

/* ---------- Inner page hero ---------- */
.page-hero { background: linear-gradient(180deg, #fff, var(--fm-cream)); border-bottom: 1px solid var(--fm-line); padding: 2rem 0 3.5rem; }
.page-hero .breadcrumb { font-size: .85rem; margin-bottom: 1.5rem; }
.page-hero .breadcrumb a { color: var(--fm-muted); }
.page-hero h1 { color: var(--fm-maroon-dark); }
.hero-photo { border-radius: 1.25rem; box-shadow: var(--fm-shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* ---------- Cards ---------- */
.card-fm { background: #fff; border: 1px solid var(--fm-line); border-radius: var(--fm-radius); padding: 1.75rem; height: 100%; transition: box-shadow .2s ease, border-color .2s ease; }
.card-fm:hover { box-shadow: var(--fm-shadow); border-color: #e0cdb8; }
.card-fm p:last-child, .card-fm ul:last-child { margin-bottom: 0; }
.icon-chip { width: 52px; height: 52px; border-radius: .9rem; background: var(--fm-maroon-soft); color: var(--fm-maroon);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 1rem; }
.icon-chip.gold { background: #fbf1da; color: #8a6414; }
.card-dark { background: var(--fm-maroon-dark); color: rgba(255,255,255,.88); border-color: var(--fm-maroon-dark); }
.card-dark h2, .card-dark h3 { color: #fff; }
.card-dark .section-tag { color: var(--fm-gold-light); }

.quote-card { background: #fff; border-left: 5px solid var(--fm-gold); border-radius: var(--fm-radius); padding: 2rem; box-shadow: var(--fm-shadow); }
.quote-card blockquote { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--fm-maroon-dark); font-style: italic; margin: 0 0 .75rem; }

.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding: .45rem 0 .45rem 1.8rem; border-bottom: 1px dashed var(--fm-line); }
.check-list li:last-child { border-bottom: 0; }
.check-list li::before { content: '\F26E'; font-family: 'bootstrap-icons'; position: absolute; left: 0; top: .45rem; color: var(--fm-gold); }
.card-dark .check-list li { border-color: rgba(255,255,255,.15); }

.fact { background: var(--fm-cream); border: 1px solid var(--fm-line); border-radius: .8rem; padding: 1rem 1.1rem; height: 100%; }
.fact small { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fm-muted); font-weight: 700; }
.fact strong { font-family: 'Playfair Display', serif; color: var(--fm-maroon-dark); font-size: 1.05rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--fm-line); }
.timeline li { position: relative; padding: 0 0 1.75rem 2.6rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--fm-gold); }
.timeline .year { font-family: 'Playfair Display', serif; font-weight: 700; color: var(--fm-maroon); font-size: 1.15rem; display: block; }
.timeline h3 { font-size: 1.05rem; font-family: 'Mulish', sans-serif; font-weight: 700; color: var(--fm-ink); margin: .15rem 0 .25rem; }
.timeline p { margin: 0; color: var(--fm-muted); }

/* ---------- Achievers ---------- */
.score-card { background: #fff; border: 1px solid var(--fm-line); border-top: 4px solid var(--fm-gold); border-radius: var(--fm-radius); padding: 1.5rem; text-align: center; height: 100%; }
.score-card .meta { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fm-muted); font-weight: 700; }
.score-card .name { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--fm-maroon-dark); display: block; margin: .35rem 0; }
.score-card .marks { font-weight: 700; color: #8a6414; }

/* ---------- Heritage tree ---------- */
.tree { display: grid; gap: 1rem; max-width: 760px; margin: 0 auto; }
.tree-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.tree-node { background: #fff; border: 2px solid var(--fm-gold-light); border-radius: var(--fm-radius); padding: 1.25rem; text-align: center; }
.tree-node i { font-size: 1.6rem; color: var(--fm-maroon); }
.tree-node strong { display: block; font-family: 'Playfair Display', serif; color: var(--fm-maroon-dark); margin-top: .35rem; }
.tree-node small { color: var(--fm-muted); }
.tree-node.trunk { background: var(--fm-maroon); border-color: var(--fm-maroon); color: rgba(255,255,255,.85); }
.tree-node.trunk i { color: var(--fm-gold-light); }
.tree-node.trunk strong { color: #fff; }
.tree-node.trunk small { color: rgba(255,255,255,.75); }
.tree-label { text-align: center; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--fm-gold); }

/* ---------- Steps ---------- */
.step-num { width: 44px; height: 44px; border-radius: 50%; background: var(--fm-maroon); color: #fff; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }

/* ---------- Gallery ---------- */
.gallery-item { display: block; position: relative; border-radius: var(--fm-radius); overflow: hidden; background: #efe5d8; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: .9rem 1rem .75rem; color: #fff; font-weight: 600; font-size: .92rem;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent); }
.gallery-filter .btn { padding: .4rem 1rem; }
.modal-content { border-radius: var(--fm-radius); overflow: hidden; }

/* ---------- Table ---------- */
.table-fm { --bs-table-bg: #fff; margin: 0; }
.table-fm thead th { background: var(--fm-maroon); color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; border: 0; padding: .9rem 1rem; }
.table-fm td { padding: .9rem 1rem; vertical-align: middle; }
.table-wrap { border: 1px solid var(--fm-line); border-radius: var(--fm-radius); overflow: hidden; background: #fff; }

/* ---------- CTA & next strip ---------- */
.cta-band { background: linear-gradient(135deg, var(--fm-maroon-dark), var(--fm-maroon)); color: rgba(255,255,255,.88); border-radius: 1.5rem; padding: 3rem 2rem; }
.cta-band h2 { color: #fff; }
.next-strip { background: #fff; border-top: 1px solid var(--fm-line); padding: 2rem 0; }

/* ---------- Forms ---------- */
.form-control, .form-select { border-radius: .7rem; padding: .7rem .9rem; border-color: #ddcfc0; }
.form-control:focus, .form-select:focus { border-color: var(--fm-gold); box-shadow: 0 0 0 .2rem rgba(201,150,43,.2); }
.form-label { font-weight: 700; font-size: .9rem; }
.map-wrap { border-radius: var(--fm-radius); overflow: hidden; background: #efe5d8; border: 1px solid var(--fm-line); }
.map-frame { border: 0; }

/* ---------- Accordion ---------- */
.accordion { --bs-accordion-border-color: var(--fm-line); --bs-accordion-active-bg: var(--fm-maroon-soft); --bs-accordion-active-color: var(--fm-maroon-dark);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(201,150,43,.25); --bs-accordion-border-radius: var(--fm-radius); --bs-accordion-inner-border-radius: var(--fm-radius); }
.accordion-button { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: #2a0a10; color: rgba(255,255,255,.72); padding: 3.5rem 0 1.5rem; font-size: .93rem; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: var(--fm-gold-light); }
.site-footer .brand-logo { background: #fff; border-radius: 50%; padding: 3px; }
.footer-note { max-width: 420px; }
.footer-title { font-family: 'Mulish', sans-serif; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fm-gold-light); font-weight: 700; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .45rem; }
.footer-contact li { display: flex; gap: .65rem; margin-bottom: .7rem; }
.footer-contact i { color: var(--fm-gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.25rem; font-size: .82rem; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 1199.98px) {
  .site-nav .navbar-collapse { padding: .75rem 0 .5rem; }
}
@media (max-width: 575.98px) {
  .brand-text strong { font-size: .98rem; }
  .brand-logo { width: 44px; height: 44px; }
  .section { padding: 3.25rem 0; }
  .cta-band { padding: 2.25rem 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
