/* Lead each mentor testimonial with its portrait. */
.hdd-mentor-testimonial > .hdd-mentor-portrait {
  grid-row: 1;
  grid-column: 1;
}
main.site-main .e-con:has(> .hdd-mentor-testimonial) {
  --hdd-testimonial-pair-margin: max(0px, calc(48px - var(--row-gap, 16px)));
}
.elementor .e-con.hdd-mentor-portal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.elementor .e-con.hdd-mentor-portal-card {
  min-width: 0;
  width: 100%;
  padding: 24px;
  gap: 20px;
  border-radius: 10px;
  background: #ecedf3;
}
.hdd-mentor-portal-card .elementor-widget-button { margin-top: auto; }
.hdd-resource-logo img { width: 220px; height: 110px; object-fit: contain; }
.hdd-caption-gallery .gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
}
.elementor .hdd-caption-gallery .gallery .gallery-item {
  width: 100%; max-width: 100%; margin: 0; padding: 0;
}
.hdd-caption-gallery .gallery br { display: none; }
.hdd-caption-gallery .gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.hdd-caption-gallery .gallery-caption,
.hdd-network-photo figcaption { margin-top: 12px; font-size: 16px; line-height: 1.5; text-align: left; }
@media (max-width: 1024px) {
  .elementor .e-con.hdd-mentor-portal-grid { grid-template-columns: 1fr; }
  .hdd-caption-gallery .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .hdd-caption-gallery .gallery { grid-template-columns: minmax(0, 1fr); }
}
.logged-in .elementor .e-con.hdd-mentor-login-main { width: 100%; }
.hdd-mentor-portal-card .elementor-heading-title {
  overflow-wrap: anywhere;
  hyphens: auto;
}
.elementor-489 .e-con.hdd-mentor-portal-card,
.elementor-433 .e-con.hdd-mentor-portal-card { background: #fff; }
/* Long German headings must also fit the 320 px layout. */
.hdd-section :is(.elementor-heading-title, .e-n-accordion-item-title-text) {
  overflow-wrap: anywhere;
  hyphens: auto;
}
.hdd-section .e-n-accordion-item-title-header { min-width: 0; }
.hdd-senior-contact a { overflow-wrap: anywhere; }
.hdd-mentor-portal-card { overflow-wrap: anywhere; hyphens: auto; }

/* Native, editable gallery images; long feedback stays outside the image rows. */
.elementor .e-con.hdd-impressions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.hdd-impressions-grid > .elementor-widget { min-width: 0; width: 100%; }
.hdd-impression-photo figure { margin: 0; width: 100%; }
.hdd-impression-photo a { display: block; text-align: left; color: #003063; }
.hdd-impression-photo a::after {
  content: 'Bild vergrößern';
  display: block;
  padding: 12px 0 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: .18em;
}
.hdd-impression-photo a:focus-visible { outline: 3px solid #003063; outline-offset: 5px; border-radius: 10px; }
.hdd-impression-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.elementor .hdd-impression-photo figcaption {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  font-style: normal;
  text-align: left;
  color: #25282b;
}
.hdd-gallery-voice blockquote {
  margin: 0;
  padding: 24px;
  border-left: 4px solid #f47420;
  border-radius: 0 10px 10px 0;
  background: #f0f3f7;
  color: #25282b;
  font-size: 18px;
  font-style: normal;
  line-height: 1.65;
  text-align: left;
}
.hdd-gallery-voice blockquote p { margin: 0; }
@media (max-width: 767px) {
  .elementor .e-con.hdd-impressions-grid { grid-template-columns: minmax(0, 1fr); }
  .hdd-gallery-voice blockquote { padding: 16px; }
}

/* Prefer authored compound boundaries over automatic syllable breaks. */
.elementor .hdd-word-wrap :is(.elementor-heading-title, .ddhh-auth-intro h1) {
  hyphens: manual;
  overflow-wrap: normal;
  word-break: normal;
}
.hdd-nowrap { white-space: nowrap; }
.elementor .hdd-mentor-entry-grid .elementor-button {
  padding-inline: 20px;
  max-width: 100%;
}
.elementor .hdd-mentor-entry-grid .elementor-button-text {
  white-space: nowrap;
  hyphens: none;
  overflow-wrap: normal;
}
.elementor .e-con.hdd-mentor-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 767px) {
  .elementor .e-con.hdd-mentor-entry-grid { grid-template-columns: minmax(0, 1fr); }
}

.elementor .hdd-mentor-entry-grid .hdd-mentor-portal-card { overflow-wrap: normal; hyphens: manual; }

.elementor .hdd-word-wrap .elementor-button-text,
.elementor .hdd-mentor-portal-card .elementor-button-text,
.elementor .hdd-material-card .elementor-button-text {
  white-space: nowrap;
  hyphens: none;
  overflow-wrap: normal;
}
