:root {
  --red: #e30613;
  --dark-red: #a90009;
  --yellow: #ffd400;
  --dark: #17191d;
  --gray: #646a73;
  --light: #f2f3f5;
  --white: #ffffff;
  --border: #dfe2e7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--dark);
  background: var(--light);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}


/* HEADER */

.siteHeader {
  min-height: 84px;
  padding: 12px clamp(18px, 5vw, 75px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 50;
  background: var(--white);
  border-bottom: 4px solid var(--yellow);
}

.schoolBrand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--dark);
  text-decoration: none;
}

.schoolBrand img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.schoolBrand strong,
.schoolBrand small {
  display: block;
}

.schoolBrand strong {
  font-family: Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.85rem);
  text-transform: uppercase;
}

.schoolBrand small {
  margin-top: 4px;
  color: var(--gray);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mainNavigation {
  display: flex;
  align-items: center;
  gap: 21px;
}

.mainNavigation a {
  color: var(--dark);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.mainNavigation a:hover,
.mainNavigation a.active {
  color: var(--red);
}

.menuButton {
  width: 46px;
  height: 42px;
  display: none;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 7px;
  font-size: 1.4rem;
  cursor: pointer;
}


/* HERO */

.directoryHero {
  min-height: 235px;
  padding: 55px clamp(20px, 7vw, 110px);
  color: var(--white);
  background:
    linear-gradient(
      110deg,
      var(--dark-red),
      var(--red)
    );
}

.directoryHero > span {
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.directoryHero h1 {
  margin: 10px 0;
  font-family: Georgia, serif;
  font-size: clamp(2.7rem, 6vw, 4.7rem);
}

.directoryHero p {
  margin: 0;
  line-height: 1.6;
}


/* DIRECTORY */

.directorySection {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto 65px;
  transition:
    filter 0.25s ease,
    opacity 0.25s ease;
}

body.directoryLocked .directorySection {
  filter: grayscale(1) blur(4px);
  opacity: 0.4;
  pointer-events: none;
  user-select: none;
}

.sectionHeading {
  margin-bottom: 27px;
  text-align: center;
}

.sectionHeading > span {
  color: var(--red);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.sectionHeading h2 {
  margin: 9px 0;
  font-family: Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.sectionHeading p {
  margin: 0;
  color: var(--gray);
}

.directoryTools {
  padding: 17px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: 0 8px 22px rgba(20, 23, 28, 0.07);
}

.directoryTools input,
.directoryTools select {
  width: 100%;
  min-height: 51px;
  padding: 0 15px;
  background: var(--white);
  border: 1px solid #cbd0d7;
  border-radius: 8px;
  outline: none;
}

.directoryTools input:focus,
.directoryTools select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, 0.12);
}

.directoryStatus {
  min-height: 57px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.directoryStatus p {
  color: var(--gray);
  font-weight: 700;
}

.directoryStatus button {
  padding: 10px 15px;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

#signOutButton {
  background: var(--dark);
}


/* DOCUMENT OUTLINE */

.staffDocument {
  padding: clamp(22px, 5vw, 55px);
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 8px solid var(--red);
  border-radius: 5px;
  box-shadow: 0 18px 48px rgba(18, 22, 28, 0.13);
}

.documentHeader {
  padding-bottom: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-bottom: 3px solid var(--dark);
}

.documentHeader span {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.documentHeader h2 {
  margin: 7px 0 3px;
  font-family: Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.documentHeader p {
  margin: 0;
  color: var(--gray);
}

.documentHeader img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.departmentGroup {
  margin-top: 37px;
}

.departmentHeading {
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--white);
  background: var(--red);
  border-left: 8px solid var(--yellow);
}

.departmentHeading h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.22rem;
}

.departmentHeading span {
  font-size: 0.79rem;
  font-weight: 700;
}

.staffTableHeader,
.staffRow {
  display: grid;
  grid-template-columns:
    minmax(190px, 0.85fr)
    minmax(300px, 1.75fr);
  gap: 24px;
}

.staffTableHeader {
  padding: 12px 16px;
  color: #555c66;
  background: #eef0f2;
  border-bottom: 1px solid #d5d9de;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.staffRow {
  padding: 14px 16px;
  border-bottom: 1px solid #e1e4e8;
}

.staffRow:nth-child(even) {
  background: #fafafa;
}

.staffRow:hover {
  background: #fff7cb;
}

.staffRow span {
  color: #4e545d;
  line-height: 1.5;
}

.noResults {
  padding: 50px 20px;
  text-align: center;
}


/* LOGIN */

.loginGate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 20px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(15, 18, 22, 0.76);
  backdrop-filter: blur(5px);
}

.loginGate.isHidden {
  display: none;
}

.loginCard {
  width: min(100%, 430px);
  padding: 28px;
  text-align: center;
  background: var(--white);
  border-top: 7px solid var(--yellow);
  border-radius: 16px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.34);
}

.loginCard > img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.lockIcon {
  margin: 8px 0 6px;
  display: block;
}

.loginLabel {
  color: var(--red);
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loginCard h2 {
  margin: 7px 0;
  font-family: Georgia, serif;
  font-size: 1.9rem;
}

.loginCard > p {
  color: var(--gray);
  line-height: 1.5;
}

.loginFields {
  margin-top: 19px;
  text-align: left;
}

.loginFields label {
  margin: 12px 0 6px;
  display: block;
  font-weight: 700;
}

.loginFields input {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  border: 1px solid #cbd0d7;
  border-radius: 8px;
}

.loginFields button {
  width: 100%;
  min-height: 50px;
  margin-top: 15px;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.loginMessage {
  min-height: 19px;
  margin: 9px 0 0;
  color: var(--red);
  font-size: 0.87rem;
}

.portalLinks {
  margin: 17px 0 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.portalLinks a,
.returnLink {
  color: var(--dark-red);
  font-size: 0.79rem;
  font-weight: 700;
}

.temporaryLogin {
  margin-top: 18px;
  padding: 13px;
  color: #333333;
  background: #fff8d1;
  border: 1px dashed #d4aa00;
  border-radius: 8px;
  text-align: left;
}

.temporaryLogin strong {
  display: block;
  margin-bottom: 8px;
  color: var(--dark-red);
  text-align: center;
}

.temporaryLogin p {
  margin: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
}

.temporaryLogin code {
  color: var(--dark);
  font-weight: 800;
}


/* FOOTER */

.siteFooter {
  padding: 28px 6%;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--white);
  background: var(--dark);
  border-top: 4px solid var(--yellow);
}

.siteFooter a {
  color: var(--yellow);
}


/* MOBILE */

[hidden] {
  display: none !important;
}

@media (max-width: 850px) {

  .menuButton {
    display: block;
  }

  .mainNavigation {
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    padding: 18px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.17);
  }

  .mainNavigation.isOpen {
    display: flex;
  }

  .directoryTools {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 600px) {

  .schoolBrand small {
    display: none;
  }

  .staffDocument {
    padding: 19px 13px;
  }

  .documentHeader img {
    width: 56px;
    height: 56px;
  }

  .departmentHeading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .staffTableHeader {
    display: none;
  }

  .staffRow {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .directoryStatus,
  .siteFooter {
    align-items: flex-start;
    flex-direction: column;
  }

  .loginCard {
    padding: 24px 18px;
  }

}

@media print {

  .siteHeader,
  .directoryHero,
  .directoryTools,
  .directoryStatus,
  .loginGate,
  .siteFooter,
  .sectionHeading {
    display: none !important;
  }

  .directorySection {
    width: 100%;
    margin: 0;
  }

  .staffDocument {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

}
.staffTableHeader,
.staffRow {
  display: grid;
  grid-template-columns:
    minmax(150px, 0.8fr)
    minmax(230px, 1.4fr)
    minmax(230px, 1fr);
  gap: 20px;
  align-items: center;
}

.staffContact {
  min-width: 0;
}

.staffContact a {
  color: #c90012;
  font-size: 0.92rem;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.staffContact a:hover,
.staffContact a:focus {
  color: #85000c;
  text-decoration: underline;
}

@media (max-width: 760px) {

  .staffTableHeader {
    display: none;
  }

  .staffRow {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .staffContact a {
    display: inline-block;
    font-size: 0.88rem;
  }

}
/* =====================================================
   RESPONSIVE STAFF DIRECTORY WITH CONTACT INFORMATION
===================================================== */

.staffTableHeader,
.staffRow {
  display: grid;
  grid-template-columns:
    minmax(140px, 0.8fr)
    minmax(220px, 1.3fr)
    minmax(200px, 1fr);
  gap: 18px;
  align-items: center;
}

.staffRow > * {
  min-width: 0;
}

.staffContact {
  display: block;
  min-width: 0;
}

.staffContact a {
  display: inline-block;
  max-width: 100%;
  color: #c90012;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-decoration: none;
}

.staffContact a:hover,
.staffContact a:focus {
  color: #85000c;
  text-decoration: underline;
}


/* =====================================================
   TABLET VIEW
===================================================== */

@media (max-width: 900px) {

  .directorySection {
    padding-left: 18px;
    padding-right: 18px;
  }

  .staffDocument {
    width: 100%;
    overflow: hidden;
  }

  .staffTableHeader,
  .staffRow {
    grid-template-columns:
      minmax(120px, 0.75fr)
      minmax(180px, 1.1fr)
      minmax(180px, 1fr);
    gap: 14px;
  }

  .staffContact a {
    font-size: 0.85rem;
  }

}


/* =====================================================
   MOBILE VIEW
===================================================== */

@media (max-width: 680px) {

  .directoryHero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .directoryHero h1 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .directorySection {
    padding: 35px 14px;
  }

  .sectionHeading {
    text-align: center;
  }

  .directoryTools {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .directoryTools input,
  .directoryTools select {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
  }

  .directoryStatus {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .directoryStatus > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .directoryStatus button {
    width: 100%;
    min-height: 46px;
  }

  .staffDocument {
    border-radius: 14px;
  }

  .documentHeader {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 16px;
  }

  .documentHeader > div {
    flex: 1;
    min-width: 0;
  }

  .documentHeader img {
    width: 58px;
    height: auto;
    flex-shrink: 0;
  }

  .principalHeading {
    margin-top: 14px;
  }

  .departmentHeading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 16px;
  }

  .departmentHeading h3 {
    margin: 0;
    font-size: 1.1rem;
  }

  .staffTableHeader {
    display: none;
  }

  .staffRow {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    padding: 16px;
  }

  .staffRow strong {
    color: #111;
    font-size: 1rem;
  }

  .staffRow > span:not(.staffContact) {
    color: #555;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .staffContact {
    width: 100%;
    padding-top: 8px;
    border-top: 1px solid #eeeeee;
  }

  .staffContact a {
    width: 100%;
    font-size: 0.88rem;
  }

}


/* =====================================================
   SMALL MOBILE VIEW
===================================================== */

@media (max-width: 420px) {

  .directorySection {
    padding-left: 10px;
    padding-right: 10px;
  }

  .directoryStatus > div {
    grid-template-columns: 1fr;
  }

  .documentHeader {
    padding: 17px 13px;
  }

  .documentHeader h2 {
    font-size: 1.35rem;
  }

  .documentHeader img {
    width: 50px;
  }

  .staffRow {
    padding: 14px 13px;
  }

  .loginCard {
    width: calc(100% - 24px);
    max-height: calc(100dvh - 24px);
    padding: 22px 16px;
    overflow-y: auto;
  }

  .portalLinks {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

}