/* Nordic Costa Blanca — one stylesheet, no build step. */

@font-face {
  font-family: "Familjen Grotesk";
  src: url("/assets/fonts/familjen-grotesk-var.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("/assets/fonts/public-sans-var.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  /* Costa Blanca at midday: deep sea, open sky, sun */
  --ink: #0f3550;
  --text: #1c3344;
  --muted: #4b6476;
  --sea: #1683ad;
  --sky: #bfe3f5;
  --sky-soft: #edf7fc;
  --horizon: #fff1d2;
  --sun: #ffc23d;
  --sun-hover: #ffcf66;
  --paper: #ffffff;
  --line: #d5e4ec;
  --error: #b3261e;

  /* one colour per vocational area, used the same way everywhere */
  --c-restauracion: #b85a07;
  --c-sociosanitario: #11796e;
  --c-deporte: #2c58c9;
  --c-forestal: #457a26;

  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Public Sans", system-ui, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 53, 80, 0.06), 0 8px 24px -12px rgba(15, 53, 80, 0.22);
}

[data-course="restauracion"], .course-restauracion { --course: var(--c-restauracion); }
[data-course="sociosanitario"], .course-sociosanitario { --course: var(--c-sociosanitario); }
[data-course="deporte"], .course-deporte { --course: var(--c-deporte); }
[data-course="forestal"], .course-forestal { --course: var(--c-forestal); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
}
img, svg { max-width: 100%; }
a { color: var(--sea); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.4rem); font-weight: 680; letter-spacing: -0.02em; }
h3 { font-size: 1.22rem; font-weight: 650; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
/* Finnish and Icelandic compounds can be longer than a phone screen is wide */
h1, h2, h3, p, li, dd, dt, td, th, label, legend, summary, .btn { overflow-wrap: break-word; hyphens: auto; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(3rem, 6vw, 5rem); }
.shade { background: var(--sky-soft); }
.mt { margin-top: 2.5rem; }
.lede { font-size: 1.2rem; max-width: 40em; }
.note { color: var(--muted); font-size: 1rem; max-width: 46em; }
.section-head { max-width: 44rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.more-link { margin-top: 1.75rem; font-weight: 700; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--sun); color: var(--ink); padding: 0.5rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

/* ------------------------------------------------------------------ header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem 2rem; flex-wrap: wrap; padding-block: 0.85rem;
}
.logo, .footer-brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  color: var(--ink); text-decoration: none;
  font: 700 1.2rem/1 var(--display); letter-spacing: -0.01em;
}
.logo-mark { width: 2rem; height: 2rem; flex: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.4rem; align-items: center; }
.site-nav a { color: var(--text); text-decoration: none; padding-block: 0.35rem; font-size: 1rem; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--sun); }
.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 0.25rem 2rem 0.25rem 0.85rem; font-size: 1rem; font-weight: 500; position: relative;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after {
  content: ""; position: absolute; right: 0.8rem; top: 50%; width: 0.45rem; height: 0.45rem;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-70%) rotate(45deg);
}
.lang-menu[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.lang-menu summary:hover { border-color: var(--ink); }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 10; min-width: 11rem; margin: 0; padding: 0.4rem;
  list-style: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.lang-menu li a { display: block; padding: 0.45rem 0.75rem; border-radius: 8px; box-shadow: none; }
.lang-menu li a:hover { background: var(--sky-soft); box-shadow: none; }
.lang-menu li a[aria-current] { font-weight: 700; box-shadow: none; }
.notfound-langs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 1.1rem; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-block; padding: 0.85rem 1.45rem; border-radius: 999px;
  font: 650 1.05rem/1.2 var(--display); text-decoration: none; border: 2px solid transparent;
  cursor: pointer;
}
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: var(--sun-hover); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #18486b; }
.btn-light { background: rgba(255, 255, 255, 0.85); color: var(--ink); border-color: rgba(15, 53, 80, 0.15); }
.btn-light:hover { background: #fff; border-color: var(--ink); }
.btn-course { background: var(--course); color: #fff; }
.btn-course:hover { filter: brightness(1.1); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ------------------------------------------------------------------ hero */
.hero {
  --scene-h: max(clamp(230px, 33vw, 430px), 23vw);
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, #dcf0fa 48%, var(--horizon) 100%);
}
.hero-scene {
  position: absolute; left: 0; bottom: 0; width: 100%;
  height: var(--scene-h);
}
/* The sun is drawn separately from the landscape so cropping the landscape on wide screens never cuts it;
   it sits behind the hills (earlier in the DOM than the scene) and rises from behind them. */
.hero-sun {
  position: absolute; right: max(5vw, calc(50% - 34rem)); bottom: calc(var(--scene-h) * 0.62);
  width: clamp(96px, 11vw, 176px); aspect-ratio: 1; border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 clamp(18px, 2.6vw, 40px) rgba(255, 233, 170, 0.45), 0 0 clamp(60px, 9vw, 140px) clamp(30px, 5vw, 80px) rgba(255, 244, 214, 0.75);
}
.hero-inner {
  position: relative; z-index: 1;
  padding-block: clamp(2rem, 4.5vw, 3.75rem) clamp(12rem, 25vw, 19rem);
}
.hero-kicker {
  display: inline-block; background: rgba(255, 255, 255, 0.7); color: var(--ink);
  border-radius: 999px; padding: 0.3rem 0.9rem; font-weight: 700; font-size: 0.95rem; margin-bottom: 1.25rem;
}
.hero h1 { max-width: 13em; }
.hero-text { font-size: 1.2rem; max-width: 34em; color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* The one orchestrated moment: the sun rises slowly from behind the hills on load. */
@media (prefers-reduced-motion: no-preference) {
  .hero-sun { animation: rise 5s cubic-bezier(.45, .05, .3, 1) 0.4s both; }
  @keyframes rise { from { transform: translateY(150%); } to { transform: none; } }
}

/* ------------------------------------------------------------------ facts */
.facts-wrap { position: relative; z-index: 2; margin-top: -3.5rem; }
.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0;
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 0.5rem;
}
.facts > div { padding: 0.25rem 1.25rem; }
.facts > div + div { border-left: 1px solid var(--line); }
.facts dt { font: 700 1.3rem/1.2 var(--display); color: var(--ink); }
.facts dd { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.98rem; line-height: 1.45; }

/* ------------------------------------------------------------------ vocational areas */
.course-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem;
}
.course-card a {
  display: block; height: 100%; color: inherit; text-decoration: none;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem 1.7rem 1.5rem; box-shadow: var(--shadow);
}
.course-card a:hover { border-color: var(--course); }
.course-card a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.course-icon {
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: color-mix(in srgb, var(--course) 13%, #fff); color: var(--course); margin-bottom: 1rem;
}
.course-icon .icon { width: 1.7rem; height: 1.7rem; }
.course-card h3 { font-size: 1.6rem; margin-bottom: 0.15rem; }
.course-card .course-sub { color: var(--course); font-weight: 700; margin-bottom: 0.75rem; }
.course-card p { margin-bottom: 1rem; }
.course-more { font-weight: 700; color: var(--course); }

/* ------------------------------------------------------------------ life in La Nucía */
.life { background: linear-gradient(180deg, var(--sky-soft), #fffaf0); }
.life-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.life-icon {
  width: 3rem; height: 3rem; padding: 0.65rem; border-radius: 50%;
  background: var(--sun); color: var(--ink); margin-bottom: 0.85rem;
}
.life-item h3 { margin-bottom: 0.35rem; }
.life-item p { color: var(--muted); margin: 0; }

.sun-compare {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 1.5rem; margin-top: 3rem;
}
.sun-compare figure {
  margin: 0; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.sun-compare figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }
.daylight { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.day { display: grid; grid-template-columns: 7.5rem 1fr 6.5rem; align-items: center; gap: 0.75rem; }
.day-city { font-weight: 600; }
.day-bar { display: block; width: 100%; height: 1.1rem; border-radius: 999px; overflow: hidden; }
.day-track { fill: var(--sky-soft); }
.day-fill { fill: #9cc9e0; }
.day.is-here .day-fill { fill: var(--sun); }
.day.is-here .day-city, .day.is-here .day-val { color: var(--ink); font-weight: 800; }
.day-val { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }

.route-map { display: block; width: 100%; height: auto; max-height: 30rem; margin-inline: auto; }
.route-map .grat { stroke: var(--line); stroke-width: 1; }
.route-map .grat-label { fill: #8aa3b3; font: 400 11px var(--body); }
.route-map .route { fill: none; stroke: var(--sea); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 5; }
.route-map .city { fill: var(--ink); }
.route-map .city-name { fill: var(--ink); font: 650 16px var(--display); paint-order: stroke; stroke: #fff; stroke-width: 6px; stroke-linejoin: round; }
.route-map .city-km { fill: var(--muted); font: 400 13px var(--body); }
.route-map .dest { fill: var(--sun); stroke: var(--ink); stroke-width: 2; }
.route-map .dest-halo { fill: rgba(255, 194, 61, 0.3); }
.route-map .dest-name { fill: var(--ink); font: 700 22px var(--display); paint-order: stroke; stroke: #fff; stroke-width: 6px; }

.video-block { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1.5rem 2.5rem; align-items: center; margin-top: 3rem; }
.video-copy p { color: var(--muted); }
.video-facade, .video-frame {
  position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: linear-gradient(180deg, var(--sky), var(--horizon));
}
.video-poster { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-play {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 4.5rem; height: 4.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: #fff; box-shadow: 0 6px 20px rgba(15, 53, 80, 0.35);
}
.video-play svg { width: 2rem; height: 2rem; margin-left: 0.2rem; }
.video-facade:hover .video-play { background: #18486b; }
.video-label {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem; color: #fff; font: 650 1.05rem/1.3 var(--display);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------------------ eligibility */
.countries { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1.25rem; }
.country { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.3rem 1.4rem; }
.country h3 { margin-bottom: 0.4rem; }
.country p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ------------------------------------------------------------------ roles */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.role { background: var(--paper); border-radius: var(--radius); padding: 1.4rem 1.5rem; box-shadow: var(--shadow); }
.role:first-child { border-top: 5px solid var(--sun); }
.role p { color: var(--muted); margin: 0; }

/* ------------------------------------------------------------------ FAQ */
.faq { max-width: 50rem; }
.faq-preview { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.qa { border-top: 1.5px solid var(--line); padding-block: 1.25rem 0.5rem; }
.faq .qa h2, .faq .qa h3 { font-size: 1.25rem; margin-bottom: 0.4rem; }
.qa p { color: var(--muted); }

/* ------------------------------------------------------------------ CTA */
.cta-band { background: var(--sun); color: var(--ink); }
.cta-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.5rem 3rem; padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.cta-inner h2 { margin-bottom: 0.4rem; }
.cta-inner p { margin: 0; max-width: 38em; }
.cta-band .btn-sun { background: var(--ink); color: #fff; }
.cta-band .btn-sun:hover { background: #18486b; }

/* ------------------------------------------------------------------ page heroes */
.page-hero {
  background: linear-gradient(180deg, var(--sky) 0%, var(--sky-soft) 100%);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.page-hero.thanks { min-height: 50vh; }

.course-hero {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: color-mix(in srgb, var(--course) 12%, #fff);
}
.course-hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; }
.course-hero .crumb { margin-bottom: 1rem; font-size: 1rem; }
.course-hero .crumb a { color: var(--course); font-weight: 600; }
.course-hero h1 { margin-bottom: 0.25rem; }
.course-hero-sub { font: 650 clamp(1.2rem, 2.4vw, 1.55rem)/1.25 var(--display); color: var(--course); margin-bottom: 1.25rem; }
.course-hero-icon {
  display: grid; place-items: center; width: clamp(5rem, 10vw, 8rem); height: clamp(5rem, 10vw, 8rem);
  border-radius: 50%; background: var(--paper); color: var(--course); box-shadow: var(--shadow);
}
.course-hero-icon .icon { width: 50%; height: 50%; }

/* ------------------------------------------------------------------ course body */
.course-body {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.75rem 3.5rem; padding-block: 3rem clamp(3rem, 7vw, 5rem);
}
.block-wide { grid-column: 1 / -1; }
.block h2 { font-size: 1.45rem; padding-bottom: 0.45rem; border-bottom: 3px solid var(--course); display: inline-block; }

.ticks, .tasks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 1.4rem; margin-bottom: 0.55rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--course, var(--sea));
}
.two-col { columns: 2 20rem; column-gap: 3rem; margin-top: 2rem; }
.two-col li { break-inside: avoid; }
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.75rem; }
.tasks li {
  background: color-mix(in srgb, var(--course) 6%, #fff); border-radius: 10px;
  border-left: 4px solid var(--course); padding: 0.8rem 1rem; line-height: 1.45;
}

table { border-collapse: collapse; width: 100%; }
.origins th, .origins td, .simple th, .simple td, .calendar th, .calendar td {
  text-align: left; vertical-align: top; padding: 0.7rem 1rem 0.7rem 0; border-bottom: 1px solid var(--line);
}
.origins th, .simple th[scope="row"] { font-family: var(--display); font-weight: 650; width: 11rem; color: var(--ink); }
.legal td:last-child { color: var(--muted); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
.calendar { background: var(--paper); border-radius: var(--radius); overflow: hidden; min-width: 36rem; box-shadow: var(--shadow); }
.calendar th, .calendar td { padding: 0.8rem 1rem; }
.calendar thead th { font-family: var(--display); background: var(--ink); color: #fff; font-weight: 650; }
.calendar td:first-child { font: 700 1.1rem var(--display); color: var(--sea); width: 4rem; }
.calendar td:last-child { color: var(--muted); }

.why-callout {
  background: color-mix(in srgb, var(--course) 8%, #fff); border-radius: var(--radius); padding: 1.75rem 2rem;
}
.why-callout h2 { border: 0; padding: 0; }
.why-callout p { font-size: 1.2rem; max-width: 40em; }

.other-courses ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.other-courses h2 { border-bottom-color: var(--line); }
.other-courses a {
  display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--text);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 0.5rem 1.1rem; background: var(--paper); font-weight: 700;
}
.other-courses a:hover { border-color: var(--course); }
.chip-icon { width: 1.2rem; height: 1.2rem; color: var(--course); }

/* ------------------------------------------------------------------ how it works */
.timeline { list-style: none; margin: 2rem 0 1.5rem; padding: 0; counter-reset: step; }
.timeline li { position: relative; counter-increment: step; padding: 0 0 1.75rem 4rem; max-width: 46rem; }
.timeline li::before {
  content: counter(step); position: absolute; left: 0; top: -0.1rem;
  width: 2.5rem; height: 2.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--sky); color: var(--ink); font: 700 1.1rem var(--display);
}
.timeline li:last-child::before { background: var(--sun); }
.timeline li:not(:last-child)::after {
  content: ""; position: absolute; left: 1.2rem; top: 2.6rem; bottom: 0.2rem; width: 2px; background: var(--line);
}
.timeline h3 { margin-bottom: 0.25rem; }
.timeline p { margin: 0; }
.timeline .who { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

.houses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.house { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.house h3 { margin-bottom: 0.3rem; }
.house-meta { color: var(--sea); font-weight: 700; margin-bottom: 0.6rem; }
.house p:last-child { color: var(--muted); margin: 0; }

.erasmus { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 2rem 4rem; }
.erasmus h3 { margin-top: 2rem; }
.erasmus > div:last-child h3 { margin-top: 0; }
.deadline {
  background: var(--paper); border-left: 6px solid var(--sun); padding: 1rem 1.25rem; border-radius: 0 10px 10px 0;
  font-weight: 700;
}

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.35rem; margin-top: 2rem; }

/* ------------------------------------------------------------------ contact */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 3rem 4rem; align-items: start; }
.contact-form { background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.field { margin: 0 0 1.25rem; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; gap: 0 1.25rem; }
/* paired fields share rows (label / input / error), so inputs line up even when one label wraps */
.field-row > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
.field-row > .field > label { align-self: end; }
.field > label, .field > legend { display: block; font-weight: 700; margin-bottom: 0.35rem; padding: 0; color: var(--ink); }
.req { color: var(--error); }
.opt { color: var(--muted); font-weight: 400; }
input:not([type="checkbox"]), select, textarea {
  width: 100%; font: inherit; color: inherit; background: var(--paper);
  border: 1.5px solid #a7bccb; border-radius: 10px; padding: 0.65rem 0.8rem;
}
textarea { resize: vertical; min-height: 8rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; border-color: var(--ink); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.field-error { color: var(--error); font-size: 0.95rem; margin: 0.35rem 0 0; font-weight: 700; }
.hint { color: var(--muted); font-size: 0.95rem; margin: 0.35rem 0 0; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-weight: 400; cursor: pointer; }
.checks .check { border: 1.5px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; border-left: 5px solid var(--course); }
.checks .check:has(input:checked) { background: color-mix(in srgb, var(--course) 9%, #fff); border-color: var(--course); }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--ink); flex: none; }
.field > label.consent { display: flex; font-size: 1rem; font-weight: 400; color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { padding: 0.9rem 1rem; border-radius: 10px; background: #fdecea; color: var(--error); font-weight: 700; }
.contact-aside h2 { font-size: 1.4rem; }
.big-link { font: 650 1.3rem/1.3 var(--display); word-break: break-word; }

/* ------------------------------------------------------------------ housing photos */
.housing-teaser .teaser-photos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.teaser-photos a { display: block; border-radius: var(--radius); overflow: hidden; }
.teaser-photos img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }

.house-section { padding-block: 0 3.5rem; }
.house-section + .house-section { border-top: 1.5px solid var(--line); padding-top: 3rem; }
.house-head { max-width: 46rem; margin-bottom: 1.5rem; }
.house-head .house-meta { color: var(--sea); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.photo { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--sky-soft); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.photo-cap {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem; padding: 0.3rem 0.6rem; border-radius: 8px;
  background: rgba(255, 255, 255, 0.9); color: var(--ink); font-size: 0.9rem; font-weight: 600; line-height: 1.3;
}
.photo:focus-visible { outline-offset: 2px; }
.house-rules { border-top: 1.5px solid var(--line); padding-top: 3rem; }
.house-rules .two-col { margin-top: 0; }

.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 24, 36, 0.92); }
.lightbox figure { margin: 0; height: 100%; display: grid; place-items: center; align-content: center; gap: 0.75rem; padding: 3.5rem 4rem; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 9rem); border-radius: 10px; }
.lightbox figcaption { color: #fff; font-weight: 600; }
.lightbox button {
  position: fixed; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox .lb-prev { left: 1rem; }
.lightbox .lb-next { right: 1rem; }
.lightbox .lb-close { top: 1.75rem; right: 1rem; transform: none; }

/* ------------------------------------------------------------------ footer */
.site-footer { background: var(--ink); color: #c5d8e5; padding-block: 2.75rem; font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem 3rem; }
.footer-brand { color: #fff; margin-bottom: 0.75rem; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 0.35rem; }
.site-footer a { color: #fff; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .erasmus, .contact-layout, .sun-compare, .video-block { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1rem; }
  .facts > div:nth-child(3) { border-left: 0; }
  .roles, .houses, .life-grid { grid-template-columns: 1fr 1fr; }
  .faq-preview { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .course-grid, .course-body, .field-row, .checks, .roles, .houses, .life-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-rows: none; }
  .field-row > .field { display: block; grid-row: auto; }
  .housing-teaser .teaser-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .photo-cap { font-size: 0.8rem; }
  .lightbox figure { padding: 3.5rem 0.5rem 1rem; }
  .lightbox .lb-prev, .lightbox .lb-next { top: auto; bottom: 1rem; transform: none; }
  .facts { grid-template-columns: 1fr; padding: 0.5rem 0.25rem; }
  .facts > div { padding: 0.75rem 1rem; }
  .facts > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .site-header { position: static; }
  .hero { --scene-h: 300px; }
  .facts-wrap { margin-top: -1.25rem; }
  .hero-inner { padding-bottom: 16.5rem; }
  .hero-sun { width: 84px; right: 9vw; bottom: calc(var(--scene-h) * 0.5); }
  .course-hero-inner { grid-template-columns: 1fr; }
  .course-hero-icon { display: none; }
  .day { grid-template-columns: 6rem 1fr 5.6rem; gap: 0.5rem; font-size: 0.95rem; }
  .origins th { width: auto; display: block; border: 0; padding-bottom: 0; }
  .origins td { display: block; padding-top: 0.15rem; }
  /* calendar: one stacked row per slot instead of a sideways-scrolling table */
  .calendar { min-width: 0; }
  .calendar thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .calendar tr { display: grid; grid-template-columns: 2.25rem 1fr; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
  .calendar td { display: block; padding: 0; border: 0; }
  .calendar td:first-child { grid-row: span 3; width: auto; }
  .calendar td:nth-child(2), .calendar td:nth-child(3) { display: inline; font-weight: 700; grid-column: 2; }
  .calendar td:nth-child(3)::before { content: "– "; }
  .calendar td:last-child { grid-column: 2; font-size: 0.95rem; }
  .calendar td:last-child:empty { display: none; }
  .legal th, .legal td { display: block; width: auto; border: 0; padding: 0; }
  .legal tr { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  .legal td:last-child { font-size: 0.95rem; }
  .site-nav { gap: 0.25rem 1rem; }
  .lang-menu ul { right: auto; left: 0; }
  .logo span { font-size: 1.05rem; }
  /* the map scales down on phones; enlarge its text so it stays readable */
  .route-map .city-name { font-size: 21px; }
  .route-map .city-km { font-size: 17px; }
  .route-map .grat-label { font-size: 15px; }
  .route-map .dest-name { font-size: 26px; }
}
