/* /erasmusplus — Erasmus+ projects: goals, yearly projects with photo galleries, partners. */

.erasmus {
  --navy: #2f2f72;            /* Erasmus blue, used only on this page */
  --caption-font: Avenir, "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif; /* the original sets captions in Avenir Light */
  background: var(--paper);
}

/* ---------- Title ---------- */
.erasmus-intro { height: 18.3rem; padding-top: 2.7rem; text-align: center; }
.erasmus-intro h1 { margin-bottom: 1.2rem; font-size: 5.2rem; line-height: 6.24rem; }
.erasmus-intro p { width: 58.7rem; margin-left: 19.5rem; font-size: 2rem; line-height: 2.8rem; color: var(--purple); }

/* ---------- Project goals ---------- */
.erasmus-goals { height: 38.5rem; padding-top: 3rem; background: var(--lilac-100); text-align: center; }
.erasmus-goals h2 { font-size: 4rem; line-height: 4.8rem; }
.erasmus-goals__list { display: flex; align-items: flex-start; margin-top: 1.6rem; }
.erasmus-goals__item { width: 28.1rem; }
.erasmus-goals__item h3 { font-size: 2.5rem; line-height: 3rem; }
.erasmus-goals__item--1 { margin-left: 2.1rem; padding-top: 1.6rem; }
.erasmus-goals__item--1 svg { width: 12rem; height: 11.6rem; margin: 0 0 2.6rem 7.2rem; }
.erasmus-goals__item--2 { margin-left: 6rem; padding-top: 1.6rem; }
.erasmus-goals__item--2 svg { width: 12rem; height: 10.4rem; margin: 0 0 2.3rem 8.1rem; }
.erasmus-goals__item--3 { margin-left: 3.1rem; }
.erasmus-goals__item--3 svg { width: 10.7rem; height: 12rem; margin: 0 0 2.3rem 8.9rem; }

/* ---------- Yearly projects ---------- */
.erasmus-projects { background: var(--lilac-100); }
.erasmus-project {
  --facts-gap: 1rem; --gallery-gap: 4.54rem; --rule-gap: 6.7rem; --end-gap: 6.4rem;
  padding: 3rem 0 var(--end-gap); background: var(--cream); text-align: center;
}
.erasmus-project h2 { font-size: 5.2rem; line-height: 6.24rem; }
.erasmus-project__facts { margin-top: var(--facts-gap); font-size: 1.6rem; line-height: 2.24rem; color: var(--lilac-300); }
.erasmus-project::after { /* blue rule under each project: full width less an 80px margin */
  content: ""; display: block;
  margin: var(--rule-gap) 8rem 0; border-top: .5rem solid var(--navy);
}
.erasmus-project--2021 { --facts-gap: 1.1rem; --gallery-gap: 4.3rem; --rule-gap: 6.74rem; }
.erasmus-project--2022 { --end-gap: 9.5rem; }
.erasmus-project--2023 { --gallery-gap: 5.3rem; --rule-gap: 7.64rem; --end-gap: 6.3rem; }
.erasmus-project--2024 { height: 23.6rem; padding: 5.5rem 0 0; }
.erasmus-project--2024::after { content: none; }

/* ---------- Gallery: one large slide, arrows, thumbnails ---------- */
.erasmus-gallery { margin-top: var(--gallery-gap); text-align: left; }
.erasmus-gallery__stage { position: relative; height: 55.8rem; overflow: hidden; border-radius: 2rem; }
.erasmus-gallery__slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden; cursor: pointer;
  transition: opacity .2s ease, visibility 0s .2s;
}
.erasmus-gallery__slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }
.erasmus-gallery__slide picture, .erasmus-gallery__slide img { width: 100%; height: 100%; }
.erasmus-gallery__slide img { object-fit: cover; }
.erasmus-gallery__open { /* added by the script: opens the full-screen view */
  position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; z-index: 1;
}
.erasmus-gallery__caption {
  position: absolute; left: 0; right: 0; bottom: 0; height: 69%; padding: 3rem; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(rgba(97, 98, 95, 0), var(--navy));
  color: var(--cream); pointer-events: none; z-index: 2;
}
.erasmus-gallery__caption h3 { font-weight: var(--bold); font-size: 1.8rem; line-height: 2.52rem; }
.erasmus-gallery__caption p { font-family: var(--caption-font); font-weight: 300; font-size: 1.5rem; line-height: 1.8rem; }
.erasmus-gallery__caption h3 + p { margin-top: .7rem; }
.erasmus-gallery__caption--spaced { padding-bottom: 4.8rem; }

.erasmus-gallery__nav {
  position: absolute; top: calc(50% - 1.8rem); z-index: 3;
  width: 4.4rem; height: 3.63rem; padding: 0; border: 0; background: none;
  color: var(--lime); opacity: .9; transition: opacity .2s ease;
}
.erasmus-gallery__nav:hover { opacity: 1; }
.erasmus-gallery__nav svg { width: 100%; height: 100%; }
.erasmus-gallery__nav--next { right: 2.3rem; }
.erasmus-gallery__nav--prev { left: 2.3rem; transform: scaleX(-1); }

.erasmus-gallery__thumbs { display: flex; gap: 1.8rem; height: 13.8rem; margin-top: .9rem; padding: .9rem; overflow-x: auto; scrollbar-width: none; }
.erasmus-gallery__thumbs::-webkit-scrollbar { display: none; }
.erasmus-gallery__thumb { display: block; width: 12rem; height: 12rem; padding: 0; border: 0; background: var(--white); }
.erasmus-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.erasmus-gallery__thumb[aria-current="true"] img { opacity: .4; }

/* ---------- Partners ---------- */
.erasmus-partners { background: var(--lilac-100); text-align: center; }
.erasmus-partners h2 { height: 13.8rem; padding-top: 3.5rem; font-size: 5.2rem; line-height: 6.24rem; }
.erasmus-partners__list { display: grid; grid-template-columns: repeat(5, 1fr); height: 30.2rem; background: var(--cream); }
.erasmus-partners__item { display: grid; place-items: center; }
.erasmus-partners__item--palau svg { width: 23rem; height: 8rem; }
.erasmus-partners__item--heutink svg { width: 20.5rem; height: 6.1rem; }
.erasmus-partners__item--square img { width: 14.9rem; height: 14.9rem; }
.erasmus-partners__item--prague img { width: 23rem; height: 6.9rem; }

/* ---------- Privacy notice ---------- */
.erasmus-privacy { height: 28.9rem; padding-top: 5.6rem; text-align: center; }
.erasmus-privacy h2 { font-size: 2.4rem; line-height: 2.88rem; }
.erasmus-privacy p { margin-top: 1.9rem; font-size: 1.6rem; line-height: 2.24rem; color: var(--lilac-300); }
.erasmus-privacy__file {
  display: flex; flex-direction: column; align-items: center; width: 20rem; margin: 2.46rem auto 0;
  font-size: 1.2rem; line-height: 1.68rem; color: var(--ink); text-decoration: none; white-space: nowrap;
  transition: color .2s ease;
}
.erasmus-privacy__file:hover { color: #91928e; }
.erasmus-privacy__file img { width: 4.3rem; height: 5.8rem; }

/* ---------- About the accreditation ---------- */
.erasmus-about { height: 32.1rem; padding-top: 5.4rem; background: var(--navy); color: var(--white); }
.erasmus-about h2 { font-size: 5.2rem; line-height: 6.24rem; }
.erasmus-about p { width: 51.2rem; margin-top: 4.96rem; font-size: 1.6rem; line-height: 2.24rem; }
.erasmus-about picture { position: absolute; left: 67.3rem; top: 13.5rem; }
.erasmus-about img { width: 30.7rem; height: 6.7rem; object-fit: cover; }
.erasmus::after { /* closing blue rule just above the footer */
  content: ""; display: block; position: relative; z-index: 1; height: .5rem;
  margin: 3.6rem 8rem -.1rem; background: var(--navy);
}

/* ---------- Full-screen view ---------- */
.erasmus-lightbox {
  width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 7.4rem 12rem 0 9rem; border: 0;
  background: var(--cream); color: var(--ink); overflow: hidden;
}
.erasmus-lightbox[open] { display: grid; grid-template-columns: minmax(0, 1fr) 30.8rem; column-gap: 9.5rem; }
.erasmus-lightbox::backdrop { background: var(--cream); }
.erasmus-lightbox__figure { position: relative; height: calc(100% - 7.4rem); min-height: 0; }
.erasmus-lightbox__figure img { width: 100%; height: 100%; object-fit: contain; }
.erasmus-lightbox__text { padding: 5.6rem 0 4rem; overflow-y: auto; }
.erasmus-lightbox__text h2 { font-size: 3.5rem; line-height: 4.9rem; color: var(--navy); }
.erasmus-lightbox__description { margin-top: 1.8rem; font-size: 1.8rem; line-height: 2.2rem; }
.erasmus-lightbox button { padding: 0; border: 0; background: none; color: var(--ink); }
.erasmus-lightbox__close { position: absolute; right: 3rem; top: 3rem; width: 3.8rem; height: 4.4rem; padding: .9rem .6rem; }
.erasmus-lightbox__close svg { width: 2.6rem; height: 2.6rem; margin: auto; }
.erasmus-lightbox__nav { position: absolute; top: calc(50% - 2.5rem); width: 5rem; height: 5rem; }
.erasmus-lightbox__nav svg { width: 100%; height: 100%; }
.erasmus-lightbox__nav--prev { left: -7rem; transform: scaleX(-1); }
.erasmus-lightbox__nav--next { right: -7rem; }
.erasmus-lightbox__nav[hidden] { display: none; }

@media (max-width: 600px) {
  .erasmus-intro { height: 14.8rem; padding: 2rem 2rem 0; }
  .erasmus-intro h1 { margin-bottom: 1rem; font-size: 2.6rem; line-height: 3.12rem; }
  .erasmus-intro p { width: 28rem; margin-left: .5rem; font-size: 1.6rem; line-height: 2.24rem; }

  .erasmus-goals { height: auto; padding: 1rem 2rem 2.16rem; }
  .erasmus-goals h2 { font-size: 2rem; line-height: 2.4rem; }
  .erasmus-goals__list { display: block; margin-top: 0; }
  .erasmus-goals__item, .erasmus-goals__item--1, .erasmus-goals__item--2, .erasmus-goals__item--3 { width: auto; margin-left: 0; padding-top: 2rem; }
  .erasmus-goals__item h3 { font-size: 1.6rem; line-height: 1.92rem; }
  .erasmus-goals__item--1 svg { width: 8rem; height: 7.8rem; margin: 0 auto 1rem; }
  .erasmus-goals__item--2 { padding-top: 2.1rem; }
  .erasmus-goals__item--2 svg { width: 8rem; height: 7rem; margin: 0 auto 1rem; }
  .erasmus-goals__item--3 { padding-top: 2.96rem; }
  .erasmus-goals__item--3 svg { width: 7rem; height: 7.9rem; margin: 0 auto 1rem; }

  .erasmus-project, .erasmus-project--2021, .erasmus-project--2022, .erasmus-project--2023 {
    --facts-gap: .96rem; --gallery-gap: 1.02rem;
    padding: 2rem 2rem 2rem;
  }
  .erasmus-project::after { content: none; }
  .erasmus-project h2 { font-size: 2.2rem; line-height: 2.64rem; }
  .erasmus-project--2023 { --facts-gap: 1.06rem; --gallery-gap: 1.12rem; margin-top: 1rem; padding-bottom: 1.7rem; }
  .erasmus-project--2024 { --facts-gap: 1.76rem; height: 24rem; padding: 2rem 2rem 0; }

  .erasmus-gallery__stage { height: 16.3rem; }
  .erasmus-gallery__thumbs { height: 10.8rem; }
  .erasmus-gallery__thumb { width: 9rem; height: 9rem; }
  /* the 2023 gallery is set up slightly differently on phones in the original */
  .erasmus-project--2023 .erasmus-gallery__nav { color: var(--cream); }
  .erasmus-project--2023 .erasmus-gallery__caption { height: 100%; }
  .erasmus-project--2023 .erasmus-gallery__caption h3 { line-height: 2.2rem; }

  .erasmus-partners { padding-bottom: 6rem; }
  .erasmus-partners h2 { height: 6.7rem; padding-top: 2.1rem; font-size: 2.2rem; line-height: 2.64rem; }
  .erasmus-partners__list { display: block; height: auto; }
  .erasmus-partners__item { padding: 2rem 0; }
  .erasmus-partners__item--palau { padding-bottom: 1rem; }
  .erasmus-partners__item--palau svg { width: 16rem; height: 5.6rem; }
  .erasmus-partners__item--heutink svg { width: 14rem; height: 4.2rem; }
  .erasmus-partners__item--square img { width: 10rem; height: 10rem; }
  .erasmus-partners__item--prague img { width: 16rem; height: 4.8rem; }

  .erasmus-privacy { height: 17.7rem; padding: 2rem 2rem 0; }
  .erasmus-privacy h2 { font-size: 1rem; line-height: 1.2rem; }
  .erasmus-privacy p { margin-top: 1rem; font-size: 1.2rem; line-height: 1.68rem; }
  .erasmus-privacy__file { margin-top: 2.04rem; }
  .erasmus-privacy__file img { width: 2.9rem; height: 3.9rem; }

  .erasmus-about { height: 26.2rem; padding: 2rem 2rem 0; }
  .erasmus-about h2 { font-size: 2.6rem; line-height: 3.12rem; }
  .erasmus-about p { width: auto; margin-top: 1.28rem; font-size: 1.3rem; line-height: 1.82rem; }
  .erasmus-about picture { position: static; margin-top: 1.88rem; }
  .erasmus-about img { width: 24rem; height: 5rem; }
  .erasmus::after { content: none; }

  .erasmus-lightbox { padding: 6rem 2rem 2rem; overflow-y: auto; }
  .erasmus-lightbox[open] { display: block; }
  .erasmus-lightbox__figure { height: 24rem; }
  .erasmus-lightbox__text { padding: 2rem 0 0; overflow: visible; }
  .erasmus-lightbox__text h2 { font-size: 2.4rem; line-height: 3.2rem; }
  .erasmus-lightbox__description { margin-top: 1.2rem; font-size: 1.6rem; line-height: 2.2rem; }
  .erasmus-lightbox__close { right: 1rem; top: 1rem; }
  .erasmus-lightbox .erasmus-lightbox__nav { top: calc(50% - 2rem); width: 4rem; height: 4rem; background: rgba(242, 244, 237, .7); border-radius: 50%; }
  .erasmus-lightbox__nav--prev { left: 0; }
  .erasmus-lightbox__nav--next { right: 0; }
}

/* Wider phones: the 320px design stays centred (--gutter in base.css) */
@media (max-width: 600px) {
  .erasmus-intro, .erasmus-about { padding-inline: calc(2rem + var(--gutter)); }
}
