/* Scoped components inherit the host theme's typography and color variables. */
.eventhub {
  color: inherit;
  font-family: inherit;
  font-size: var(--type-body, 1rem);
  line-height: 1.6;
}

.eventhub [hidden] {
  display: none !important;
}

.eventhub h2 {
  font-size: var(--type-section, clamp(2rem, 3vw, 3rem));
  font-weight: 500;
  line-height: 1.15;
}

.eventhub h3 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.eventhub-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.eventhub-event {
  min-width: 0;
  padding-block: 1.5rem;
  border-top: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 25%, transparent);
}

.eventhub-top .eventhub-event {
  display: flex;
  flex-direction: column;
}

.eventhub-date {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-align: left;
}

.eventhub-description {
  margin: 0 0 1.5rem;
  hyphens: auto;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.eventhub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
  flex-direction: row-reverse;
}

.eventhub .button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  box-sizing: border-box;
  min-height: 50px;
  padding: 11px 22px;
  border: 1px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
}

.eventhub .button-accent,
.eventhub .eventhub-filter[aria-pressed="true"] {
  border-color: transparent;
  background: var(--accent, #91c5bc);
  color: var(--ink, #23282a);
}

.eventhub .button-accent:hover,
.eventhub .button-accent:focus-visible {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.eventhub .button-outline:hover,
.eventhub .button-outline:focus-visible {
  border-color: var(--accent, #91c5bc);
  background: var(--accent, #91c5bc);
  color: var(--ink, #23282a);
}

.eventhub .button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.eventhub-rest {
  margin-top: 3rem;
}

.eventhub-list-filter {
  margin-bottom: 24px;
}

@media (max-width: 760px) {
  .eventhub-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .eventhub-actions {
    flex-direction: column;
  }

  .eventhub .button,
  .eventhub-actions {
    width: 100%;
  }
}

/* Opt-in hero: the host page supplies a full-width content frame. */
.eventhub--hero {
  --eventhub-bg: var(--ink-deep, #1b2022);
  --eventhub-fg: var(--paper, #f4f5f2);
  --eventhub-accent: var(--accent, #91c5bc);
  --eventhub-inset: max(var(--gutter, 24px), calc((100vw - var(--content, 1440px)) / 2));
}

.eventhub .eventhub-hero {
  display: grid;
  grid-template-columns: var(--eventhub-image-width, 40%) minmax(0, 1fr);
  padding: 0;
  border: 0;
  background: var(--eventhub-bg);
  color: var(--eventhub-fg);
}

.eventhub-image {
  position: relative;
  min-width: 0;
  margin: 0;
}

.eventhub-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.eventhub-image::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 55%, var(--eventhub-bg));
  content: "";
  pointer-events: none;
}

.eventhub-hero .eventhub-copy {
  min-width: 0;
  padding: 70px var(--eventhub-inset) 70px 32px;
}

.eventhub-hero .eventhub-title {
  margin: 20px 0 28px;
  font-size: var(--type-single-title, clamp(2.5rem, 5vw, 5rem));
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.055em;
  overflow-wrap: anywhere;
}

.eventhub-location-label {
  display: block;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eventhub-accent {
  color: var(--eventhub-accent);
}

.eventhub-hero .eventhub-date {
  margin: 0 0 24px;
  font-size: clamp(1.25rem, 2.2vw, 2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.eventhub-time,
.eventhub-end-date {
  display: block;
}

.eventhub-hero .eventhub-time {
  margin-top: 6px;
  color: var(--eventhub-accent);
}

.eventhub-location {
  margin: 0 0 24px;
  font-style: normal;
  text-align: left;
  overflow-wrap: anywhere;
}

.eventhub-hero .eventhub-location {
  font-size: var(--type-lead, 1.25rem);
}

.eventhub-hero .eventhub-description {
  max-width: 44ch;
  font-size: var(--type-lead, 1.25rem);
}

.eventhub-hero .eventhub-actions {
  margin-top: 28px;
  justify-content: flex-start;
}

@media (min-width: 761px) {
  .eventhub-hero .eventhub-actions {
    flex-direction: row;
  }
}

.eventhub-hero .button-accent {
  background: var(--eventhub-accent);
}

.eventhub-hero .button-accent:hover,
.eventhub-hero .button-accent:focus-visible {
  background: transparent;
}

.eventhub-hero .button-outline:hover,
.eventhub-hero .button-outline:focus-visible {
  border-color: var(--eventhub-accent);
  background: var(--eventhub-accent);
}

.eventhub .eventhub-hero--right {
  grid-template-columns: minmax(0, 1fr) var(--eventhub-image-width, 40%);
}

.eventhub-hero--right .eventhub-image {
  grid-column: 2;
  grid-row: 1;
}

.eventhub-hero--right .eventhub-copy {
  grid-column: 1;
  grid-row: 1;
  padding-inline: var(--eventhub-inset) 32px;
}

.eventhub-hero--right .eventhub-image::after {
  background: linear-gradient(270deg, transparent 55%, var(--eventhub-bg));
}

.eventhub .eventhub-hero--no-image {
  grid-template-columns: minmax(0, 1fr);
}

.eventhub-hero--no-image .eventhub-copy {
  padding-inline: var(--eventhub-inset);
}

.eventhub--hero .eventhub-rest,
.eventhub-page-content > :not(.eventhub) {
  width: min(100% - var(--gutter, 24px) * 2, var(--content, 1440px));
  max-width: 1000px;;
  margin-inline: auto;
}

.eventhub--hero .eventhub-rest {
  margin-block: 0;
  padding-block: 70px;
}

@media (max-width: 760px) {
  .eventhub .eventhub-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .eventhub-hero .eventhub-image {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 4 / 3;
  }

  .eventhub-hero .eventhub-image::after {
    background: linear-gradient(180deg, transparent 55%, var(--eventhub-bg));
  }

  .eventhub-hero .eventhub-copy {
    grid-column: 1;
    grid-row: 2;
    padding: 24px var(--gutter, 24px) 48px;
  }

  .eventhub-hero--no-image .eventhub-copy {
    grid-row: 1;
    padding-top: 48px;
  }

  .eventhub--hero .eventhub-rest {
    padding-block: 48px;
  }
}

/* Terminblock: Raster und Datumskachel folgen dem Journal-Audiobaustein. */
.eventhub-hero .eventhub-eyebrow {
  margin: 0 0 8px;
}

.eventhub-schedule {
  display: grid;
  grid-template-columns: 90px minmax(110px, 0.8fr) minmax(0, 1.5fr);
  align-items: center;
  gap: 16px;
  max-width: 640px;
  margin-top: 24px;
  padding-block: 24px;
  border-block: 1px solid color-mix(in srgb, var(--eventhub-fg) 20%, transparent);
}

.eventhub-date-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 90px;
  background: var(--eventhub-accent);
  color: var(--ink-deep, #1b2022);
  line-height: 1;
  text-align: center;
}

.eventhub-day {
  font-size: 42.5px;
  font-weight: 600;
}

.eventhub-month {
  margin-top: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eventhub-schedule-time {
  margin: 0;
  font-size: var(--type-body, 1rem);
  line-height: 1.5;
  text-align: left;
}

.eventhub-schedule-time > span {
  display: block;
}

.eventhub-schedule-time > span:first-child {
  font-weight: 600;
}

.eventhub-schedule .eventhub-location {
  font-weight: 400;
  grid-column: 3;
  padding-left: 16px;
  border-left: 1px solid color-mix(in srgb, var(--eventhub-fg) 20%, transparent);
  margin: 0;
  font-size: var(--type-body, 1rem);
  text-align: left;
}

@media (max-width: 1000px) {
  .eventhub-schedule {
    grid-template-columns: 90px minmax(0, 1fr);
  }

  .eventhub-schedule .eventhub-location {
    grid-column: 2;
  }

  .eventhub-date-tile {
    grid-row: 1 / span 2;
    align-self: start;
  }
}

.eventhub-schedule .eventhub-location strong {
  font-weight: 600;
}

.eventhub-location-separator {
  display: none;
}

@media (max-width: 760px) {
  .eventhub-schedule .eventhub-date-tile {
    grid-row: 1;
  }

  .eventhub-schedule .eventhub-location {
    grid-column: 1 / -1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    max-height: 3.2em;
    overflow: hidden;
    padding-left: 0;
    border-left: 0;
    line-height: 1.6;
  }

  .eventhub-location-break {
    display: none;
  }

  .eventhub-location-separator {
    display: inline;
  }
}

@media (max-width: 760px) {
  .eventhub-schedule {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .eventhub-date-tile {
    width: 60px;
    height: 60px;
  }

  .eventhub-day {
    font-size: 29px;
  }

  .eventhub-month {
    font-size: 14px;
  }
}

/* Redaktionelle Terminliste nach dem Raster der Journal-Textliste. */
.eventhub-rest .eventhub-list {
  border-top: 1px solid var(--line-light, #c8cecb);
}

.eventhub-rest .eventhub-list-row {
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 2fr) minmax(220px, 1fr);
  gap: 20px 30px;
  max-width: none;
  margin: 0;
  padding-block: 25px;
  border-top: 0;
  border-bottom: 1px solid var(--line-light, #c8cecb);
  --eventhub-accent: var(--accent, #91c5bc);
  --eventhub-fg: var(--ink, #23282a);
}

.eventhub-list-date {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.eventhub-list-row .eventhub-date-tile {
  grid-row: auto;
  align-self: center;
}

.eventhub-list-copy {
  min-width: 0;
  padding-left: 16px;
  border-left: 1px solid var(--line-light, #c8cecb);
}

.eventhub-list-row .eventhub-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 29px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--accent-dark);
  text-transform: uppercase;
}



.eventhub-list-row .eventhub-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin: 10px 0 0;
  overflow: hidden;
  text-align: left;
}

.eventhub-list-row .eventhub-actions {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 1000px) {
  .eventhub-rest .eventhub-list-row {
    grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.5fr);
  }

  .eventhub-list-row .eventhub-location {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .eventhub-rest .eventhub-list-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding-block: 22px;
  }

  .eventhub-list-date {
    grid-template-columns: 60px minmax(0, 1fr);
    background: #d0d0d0;
  }

  .eventhub-list-row .eventhub-list-copy,
  .eventhub-list-row .eventhub-location,
  .eventhub-list-row .eventhub-actions {
    grid-column: 1;
  }

  .eventhub-list-row .eventhub-description {
    margin: 0px 0 0;
    padding-bottom: 6px;
    border-bottom: 1px #cccccc solid;
    margin-bottom: -8px;
  }
  .eventhub-participant-link{
    justify-content: space-between !important;
  }
}

@media (max-width: 760px) {
  .eventhub-list-copy {
    padding-left: 0;
    border-left: 0;
  }
}

.eventhub-participant-actions {
  display: flex;
  flex: 1 1 240px;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  margin-left: 0;
}

.eventhub-participant-actions .eventhub-participant-link {
  flex: 1 1 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 761px) {
  .eventhub-participant-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  }
}

@media (max-width: 760px) {
  .eventhub-participant-actions {
    flex-basis: auto;
    flex-direction: column;
    width: 100%;
  }

  .eventhub-participant-actions .eventhub-participant-link {
    flex: 0 0 auto;
  }
}

/* Durchgehende Trennlinien auf Höhe der Datumskachel. */
@media (min-width: 761px) {
  .eventhub-list-copy,
  .eventhub-schedule .eventhub-location {
    align-self: stretch;
    min-height: 90px;
    align-content: center;
  }
}

/*.eventhub-actions:has(> .button) .eventhub-participant-link,
.eventhub-participant-actions:has(> .eventhub-participant-link ~ .eventhub-participant-link) .eventhub-participant-link {
  justify-content: flex-end;
  text-align: right;
}*/

@media (min-width: 761px) {
  .eventhub-list-row .eventhub-title {
    font-size: clamp(18px, 1.6vw, 24px);
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

/* Mobile: vollständige Termine als wechselnde, randbreite Flächen. */
@media (max-width: 760px) {
  .eventhub-rest .eventhub-list {
    margin-inline: calc(-1 * var(--gutter, 24px));
  }

  .eventhub-rest .eventhub-list-row {
    padding-inline: var(--gutter, 24px);
    background: var(--paper, #f4f5f2);
  }

  .eventhub-rest .eventhub-list-row:nth-child(odd of .eventhub-list-row:not([hidden])) {
    background: var(--soft, #e5e9e6);
  }
}

/* Hero-Aktionen bleiben auf Desktop kompakt an der linken Führungsachse. */
@media (min-width: 761px) {
  .eventhub-hero .eventhub-actions {
    max-width: 640px;
  }

  .eventhub-hero .eventhub-participant-actions {
    display: flex;
    flex: 0 1 auto;
    justify-content: flex-start;
    max-width: 100%;
  }

  .eventhub-hero .eventhub-actions .button {
    flex: 0 1 auto;
    width: auto;
  }
}

/* Gemeinsamer Kalender: vorhandener Journal-Verbindungsbalken mit Theme-Fallback. */
.eventhub-calendar-intro {
  padding-block: clamp(48px, 6vw, 88px);
  background: var(--eventhub-info-bg, #c1cdcb);
  color: var(--ink-deep, #1b2022);
}

.eventhub-calendar-intro .work-study-connections-grid {
  display: grid;
  grid-template-columns: clamp(112px, 12vw, 160px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(24px, 4vw, 56px);
  width: min(100% - var(--gutter, 24px) * 2, var(--content, 1440px));
  max-width: 1000px;
  margin-inline: auto;
}

.eventhub-info-mark {
  position: relative;
  align-self: stretch;
  min-height: 0;
  border-right: 1px solid var(--line-light, rgba(35, 40, 42, 0.2));
  color: var(--accent-dark, #35685f);
}

.eventhub-info-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: auto;
  height: 118%;
  max-width: calc(100% - 24px);
  transform: translate(-50%, -50%);
}

.eventhub-calendar-text .eyebrow {
  margin: 0 0 8px;
}

.eventhub .eventhub-calendar-intro h2 {
  margin: 0 0 20px;
  font-size: var(--type-section, clamp(2rem, 3.5vw, 3rem));
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.eventhub-calendar-text p {
  margin: 0 0 1em;
}

.eventhub-calendar-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 760px) {
  .eventhub-calendar-intro .work-study-connections-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}

.eventhub-calendar-text .eventhub-filter {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .eventhub--hero .eventhub-rest {
    padding-top: 0;
  }

  .eventhub-list-filter {
    margin-bottom: 0;
    padding-block: 24px;
  }

  .eventhub-info-mark {
    display: none;
  }
}

.eventhub .eventhub-filter-hint {
  margin: 0 0 12px;
}

.eventhub-calendar-text .eventhub-filter-hint {
  margin-top: 24px;
}

.eventhub-calendar-text .eventhub-filter-hint + .eventhub-filter {
  margin-top: 0;
}

/* Compact participant label on smartphones; desktop wording stays unchanged. */
.eventhub .eventhub-filter-label-mobile {
  display: none;
}

@media (max-width: 760px) {
  .eventhub .eventhub-filter-label-desktop {
    display: none;
  }

  .eventhub .eventhub-filter-label-mobile {
    display: inline;
  }
}

.eventhub .eventhub-location-link-mobile {
  display: none;
}

@media (max-width: 760px) {
  .eventhub .eventhub-location-action,
  .eventhub .eventhub-location-name-desktop {
    display: none;
  }

  .eventhub .eventhub-location-link-mobile {
    display: inline;
    color: var(--accent-dark, #35685f);
    font-weight: 600;
    text-decoration: none;
  }

  .eventhub .eventhub-hero .eventhub-location-link-mobile {
    color: var(--eventhub-accent, var(--accent, #91c5bc));
  }

  .eventhub .eventhub-location-link-mobile:hover {
    text-decoration: underline;
  }

  .eventhub .eventhub-location-link-mobile:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
}

/* Extend the mobile date tile to the viewport edge without shifting the schedule. */
@media (max-width: 760px) {
  .eventhub-schedule .eventhub-date-tile {
    width: calc(60px + var(--gutter, 24px));
    margin-left: calc(-1 * var(--gutter, 24px));
  }
}
