:root {
  --red: #e30613;
  --deep-red: #b8000a;
  --gold: #ffd400;
  --cream: #fffdf2;
  --ink: #221818;
  --muted: #706365;
  --border: rgba(227, 6, 19, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);

  background:
    linear-gradient(
      rgba(27, 9, 10, 0.78),
      rgba(27, 9, 10, 0.78)
    ),
    url("../images/school-background.jpg")
    center / cover fixed;

  font-family: "DM Sans", Arial, sans-serif;
}

button,
a {
  font: inherit;
}

/* PAGE OVERLAY */

.page-overlay {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(28, 9, 10, 0.3);
  backdrop-filter: blur(7px);
}

/* MAIN POPUP */

.contact-modal {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;

  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 26px;

  background: var(--cream);

  box-shadow:
    0 32px 100px rgba(0, 0, 0, 0.46);

  animation: modalEnter 0.38s ease-out both;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* CLOSE BUTTON */

.close-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;

  width: 44px;
  height: 44px;

  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;

  color: #ffffff;
  background: rgba(0, 0, 0, 0.22);

  font-size: 29px;
  line-height: 1;

  cursor: pointer;

  transition:
    transform 0.2s,
    background 0.2s;
}

.close-button:hover,
.close-button:focus-visible {
  background: rgba(0, 0, 0, 0.4);
  transform: rotate(90deg);

  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* CONTACT HEADER */

.contact-header {
  position: relative;
  overflow: hidden;

  padding:
    42px
    clamp(22px, 6vw, 68px)
    40px;

  color: #ffffff;

  background:
    radial-gradient(
      circle at 92% 5%,
      rgba(244, 196, 48, 0.34),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      var(--red),
      var(--deep-red)
    );
}

.contact-header::after {
  content: "";

  position: absolute;
  right: -90px;
  bottom: -125px;

  width: 310px;
  height: 310px;

  border: 42px solid rgba(244, 196, 48, 0.08);
  border-radius: 50%;

  pointer-events: none;
}

/* SCHOOL BRAND */

.school-brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.school-crest {
  width: 76px;
  height: 76px;
  object-fit: contain;

  filter:
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.26));
}

.eyebrow {
  margin: 0 0 5px;

  color: var(--gold);

  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-header h1,
.chapters h2,
.chapter-card h3 {
  font-family:
    "Barlow Condensed",
    Arial,
    sans-serif;
}

.contact-header h1 {
  margin: 0;

  font-size:
    clamp(2.5rem, 7vw, 4.7rem);

  line-height: 0.9;
  text-transform: uppercase;
}

.intro {
  max-width: 670px;
  margin: 20px 0 28px;

  color: rgba(255, 255, 255, 0.82);

  line-height: 1.65;
}

/* MAIN CONTACT CARDS */

.contact-grid {
  position: relative;
  z-index: 1;

  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 15px;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 15px;

  min-height: 112px;
  padding: 18px;

  border:
    1px solid rgba(255, 255, 255, 0.2);

  border-radius: 17px;

  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);

  text-decoration: none;

  transition:
    transform 0.2s,
    background 0.2s;
}

.contact-card:hover {
  background: rgba(255, 255, 255, 0.17);
  transform: translateY(-3px);
}

.contact-icon {
  flex: 0 0 48px;

  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  border-radius: 14px;

  color: var(--deep-red);
  background: var(--gold);
}

.contact-icon svg {
  width: 24px;
  fill: currentColor;
}

.contact-card small {
  display: block;
  margin-bottom: 4px;

  color: rgba(255, 255, 255, 0.66);

  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-card strong {
  display: block;
  line-height: 1.35;
}

.contact-card em {
  display: block;
  margin-top: 7px;

  color: var(--gold);

  font-size: 0.8rem;
  font-style: normal;
  font-weight: 700;
}

/* CHAPTER SECTION */

.chapters {
  padding:
    34px
    clamp(22px, 6vw, 68px)
    48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 20px;
}

.eyebrow.dark {
  color: var(--red);
}

.section-heading h2 {
  margin: 0;

  color: var(--deep-red);

  font-size:
    clamp(2rem, 4vw, 3rem);

  line-height: 1;
  text-transform: uppercase;
}

.section-heading > p {
  max-width: 400px;
  margin: 0;

  color: var(--muted);

  font-size: 0.92rem;
  line-height: 1.5;
}

.chapter-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 16px;
}

.chapter-card {
  position: relative;

  min-height: 210px;
  overflow: hidden;

  padding: 26px;

  border:
    1px solid rgba(123, 17, 19, 0.14);

  border-radius: 19px;

  background: #ffffff;

  box-shadow:
    0 13px 32px rgba(78, 8, 10, 0.07);
}

.chapter-number {
  position: absolute;
  top: 14px;
  right: 20px;

  color: rgba(123, 17, 19, 0.08);

  font-family:
    "Barlow Condensed",
    sans-serif;

  font-size: 4.7rem;
  font-weight: 800;
  line-height: 1;
}

.status {
  position: relative;
  display: inline-block;

  margin-bottom: 25px;
  padding: 7px 11px;

  border-radius: 999px;

  color: var(--red);
  background: rgba(244, 196, 48, 0.28);

  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.chapter-card h3 {
  position: relative;

  max-width: 85%;
  margin: 0 0 9px;

  color: var(--deep-red);

  font-size: 1.55rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.chapter-card p {
  position: relative;
  margin: 0;

  color: var(--muted);

  font-size: 0.9rem;
  line-height: 1.6;
}

/* MOBILE VIEW */

@media (max-width: 680px) {

  body {
 background: var(--red);
  }

  .page-overlay {
    display: block;
    padding: 0;
  }

  .contact-modal {
    width: 100%;
    min-height: 100vh;
    max-height: none;

    border: 0;
    border-radius: 0;
  }

  .contact-header {
    padding: 55px 19px 28px;
  }

  .school-brand {
    align-items: flex-start;
    padding-right: 44px;
  }

  .school-crest {
    width: 61px;
    height: 61px;
  }

  .contact-grid,
  .chapter-grid {
    grid-template-columns: 1fr;
  }

  .contact-card {
    min-height: 100px;
  }

  .chapters {
    padding: 28px 19px 38px;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin-top: 11px;
  }
}

/* REDUCE ANIMATION */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
/* =====================================================
   EMAIL AND DIRECTORY COLUMN
===================================================== */

.email-directory-column {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.email-directory-column .contact-card {
  width: 100%;
}


/* =====================================================
   SMALL DIRECTORY BUTTON
===================================================== */

.officials-small-button {
  width: 72%;
  min-height: 48px;
  align-self: flex-end;

  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;

  padding: 5px 9px 5px 5px;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.13);
  color: #fff;

  font-family: "DM Sans", sans-serif;
  text-align: left;
  cursor: pointer;

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.officials-small-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffd400;
  box-shadow: 0 8px 18px rgba(70, 0, 0, 0.22);
}

.officials-small-button:focus-visible {
  outline: 3px solid #ffd400;
  outline-offset: 3px;
}

.officials-small-button img {
  width: 52px;
  height: 40px;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.officials-small-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.officials-small-text small {
  color: #ffd400;
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.officials-small-text strong {
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.officials-small-text em {
  color: rgba(255, 255, 255, 0.78);
  font-size: 8px;
  font-style: normal;
}

.officials-small-arrow {
  width: 25px;
  height: 25px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #ffd400;
  color: #9f0610;

  font-size: 15px;
  font-weight: 800;
}


/* =====================================================
   SCHOOL OFFICIALS PDF MODAL
===================================================== */

.officials-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 18px;

  background: rgba(25, 12, 12, 0.82);
  backdrop-filter: blur(6px);
}

.officials-modal.is-open {
  display: flex;
}

.officials-modal-window {
  width: min(96%, 800px);
  height: min(94vh, 920px);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  border: 4px solid #ffd400;
  border-radius: 20px;

  background: #fff;

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.5);
}

.officials-modal-header {
  min-height: 76px;

  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 13px;

  padding: 10px 14px;

  background:
    linear-gradient(135deg, #b8000c, #e30613);

  color: #fff;
}

.officials-modal-crest {
  width: 52px;
  height: 52px;

  display: block;
  object-fit: contain;

  padding: 4px;
  border-radius: 9px;
  background: #ffd400;
}

.officials-modal-header h2 {
  margin: 0;

  font-family: "Barlow Condensed", sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  line-height: 1;
  text-transform: uppercase;
}

.full-directory-link {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.full-directory-link:hover {
  color: #ffd400;
}

.officials-modal-close {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.12);
  color: #fff;

  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.officials-modal-close:hover {
  background: #ffd400;
  color: #9f0610;
}

.officials-pdf-viewer {
  min-height: 0;
  flex: 1;

  padding: 8px;
  background: #ececec;
}

.officials-pdf-viewer iframe {
  width: 100%;
  height: 100%;

  display: block;
  border: 0;
  border-radius: 8px;

  background: #fff;
}

body.officials-modal-open {
  overflow: hidden;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {
  .email-directory-column {
    width: 100%;
  }

  .officials-small-button {
    width: 88%;
    align-self: center;
  }

  .officials-modal {
    padding: 7px;
  }

  .officials-modal-window {
    width: 100%;
    height: 96vh;

    border-width: 3px;
    border-radius: 15px;
  }

  .officials-modal-header {
    min-height: 66px;

    grid-template-columns: 42px minmax(0, 1fr) 36px;
    gap: 9px;

    padding: 8px 10px;
  }

  .officials-modal-crest {
    width: 42px;
    height: 42px;
  }

  .officials-modal-header h2 {
    font-size: 1.05rem;
  }

  .full-directory-link {
    grid-column: 1 / -1;
    grid-row: 2;

    padding-top: 3px;
    text-align: center;
  }

  .officials-modal-close {
    width: 35px;
    height: 35px;
  }

  .officials-pdf-viewer {
    padding: 4px;
  }
}
.contact-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
}

.directory-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border: 2px solid #ffd400;
  border-radius: 10px;
  color: #8b0000;
  background: #ffd400;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: 0.2s ease;
}

.directory-button:hover,
.directory-button:focus-visible {
  color: #ffd400;
  background: #8b0000;
  transform: translateY(-2px);
}

@media (max-width: 600px) {
  .contact-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .directory-button {
    width: 100%;
  }
}
.directory-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 175px;
  min-height: 54px;
  padding: 14px 28px;
  border: 2px solid #ffd400;
  border-radius: 10px;
  color: #8b0000;
  background: #ffd400;
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.directory-button:hover,
.directory-button:focus-visible {
  color: #ffd400;
  background: #8b0000;
  transform: translateY(-2px);
}