/* Contact Card — see ContentBlocks/ContentElements/contact-card/ */

.contact-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(3, 48, 93, 0.12);
  height: 100%;
  /* Defaults overridden by the .contact-card--bg-* modifier classes below */
  background: #ffffff;
  color: var(--theme-primary);
}

/* === Background variants === */
.contact-card.contact-card--bg-light {
  background: #ffffff;
  color: var(--theme-primary);
}
.contact-card.contact-card--bg-hell {
  background: #DFE8FF;
  color: var(--theme-primary);
}
.contact-card.contact-card--bg-hellblau {
  background: #eef1f7;
  color: var(--theme-primary);
}
.contact-card.contact-card--bg-primary {
  background: var(--theme-primary);
  color: #ffffff;
}
.contact-card.contact-card--bg-secondary {
  background: var(--theme-secondary);
  color: #ffffff;
}
.contact-card.contact-card--bg-black {
  background: #000000;
  color: #ffffff;
}

.contact-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  flex-shrink: 0;
}

.contact-card__heading-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.contact-card h3.contact-card__title {
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 300;
  text-transform: uppercase;
  margin: 0;
}

.contact-card__subtitle {
  font-size: 0.875rem;
  line-height: 1.2;
  color: inherit;
  opacity: 0.7;
  margin: 0;
}

.contact-card__text {
  font-size: 0.95rem;
  line-height: 1.6;
}

.contact-card__text p {
  margin-bottom: 0.5rem;
}

.contact-card__text p:last-child {
  margin-bottom: 0;
}

.contact-card__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.contact-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 200ms ease, color 200ms ease;
}

.contact-card__link:hover {
  opacity: 0.7;
}

.contact-card__link svg {
  flex-shrink: 0;
}

.contact-card__link--button {
  align-self: flex-start;
  background: var(--theme-secondary);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  margin-top: 0.25rem;
}

.contact-card__link--button:hover {
  background: var(--theme-primary);
  color: #ffffff;
}

.contact-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* === Vertical (default) === */
.contact-card--vertical {
  max-width: 24rem;
}

.contact-card--vertical .contact-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.contact-card--vertical .contact-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* === Horizontal === */
.contact-card--horizontal {
  flex-direction: column;
  max-width: 56rem;
}

.contact-card--horizontal .contact-card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.contact-card--horizontal .contact-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

@media (min-width: 640px) {
  .contact-card--horizontal {
    flex-direction: row;
  }

  .contact-card--horizontal .contact-card__image {
    width: 40%;
    aspect-ratio: auto;
    min-height: 100%;
    flex-shrink: 0;
  }

  .contact-card--horizontal .contact-card__body {
    width: 60%;
    padding: 2rem;
  }
}

/* === Horizontal, full width ===
   Same card as --horizontal, minus the 56rem cap: for use as an edge-to-edge
   band (pair it with Größe 3/3, which is what governs the grid cell). Carries
   both modifier classes, so everything above still applies.

   The image must not grow — only the body gains the extra room. `width: 40%`
   capped at 22.4rem does that: 22.4rem *is* 40% of the old 56rem cap, so up to
   that container width the image resolves to exactly the size it has in the
   capped variant, and past it stops growing. */
.contact-card--horizontal-full {
  max-width: none;
}

@media (min-width: 640px) {
  .contact-card--horizontal-full .contact-card__image {
    width: 40%;
    max-width: 22.4rem;
  }

  .contact-card--horizontal-full .contact-card__body {
    width: auto;
    flex: 1;
    /* Long unbreakable content (a URL, a long address) must not push the body
       past its flex basis and squeeze the image. */
    min-width: 0;
  }
}
