/* Shared DE/EN homepage refinements. Scoped so programme and admin pages
   keep their own layouts; server-rendered masterclasses use the same rules. */
.home-page .home-skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 2147483001;
  transform: translateY(-200%);
  padding: 12px 18px;
  background: var(--paper);
  color: var(--ink-900);
  border: 2px solid var(--violet-500);
}

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

.home-page #main-content {
  scroll-margin-top: 84px;
}

.home-page main > :is(.tracks-section, .network-section, .content-section, .masterclass-section) {
  padding-block: 80px;
}

.home-page :is(.tracks-header, .network-intro) {
  margin-bottom: 40px;
}

.home-page .faculty-section {
  margin-top: 96px;
}

.home-page .faculty-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 32px;
}

.home-page .faculty-card img {
  display: block;
  height: 240px;
  object-fit: contain;
  background: var(--paper);
}

/* The subject and date, not an oversized portrait, lead each event card.
   One to four events remain legible without empty three-quarter rows. */
.home-page #masterclasses .mc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.home-page #masterclasses .mc-card {
  display: grid;
  grid-template-columns: minmax(100px, 28%) minmax(0, 1fr);
  align-items: start;
}

.home-page #masterclasses .mc-card-bild {
  margin: 20px 0 20px 20px;
  aspect-ratio: 1;
  border-radius: 2px;
}

.home-page #masterclasses .mc-card-text {
  align-self: stretch;
  min-width: 0;
  padding: 20px;
}

.home-page #masterclasses .mc-card-titel {
  font-size: 1.25rem;
  overflow-wrap: break-word;
}

.home-page #masterclasses .mc-card-status {
  inset: auto 0 0;
  padding: 4px;
  text-align: center;
  font-size: .65rem;
  letter-spacing: .04em;
}

/* A clear focus treatment and comfortable targets across input devices. */
.home-page main :is(a, button):focus-visible {
  outline: 2px solid var(--violet-500);
  outline-offset: 4px;
}

.home-page .sv-gradient-teaser-v3 a:focus-visible {
  outline-color: #fff;
}

.home-page :is(.filter-btn, .register-chip) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-block: 0;
}

.home-page .register-note-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-page .partner-item[hidden] {
  display: none;
}

.home-page .home-filter-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Photos are impressions, not controls: do not promise a nonexistent zoom. */
.home-page :is(.gallery-item, .summit-sheet) {
  cursor: default;
}

.home-page .gallery-item:hover img {
  transform: none;
}

.home-page .gallery-item:hover::after {
  border-color: transparent;
}

/* The closed drawer is off-canvas, but must also leave the tab order. */
@media (min-width: 992px) {
  .home-page .nav-wrapper :is(.nav-item, .lang-select):focus-within:not(.home-menu-dismissed) > .program-dropdown {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }

  .home-page .nav-wrapper .home-menu-dismissed > .program-dropdown {
    opacity: 0;
    visibility: hidden;
    transition: none;
  }
}

@media (max-width: 991.98px) {
  .home-page .nav-menu:not(.active) {
    visibility: hidden;
  }
}

/* Keep advice available while covering less of the programme register. */
@media (min-width: 769px) {
  .home-page .sticky-contact-card.sticky-contact-card {
    width: 300px;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
  }

  .home-page .sticky-contact-card.sticky-contact-card .sticky-contact-image-wrap {
    width: 42px;
    height: 42px;
  }

  .home-page .sticky-contact-card.sticky-contact-card .sticky-contact-title {
    display: none;
  }

  .home-page .sticky-contact-card.sticky-contact-card .sticky-contact-name {
    margin-top: 6px;
  }

  .home-page .sticky-contact-card.sticky-contact-card .sticky-contact-cta {
    margin-top: 6px;
  }
}

@media (max-width: 1100px) {
  .home-page .faculty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .home-page #masterclasses .mc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-page #masterclasses .mc-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }
}

@media (max-width: 768px) {
  .home-page main > :is(.tracks-section, .network-section, .content-section, .masterclass-section) {
    padding-block: 56px;
  }

  .home-page :is(.tracks-header, .network-intro) {
    margin-bottom: 32px;
  }

  .home-page .faculty-section {
    margin-top: 64px;
  }

  .home-page .faculty-grid {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 28px;
  }

  .home-page .faculty-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: center;
    padding: 16px;
    gap: 20px;
  }

  .home-page .faculty-card img {
    width: 96px;
    height: 108px;
    border-radius: 2px;
  }

  .home-page .faculty-info {
    min-width: 0;
    border: 0;
    padding: 0;
  }

  .home-page .faculty-name {
    font-size: 1.05rem;
  }

  .home-page .sv-gradient-teaser-v3 {
    padding: 36px 24px;
  }

  .home-page .sv-gradient-v3-features {
    gap: 24px;
    margin-block: 28px;
  }

  .home-page .sv-gradient-v3-feature {
    padding: 20px 0 0;
  }

  .home-page .sv-gradient-v3-feature-icon {
    margin-bottom: 8px;
  }

  .home-page .sv-gradient-v3-footer {
    gap: 16px;
    margin-top: 24px;
  }

  .home-page .sv-gradient-v3-footer-text {
    margin-bottom: 0;
  }

  .home-page .sv-gradient-v3-partner-container,
  .home-page .sv-gradient-v3-partner {
    margin-bottom: 0;
  }

  .home-page .sv-gradient-v3-cta {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    padding-inline: 18px;
  }

  .home-page .gradient-quote-content {
    padding: 28px 20px 24px;
  }

  .home-page .gradient-quote-footer {
    padding: 20px;
    flex-wrap: wrap;
    gap: 14px;
  }

  .home-page .gradient-person {
    flex: 1 1 220px;
  }

  .home-page .gradient-company {
    margin-left: 62px;
    max-width: 80px;
  }
}

@media (max-width: 480px) {
  .home-page #masterclasses .mc-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0 16px;
    padding: 16px;
  }

  .home-page #masterclasses .mc-card-bild {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 72px;
    margin: 0;
  }

  .home-page #masterclasses .mc-card-text {
    display: contents;
  }

  .home-page #masterclasses .mc-card-marke {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    margin-bottom: 6px;
  }

  .home-page #masterclasses .mc-card-dozent {
    grid-column: 2;
    grid-row: 2;
  }

  .home-page #masterclasses .mc-card-titel {
    grid-column: 1 / -1;
    grid-row: 3;
    font-size: 1.12rem;
    margin-top: 16px;
  }

  .home-page #masterclasses .mc-card-meta {
    grid-column: 1 / -1;
    grid-row: 4;
    margin-top: 16px;
  }

  .home-page #masterclasses .mc-card-cta {
    grid-column: 1 / -1;
    grid-row: 5;
  }

  .home-page .faculty-card {
    grid-template-columns: 80px minmax(0, 1fr);
    padding: 14px;
    gap: 16px;
  }

  .home-page .faculty-card img {
    width: 80px;
    height: 92px;
  }
}

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