/* St. Xavier's — corporate / Finsmart-inspired layout */
:root {
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-ink: #0f172a;
  --color-muted: #64748b;
  --color-border: #e2e8f0;
  --color-navy: #0a1628;
  --color-navy-mid: #132337;
  --color-accent: #dc2626;
  --color-accent-hover: #b91c1c;
  --color-gold: #c9a227;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08);
  --radius: 12px;
  --container: min(1180px, 100% - 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-ink);
  background: var(--color-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: var(--container);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.header-top {
  background: var(--color-navy);
  color: #e2e8f0;
  font-size: 0.8125rem;
}
.header-top a { color: #fff; text-decoration: none; }
.header-top a:hover { text-decoration: underline; }
.header-top-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1rem;
  padding: 0.45rem 0;
}
.header-contacts .sep { opacity: 0.5; margin: 0 0.35rem; }
.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 10px;
  flex-shrink: 0;
}
.brand-logo--footer {
  width: 48px;
  height: 48px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: grid;
  place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; }
.brand-text small { font-size: 0.72rem; color: var(--color-muted); font-weight: 500; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-navy);
  margin-inline: auto;
}

.site-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.25rem;
}
.site-nav .nav-list > li { position: relative; }
.site-nav .nav-list > li > a {
  display: block;
  padding: 0.55rem 0.85rem;
  color: var(--color-ink);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 8px;
  text-decoration: none;
}
.site-nav .nav-list > li > a:hover {
  background: var(--color-bg);
  text-decoration: none;
}
.btn-nav-cta {
  background: var(--color-accent) !important;
  color: #fff !important;
  margin-left: 0.25rem;
}
.btn-nav-cta:hover {
  background: var(--color-accent-hover) !important;
}

.submenu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 220px;
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
}
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.submenu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-ink);
  font-size: 0.9rem;
  text-decoration: none;
}
.submenu a:hover {
  background: var(--color-bg);
  text-decoration: none;
}

@media (max-width: 1024px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 88vw);
    background: var(--color-surface);
    padding: 5rem 1rem 2rem;
    box-shadow: -8px 0 40px rgba(15, 23, 42, 0.12);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    z-index: 99;
  }
  body.nav-open .site-nav { transform: translateX(0); }
  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 98;
  }
  .site-nav .nav-list {
    flex-direction: column;
    align-items: stretch;
  }
  .site-nav .nav-list > li > a { padding: 0.75rem 0.5rem; }
  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 0.75rem;
    display: none;
    border-left: 2px solid var(--color-border);
    margin: 0.25rem 0 0.5rem;
  }
  .has-sub.open > .submenu { display: block; }
  .btn-nav-cta { margin-left: 0; text-align: center; }
}

/* Hero */
.hero {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.82) 0%, rgba(30, 58, 95, 0.74) 55%, rgba(19, 35, 55, 0.86) 100%),
    url("../../images/banner1.jpg") center/cover no-repeat;
  color: #f8fafc;
  padding: clamp(3rem, 8vw, 5.5rem) 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(220, 38, 38, 0.22), transparent);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr 0.9fr; }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
}
.hero-lead {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 36rem;
  margin-bottom: 1.5rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.hero-card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; }
.hero-card p { margin: 0; font-size: 0.9rem; opacity: 0.9; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--color-accent);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.5);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-light {
  background: #fff;
  color: var(--color-navy);
}
.btn-light:hover { background: var(--color-bg); color: var(--color-navy); }

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.section-alt { background: var(--color-surface); }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
  text-align: center;
}
.section-title.left { text-align: left; }
.section-intro {
  text-align: center;
  color: var(--color-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.section-intro.left { text-align: left; margin-left: 0; }

/* Split panels (home) */
.panel-split {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (min-width: 768px) {
  .panel-split { grid-template-columns: 1fr 1fr; }
  .panel-split.reverse .panel-media { order: 2; }
  .panel-split.reverse .panel-body { order: 1; }
}
.panel-media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-border);
  min-height: 220px;
}
.panel-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 260px;
}
.panel-placeholder {
  min-height: 260px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  color: var(--color-muted);
  font-weight: 600;
  padding: 1rem;
  text-align: center;
}
.panel-body h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1rem;
}
.panel-body p { margin: 0 0 0.85rem; color: #334155; }
.panel-centered {
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
}
.panel-centered h2 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 1rem; }
.panel-centered p { color: #334155; margin-bottom: 0.85rem; }
.panel-text-only {
  max-width: 820px;
  margin-inline: auto;
  background: var(--color-surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}
.panel-text-only h2 {
  font-family: var(--font-display);
  margin-top: 0;
  text-align: center;
}

/* Cards grid */
.cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card-img {
  aspect-ratio: 16/10;
  background: var(--color-bg);
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1.25rem; flex: 1; }
.card-body h3 { margin: 0 0 0.5rem; font-size: 1.1rem; font-family: var(--font-display); }
.card-meta { font-size: 0.8125rem; color: var(--color-muted); margin-bottom: 0.5rem; }

/* Page header */
.page-hero {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.82) 0%, rgba(30, 58, 95, 0.74) 100%),
    url("../../images/banner1.jpg") center/cover no-repeat;
  color: #f8fafc;
  padding: clamp(2rem, 5vw, 3rem) 0;
  position: relative;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  margin: 0;
}
.page-hero p { margin: 0.5rem 0 0; opacity: 0.9; max-width: 42rem; }

.prose {
  max-width: 800px;
  margin: 0 auto;
}
.prose.wide { max-width: 900px; }
.prose p { margin: 0 0 1rem; color: #334155; }
.prose h2 { font-family: var(--font-display); font-size: 1.35rem; margin: 2rem 0 0.75rem; }
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1rem 0;
}
.prose th, .prose td {
  border: 1px solid var(--color-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}
.prose th { background: var(--color-bg); font-weight: 600; }
.quote-block {
  border-left: 4px solid var(--color-accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--color-navy-mid);
  font-size: 1.05rem;
}

/* Tables (fees) */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th, .data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}
.data-table th { background: var(--color-navy); color: #fff; font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }

/* Contact */
.contact-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
.contact-form label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font: inherit;
  margin-bottom: 1rem;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.map-embed iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* Disclosure list */
.disclosure-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.disclosure-list li {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-surface);
}
.disclosure-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  color: var(--color-ink);
  font-weight: 500;
  text-decoration: none;
}
.disclosure-list a:hover { background: var(--color-bg); }
.disclosure-list .badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--color-bg);
  color: var(--color-muted);
}
.disclosure-list .badge.ok { background: #d1fae5; color: #065f46; }

/* Gallery */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-border);
  box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Principal / Chairman portrait */
.message-portrait-wrap {
  text-align: center;
  margin: 0 auto 1.75rem;
}
.message-portrait {
  width: min(280px, 72vw);
  max-height: 280px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  border: 4px solid rgba(220, 38, 38, 0.2);
}

/* Footer */
.site-footer { margin-top: auto; }
.footer-cta {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-hover));
  color: #fff;
  padding: 2.5rem 0;
}
.footer-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-cta h2 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 1.5rem; }
.footer-cta p { margin: 0; opacity: 0.95; max-width: 520px; }
.footer-main {
  background: var(--color-navy);
  color: #cbd5e1;
  padding: 3rem 0 2rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.footer-heading {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  margin: 0 0 1rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links a { color: #cbd5e1; text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.6; margin: 1rem 0 0; }
.brand-footer .brand-mark { width: 44px; height: 44px; font-size: 0.9rem; }
.footer-address, .footer-contact { font-size: 0.9rem; line-height: 1.65; }
.footer-contact a { color: #e2e8f0; }
.footer-bottom {
  background: #070f18;
  color: #94a3b8;
  font-size: 0.8125rem;
  padding: 1rem 0;
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}
.admin-link { color: #64748b; }
.admin-link:hover { color: #94a3b8; }

.footer-bottom .footer-credit {
  color: #fff !important;
  text-decoration: none;
}
.footer-bottom .footer-credit:hover {
  color: #f1f5f9 !important;
  text-decoration: underline;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--color-muted);
}

.site-main { min-height: 50vh; }
