.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 110;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--white);
  font-weight: 800;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

:where(a, button, input):focus-visible {
  outline: 3px solid #6831a4;
  outline-offset: 4px;
}

.menu a[aria-current="page"] {
  background: var(--pink-soft);
  color: var(--ink);
}

.nav-cta { color: var(--ink); }

@media (min-width: 1081px) {
  .nav .brand {
    min-width: 0;
    flex: 0 0 clamp(125px, calc(154px * var(--header-logo-scale, 1)), 170px);
  }
  .nav .menu { gap: 2px; font-size: 14px; }
  .nav .menu a { padding-inline: 7px; }
  .nav-cta { padding-inline: 13px; }
  .nav .menu a,
  .nav-cta { white-space: nowrap; }
}

.news-page {
  --muted: #555b70;
}

.news-hero {
  padding: 136px 0 58px;
}

.news-hero .hero-grid {
  grid-template-columns: 1fr 1fr;
}

.news-hero h1,
.article-heading h1 {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(48px, 6.5vw, 88px);
  line-height: .99;
  letter-spacing: -.045em;
  margin: 18px 0;
}

.news-hero h1 span { color: #993f6d; }

.news-hero p,
.article-heading > p {
  color: var(--muted);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 650;
  line-height: 1.55;
  max-width: 43ch;
}

.news-hero .pill { padding: 8px 15px; }
.news-hero .hero-actions { margin-top: 26px; }

.news-feature {
  padding: clamp(16px, 2.4vw, 28px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--white);
  background:
    radial-gradient(ellipse at 90% 18%, var(--pink-soft), transparent 58%),
    linear-gradient(140deg, var(--yellow-soft), var(--white) 56%, var(--green-soft));
  box-shadow: var(--shadow);
}

.news-feature .news-frame { padding: 8px; }
.news-feature .news-frame img { aspect-ratio: 2.45; }

.news-feature-copy { padding: 16px 8px 1px; }

.news-feature h2 {
  font-size: clamp(25px, 3.1vw, 38px);
  letter-spacing: -.025em;
  line-height: 1.06;
  margin: 10px 0 0;
}

.news-feature h2 a:hover,
.news-card h3 a:hover {
  text-decoration: underline;
  text-underline-offset: .15em;
}

.news-feature h2 a,
.news-card h3 a { display: inline-block; }

.news-archive {
  padding: 44px 0 80px;
  scroll-margin-top: 110px;
}

.news-archive-header {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 20px;
}

.news-archive-header h2 { margin: 0; }
.news-archive-header p { color: var(--muted); font-weight: 800; }
.news-archive [hidden] { display: none; }

.news-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  border: 0;
  min-width: 0;
  margin: 0 0 26px;
}

.news-filters legend {
  float: left;
  margin: 0 9px 0 0;
  font-weight: 800;
}

.news-filters label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid #c8bccd;
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.news-filters label:hover { background: var(--yellow-soft); }
.news-filters label:has(:checked) { background: var(--pink-soft); border-color: #993f6d; }
.news-filters input { accent-color: #993f6d; }

.news-card {
  --news-accent: var(--yellow-soft);
  display: flex;
  flex-direction: column;
  padding: 13px;
  background: var(--white);
}

.news-card::before { pointer-events: none; }
[data-category="celebraciones"] { --news-accent: var(--pink-soft); }
[data-category="actividades"] { --news-accent: var(--green-soft); }
[data-category="familias"] { --news-accent: var(--blue-soft); }
[data-category="centro"] { --news-accent: var(--yellow-soft); }

.news-frame {
  position: relative;
  margin: 0;
  padding: 9px;
  border: 1px solid var(--white);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--news-accent, var(--yellow-soft)), #fff9ed);
  overflow: hidden;
}

.news-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 2.4;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 9px);
}

.news-frame .news-image-contained {
  object-fit: contain;
}

.news-frame figcaption {
  margin: 0.6rem 0.4rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.news-frame img[src$="/colorins.jpg"] { mix-blend-mode: multiply; }
.news-frame img[src$="/intercambio.png"] { transform: scale(1.36); }

.news-card-copy {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 10px 8px;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 10px;
  color: #555b70;
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.4;
}

.news-topic {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--news-accent, var(--yellow-soft));
  color: var(--ink);
}

.news-card h3 {
  font-size: clamp(23px, 2.5vw, 28px);
  line-height: 1.1;
  margin: 12px 0 8px;
}

.news-card p { color: #555b70; }

.news-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  padding-top: 8px;
  color: #823258;
  font-weight: 900;
}

.news-link:hover,
.footer-inner a:hover { text-decoration: underline; }

.news-home .section-title { margin-bottom: 32px; }
.news-home .eyebrow { color: #993f6d; }
.news-home-actions { margin-top: 30px; text-align: center; }

.article-page {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 134px 0 50px;
}

.article-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 0 0 22px;
  color: #823258;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: .18em;
}

.article-heading h1 { font-size: clamp(39px, 6.2vw, 68px); }
.article-heading > p { max-width: 58ch; }
.article-page .news-frame { margin-top: 28px; padding: clamp(10px, 2.4vw, 20px); }
.article-page .news-frame img { aspect-ratio: 2.75; }

.article-body {
  padding: clamp(22px, 5vw, 45px);
  margin: 24px 0 0;
  background: var(--white);
  border: 1px solid var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.7;
}

.article-body p + p { margin-top: 1em; }
.article-body h2 {
  margin: 1em 0 .4em;
  font-size: clamp(25px, 4vw, 33px);
  letter-spacing: -.025em;
  color: var(--ink);
}

.article-body ul { padding-left: 1.2em; }
.article-body li a { display: inline-flex; align-items: center; min-height: 44px; }
.article-body a { color: #823258; font-weight: 800; text-decoration: underline; text-underline-offset: .15em; }
.article-body .article-source { margin-top: 1.3em; }

.article-toc {
  border-radius: 18px;
  padding: clamp(16px, 4vw, 24px);
  margin-bottom: 1.65rem;
  background: #fff4f6;
}

.article-toc p { color: var(--ink); font-weight: 900; margin: 0 0 .5rem; }
.article-toc ol { padding-left: 1.35em; }
.article-toc li a { min-height: 40px; padding: 5px 0; }
.article-body h2[id] { scroll-margin-top: 120px; }
.public-site main > section[id] { scroll-margin-top: 115px; }

.school-photo { background: var(--yellow-soft); }
.school-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-photo-hero img { object-position: 57% center; }
.school-photo-courtyard img { object-position: center 65%; }
.school-photo-contact { margin: 0; }
.school-photo-contact img { object-position: center 63%; }
.school-photo-contact::after { content: none; }
.school-photo-contact figcaption {
  position: absolute;
  inset: auto 24px 24px;
  padding: 16px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(16px);
  font-weight: 900;
  box-shadow: var(--shadow-soft);
}

.school-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.school-gallery figure {
  margin: 0;
  padding: 12px;
  border-radius: 28px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.school-gallery img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 58%;
  border-radius: 18px;
  background: var(--yellow-soft);
}

.school-gallery figcaption {
  padding: 12px 8px 5px;
  font: 600 clamp(1.12rem, 2vw, 1.35rem)/1.2 "Fredoka", sans-serif;
}

.school-gallery-actions { margin-top: 28px; text-align: center; }

@media (max-width: 980px) {
  .school-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .nav:not(.menu-ready) {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 26px;
  }

  .nav:not(.menu-ready) .menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav:not(.menu-ready) .hamb { display: none; }
  .nav.open .menu { max-height: calc(100dvh - 110px); overflow-y: auto; }
  body:has(.nav:not(.menu-ready)) > header { position: static; padding-top: 12px; }
  body:has(.nav:not(.menu-ready)) :is(.hero, .news-hero, .article-page) { padding-top: 40px; }
}

@media (max-width: 700px) {
  .news-hero { padding: 110px 0 44px; }
  .news-hero .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .news-archive { padding: 28px 0 58px; }
  .news-filters legend { float: none; margin: 0 0 8px; }
  .article-page { width: calc(100% - 28px); padding-top: 110px; }
}

@media (max-width: 560px) {
  .school-gallery { grid-template-columns: minmax(0, 1fr); }
  .school-photo-courtyard { min-height: 360px; }
  .school-photo-contact figcaption { inset: auto 16px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
