/* Welcome page styles — theme/index.css */

#quarto-content > * {
  padding-top: 0;
}

#quarto-content > .objectives-section {
  padding-top: 1rem;
}

#quarto-content > .news-section,
#quarto-content > .research-section,
#quarto-content > .affiliations-section {
  padding-top: 2rem;
}

@media (min-width: 980px) {
  #quarto-content > .objectives-section {
    padding-bottom: 2rem;
  }

  #quarto-content > .news-section,
  #quarto-content > .research-section,
  #quarto-content > .affiliations-section {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }
}

/* Index-specific section wrapper — objectives has custom layout */
.objectives-section {
  width: 100%;
  display: flex;
  justify-content: center;
}


/* Hero banner — aspect-ratio sizing matching TUHH Typo3 header-slider */

.hero-banner {
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  position: relative;
  padding: 0;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 60px) 2rem 0;
  height: clamp(200px, 45vw, 540px);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  text-align: left;
  overflow: hidden;
  gap: 2rem;
}

.hero-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.hero-subtitle {
  display: block;
  position: relative;
  z-index: 1;
  color: white;
  font-size: clamp(14px, 2vw, 24px);
  font-weight: 400;
  line-height: 1.55;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-tuhh-logo {
  height: 0.75em;
  width: auto;
  vertical-align: middle;
  display: inline-block;
  margin-top: -0.15em;
}

.hero-title {
  display: block;
  color: white;
  font-family: SangBleuSans, PublicaSans, Poppins, sans-serif;
  font-size: clamp(20px, 4.5vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  max-width: 66.667%;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-banner a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-banner a:hover {
  opacity: 0.85;
}

.hero-banner .hero-carousel a {
  color: inherit;
  text-decoration: none;
}

.hero-banner .hero-carousel a:hover {
  opacity: 1;
}


/* Landing hero illustration — matches TUHH startseite */

.hero-text > p:has(.hero-illu) {
  margin: 0;
  flex: 1;
  min-height: 0;
  align-self: flex-start;
  display: flex;
  align-items: stretch;
}

img.hero-illu {
  display: block;
  height: 100%;
  width: auto;
  padding-top: clamp(4px, 0.5vw, 8px);
}


/* Hero carousel — TUHH teaser card design */

.hero-carousel {
  flex: 0 0 clamp(160px, 24vw, 300px);
  display: flex;
  align-items: center;
  padding-bottom: clamp(16px, 3vw, 48px);
}

.hero-carousel .carousel {
  width: 100%;
}

.hero-carousel .teaser-card {
  display: block;
  background: white;
  border: 1px solid #00C1D4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}

.hero-carousel .teaser-card:hover {
  text-decoration: none;
  opacity: 1;
}

.hero-carousel .teaser-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  position: relative;
}

.hero-carousel .teaser-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-carousel .teaser-body {
  padding: 0.75rem 1rem;
  border-top: 1px solid #00C1D4;
}

.hero-carousel .teaser-body h3 {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #005e73;
}

.hero-carousel .teaser-cta {
  font-size: 0.75rem;
  white-space: nowrap;
  color: #005e73;
  opacity: 0.75;
}

.hero-carousel .teaser-card:hover .teaser-cta {
  opacity: 1;
  color: #00C1D4;
}

/* Carousel controls */

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 2rem;
  opacity: 0.7;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  opacity: 1;
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 1.25rem;
  height: 1.25rem;
  filter: none;
  background-size: 100% 100%;
}

.hero-carousel .carousel-control-prev-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2300C1D4'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.hero-carousel .carousel-control-next-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2300C1D4'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Carousel indicators */

.hero-carousel .carousel-indicators {
  bottom: -1.25rem;
  margin-bottom: 0;
}

.hero-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background-color: rgba(0, 193, 212, 0.4);
  margin: 0 4px;
}

.hero-carousel .carousel-indicators .active {
  background-color: #00C1D4;
}

.hero-carousel .teaser-credit {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 2px 5px;
  font-size: 0.5em;
  color: #ccc;
  background: #323232;
  opacity: 0.4;
  border-radius: 5px 0 0 0;
}


/* Responsive: mobile stacking */

@media (max-width: 980px) {
  .hero-content {
    flex-direction: column;
    height: auto;
    padding-top: clamp(16px, 3vw, 40px);
    padding-bottom: 0;
    gap: 0;
  }

  .hero-text {
    min-height: 0;
    flex: 0 0 auto;
    position: relative;
  }

  .hero-text > p:has(.hero-illu) {
    flex: 0 0 auto;
    min-height: 0;
    position: relative;
  }

  img.hero-illu {
    width: clamp(40px, 10vw, 75px);
    height: auto;
    padding-top: 0;
  }

  .hero-text > p:has(.hero-illu)::after {
    content: "";
    position: absolute;
    left: calc(clamp(40px, 10vw, 75px) / 2 - 0.5px);
    top: 100%;
    width: 1px;
    height: 100vh;
    background-color: #00C1D4;
    pointer-events: none;
  }

  .hero-title {
    max-width: 100%;
    font-size: clamp(24px, 7vw, 56px);
  }

  .hero-carousel {
    flex: 0 0 auto;
    width: 55%;
    max-width: 260px;
    padding-bottom: 4rem;
    margin-top: -1.5rem;
    align-self: flex-end;
  }

  .hero-carousel .teaser-credit {
    font-size: 0.35em;
    padding: 1px 3px;
  }
}

@media (max-width: 576px) {
  .hero-carousel {
    width: 65%;
    max-width: 240px;
  }
}


/* Objectives / Mission section */

.objectives-section {
  padding-top: 1rem;
  padding-bottom: 1rem;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mission-statement {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 0;
}

.objectives-section .content-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.mission-statement p {
  font-family: 'SangBleuSans', Arial, sans-serif;
  font-size: clamp(16px, 3.5vw, 1.4rem);
  line-height: 1.6;
  color: #005e73;
  margin: 0;
}

.mission-statement a {
  color: #00C1D4;
  text-decoration: none;
}

.mission-statement a:hover {
  opacity: 0.75;
}

/* Desktop: break before "through" */
.mission-statement .br-mobile::before {
  content: "\a";
  white-space: pre;
}

/* Mobile: break after "through" instead */
@media (max-width: 980px) {
  .mission-statement .br-mobile::before {
    content: none;
  }
  .mission-statement .br-mobile::after {
    content: "\a";
    white-space: pre;
  }
}


/* Affiliations section — TUHH logo-list design */


.logo-grid {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid #00c1d4;
  border-bottom: 1px solid #00c1d4;
}

.logo-grid > p {
  display: contents;
}

.logo-grid a {
  flex: 0 0 50%;
  max-width: 50%;
  height: 89px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 15px 20px;
}

.logo-grid img {
  transition: filter 0.3s ease, opacity 0.3s ease;
  filter: grayscale(100%);
  opacity: 0.5;
}

.logo-grid a:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

.logo-grid a:not(:nth-child(2n+1)) {
  border-left: 1px dashed #00c1d4;
}

.logo-grid a:not(:nth-last-of-type(-n+2)) {
  border-bottom: 1px dashed #00c1d4;
}

.logo-grid img {
  max-height: 55px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (min-width: 980px) {
  .logo-grid img {
    max-height: 65px;
  }
}

@media (min-width: 980px) {
  .logo-grid a {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .logo-grid a:not(:nth-child(2n+1)) {
    border-left: none;
  }
  .logo-grid a:not(:nth-last-of-type(-n+2)) {
    border-bottom: none;
  }
  .logo-grid a:not(:nth-child(4n+1)) {
    border-left: 1px dashed #00c1d4;
  }
  .logo-grid a:not(:nth-last-of-type(-n+4)) {
    border-bottom: 1px dashed #00c1d4;
  }
}


/* Dark mode overrides */

.quarto-dark .objectives-section {
  background-color: #272935;
}

.quarto-dark .mission-statement p {
  color: rgba(255, 255, 255, 0.9);
}

.quarto-dark .mission-statement a {
  color: #00C1D4;
}

.quarto-dark .logo-grid img {
  filter: grayscale(100%) brightness(1.5);
  opacity: 0.6;
}

.quarto-dark .logo-grid a:hover img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

.quarto-dark .hero-carousel .teaser-card {
  background: #23252f;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.quarto-dark .hero-carousel .teaser-body h3 {
  color: white;
}

.quarto-dark .hero-carousel .teaser-cta {
  color: rgba(255, 255, 255, 0.7);
}

.quarto-dark .hero-carousel .teaser-card:hover .teaser-cta {
  color: #00C1D4;
}
