/* Additions for the new site. Unlayered on purpose, so these rules win over the
   Tailwind utilities in site.css (which all live inside @layer). */

/* Header: 6 links + Apply Now need more room, so desktop nav starts at lg (1024px). */
@media (min-width: 64rem) {
  .nav-desktop { display: flex; }
}

/* Tailwind utilities used by the new pages that the original build never generated
   (values match Tailwind's defaults). Run tools/check_classes.py to find more. */
.cursor-pointer { cursor: pointer; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-9 { margin-bottom: 2.25rem; }
.py-\[56px\] { padding-top: 56px; padding-bottom: 56px; }
.leading-\[1\.8\] { line-height: 1.8; }
.text-\[12px\] { font-size: 12px; }
@media (min-width: 48rem) {
  .md\:text-\[48px\] { font-size: 48px; }
}

/* Links inside body copy (contact page, privacy notice). */
.contact-link { color: var(--color-brand); font-weight: 600; }
.contact-link:hover { text-decoration: underline; }
.break-all { word-break: break-all; }

/* ---------- Admissions: file inputs + consent ---------- */
.file-input {
  display: block; width: 100%;
  border: 1px dashed var(--color-line); border-radius: 7px;
  background: #fcfbf7; padding: 9px 10px; font-size: 14px; color: #4a574e;
  cursor: pointer; transition: border-color .15s;
}
.file-input:hover, .file-input:focus { border-color: var(--color-brand); outline: none; }
.file-input::file-selector-button {
  margin-right: 12px; border: 0; border-radius: 6px;
  background: #e7f3ec; color: var(--color-brand);
  padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer;
}
.consent-box {
  border: 1px solid var(--color-line); border-radius: 10px;
  background: var(--color-paper); padding: 18px 20px;
}
.consent-list { margin: 10px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.consent-check { margin-top: 3px; width: 18px; height: 18px; flex: none; accent-color: var(--color-brand); }
/* Spam trap: invisible to people, filled in by bots (FormSubmit then drops the submission). */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error {
  margin-bottom: 20px; border-radius: 7px; background: #fbe7e2;
  padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--color-danger);
}

/* ---------- Contact ---------- */
.map-frame { display: block; width: 100%; height: 420px; border: 0; }

/* ---------- News article ---------- */
.article-lede { margin: 0 0 28px; font-size: 20px; line-height: 1.6; color: var(--color-ink); font-weight: 500; }
.article-body p { margin: 0 0 1.1em; font-size: 17px; line-height: 1.75; color: #3d4a41; }
.article-image { display: block; width: 100%; border-radius: 12px; margin: 0 0 28px; }

/* ---------- Gallery: mosaic grid ----------
   Placement comes from the build: --r/--c/--rs/--cs (4 columns, tablet and up)
   and --mr/--mc/--mrs/--mcs (2 columns, phones). Both layouts have no holes. */
.gallery-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
}
.gallery-grid .gallery-item {
  grid-row: var(--mr) / span var(--mrs);
  grid-column: var(--mc) / span var(--mcs);
}
@media (min-width: 48rem) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(140px, 15vw, 200px);
  }
  .gallery-grid .gallery-item {
    grid-row: var(--r) / span var(--rs);
    grid-column: var(--c) / span var(--cs);
  }
}

.gallery-item {
  position: relative; z-index: 0; display: block;
  padding: 0; border: 0; border-radius: 11px; overflow: hidden;
  background: var(--color-brand-dark); cursor: zoom-in;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s, filter .4s;
}
.gallery-item img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 36px 16px 14px; text-align: left;
  font-size: 14px; font-weight: 600; line-height: 1.4; color: #fff;
  background: linear-gradient(180deg, transparent, rgba(8,30,18,.85));
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s, transform .3s;
}

/* The photo you hover or tab to grows; the others step back. */
.gallery-item:hover, .gallery-item:focus-visible {
  z-index: 2; transform: scale(1.05);
  box-shadow: 0 26px 50px -18px rgba(0,0,0,.5);
}
.gallery-item:hover img, .gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item:hover .gallery-caption, .gallery-item:focus-visible .gallery-caption { opacity: 1; transform: none; }
.gallery-grid:has(.gallery-item:hover) .gallery-item:not(:hover),
.gallery-grid:has(.gallery-item:focus-visible) .gallery-item:not(:focus-visible) {
  filter: brightness(.72) saturate(.85);
}
.gallery-item:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; }

/* Touch screens have no hover: always show captions, no dimming. */
@media (hover: none) {
  .gallery-caption { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-item, .gallery-item img, .gallery-caption { transition: none; }
  .gallery-item:hover, .gallery-item:focus-visible,
  .gallery-item:hover img, .gallery-item:focus-visible img { transform: none; }
}

.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(8, 30, 18, .92); }
.lb-figure { margin: 0; max-width: min(1200px, 88vw); }
.lb-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 10px; }
.lb-caption { margin-top: 14px; text-align: center; color: #e4efe8; font-size: 15px; }
.lb-btn {
  position: fixed; display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 0; border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
  transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.24); }
.lb-close { top: 18px; right: 18px; font-size: 20px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lb-prev, .lb-next { top: auto; bottom: 18px; transform: none; }
}
