:root {
  --blue-700: #2e63bb;
  --blue-800: #24539f;
  --blue-900: #163865;
  --text-900: #142238;
  --text-700: #4b5b70;
  --line-200: #d9e1ef;
  --line-300: #c8d0dc;
  --surface: #ffffff;
  --surface-soft: #f1f3f6;
  --surface-page: #f5f8fd;
  --shadow-soft: 0 14px 35px rgba(17, 41, 82, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans", "Noto Sans Devanagari", sans-serif;
  color: var(--text-900);
  background: var(--surface-page);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: min(1680px, calc(100% - 160px));
  margin: 0 auto;
}

/* Preserve manual line breaks entered in backend across pages */
.page-body p {
  white-space: pre-line;
}

.site-header-shell {
  background: #ffffff;
  border-bottom: 1px solid var(--line-200);
}

.masthead {
  display: grid;
  grid-template-columns: minmax(92px, 112px) minmax(0, 1fr) minmax(260px, 330px);
  align-items: center;
  gap: 1.15rem;
  padding: 0.7rem 0 0.62rem;
}

.masthead-center {
  min-width: 0;
}

.masthead-side {
  display: grid;
  width: 100%;
  align-content: center;
  justify-items: end;
  gap: 0.28rem;
  text-align: right;
}

.site-logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
}

.site-logo-right {
  margin-bottom: 0.12rem;
}

.office-time-card {
  display: grid;
  justify-items: end;
  gap: 0.16rem;
  text-align: right;
  color: #0f1f35;
  max-width: 100%;
}

.office-time-label {
  display: block;
  color: var(--blue-700);
  font-size: 0.78rem;
  line-height: 1.15;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.office-time-value {
  display: block;
  color: #263750;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 600;
  max-width: 24rem;
}

.site-logo-mobile {
  display: none;
}

.school-motto {
  margin: 0 0 0.42rem;
  font-size: clamp(0.9rem, 1vw, 1.1rem);
  color: #0f1f35;
}

.school-title {
  margin: 0;
  font-size: clamp(2rem, 2.3vw, 3.05rem);
  line-height: 1.06;
  color: var(--blue-700);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.school-location {
  margin: 0.46rem 0 0;
  font-size: clamp(0.95rem, 1vw, 1.15rem);
  color: #354152;
}

.current-date {
  display: block;
  max-width: 24rem;
  font-size: 0.82rem;
  color: #0f1f35;
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  justify-self: end;
}

.utility-strip {
  background: var(--surface-soft);
  border-top: 1px solid #e4e8ef;
  border-bottom: 1px solid var(--line-200);
}

.utility-shell {
  display: flex;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  align-items: center;
  padding: 0.58rem 0;
}

.utility-links,
.utility-meta,
.social-strip,
.language-switcher {
  display: flex;
  align-items: center;
}

.utility-links,
.utility-meta {
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.utility-link,
.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #24374e;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.utility-link-button {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.utility-links .utility-link:not(:last-child) {
  padding-right: 1.2rem;
  border-right: 1px solid var(--line-300);
}

.utility-link:hover,
.contact-item:hover,
.utility-link.active {
  color: var(--blue-700);
}

.utility-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  color: var(--blue-700);
  flex-shrink: 0;
}

.utility-icon svg,
.social-icon svg,
.nav-home-badge svg,
.nav-toggle svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.nav-home-badge svg,
.nav-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

.email-item {
  padding-right: 1rem;
  border-right: 1px solid var(--line-300);
}

.language-switcher {
  gap: 0.35rem;
  font-weight: 700;
  font-size: 0.92rem;
}

.lang-chip {
  border: none;
  background: transparent;
  color: #123d83;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  opacity: 0.7;
}

.lang-chip.active {
  opacity: 1;
}

.lang-separator {
  color: #59667a;
}

.social-strip {
  gap: 0.72rem;
}

.social-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.social-strip .social-icon {
  flex-shrink: 0;
}

.social-youtube {
  color: #db2d27;
}

.social-facebook {
  color: #2b67d0;
}

.social-location {
  color: #1f9a52;
}

.social-mail {
  color: #5b6574;
}

.primary-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--blue-700);
  box-shadow: 0 8px 18px rgba(18, 49, 100, 0.08);
}

.nav-shell {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: stretch;
  gap: 0;
  min-height: 42px;
}

.nav-tools {
  display: none;
  align-items: center;
  justify-content: center;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.nav-home-badge,
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #ffffff;
  background: transparent;
  border: none;
}

.nav-home-badge {
  border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.main-nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(1.5rem, 2vw, 3rem);
  min-width: 0;
}

.nav-item,
.mobile-nav-link {
  color: #ffffff;
  text-decoration: none;
}

.nav-item {
  position: relative;
  font-size: clamp(0.96rem, 1vw, 1.06rem);
  font-weight: 600;
  padding: 0.75rem 0 0.76rem;
  white-space: nowrap;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #ffffff;
  transform: translateX(-50%);
  transition: width 0.2s ease;
}

.nav-item.active,
.nav-item:hover,
.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: #eef4ff;
}

.nav-item.active::after,
.nav-item:hover::after {
  width: calc(100% - 0.4rem);
}

.nav-toggle {
  display: none;
  cursor: pointer;
}

.mobile-nav-panel {
  display: none;
}

.page-body {
  min-height: 70vh;
  padding: 2rem 0 3rem;
  animation: page-content-appear 120ms ease-out;
}

@keyframes page-content-appear {
  from {
    opacity: 0.985;
    transform: translateY(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-body {
    animation: none;
  }
}

.page-shell {
  display: grid;
  gap: 1.2rem;
}

.page-shell-narrow {
  max-width: 720px;
  margin: 0 auto;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line-200);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
}

.card-spacious {
  padding: 2rem;
}

.page-kicker {
  display: inline-block;
  background: #e9f0fc;
  color: var(--blue-700);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-title {
  margin: 1rem 0 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.1;
  color: var(--text-900);
}

.page-description,
.page-copy {
  margin: 0.9rem 0 0;
  color: var(--text-700);
  line-height: 1.75;
  font-size: 1rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.4rem;
}

.article-stack {
  display: grid;
  gap: 1rem;
}

.article-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: #1a3154;
}

.article-card p {
  margin: 0.8rem 0 0;
  color: var(--text-700);
  line-height: 1.7;
}

.empty-card {
  text-align: center;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.metric-card {
  border: 1px solid var(--line-200);
  border-radius: 18px;
  background: #f8fbff;
  padding: 1.2rem;
}

.metric-label {
  display: block;
  color: #516279;
  font-size: 0.9rem;
}

.metric-value {
  display: block;
  margin-top: 0.55rem;
  font-size: 2rem;
  color: var(--blue-700);
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.field-label {
  color: #40526b;
  font-size: 0.95rem;
  font-weight: 600;
}

.input {
  width: 100%;
  border: 1px solid var(--line-300);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--text-900);
  background: #ffffff;
}

.input:focus {
  outline: 2px solid rgba(46, 99, 187, 0.16);
  border-color: var(--blue-700);
}

.btn {
  border: none;
  background: var(--blue-700);
  color: #ffffff;
  padding: 0.85rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 700;
}

.btn:hover {
  background: var(--blue-800);
}

.btn-wide {
  width: 100%;
}

.message-error {
  margin: 0;
  color: #b42318;
  font-weight: 600;
}

.site-footer {
  background: var(--blue-900);
  color: #ffffff;
}

.footer-inner {
  padding: 0.84rem 0;
  text-align: center;
  font-size: 0.92rem;
}

.home-footer {
  position: relative;
  margin-top: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(49, 118, 239, 0.55), transparent 34rem),
    linear-gradient(180deg, #003b9b 0%, #00398f 46%, #00327d 100%);
  color: #ffffff;
  overflow: hidden;
}

.home-footer-wave {
  height: clamp(1.4rem, 4vw, 3.1rem);
  background: var(--surface-page);
  clip-path: ellipse(74% 64% at 50% 0%);
}

.home-footer-grid {
  display: grid;
  grid-template-columns: 1.03fr 1.22fr 1.02fr 0.58fr 0.92fr;
  gap: clamp(0.9rem, 2vw, 2.1rem);
  padding: 1.15rem 0 1.05rem;
}

.footer-column {
  min-width: 0;
}

.footer-about {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-content: start;
  column-gap: 0.86rem;
}

.footer-about p {
  grid-column: 2;
  white-space: pre-line;
}

.footer-section-icon,
.footer-mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  background: linear-gradient(145deg, #3d8cff, #1e68d9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 7px 18px rgba(0, 22, 78, 0.25);
}

.footer-section-icon {
  grid-row: 1 / span 2;
  width: 2.95rem;
  height: 2.95rem;
  border-radius: 50%;
}

.footer-section-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.footer-column h3 {
  margin: 0 0 0.65rem;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 800;
}

.footer-column p,
.footer-column li,
.footer-column a {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  line-height: 1.48;
  text-decoration: none;
}

.footer-column p {
  margin: 0;
}

.footer-links,
.footer-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.46rem;
}

.footer-link-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
}

.footer-link-columns .footer-links {
  min-height: 8rem;
  padding: 0.76rem 0.88rem;
  border-radius: 0.52rem;
  background: rgba(19, 92, 197, 0.52);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.footer-contact-icons li {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.footer-mini-icon {
  width: 1.58rem;
  height: 1.58rem;
  border-radius: 50%;
}

.footer-mini-icon svg {
  width: 0.78rem;
  height: 0.78rem;
  fill: currentColor;
}

.footer-links a:hover,
.footer-contact-list a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.82rem;
  align-items: center;
}

.footer-socials .social-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  flex-shrink: 0;
}

.footer-socials .social-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.footer-socials .social-youtube {
  background: #ff2c21;
}

.footer-socials .social-facebook {
  background: #2869d6;
}

.footer-socials .social-location {
  background: #19ab5b;
}

.footer-socials .social-mail {
  background: #777d86;
}

.footer-school-time {
  position: relative;
  padding-left: 2.2rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.footer-school-time::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: #2d73db;
  box-shadow: inset 0 0 0 0.34rem rgba(255, 255, 255, 0.08);
}

.footer-school-time::after {
  content: "";
  position: absolute;
  left: 0.49rem;
  top: 0.49rem;
  width: 0.48rem;
  height: 0.48rem;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
  opacity: 0.94;
}

.footer-school-days {
  margin-top: 0.1rem;
  padding-left: 2.2rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
}

.home-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
  padding: 0.62rem 0 0.74rem;
  background: rgba(0, 35, 94, 0.28);
}

.home-footer-bottom .container {
  position: relative;
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: 3.6rem;
}

.footer-bottom-logo {
  position: absolute;
  left: 0;
  width: 2.36rem;
  height: 2.36rem;
  object-fit: contain;
}

.home-footer-bottom p {
  max-width: 28rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.84rem;
  line-height: 1.32;
}

.useful-links-modal,
.social-sharing-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
}

.useful-links-modal.is-open,
.social-sharing-modal.is-open {
  display: flex;
}

.useful-links-backdrop,
.social-sharing-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 16, 30, 0.58);
  backdrop-filter: blur(7px);
}

.useful-links-dialog,
.social-sharing-dialog {
  position: relative;
  width: min(100%, 1060px);
  max-height: min(88vh, 760px);
  overflow: auto;
  background: #f5f6f9;
  border: 1px solid rgba(210, 218, 230, 0.95);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(17, 41, 82, 0.32);
  padding: clamp(2rem, 4vw, 3.2rem);
}

.useful-links-close,
.social-sharing-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.6rem;
  height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d9e1ef;
  border-radius: 999px;
  background: #ffffff;
  color: #526177;
  cursor: pointer;
}

.useful-links-close:hover,
.social-sharing-close:hover {
  color: var(--blue-700);
  border-color: var(--blue-700);
}

.useful-links-close svg,
.social-sharing-close svg,
.useful-link-icon svg,
.useful-link-external svg,
.social-update-placeholder svg,
.social-update-link svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.useful-links-header,
.social-sharing-header {
  text-align: center;
  margin: 0 auto clamp(1.8rem, 4vw, 3rem);
  padding-inline: 2rem;
}

.useful-links-header h2,
.social-sharing-header h2 {
  margin: 0;
  color: #101a2f;
  font-size: clamp(2.35rem, 5vw, 4.6rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.useful-links-header h2 span,
.social-sharing-header h2 span {
  color: var(--blue-700);
}

.useful-links-header p,
.social-sharing-header p {
  margin: 1.35rem 0 0;
  color: #425269;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
}

.useful-links-grid,
.social-sharing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.05rem 1.2rem;
}

.useful-link-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 5.6rem;
  padding: 1.1rem 1.5rem;
  background: #ffffff;
  border: 1px solid #dfe4ed;
  border-radius: 10px;
  color: #0d1728;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(17, 41, 82, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.useful-link-card:hover {
  border-color: rgba(46, 99, 187, 0.45);
  box-shadow: 0 12px 26px rgba(17, 41, 82, 0.12);
  transform: translateY(-2px);
}

.useful-link-icon {
  width: 3.35rem;
  height: 3.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f2f6;
  border-radius: 9px;
  color: #344155;
}

.useful-link-icon svg {
  width: 1.75rem;
  height: 1.75rem;
}

.useful-link-body {
  display: grid;
  min-width: 0;
}

.useful-link-body strong {
  font-size: 1.25rem;
  line-height: 1.25;
  color: #050b18;
}

.useful-link-body span {
  margin-top: 0.25rem;
  color: #56667b;
  font-size: 1.02rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.useful-link-external {
  color: #95a0b1;
}

.useful-links-empty {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: #56667b;
  background: #ffffff;
  border: 1px dashed #cbd4e2;
  border-radius: 10px;
  padding: 1.4rem;
}

.social-update-card {
  display: grid;
  grid-template-columns: 10.4rem minmax(0, 1fr);
  gap: 1.1rem;
  min-height: 8.6rem;
  padding: 1rem;
  background: #ffffff;
  border: 1px solid #dfe4ed;
  border-radius: 14px;
  color: #0d1728;
  box-shadow: 0 2px 8px rgba(17, 41, 82, 0.06);
}

.social-update-media {
  position: relative;
  min-height: 7rem;
  overflow: hidden;
  border-radius: 12px;
  background: #2178f4;
  color: #ffffff;
}

.social-update-media img {
  width: 100%;
  height: 100%;
  min-height: 7rem;
  object-fit: cover;
}

.social-update-youtube {
  background: #111827;
}

.social-update-facebook {
  background: #2178f4;
}

.social-update-instagram {
  background: linear-gradient(135deg, #7c3aed, #e1306c 55%, #f59e0b);
}

.social-update-website {
  background: #315376;
}

.social-update-placeholder {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.86;
}

.social-update-placeholder svg {
  width: 3.1rem;
  height: 3.1rem;
}

.social-platform-badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #ffffff;
  padding: 0.24rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.social-update-body {
  display: grid;
  align-content: center;
  min-width: 0;
}

.social-update-meta {
  margin: 0 0 0.42rem;
  color: #56667b;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.social-update-body h3 {
  margin: 0;
  color: #050b18;
  font-size: clamp(1.08rem, 1.6vw, 1.38rem);
  line-height: 1.25;
}

.social-update-copy {
  margin: 0.45rem 0 0;
  color: #425269;
  font-size: 0.95rem;
  line-height: 1.55;
}

.social-update-link {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  width: fit-content;
  margin-top: 0.72rem;
  color: var(--blue-700);
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
}

.social-update-link:hover {
  color: var(--blue-800);
}

.social-update-link svg {
  width: 1rem;
  height: 1rem;
}

.social-sharing-empty {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  color: #56667b;
  background: #ffffff;
  border: 1px dashed #cbd4e2;
  border-radius: 10px;
  padding: 1.4rem;
}

@media (max-width: 1280px) {
  .container {
    width: min(1220px, calc(100% - 36px));
  }

  .masthead {
    grid-template-columns: minmax(84px, 96px) minmax(0, 1fr) minmax(230px, 285px);
    gap: 1rem;
  }

  .site-logo {
    width: 78px;
    height: 78px;
  }

  .school-motto {
    font-size: clamp(0.85rem, 1vw, 0.95rem);
  }

  .school-title {
    font-size: clamp(1.82rem, 2.1vw, 2.72rem);
  }

  .school-location {
    font-size: clamp(0.88rem, 1vw, 1rem);
  }

  .office-time-label {
    font-size: 0.74rem;
  }

  .office-time-value,
  .current-date {
    font-size: 0.74rem;
  }

  .utility-link,
  .contact-item,
  .language-switcher {
    font-size: 0.73rem;
    font-weight: 700;
  }

  .nav-item {
    font-size: clamp(0.9rem, 0.96vw, 1rem);
  }
}

@media (max-width: 1200px) {
  .home-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header-shell {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .masthead {
    order: 1;
  }

  .utility-strip {
    order: 2;
    background: #fbfcff;
    border-top: 0;
  }

  .primary-nav {
    order: 3;
  }

  .masthead {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 0.85rem;
  }

  .site-logo-left,
  .site-logo-right {
    display: none;
  }

  .current-date {
    max-width: 100%;
    text-align: center;
    justify-self: center;
  }

  .office-time-card {
    justify-items: center;
    text-align: center;
  }

  .site-logo-mobile {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto 0.75rem;
  }

  .utility-shell,
  .utility-meta {
    justify-content: center;
  }

  .utility-shell {
    flex-direction: column;
    align-items: center;
  }

  .utility-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    align-items: center;
    width: min(100%, 34rem);
    gap: 0.65rem 0.95rem;
  }

  .utility-links .utility-link:not(:last-child) {
    padding-right: 0;
    border-right: 0;
  }

  .utility-link {
    justify-content: center;
    min-width: 0;
    gap: 0.42rem;
    line-height: 1.25;
  }

  .utility-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "phone"
      "email"
      "lang"
      "social";
    align-items: center;
    justify-items: center;
    justify-content: center;
    gap: 0.78rem 0.9rem;
    width: min(100%, 28rem);
    margin: 0 auto;
  }

  .utility-meta > .contact-item:first-child {
    grid-area: phone;
  }

  .utility-meta > .email-item {
    grid-area: email;
    min-width: 0;
  }

  .utility-meta > .language-switcher {
    grid-area: lang;
  }

  .utility-meta > .social-strip {
    grid-area: social;
    justify-self: center;
  }

  .contact-item {
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    text-align: center;
  }

  .email-item {
    border-right: none;
    padding-right: 0;
  }
}

@media (max-width: 640px) {
  .main-nav-links {
    display: none;
  }

  .primary-nav .container {
    width: 100%;
  }

  .nav-shell {
    position: relative;
    display: block;
    min-height: 5.2rem;
    padding-inline: 0;
  }

  .nav-home-badge,
  .nav-tools {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5.2rem;
  }

  .nav-home-badge {
    left: 0;
  }

  .nav-tools {
    display: flex;
    right: 0;
    justify-content: flex-end;
    border-left: 0;
  }

  .nav-toggle {
    display: inline-flex;
    width: 100%;
    height: 100%;
    margin-left: auto;
  }

  .mobile-nav-panel {
    background: var(--blue-700);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0 1rem;
  }

  .mobile-nav-panel.open {
    display: grid;
  }

  .mobile-nav-link {
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 1rem;
    font-weight: 600;
  }

  .mobile-nav-link:last-child {
    border-bottom: none;
  }

  .home-footer-grid {
    grid-template-columns: 1fr;
  }

  .useful-links-grid,
  .social-sharing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header-shell {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .masthead {
    order: 1;
  }

  .utility-strip {
    order: 2;
  }

  .primary-nav {
    order: 3;
  }

  .container {
    width: min(100%, calc(100% - 1rem));
  }

  .masthead {
    gap: 0.42rem;
    padding: 0.85rem 0 0.9rem;
  }

  .masthead-center,
  .masthead-side {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    justify-items: center;
    text-align: center;
  }

  .current-date,
  .office-time-card,
  .office-time-value {
    width: 100%;
    max-width: 100%;
    justify-self: center;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .site-logo-mobile {
    width: 10rem;
    height: 10rem;
    margin-bottom: 0.45rem;
  }

  .school-motto {
    margin-bottom: 0.52rem;
    font-size: 1rem;
    line-height: 1.25;
  }

  .school-title {
    width: 100%;
    max-width: 20ch;
    margin-inline: auto;
    font-size: 1.56rem;
    line-height: 1.16;
    letter-spacing: 0;
    overflow-wrap: anywhere;
  }

  .school-location {
    width: 100%;
    max-width: 32ch;
    margin-inline: auto;
    margin-top: 0.72rem;
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .utility-strip {
    background: #fbfcff;
    border-top: 0;
  }

  .utility-shell {
    gap: 0.82rem;
    padding: 0.92rem 0 0.88rem;
  }

  .utility-links {
    width: 100%;
    gap: 0.65rem 0.95rem;
  }

  .utility-link {
    font-size: 0.95rem;
    font-weight: 700;
  }

  .utility-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "phone"
      "email"
      "lang"
      "social";
    align-items: center;
    justify-items: center;
    justify-content: center;
    gap: 0.78rem 0.9rem;
    width: min(100%, 28rem);
    margin: 0 auto;
  }

  .utility-meta > .contact-item:first-child {
    grid-area: phone;
  }

  .utility-meta > .email-item {
    grid-area: email;
    min-width: 0;
  }

  .utility-meta > .language-switcher {
    grid-area: lang;
  }

  .utility-meta > .social-strip {
    grid-area: social;
    justify-self: center;
  }

  .contact-item {
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    font-size: 0.94rem;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  .language-switcher {
    font-size: 1.06rem;
    line-height: 1.1;
  }

  .utility-icon {
    width: 0.95rem;
    height: 0.95rem;
  }

  .email-item span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .social-strip {
    gap: 0.82rem;
  }

  .social-icon {
    width: 1.35rem;
    height: 1.35rem;
  }

  .nav-shell {
    min-height: 4.35rem;
    display: block;
  }

  .nav-home-badge,
  .nav-tools {
    width: 4.75rem;
  }

  .nav-toggle {
    width: 100%;
    height: 100%;
  }

  .nav-home-badge svg,
  .nav-toggle svg {
    width: 2.2rem;
    height: 2.2rem;
  }

  .card {
    border-radius: 18px;
    padding: 1.35rem;
  }

  .page-body {
    padding-top: 1.3rem;
  }

  .home-footer-grid {
    padding: 1.3rem 0.8rem;
  }

  .home-footer-wave {
    height: 2rem;
    clip-path: ellipse(86% 72% at 50% 0%);
  }

  .home-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0.95rem 1rem 0.95rem;
  }

  .footer-column {
    padding: 0.78rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer-about,
  .footer-column:nth-child(2),
  .footer-column:nth-child(3) {
    grid-column: 1 / -1;
  }

  .footer-column:last-child,
  .footer-column:nth-last-child(2) {
    border-bottom: 0;
  }

  .footer-column h3 {
    margin-bottom: 0.62rem;
    font-size: 1rem;
  }

  .footer-column p,
  .footer-column li,
  .footer-column a {
    font-size: 0.76rem;
    line-height: 1.42;
  }

  .footer-about {
    grid-template-columns: 2.85rem minmax(0, 1fr);
    column-gap: 0.76rem;
    padding-top: 0.42rem;
  }

  .footer-section-icon {
    width: 2.58rem;
    height: 2.58rem;
  }

  .footer-section-icon svg {
    width: 1.32rem;
    height: 1.32rem;
  }

  .footer-link-columns {
    gap: 0.62rem;
  }

  .footer-link-columns .footer-links {
    min-height: 6.15rem;
    padding: 0.66rem 0.7rem;
    border-radius: 0.46rem;
  }

  .footer-contact-icons {
    gap: 0.52rem;
  }

  .footer-contact-icons li {
    grid-template-columns: 1.52rem minmax(0, 1fr);
    gap: 0.48rem;
  }

  .footer-mini-icon {
    width: 1.42rem;
    height: 1.42rem;
  }

  .footer-socials .social-icon {
    width: 1.86rem;
    height: 1.86rem;
  }

  .footer-column#social-sharing {
    padding-right: 0.7rem;
  }

  .footer-column#social-sharing + .footer-column {
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
  }

  .footer-school-time,
  .footer-school-days {
    padding-left: 2.02rem;
  }

  .home-footer-bottom .container {
    min-height: 2.55rem;
    padding-inline: 3rem 0.45rem;
    justify-content: center;
  }

  .footer-bottom-logo {
    width: 2.22rem;
    height: 2.22rem;
  }

  .home-footer-bottom p {
    max-width: 17rem;
    font-size: 0.76rem;
  }

  .useful-links-modal,
  .social-sharing-modal {
    padding: 0.9rem;
    align-items: flex-start;
  }

  .useful-links-dialog,
  .social-sharing-dialog {
    width: min(92vw, 360px);
    max-height: min(72vh, 520px);
    max-height: min(72svh, 520px);
    padding: 2.2rem 0.8rem 0.8rem;
    border-radius: 12px;
  }

  .useful-links-header,
  .social-sharing-header {
    padding-inline: 1.4rem;
    margin-bottom: 0.9rem;
  }

  .useful-links-header h2,
  .social-sharing-header h2 {
    font-size: 1.6rem;
  }

  .useful-links-header p,
  .social-sharing-header p {
    margin-top: 0.45rem;
    font-size: 0.84rem;
    line-height: 1.35;
  }

  .useful-link-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.62rem;
    min-height: 3.65rem;
    padding: 0.62rem;
  }

  .useful-link-icon {
    width: 2.25rem;
    height: 2.25rem;
  }

  .useful-link-icon svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .useful-link-body strong {
    font-size: 0.9rem;
  }

  .useful-link-body span {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .useful-links-close,
  .social-sharing-close {
    top: 0.55rem;
    right: 0.55rem;
    width: 2rem;
    height: 2rem;
  }

  .social-update-card {
    grid-template-columns: 6.9rem minmax(0, 1fr);
    gap: 0.65rem;
    min-height: 5.9rem;
    padding: 0.62rem;
    border-radius: 10px;
  }

  .social-update-media,
  .social-update-media img {
    min-height: 4.85rem;
  }

  .social-platform-badge {
    left: 0.42rem;
    top: 0.42rem;
    padding: 0.2rem 0.42rem;
    font-size: 0.55rem;
  }

  .social-update-meta {
    margin-bottom: 0.24rem;
    font-size: 0.64rem;
  }

  .social-update-body h3 {
    font-size: 0.92rem;
  }

  .social-update-copy {
    display: none;
  }

  .social-update-link {
    margin-top: 0.36rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 420px) {
  .utility-links {
    gap: 0.64rem 0.72rem;
  }

  .utility-link {
    font-size: 0.9rem;
  }

  .contact-item {
    font-size: 0.86rem;
  }

  .utility-meta {
    gap: 0.74rem 0.72rem;
  }
}

@media (max-width: 380px) {
  .site-logo-mobile {
    width: 9.5rem;
    height: 9.5rem;
  }

  .school-title {
    font-size: 1.42rem;
  }

  .school-location {
    font-size: 0.98rem;
  }

  .utility-link {
    font-size: 0.82rem;
  }

  .contact-item {
    font-size: 0.8rem;
  }
}

@media (max-width: 340px) {
  .utility-meta {
    grid-template-columns: 1fr;
    grid-template-areas:
      "phone"
      "email"
      "lang"
      "social";
  }

  .utility-meta > .social-strip {
    justify-self: center;
  }

  .contact-item {
    white-space: normal;
  }
}
