/* ==========================================================================
   Art Competition page (art-competition.html)
   Desktop sizes follow the reference screenshot at a 1280px viewport.
   The reference renders in the system Arial/Helvetica stack, kept here.
   ========================================================================== */

.ac {
  --gr-container: 1144px;
  --gr-gutter: 24px;
  --ac-wide: 1212px;
  --ac-navy: #11324d;
  --ac-cyan: #1f8fc4;
  --ac-cyan-dark: #1b7fae;
  --ac-text: #5a6573;
  --ac-muted: #7d8894;
  --ac-tint: #edf6fb;
  font-family: Arial, "Helvetica Neue", Helvetica, "Liberation Sans", sans-serif;
  color: var(--ac-navy);
}

.ac-container {
  width: 100%;
  max-width: calc(var(--gr-container) + 2 * var(--gr-gutter));
  margin-inline: auto;
  padding-inline: var(--gr-gutter);
}

/* Header and hero use a slightly wider frame than the content */
.ac-wrap {
  width: 100%;
  max-width: var(--ac-wide);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.ac-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 129px;
  padding: 16px 34px 16px;
}

.ac-header__logo img {
  width: auto;
  height: 64px;
}

.ac-header__funding {
  display: flex;
  align-items: center;
  gap: 22px;
}

.ac-header__erasmus {
  font-size: 19px;
  letter-spacing: -0.01em;
  color: #305f85;
}

.ac-header__funding .gr-eu {
  height: 52px;
}

/* ---------- Hero ---------- */
.ac-hero-wrap {
  padding-inline: var(--gr-gutter);
}

.ac-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 32px;
  align-items: center;
  max-width: var(--ac-wide);
  min-height: 440px;
  margin-inline: auto;
  padding: 56px 62px 48px;
  overflow: hidden;
  background: linear-gradient(90deg, #073a66 0%, #084675 35%, #0b5f8c 68%, #2f92a6 100%);
  color: #fff;
}

/* Soft concentric circle behind the collage */
.ac-hero::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 25px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.05) 0 66%, transparent 66.5%),
    radial-gradient(circle, transparent 0 82%, rgba(255, 255, 255, 0.07) 82.5% 100%);
  pointer-events: none;
}

.ac-hero__content {
  position: relative;
}

.ac-hero__eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #f3cf4f;
}

.ac-hero__title {
  max-width: 470px;
  margin-top: 24px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.09;
  letter-spacing: -0.01em;
}

.ac-hero__lead {
  max-width: 560px;
  margin-top: 28px;
  font-size: 18.5px;
  line-height: 1.7;
  color: #dbe7f2;
}

.ac-hero__lead span {
  display: block;
}

.ac-hero__button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding: 14px 30px;
  border-radius: 999px;
  background: #fff;
  color: #0d3b66;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(3, 25, 50, 0.25);
}

.ac-hero__button span {
  font-size: 20px;
  line-height: 1;
}

.ac-hero__button:hover {
  background: #eaf4fb;
}

.ac-hero__collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ac-hero__collage img {
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  border: 5px solid #fff;
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(3, 25, 50, 0.3);
}

.ac-hero__collage > :nth-child(1) { transform: rotate(-2deg) translateY(-6px); }
.ac-hero__collage > :nth-child(2) { transform: rotate(2.5deg); }
.ac-hero__collage > :nth-child(3) { transform: rotate(-1.5deg) translateX(-6px); }
.ac-hero__collage > :nth-child(4) { transform: rotate(3deg) translateY(8px); }

/* Collage tiles that are contest artworks: link to the artwork, with its title on hover */
.ac-hero__side {
  position: relative;
}

.ac-hero__tile {
  position: relative;
  transition: transform 0.25s ease;
}

.ac-hero__tile img {
  display: block;
}

.ac-hero__art {
  position: relative;
  display: block;
  color: #fff;
  text-decoration: none;
}

.ac-hero__art:focus-visible {
  outline: 3px solid #ffd447;
  outline-offset: 3px;
}

.ac-hero__label {
  position: absolute;
  right: 11px;
  bottom: 11px;
  left: 11px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(7, 30, 52, 0.84);
  font-size: 11.5px;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.ac-hero__label-title {
  display: block;
  font-weight: 700;
}

.ac-hero__label-by {
  display: block;
  opacity: 0.85;
}

.ac-hero__art:hover .ac-hero__label,
.ac-hero__art:focus-visible .ac-hero__label {
  opacity: 1;
  transform: none;
}

.ac-hero__collage > .ac-hero__tile:has(.ac-hero__art):hover {
  z-index: 1;
  transform: rotate(0deg) scale(1.04);
}

.ac-hero__caption {
  margin-top: 18px;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
}

/* Portrait-format images: keep the subject's face in the crop */
.ac .ac-focus-top {
  object-position: 50% 12%;
}

/* ---------- Intro ---------- */
.ac-intro {
  padding: 30px 0 18px;
}

.ac-intro__inner {
  display: grid;
  grid-template-columns: minmax(0, 765px) 264px;
  justify-content: space-between;
  gap: 32px;
  align-items: start;
}

.ac-intro__inner > p {
  font-size: 16.5px;
  line-height: 1.85;
  color: var(--ac-text);
}

.ac-intro__box {
  padding: 20px 24px;
  border-left: 4px solid #2aa0d0;
  background: #e9f3f8;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ac-text);
}

.ac-intro__box-title {
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--ac-navy);
}

/* ---------- Section scaffolding ---------- */
.ac-section {
  padding: 30px 0 18px;
}

.ac-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.ac-heading {
  position: relative;
  max-width: 460px;
  padding-top: 22px;
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ac-navy);
}

.ac-heading--wide {
  max-width: none;
  font-size: 34px;
}

.ac-heading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 5px;
  border-radius: 3px;
  background: var(--ac-cyan);
}

.ac-pill {
  flex: none;
  padding: 11px 26px;
  border-radius: 999px;
  background: #daeef5;
  color: #1e89b1;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ac-section__intro {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ac-muted);
}

/* ---------- Artwork grid ---------- */
.ac-art-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.ac-art {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 257px;
  overflow: hidden;
  border: 1px solid #e3ecf2;
  border-radius: 10px;
  background: #f4f8fb;
}

.ac-art--captioned {
  height: auto;
  min-height: 257px;
}

/* The image links to the full artwork (the original file), since the card crops it */
.ac-art__view {
  position: relative;
  display: block;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #e8f0f6;
}

.ac-art--captioned .ac-art__view {
  flex: none;
  height: 186px;
}

.ac-art__view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.ac-art__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ac-cyan-dark);
  box-shadow: 0 1px 4px rgba(0, 30, 60, 0.18);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ac-art__zoom .gr-icon {
  width: 16px;
  height: 16px;
}

.ac-art__view:hover .ac-art__zoom,
.ac-art__view:focus-visible .ac-art__zoom {
  opacity: 1;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .ac-art__view:hover img {
    transform: scale(1.03);
  }
}

.ac-art__caption {
  flex: 1;
  padding: 14px 20px 16px;
}

.ac-art__caption h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.ac-art__caption h3,
.ac-venue__caption h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ac-navy);
}

.ac-art__caption p,
.ac-venue__caption p {
  margin-top: 4px;
  font-size: 12.5px;
  color: #8a95a1;
}

.ac-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fff;
  color: #2b6f96;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 1px 4px rgba(0, 30, 60, 0.15);
}

/* Places 1-8: gold, silver, bronze, then GREATER blue, as on the certificates */
.ac-badge--place {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 9px;
}

.ac-badge--place .gr-icon {
  width: 13px;
  height: 13px;
}

.ac-badge--gold {
  background: #f2c230;
  color: #4a3500;
}

.ac-badge--silver {
  background: #dfe5ea;
  color: #2f3d4a;
}

.ac-badge--bronze {
  background: #d8955a;
  color: #3d1f05;
}

.ac-badge--blue {
  background: #00ace4;
  color: #fff;
}

.js .ac-art--more,
.js .ac-video--more {
  display: none;
}

.js .is-expanded .ac-art--more,
.js .is-expanded .ac-video--more {
  display: flex;
}

/* ---------- "View all" buttons ---------- */
.ac-more {
  display: none;
  justify-content: center;
  margin-top: 28px;
}

.js .ac-more {
  display: flex;
}

.ac-more__button {
  min-width: 310px;
  padding: 14px 28px;
  border: 1.5px solid #3ca0cf;
  border-radius: 999px;
  background: #fff;
  color: var(--ac-cyan-dark);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ac-more__button:hover {
  background: #eef7fc;
}

/* ---------- Video grid ---------- */
.ac-section--videos {
  padding-top: 40px;
}

.ac-video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 26px;
}

.ac-video {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 10px;
  background: #082f4f;
}

.ac-video__media {
  position: relative;
  height: 180px;
  overflow: hidden;
  /* Shown until (or instead of) a frame of the video */
  background:
    radial-gradient(circle at 78% 22%, rgba(31, 143, 196, 0.55), transparent 55%),
    linear-gradient(135deg, #0d4269 0%, #072a45 100%);
}

.ac-video__media img,
.ac-video__preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ac-video__preview {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ac-video__preview.is-ready {
  opacity: 1;
}

.ac-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0 0 0 4px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ac-cyan);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 14px rgba(0, 20, 40, 0.3);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.ac-video__play:hover {
  transform: translate(-50%, -50%) scale(1.06);
}

.ac-video__play .gr-icon {
  width: 24px;
  height: 24px;
}

.ac-video__caption {
  flex: 1;
  padding: 18px 20px 20px;
}

.ac-video__caption h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.ac-video__caption p {
  margin-top: 5px;
  font-size: 12.5px;
  color: #b9c9d8;
}

/* ---------- How it worked ---------- */
.ac-steps-wrap {
  margin-top: 40px;
  padding-inline: var(--gr-gutter);
}

.ac-steps {
  max-width: var(--ac-wide);
  margin-inline: auto;
  padding: 36px 0 40px;
  background: var(--ac-tint);
}

.ac-steps .ac-container {
  padding-inline: 10px;
}

.ac-steps__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 26px;
}

.ac-step {
  min-height: 214px;
  padding: 24px 24px 22px;
  border-top: 4px solid var(--ac-cyan);
  background: #fff;
}

/* Selection timeline: dates on a line above the step cards */
.ac-timeline {
  position: relative;
}

.ac-timeline::before {
  content: "";
  position: absolute;
  top: 50px;
  right: calc((100% - 45px) / 8);
  left: calc((100% - 45px) / 8);
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--ac-cyan), #7cc9ea);
}

.ac-timeline .ac-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.ac-step .ac-step__date {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 13px;
  border-radius: 999px;
  background: #fff;
  color: var(--ac-navy);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(17, 50, 77, 0.1);
}

.ac-step .ac-step__date .gr-icon {
  width: 14px;
  height: 14px;
  color: var(--ac-cyan);
}

.ac-step__dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: 12px 0 14px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--ac-cyan);
  box-shadow: 0 0 0 2px var(--ac-cyan);
}

.ac-timeline .ac-step:not(.ac-step--dated) .ac-step__dot {
  margin-top: 42px;
}

.ac-step__card {
  flex: 1;
  width: 100%;
  min-height: 190px;
  padding: 22px 22px 20px;
  border-top: 4px solid var(--ac-cyan);
  background: #fff;
  box-shadow: 0 6px 18px rgba(17, 50, 77, 0.06);
}

.ac-timeline .ac-step:last-child .ac-step__dot {
  width: 22px;
  height: 22px;
  margin-block: 10px 12px;
  background: #f2b632;
  box-shadow: 0 0 0 2px #f2b632;
}

.ac-step__num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--ac-cyan);
}

.ac-step h3 {
  margin-top: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ac-navy);
}

.ac-step p {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--ac-muted);
}

/* ---------- Travelling exhibition ---------- */
.ac-travel {
  padding-top: 36px;
  padding-bottom: 50px;
}

.ac-travel__intro {
  max-width: 1100px;
}

.ac-travel__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-top: 22px;
}

.ac-venue {
  overflow: hidden;
  border: 1px solid #e3eaf0;
  border-radius: 8px;
  background: #fff;
}

.ac-venue img {
  width: 100%;
  height: 146px;
  object-fit: cover;
}

.ac-venue__caption {
  padding: 18px 18px 20px;
}

/* ---------- Footer ---------- */
.ac-footer {
  background: #e2f4fb;
}

.ac-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 122px;
  padding-block: 20px;
}

.ac-footer__logo {
  width: auto;
  height: 52px;
}

.ac-footer__note {
  font-size: 13px;
  line-height: 1.7;
  color: #3d7ea6;
}

.ac-footer__eu {
  justify-self: end;
  height: 50px;
}

/* ---------- Video dialog ---------- */
.ac-video-dialog {
  width: min(880px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #082f4f;
  color: #fff;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.ac-video-dialog::backdrop {
  background: rgba(4, 20, 36, 0.7);
}

.ac-video-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 14px 22px;
}

.ac-video-dialog__head h2 {
  margin: 0;
  font-size: 18px;
}

.ac-video-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.ac-video-dialog {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

.ac-video-dialog__stage video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #000;
}

.ac-video-dialog__note {
  margin: 0;
  padding: 48px 24px 56px;
  text-align: center;
  font-size: 15px;
  color: #cfdbe6;
}

.ac-video-dialog__help {
  margin: 0;
  padding: 12px 4px 2px;
  text-align: center;
  font-size: 13.5px;
}

.ac-video-dialog__help a {
  color: #9fd4ef;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .ac-timeline.ac-steps__grid {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-left: 36px;
  }

  .ac-timeline::before {
    top: 8px;
    right: auto;
    bottom: 8px;
    left: 9px;
    width: 3px;
    height: auto;
    background: linear-gradient(180deg, var(--ac-cyan), #7cc9ea);
  }

  .ac-timeline .ac-step {
    position: relative;
    display: block;
  }

  .ac-step__dot,
  .ac-timeline .ac-step:not(.ac-step--dated) .ac-step__dot {
    position: absolute;
    top: 6px;
    left: -35px;
    margin: 0;
  }

  .ac-timeline .ac-step:last-child .ac-step__dot {
    left: -37px;
    margin: 0;
  }

  .ac-step .ac-step__date {
    margin-bottom: 10px;
  }

  .ac-step__card {
    min-height: 0;
  }

  .ac-hero {
    grid-template-columns: minmax(0, 1fr) 340px;
    padding: 48px 44px 44px;
  }

  .ac-hero::before {
    right: 20px;
  }

  .ac-intro__inner {
    grid-template-columns: minmax(0, 1fr) 250px;
  }

  .ac-steps__grid,
  .ac-travel__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .ac-header__inner {
    min-height: 0;
    padding: 16px var(--gr-gutter);
    flex-wrap: wrap;
  }

  .ac-header__logo img {
    height: 50px;
  }

  .ac-header__funding .gr-eu {
    height: 42px;
  }

  .ac-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 40px 32px;
  }

  .ac-hero::before {
    top: auto;
    bottom: -220px;
    right: -160px;
    transform: none;
  }

  .ac-hero__collage {
    max-width: 440px;
  }

  .ac-intro__inner {
    grid-template-columns: 1fr;
  }

  .ac-section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .ac-art-grid,
  .ac-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ac-footer__inner {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .ac-footer__eu {
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .ac {
    --gr-gutter: 16px;
  }

  .ac-header__logo img {
    height: 42px;
  }

  .ac-header__funding {
    gap: 14px;
  }

  .ac-header__erasmus {
    font-size: 16px;
  }

  .ac-header__funding .gr-eu {
    height: 34px;
  }

  .ac-hero {
    padding: 32px 20px;
  }

  .ac-hero__title {
    margin-top: 16px;
    font-size: 40px;
  }

  .ac-hero__lead {
    margin-top: 18px;
    font-size: 16.5px;
  }

  .ac-heading,
  .ac-heading--wide {
    font-size: 28px;
  }

  .ac-art-grid,
  .ac-video-grid,
  .ac-steps__grid,
  .ac-travel__grid {
    grid-template-columns: 1fr;
  }

  .ac-art {
    height: auto;
  }

  .ac-art--captioned {
    min-height: 0;
  }

  .ac-art__view,
  .ac-art--captioned .ac-art__view {
    flex: none;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .ac-art__zoom {
    opacity: 1;
  }

  .ac-step {
    min-height: 0;
  }

  .ac-more__button {
    min-width: 0;
    width: 100%;
  }
}

.ac-video-dialog__frame {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

/* ==========================================================================
   Place, artist and description (artwork dialog and video dialog)
   ========================================================================== */

.js .ac-art {
  cursor: pointer;
}

.ac-place-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.ac-place-line .ac-badge {
  position: static;
  box-shadow: none;
}

.ac-badge--large {
  padding: 7px 14px;
  font-size: 13.5px;
}

.ac-badge--large.ac-badge--place {
  gap: 7px;
  padding-left: 11px;
}

.ac-badge--large .gr-icon {
  width: 16px;
  height: 16px;
}

.ac-badge--rank {
  background: #e3f0f8;
  color: #1b5f86;
}

.ac-place-line__category {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ac-muted);
}

.ac-prose {
  font-size: 14.5px;
  line-height: 1.65;
  color: #46525e;
}

.ac-prose p + p {
  margin-top: 0.8em;
}

/* ---------- Artwork dialog ---------- */
.ac-art-dialog {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ac-navy);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.ac-art-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.ac-art-dialog::backdrop {
  background: rgba(4, 20, 36, 0.82);
}

.ac-art-dialog__figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  max-height: calc(100vh - 32px);
  margin: 0;
  background: #0b2238;
}

.ac-art-dialog__figure img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 32px);
  object-fit: contain;
  transition: opacity 0.2s ease;
}

.ac-art-dialog.is-loading .ac-art-dialog__figure img {
  opacity: 0.2;
}

.ac-art-dialog.is-loading .ac-art-dialog__figure::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ac-spin 0.8s linear infinite;
}

@keyframes ac-spin {
  to {
    transform: rotate(360deg);
  }
}

.ac-art-dialog__info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 32px);
  padding: 24px 26px 18px;
  overflow-y: auto;
}

.ac-art-dialog__info .ac-place-line {
  padding-right: 44px; /* room for the close button */
}

.ac-art-dialog__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #eef3f7;
  color: var(--ac-navy);
  cursor: pointer;
}

.ac-art-dialog__close:hover {
  background: #e0e9f0;
}

.ac-art-dialog__title {
  margin-top: 4px;
  font-size: 22px;
  line-height: 1.25;
  color: var(--ac-navy);
}

.ac-art-dialog__artist {
  font-size: 14.5px;
  color: var(--ac-muted);
}

.ac-art-dialog__artist strong {
  color: #2b3b4a;
}

.ac-art-dialog__info .ac-prose {
  padding-top: 12px;
  border-top: 1px solid #e6edf2;
}

.ac-art-dialog__original {
  font-size: 13.5px;
}

.ac-art-dialog__original a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ac-cyan-dark);
  font-weight: 700;
  text-decoration: none;
}

.ac-art-dialog__original a:hover {
  text-decoration: underline;
}

.ac-art-dialog__original .gr-icon {
  width: 15px;
  height: 15px;
}

.ac-art-dialog__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #e6edf2;
}

.ac-art-dialog__step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 1.5px solid #3ca0cf;
  border-radius: 999px;
  background: #fff;
  color: var(--ac-cyan-dark);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.ac-art-dialog__step:hover:not(:disabled) {
  background: #eef7fc;
}

.ac-art-dialog__step:disabled {
  border-color: #d5dee6;
  color: #a7b3be;
  cursor: default;
}

.ac-art-dialog__step .gr-icon {
  width: 16px;
  height: 16px;
}

.ac-art-dialog__count {
  font-size: 13px;
  font-weight: 700;
  color: var(--ac-muted);
}

/* ---------- Video dialog: place, artist and description under the player ---------- */
.ac-video-dialog__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 22px 22px;
}

.ac-video-dialog__info[hidden] {
  display: none;
}

.ac-video-dialog .ac-badge--rank {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.ac-video-dialog .ac-place-line__category {
  color: #9fb8cc;
}

.ac-video-dialog__artist {
  font-size: 14px;
  color: #cfdbe6;
}

.ac-video-dialog .ac-prose {
  color: #dbe6ef;
}

@media (max-width: 860px) {
  .ac-art-dialog {
    width: 100%;
    height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .ac-art-dialog[open] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .ac-art-dialog__figure {
    min-height: 220px;
    max-height: 52vh;
  }

  .ac-art-dialog__figure img {
    max-height: 52vh;
  }

  .ac-art-dialog__info {
    max-height: none;
    padding: 18px 18px 16px;
  }

  .ac-art-dialog__info .ac-place-line {
    padding-right: 0;
  }

  .ac-art-dialog__close {
    background: rgba(255, 255, 255, 0.92);
  }

  .ac-art-dialog__title {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ac-hero__tile,
  .ac-hero__label {
    transition: none;
  }

  .ac-art-dialog.is-loading .ac-art-dialog__figure::after {
    animation-duration: 2.4s;
  }
}
