/* ============================================
   Academic Pathways — Website Stylesheet
   Brand: Navy #0F1B45 | Gold #CE8F2C | Off-white #FEFEFD
   ============================================ */

/* --- Loading Screen --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 2s ease;
}
.loader.fade-out { opacity: 0; pointer-events: none; }
.loaded .loader { display: none; }
.loader__logo {
  width: 320px;
  opacity: 0;
  transform: scale(0.7);
  animation: loaderGrow 1.2s ease-out forwards;
}
@keyframes loaderGrow {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0F1B45;
  --gold: #CE8F2C;
  --gold-hover: #B87D24;
  --bg: #FEFEFD;
  --text: #333333;
  --text-light: #666666;
  --cream: #F5EDE0;
  --border: #E0D8CC;
  --white: #FFFFFF;
  --shadow: 0 2px 8px rgba(15, 27, 69, 0.1);
  --shadow-hover: 0 4px 16px rgba(15, 27, 69, 0.15);
  --radius: 8px;
  --max-width: 1100px;
  --nav-height: 80px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--gold); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-hover); }

img { max-width: 100%; height: auto; }

h1, h2, h3, h4 { color: var(--navy); line-height: 1.3; }
h1 { font-size: 2.2rem; margin-bottom: 0.5em; }
h2 { font-size: 1.6rem; margin-bottom: 0.5em; }
h3 { font-size: 1.25rem; margin-bottom: 0.4em; }
h4 { font-size: 1.1rem; margin-bottom: 0.3em; }

p { margin-bottom: 1em; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 60px 0; }
.section--cream { background: var(--cream); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy a { color: var(--gold); }
.section--navy .btn { color: var(--white); }

/* --- Header & Navigation --- */
.header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(15, 27, 69, 0.12);
  border-bottom: 3px solid var(--gold);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.header__logo img {
  height: 60px;
  width: auto;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav a {
  color: var(--navy);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.nav a:hover, .nav a.active {
  color: var(--gold);
  background: rgba(15, 27, 69, 0.06);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1a2d5e 100%);
  color: var(--white);
  padding: 80px 0;
  text-align: center;
}

.hero h1 { color: var(--white); font-size: 2.6rem; margin-bottom: 0.3em; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.85); max-width: 640px; margin: 0 auto 1.5em; }

.hero__tagline {
  color: var(--gold);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5em;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  border: none;
  text-align: center;
  background: var(--navy);
  color: var(--white);
}

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

.btn:active { transform: scale(0.98); }

.btn--gold {
  background: var(--gold);
  color: var(--white);
}
.btn--gold:hover { background: var(--gold-hover); color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--gold);
}
.btn--outline:hover { background: var(--gold); color: var(--white); }

.section--navy .btn--outline,
.hero .btn--outline { color: var(--white); }

.btn--navy {
  background: var(--navy);
  color: var(--white);
}
.btn--navy:hover { background: #162352; color: var(--white); }

.btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card__label {
  display: inline-block;
  background: var(--cream);
  color: var(--gold-hover);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card__title { margin-bottom: 8px; }
.card__meta { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.card__body { font-size: 0.95rem; margin-bottom: 16px; }

/* --- Founder --- */
.founder {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

.founder__photo {
  width: 320px;
  flex-shrink: 0;
  border-radius: 8px;
}

.founder__bio h3 { margin-top: 0; }

/* --- Value Props --- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.value-item { text-align: center; padding: 20px; }
.value-item h3 { color: var(--gold); margin-bottom: 8px; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; margin: 1em 0; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

tr:nth-child(even) { background: var(--cream); }
tr:hover { background: #eee8dd; }

/* Schedule grid */
.schedule-table th { font-size: 0.8rem; white-space: nowrap; padding: 8px 10px; }
.schedule-table { table-layout: fixed; width: 100%; border: 2px solid var(--navy); }
.schedule-table td { font-size: 0.8rem; vertical-align: middle; padding: 8px 10px; }
.schedule-table a { font-weight: 700; color: var(--navy); }
.schedule-table a:hover { color: #000; }
.schedule-table .grade-label { font-size: 0.7rem; color: #666; font-weight: normal; }
.schedule-table td { color: #000; }
.schedule-table td:first-child strong { font-weight: 700; }
.schedule-table tbody tr { background: var(--cream) !important; }
.schedule-table .schedule-break { background: #fff !important; }
.schedule-table .schedule-break td { color: var(--gold); font-size: 0.8rem; text-align: left; padding: 6px 12px; font-weight: 500; font-style: italic; }
.schedule-table .schedule-break td:first-child { white-space: nowrap; font-style: normal; color: var(--navy); }
.schedule-table .schedule-break td:first-child strong { font-weight: 700; }
.schedule-table .schedule-allday { background: #fff !important; }
.schedule-table .schedule-allday td { font-style: italic; font-weight: 600; text-align: center; color: var(--gold); font-size: 0.8rem; padding: 6px 12px; }
.schedule-table .schedule-allday td:first-child { text-align: left; font-style: normal; white-space: nowrap; color: var(--navy); }
.schedule-table .schedule-allday td:first-child strong { font-weight: 700; }
.schedule-table .schedule-allday td[colspan] { border-left: none; }
.allday-label { display: flex; align-items: center; gap: 12px; }
.allday-label::before,
.allday-label::after { content: ''; flex: 1; height: 1px; background: var(--gold); opacity: 0.6; }


/* Standards tables — consistent column widths across multiple tables */
.standards-table { table-layout: fixed; width: 100%; }
.standards-table col.col-month { width: 25%; }
.standards-table col.col-class { width: 25%; }
.standards-table col.col-standards { width: 50%; }
.standards-table col.col-subject { width: 20%; }
.standards-table col.col-grade { width: 20%; }
.standards-table col.col-science { width: 40%; }
.standards-table col.col-history { width: 40%; }

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: var(--white);
  border: none;
  padding: 18px 24px;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.faq-question:hover { background: var(--cream); }

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--gold);
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 24px 18px;
}

/* --- Forms --- */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(206, 143, 44, 0.15);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.checkbox-group { display: flex; flex-direction: column; gap: 8px; }
.checkbox-group label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] { width: auto; accent-color: var(--gold); }

/* --- Survey Form --- */
.survey-form { max-width: 700px; margin: 0 auto; }

.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.form-section__heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 24px;
}

.checkbox-grid label {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-grid input[type="checkbox"] { width: auto; accent-color: var(--gold); }

.form-sub-field {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.form-sub-field label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-light);
}

@media (max-width: 480px) {
  .checkbox-grid { grid-template-columns: 1fr; }
}

/* --- Page Header (non-home pages) --- */
.page-header {
  background: var(--navy);
  color: var(--white);
  padding: 40px 0;
  text-align: center;
}

.page-header h1 { color: var(--white); margin-bottom: 0.2em; }
.page-header p { color: rgba(255,255,255,0.8); font-size: 1.1rem; }

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumb a { color: var(--gold); }
.breadcrumb span { margin: 0 6px; }

/* --- Footer --- */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}

.footer h4 {
  color: var(--gold);
  margin-bottom: 12px;
  font-size: 1rem;
}

.footer ul { list-style: none; }
.footer li { margin-bottom: 6px; }
.footer a { color: rgba(255,255,255,0.7); font-size: 0.9rem; }
.footer a:hover { color: var(--white); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
}

/* --- Contact List --- */
.contact-list { margin: 0; }
.contact-list dt {
  font-weight: 600;
  color: var(--navy);
  margin-top: 12px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.contact-list dt:first-child { margin-top: 0; }
.contact-list dd {
  margin: 4px 0 0 0;
  color: var(--text-light);
  font-style: italic;
}

/* --- Map with Overlay --- */
.map-container {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.map-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 69, 0.82);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.map-overlay p {
  color: var(--white);
  font-size: 1.15rem;
  max-width: 480px;
  margin-bottom: 0.5em;
}

.map-overlay p:last-child { margin-bottom: 0; }
.map-overlay a { color: var(--gold); font-weight: 600; }

/* --- Placeholder / Missing Content --- */
.placeholder {
  background: #FFF8E7;
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-navy { color: var(--navy); }
.mt-1 { margin-top: 1em; }
.mt-2 { margin-top: 2em; }
.mb-1 { margin-bottom: 1em; }
.mb-2 { margin-bottom: 2em; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  .header__logo img { height: 44px; }

  .nav-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    box-shadow: 0 8px 16px rgba(15, 27, 69, 0.12);
    border-top: 1px solid var(--border);
  }

  .nav.open { display: flex; }
  .nav a { padding: 12px 16px; width: 100%; color: var(--navy); }

  .hero { padding: 48px 0; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero__tagline { font-size: 1.1rem; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.35rem; }

  .section { padding: 40px 0; }
  .page-header { padding: 28px 0; }

  .card-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .founder { flex-direction: column; align-items: center; text-align: center; }
  .founder__photo { width: 220px; }

  .schedule-table { font-size: 0.8rem; table-layout: auto; width: auto; min-width: 640px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 1.5rem; }
  .btn { padding: 10px 20px; font-size: 0.9rem; }
  .footer__grid { grid-template-columns: 1fr; }
}
