/* ============================================================
   Vacanze Studio college pages — «Campus» and «Escursioni» blocks
   (client mockups, Oct 2026).
   Templates: sections/pages/colleges/content-campus-overview.php
              sections/pages/colleges/content-excursions-overview.php
   Plain CSS layered over the compiled theme CSS — no build step.
   Loaded only on the colleges that get these blocks
   (inc/college-overview/college-overview.php).
   ============================================================ */

.stc-campus,
.stc-exc {
  /* Study Tours palette only: black + magenta, neutral greys (ST-0052). */
  --stc-black: #18191a;
  --stc-ink: #18191a;
  --stc-muted: #848484;
  --stc-pink: #cc0f7a;
  --stc-pink-dark: #980b5b;
  --stc-band: #f7f7f7;
  --stc-line: #e8e8e8;
  --stc-soft: #f8f8f8;
  --stc-radius: 16px;
  color: var(--stc-ink);
}

.stc-campus :focus-visible,
.stc-exc :focus-visible {
  outline: 2px solid var(--stc-pink);
  outline-offset: 3px;
  border-radius: 6px;
}

.stc-kicker-pink {
  color: var(--stc-pink);
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0 0 .35rem;
}

.stc-caps {
  color: var(--stc-pink);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.stc-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--stc-pink);
  font: inherit;
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.stc-link:hover { color: var(--stc-pink-dark); }
.stc-link--chevron { text-decoration: none; }
.stc-link--chevron::after {
  content: "";
  width: .5rem;
  height: .5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s;
}
.is-open > .stc-link--chevron::after,
.stc-link--chevron[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }

.stc-btn {
  display: inline-flex;
  align-items: center;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  background: var(--stc-pink);
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  transition: background .2s;
}
.stc-btn:hover { background: var(--stc-pink-dark); color: #fff; }

/* ---------- Campus ---------- */

.stc-campus {
  background: #fff;
  padding-top: 60px;
}

.stc-campus__head { text-align: center; }
.stc-campus__title {
  color: var(--stc-black);
  font-size: clamp(1.602rem, 0.858vi + 1.387rem, 2.074rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.stc-campus__accommodation,
.stc-campus__accommodation p {
  color: var(--stc-black);
  font-size: .95rem;
  margin: .3rem 0 0;
}
.stc-campus__accommodation > div { margin-top: .4rem; }

.stc-campus__intro {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.stc-campus__headline {
  color: var(--stc-black);
  font-size: clamp(1.602rem, 0.858vi + 1.387rem, 2.074rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.stc-campus__copy {
  color: var(--stc-ink);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.stc-campus__copy p { margin: 0 0 .9rem; }
.stc-campus__copy p:last-child { margin-bottom: 0; }
.stc-campus__subtitle {
  color: var(--stc-black);
  font-size: clamp(1.125rem, 0.136vi + 1.091rem, 1.2rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 1.6rem 0 .6rem;
}
.stc-campus__map {
  margin: 1.1rem 0 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--stc-soft);
}
.stc-campus__map img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 1024px) { .stc-campus__map { max-width: 560px; aspect-ratio: 16 / 10; } }
.stc-campus__copy.is-clamped {
  max-height: 10.5em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 70%, transparent);
          mask-image: linear-gradient(#000 70%, transparent);
}
.stc-campus__copy.is-clamped.is-open {
  max-height: none;
  -webkit-mask-image: none;
          mask-image: none;
}

@media (min-width: 1024px) {
  .stc-campus__intro {
    grid-template-columns: 5fr 7fr;
    gap: 0;
    margin-top: 3rem;
  }
  .stc-campus__lead { padding: .2rem 2.5rem 0 0; }
  .stc-campus__text {
    border-left: 1px solid #c6c6c6;
    padding: .2rem 3rem .2rem 3.5rem;
  }
}

/* Gallery */
.stc-gallery {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.5rem;
  padding-bottom: 3rem;
}
.stc-gallery__kicker {
  color: var(--stc-pink);
  font-size: 1.125rem;
  margin: 0 0 .3rem;
}
.stc-gallery__title {
  color: var(--stc-black);
  font-size: clamp(1.424rem, 0.553vi + 1.286rem, 1.728rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.stc-gallery__arrows {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}
.stc-round {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1.5px solid var(--stc-black);
  border-radius: 999px;
  background: #fff;
  color: var(--stc-black);
  cursor: pointer;
  transition: background .2s, color .2s, opacity .2s;
}
.stc-round svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.stc-round:hover:not(:disabled) { background: var(--stc-black); color: #fff; }
.stc-round:disabled { opacity: .35; cursor: default; }

.stc-gallery__track {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  min-width: 0;
}
.stc-gallery__track::-webkit-scrollbar { display: none; }
.stc-gallery__item {
  flex: 0 0 72%;
  scroll-snap-align: start;
  aspect-ratio: 1.09;
  border-radius: 14px;
  overflow: hidden;
  background: var(--stc-soft);
}
.stc-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (min-width: 640px)  { .stc-gallery__item { flex-basis: calc((100% - 28px) / 3); } }
@media (min-width: 1024px) {
  .stc-gallery {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-bottom: 3.5rem;
  }
  .stc-gallery__item { flex-basis: calc((100% - 42px) / 4); }
}
@media (min-width: 1280px) { .stc-gallery__item { flex-basis: calc((100% - 56px) / 5); } }

/* Services */
.stc-services {
  background: var(--stc-band);
  padding: 2.75rem 0;
}
.stc-services__inner {
  display: grid;
  gap: 1.75rem;
}
.stc-services__title {
  color: var(--stc-black);
  font-size: clamp(1.424rem, 0.553vi + 1.286rem, 1.728rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.stc-services__sub {
  color: var(--stc-ink);
  font-size: 1.0625rem;
  margin: .4rem 0 0;
}
.stc-services__group + .stc-services__group { margin-top: 1.75rem; }
.stc-services__group-title {
  color: var(--stc-black);
  font-size: clamp(1.125rem, 0.136vi + 1.091rem, 1.2rem);
  font-weight: 400;
  margin: 0 0 1rem; line-height: 1.25}
.stc-services__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.stc-service {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  min-width: 0;
}
.stc-service__icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  object-fit: contain;
  /* EdNext icons are black PNGs: tint them navy. */
  filter: invert(11%) sepia(52%) saturate(3100%) hue-rotate(226deg) brightness(78%) contrast(103%);
}
.stc-service__icon--dot {
  display: block;
  width: 10px;
  height: 10px;
  margin: 10px 11px;
  border-radius: 99px;
  background: var(--stc-black);
  filter: none;
}
.stc-service__text { min-width: 0; }
.stc-service__name {
  display: block;
  color: var(--stc-black);
  font-size: .9375rem;
  line-height: 1.3;
}
.stc-service__detail {
  display: block;
  color: var(--stc-muted);
  font-size: .8125rem;
  line-height: 1.35;
  margin-top: .1rem;
}
.stc-services__body:not(.is-open) .is-extra { display: none; }

@media (min-width: 768px) {
  .stc-services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .stc-services { padding: 3rem 0; }
  .stc-services__inner { grid-template-columns: 4fr 8fr; gap: 0; }
  .stc-services__lead {
    padding: .25rem 3rem 0 0;
    border-right: 1px solid #d3d3d3;
    align-self: start;
    min-height: 100%;
  }
  .stc-services__body { padding-left: 3.5rem; }
}

/* ---------- Excursions ---------- */

.stc-exc {
  background: #fff;
  padding: 60px 0;
}
@media (min-width: 1024px) { .stc-exc { padding: 80px 0; } }

.stc-exc__title {
  color: #18191a;
  font-size: clamp(1.602rem, 0.858vi + 1.387rem, 2.074rem);
  font-weight: 400;
  line-height: 1.25;
  max-width: 28ch;
  margin: 0;
}

/* Number strip */
.stc-strip {
  display: grid;
  gap: 1rem;
  margin: 2.25rem 0 2.5rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--stc-line);
}
.stc-strip__title {
  color: var(--stc-black);
  font-size: clamp(1.266rem, 0.317vi + 1.186rem, 1.44rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.stc-strip__sub {
  color: var(--stc-muted);
  font-size: 1rem;
  margin: .3rem 0 0;
}
.stc-strip__main { min-width: 0; }
.stc-strip__nums {
  display: flex;
  gap: .25rem;
  margin: 0 -.35rem;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.stc-strip__nums::-webkit-scrollbar { display: none; }
.stc-num {
  position: relative;
  min-width: 2.75rem;
  height: 2.9rem;
  padding: 0 .35rem;
  border: 0;
  background: none;
  color: #686868;
  font: inherit;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color .15s;
}
.stc-num::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: .2rem;
  width: 1.4rem;
  height: 3px;
  border-radius: 3px;
  background: var(--stc-pink);
  transform: translateX(-50%) scaleX(0);
  transition: transform .2s;
}
.stc-num:hover { color: var(--stc-black); }
.stc-num.is-active { color: var(--stc-black); font-weight: 400; }
.stc-num.is-active::after { transform: translateX(-50%) scaleX(1); }
.stc-strip__current {
  color: var(--stc-muted);
  font-size: .95rem;
  line-height: 1.35;
  margin: .25rem 0 0;
  min-height: 1.35em;
}

@media (min-width: 1024px) {
  .stc-strip {
    grid-template-columns: minmax(260px, 30%) minmax(0, 1fr);
    align-items: start;
    gap: 2.5rem;
  }
  .stc-strip__nums { flex-wrap: wrap; gap: .35rem; overflow: visible; }
  .stc-num { min-width: 3.4rem; }
}

/* List + side cards */
.stc-exc__grid {
  display: grid;
  gap: 2.5rem;
}
.stc-exc__scroll { scroll-behavior: smooth; }
.stc-exc__scroll > [data-n] { scroll-margin-top: 1rem; border-radius: 12px; transition: background .3s; }
.stc-exc__scroll > [data-n]:focus { outline: none; }

@media (min-width: 1024px) {
  .stc-exc__grid {
    grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
    gap: 3rem;
    align-items: stretch;
  }
  .stc-exc__list {
    position: relative;
    min-height: 620px;
  }
  .stc-exc__scroll {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    padding-right: 1.25rem;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #d4d4d4 transparent;
  }
}

.stc-exc__side {
  display: grid;
  gap: 1.25rem;
  align-content: start;
  min-width: 0;
}
/* A page whose packages have no excursion keeps its day-by-day programme (ST-0069): the card alone, centred. */
.stc-exc--program-only .stc-exc__grid {
  grid-template-columns: minmax(0, 1fr);
  max-width: 46rem;
  margin: 0 auto;
}
/* Phones and tablets: map and programme first, the long list after. */
@media (max-width: 1023px) {
  .stc-exc__side { order: -1; }
}

.stc-card {
  border: 1px solid var(--stc-line);
  border-radius: var(--stc-radius);
  background: #fff;
  padding: 1.1rem 1rem 1rem;
  box-shadow: 0 10px 30px -24px rgba(24, 25, 26, .45);
  min-width: 0;
}
@media (min-width: 640px) { .stc-card { padding: 1.25rem 1.25rem 1.1rem; } }
.stc-card__title {
  color: var(--stc-black);
  font-size: clamp(1.266rem, 0.317vi + 1.186rem, 1.44rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0;
}
.stc-card__sub {
  color: var(--stc-muted);
  font-size: .95rem;
  margin: .25rem 0 0;
}
.stc-card__note {
  color: var(--stc-muted);
  font-size: .8rem;
  margin: .75rem 0 0;
}

/* Map */
.stc-map {
  position: relative;
  margin-top: .9rem;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 640 / 400;
  background: #d9d9d9;
}
.stc-map__svg {
  display: block;
  width: 100%;
  height: 100%;
  font-family: inherit;
}
.stc-map__sea { fill: #d9d9d9; }
.stc-map__land { fill: #eef2ea; stroke: #d7dfd2; stroke-width: .6; }
.stc-map__lake { fill: #d9d9d9; }
.stc-map__state { fill: none; stroke: #dbdbdb; stroke-width: .7; }
.stc-map__border { fill: none; stroke: #b1b1b1; stroke-width: .9; stroke-dasharray: 4 3; }
.stc-map__towns circle { fill: #808080; }
.stc-map__towns text {
  fill: #555555;
  font-size: 11.5px;
  paint-order: stroke;
  stroke: #eef2ea;
  stroke-width: 3px;
  stroke-linejoin: round;
}
.stc-map__routes line {
  stroke: var(--stc-black);
  stroke-width: 1.4;
  stroke-dasharray: 4 4;
  opacity: .65;
  transition: stroke .2s, opacity .2s, stroke-width .2s;
}
.stc-map__routes line.is-active { stroke: var(--stc-pink); stroke-width: 2; opacity: 1; }

.stc-pin {
  cursor: pointer;
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform .2s;
}
.stc-pin__drop { fill: var(--stc-pink); stroke: #fff; stroke-width: 1.5; }
.stc-pin__num {
  fill: #fff;
  font-size: 9.5px;
  font-weight: 700;
  text-anchor: middle;
  pointer-events: none;
}
.stc-pin__label {
  fill: var(--stc-black);
  font-size: 13px;
  font-weight: 600;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, .92);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}
.stc-pin.is-active { transform: scale(1.22); }
.stc-pin.is-active .stc-pin__drop { fill: var(--stc-pink-dark); }

.stc-pin--campus { transform-origin: 50% 50%; }
.stc-pin--campus circle { fill: var(--stc-black); stroke: #fff; stroke-width: 2.5; }
.stc-pin--campus .stc-pin__tag rect { fill: var(--stc-black); }
.stc-pin--campus .stc-pin__tag text { fill: #fff; font-size: 11.5px; font-weight: 500; }
.stc-pin--campus.is-active circle { fill: var(--stc-pink); }
.stc-pin--campus.is-active { transform: none; }

.stc-map__legend {
  position: absolute;
  left: .75rem;
  bottom: .75rem;
  display: flex;
  gap: 1.1rem;
  padding: .45rem .85rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px -8px rgba(24, 25, 26, .4);
  color: var(--stc-black);
  font-size: .875rem;
}
.stc-map__legend span { display: inline-flex; align-items: center; gap: .45rem; }
.stc-dot { display: inline-block; width: 12px; height: 12px; border-radius: 99px; }
.stc-dot--campus { background: var(--stc-black); }
.stc-dot--exc { background: var(--stc-pink); }

/* Programme */
.stc-week {
  margin-top: .75rem;
  border: 1px solid var(--stc-line);
  border-radius: 12px;
  overflow: hidden;
}
.stc-week__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 1rem;
  color: var(--stc-black);
  font-size: clamp(1.125rem, 0.136vi + 1.091rem, 1.2rem);
  cursor: pointer;
  list-style: none; line-height: 1.25}
.stc-week__summary::-webkit-details-marker { display: none; }
.stc-week[open] .stc-week__summary { background: #f3f3f3; }
.stc-week__summary svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s;
}
.stc-week[open] .stc-week__summary svg { transform: rotate(180deg); }

.stc-prog {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
  line-height: 1.35;
}
.stc-prog th,
.stc-prog td {
  padding: .5rem .75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f0f0f0;
}
.stc-prog tbody tr:last-child th,
.stc-prog tbody tr:last-child td { border-bottom: 0; }
.stc-prog thead th {
  color: var(--stc-black);
  font-size: .8125rem;
  font-weight: 600;
  border-bottom-color: var(--stc-line);
}
.stc-prog tbody th { color: var(--stc-black); font-weight: 600; white-space: nowrap; width: 3.75rem; }
.stc-prog td { color: var(--stc-ink); }
.stc-prog td.is-merged { background: #fbf4f8; }
.stc-prog__empty { color: #bbbbbb; }

@media (max-width: 639px) {
  .stc-prog thead { display: none; }
  .stc-prog,
  .stc-prog tbody,
  .stc-prog tr,
  .stc-prog th,
  .stc-prog td { display: block; width: auto; }
  .stc-prog tr { padding: .65rem .9rem; border-bottom: 1px solid #f0f0f0; }
  .stc-prog tbody tr:last-child { border-bottom: 0; }
  .stc-prog th,
  .stc-prog td { padding: .15rem 0; border: 0; }
  .stc-prog tbody th::before { content: attr(data-label) " "; }
  .stc-prog td::before {
    content: attr(data-label);
    display: block;
    color: var(--stc-muted);
    font-size: .75rem;
  }
  .stc-prog td.is-merged { background: none; }
}

.stc-program-soon {
  margin-top: .9rem;
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  background: var(--stc-soft);
}
.stc-program-soon p {
  color: var(--stc-ink);
  font-size: 1rem;
  margin: 0 0 .9rem;
}

/* Phones: the map is drawn at 640 px and shrinks to about half; pins and names grow to stay readable. */
@media (max-width: 639px) {
  .stc-map { aspect-ratio: 640 / 430; }
  .stc-pin { transform: scale(1.55); }
  .stc-pin.is-active { transform: scale(1.8); }
  .stc-pin--campus,
  .stc-pin--campus.is-active { transform: scale(1.4); }
  .stc-map__towns text { font-size: 17px; stroke-width: 4px; }
  .stc-map__legend { left: .5rem; bottom: .5rem; gap: .8rem; padding: .3rem .6rem; font-size: .75rem; }
  .stc-dot { width: 9px; height: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .stc-gallery__track,
  .stc-exc__scroll { scroll-behavior: auto; }
  .stc-pin,
  .stc-num::after,
  .stc-map__routes line { transition: none; }
}
