/* ===== Farbpalette ===== */
:root {
  --pink-1: #E6007E;
  --pink-2: #BD4793;
  --pink-3: #D599C4;
  --pink-4: #DAB4D6;
  --pink-5: #DACBE2;

  --purple-1: #4D267C;
  --purple-2: #5A4294;
  --purple-3: #9C8FBF;
  --purple-4: #B6AED6;

  --navy-1: #1A2746;
  --navy-2: #869CBA;

  --teal-1: #265F65;
  --teal-2: #20494B;
  --teal-3: #A3D5CF;
  --teal-4: #8EC7BC;

  --text: var(--navy-1);
  --bg-gradient: linear-gradient(160deg, var(--teal-3) 0%, var(--teal-4) 18%, var(--pink-5) 55%, var(--pink-4) 75%, var(--pink-3) 100%);

  --max-width: 1100px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Poppins", "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background: var(--bg-gradient);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.18);
}

.site-header .wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--purple-1);
  white-space: nowrap;
  justify-self: start;
}

.nav-toggle {
  display: none;
  grid-column: 3;
  justify-self: end;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--purple-1);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.main-nav {
  grid-column: 2;
  justify-self: center;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.main-nav a {
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--purple-1);
  transition: background 0.2s ease, color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  background: var(--purple-1);
  color: var(--pink-5);
}

.insta-btn {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.insta-btn:hover {
  transform: scale(1.08);
}

.insta-btn svg {
  width: 38px;
  height: 38px;
}

.insta-fab {
  display: none;
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 14px rgba(26, 39, 70, 0.4));
}

.insta-fab svg {
  width: 50px;
  height: 50px;
}

@media (max-width: 699px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
    grid-column: 1 / -1;
    justify-self: stretch;
    position: absolute;
    top: calc(100% + 0.8rem);
    left: auto;
    right: 0;
    width: 250px;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.5rem 1.4rem;
    border-radius: 1.75rem;
    background: linear-gradient(160deg, var(--teal-4), var(--pink-4));
    box-shadow: 0 20px 45px -14px rgba(26, 39, 70, 0.45);
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    text-align: center;
    background: rgba(255, 255, 255, 0.55);
    padding: 0.85rem 1.1rem;
    font-size: 1rem;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background: var(--purple-1);
  }

  .site-header .insta-btn {
    display: none;
  }

  .insta-fab {
    display: flex;
  }

  body.no-fab .insta-fab {
    display: none;
  }
}

/* ===== Hero ===== */
.hero {
  min-height: calc(82vh - 70px);
  display: flex;
  align-items: center;
  text-align: center;
}

.hero .wrapper {
  width: 100%;
}

.hero-eyebrow {
  font-size: clamp(0.95rem, 1.6vw, 1.4rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-2);
  margin: 0 0 0.75rem;
}

.hero-title {
  font-size: clamp(2.1rem, 9vw, 6.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--purple-1);
  margin: 0;
}

.hero-title .accent {
  color: var(--pink-1);
}

.hero-subtitle {
  margin: 1rem auto 0;
  max-width: 38rem;
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--teal-2);
}

.hero-cta {
  display: inline-block;
  margin-top: 2.25rem;
  padding: 1rem 2.5rem;
  border-radius: var(--radius-pill);
  background: var(--pink-1);
  color: var(--pink-5);
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 12px 30px -10px rgba(230, 0, 126, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -8px rgba(230, 0, 126, 0.7);
}

/* ===== Galerie ===== */
.gallery-section {
  padding: 1.5rem 0 3.5rem;
  min-height: 18vh;
}

.gallery-mask {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 10%, black 90%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 10%, black 90%, transparent 100%);
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: 3.3rem;
  width: max-content;
  padding: 4.5rem 1.25rem 3rem;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--purple-3);
  opacity: 0.5;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.gallery-dot.active {
  background: var(--pink-1);
  opacity: 1;
  transform: scale(1.35);
}

.gallery-card {
  position: relative;
  flex: 0 0 238px;
  border-radius: 1.5rem;
  overflow: hidden;
  display: block;
  transition: transform 0.15s linear;
  will-change: transform;
}

@media (min-width: 700px) {
  .gallery-mask {
    max-width: 1300px;
    margin: 0 auto;
  }

  .gallery-card {
    flex: 0 0 340px;
  }
}

.gallery-card-img {
  aspect-ratio: 1 / 2;
  width: 100%;
  object-fit: cover;
  display: block;
}

.gallery-card-link {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.6rem 1.44rem;
  border-radius: var(--radius-pill) var(--radius-pill) 0 0;
  background: #fff;
  color: var(--purple-1);
}

@media (max-width: 699px) {
  .hero {
    min-height: auto;
    display: block;
    padding: 9.75rem 0 5.184rem;
  }

  .gallery-section {
    padding-top: 0.864rem;
  }

  .gallery-track {
    padding-top: 5.472rem;
  }
}

/* ===== Footer ===== */
.site-footer {
  padding: 1.5rem 0 2rem;
  margin-top: auto;
}

.site-footer .wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--teal-2);
}

.footer-disclaimer {
  max-width: 22rem;
  font-weight: 600;
}

.footer-contact {
  text-align: right;
  font-weight: 600;
  line-height: 1.5;
}

.footer-impressum-link {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

@media (max-width: 699px) {
  .site-footer .wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-disclaimer,
  .footer-contact {
    text-align: center;
    max-width: none;
  }
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* ===== Pillenform Designelement ===== */
.pill-stack {
  width: 70px;
  margin: 0 auto;
}

.pill-segment {
  height: 46px;
  border-radius: var(--radius-pill);
  background: var(--pink-1);
}

/* ===== Seitenkopf (Thesis / Literatur) ===== */
.page-head {
  padding: 2.5rem 0 1.5rem;
  text-align: center;
}

.page-head h1 {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  text-transform: uppercase;
  color: var(--purple-1);
  margin: 0.5rem 0 0;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.download-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  background: var(--pink-1);
  color: var(--pink-5);
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 12px 30px -10px rgba(230, 0, 126, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.download-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -8px rgba(230, 0, 126, 0.7);
}

.view-toggle-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  color: var(--purple-1);
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.view-toggle-btn:hover {
  transform: translateY(-2px);
}

/* ===== Thesis Flipbook ===== */
.flipbook-section {
  max-width: 1900px;
  padding: 0.5rem 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

#flipbook-container {
  width: min(96%, 1900px);
  display: flex;
  justify-content: center;
}

#pdf-embed-container {
  width: 100%;
  justify-content: center;
}

.page-html {
  background: #fff;
}

.page-html img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.flipbook-loading {
  font-weight: 600;
  color: var(--teal-2);
  padding: 3rem 0;
}

.flipbook-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.flipbook-controls button {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--purple-1);
  color: var(--pink-5);
  font-size: 1.1rem;
  font-weight: 700;
}

.flipbook-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}

#flipbook-page-info {
  font-weight: 700;
  color: var(--navy-1);
  font-size: 0.9rem;
  min-width: 5rem;
  text-align: center;
}

/* ===== Literatur ===== */
.literature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 1rem 0 3.5rem;
}

@media (min-width: 700px) {
  .literature-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.book-card {
  position: relative;
  border-radius: 1.25rem;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.book-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px -14px rgba(26, 39, 70, 0.4);
}

.book-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-card.contain {
  background: #5442EE;
}

.book-card.contain .book-card-img {
  object-fit: contain;
}

.book-card-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  transform: translate(-50%, -50%);
  object-fit: contain;
}

/* ===== Flyer-Viewer (Mehr-Infos-Seite) ===== */
body.flyer-page {
  min-height: 100vh;
  background: var(--bg-gradient);
}

.flyer-fullscreen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.4rem;
}

.flyer-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--pink-1);
  color: var(--teal-3);
  font-size: 2.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flyer-stage-loading {
  font-weight: 600;
  color: var(--teal-2);
  text-align: center;
  padding: 1rem;
}

.flyer-views {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.flyer-view {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.flyer-view.active {
  display: flex;
}

.flyer-view img {
  max-width: 100%;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 0.75rem;
  box-shadow: 0 25px 60px -20px rgba(26, 39, 70, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: scale(0.97);
}

.flyer-view img.active {
  opacity: 1;
  transform: scale(1);
}

.flyer-view .flyer-download-btn {
  display: none;
}

.flyer-mobile-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.flyer-download-btn {
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  color: var(--purple-1);
  font-weight: 700;
  font-size: 0.95rem;
}

.flyer-next-btn {
  padding: 0.85rem 2.25rem;
  border-radius: var(--radius-pill);
  background: var(--pink-1);
  color: var(--pink-5);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 12px 30px -10px rgba(230, 0, 126, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flyer-next-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -8px rgba(230, 0, 126, 0.7);
}

@media (min-width: 700px) {
  .flyer-views {
    gap: 5rem;
  }

  .flyer-view {
    display: flex !important;
    width: auto;
  }

  .flyer-view img {
    max-height: 80vh;
    max-width: 30vw;
    opacity: 1;
    transform: scale(1);
  }

  .flyer-view .flyer-download-btn {
    display: inline-block;
  }

  .flyer-mobile-controls {
    display: none !important;
  }
}

/* ===== Impressum ===== */
.legal-section {
  padding-top: 1rem;
  padding-bottom: 3.5rem;
  max-width: 44rem;
  color: var(--navy-1);
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-block {
  margin-bottom: 2.5rem;
}

.legal-block p {
  margin: 0 0 1rem;
}

.legal-block-main {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy-1);
  overflow-wrap: break-word;
}

.legal-block-main p {
  margin: 0 0 1.25rem;
}

.legal-heading {
  font-size: 1.3rem;
  text-transform: uppercase;
  color: var(--purple-1);
  margin: 0 0 1.25rem;
}

.sources-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.sources-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(26, 39, 70, 0.12);
}

.source-label {
  font-weight: 700;
  min-width: 9rem;
  color: var(--teal-2);
}

.sources-list a {
  text-decoration: underline;
  word-break: break-word;
}

.source-text {
  color: var(--navy-1);
}

/* ===== Bestätigung externer Links ===== */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(26, 39, 70, 0.45);
  backdrop-filter: blur(4px);
}

.confirm-modal.hidden {
  display: none;
}

.confirm-modal-box {
  max-width: 26rem;
  width: 100%;
  border-radius: 1.5rem;
  padding: 2rem 1.75rem;
  background: var(--bg-gradient);
  box-shadow: 0 25px 60px -20px rgba(26, 39, 70, 0.6);
  text-align: center;
}

.confirm-modal-text {
  margin: 0 0 0.5rem;
  font-weight: 600;
  color: var(--navy-1);
}

.confirm-modal-host {
  margin: 0 0 1.5rem;
  font-weight: 700;
  color: var(--purple-1);
  word-break: break-word;
}

.confirm-modal-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.confirm-modal-cancel,
.confirm-modal-confirm {
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
}

.confirm-modal-cancel {
  background: rgba(255, 255, 255, 0.55);
  color: var(--purple-1);
}

.confirm-modal-confirm {
  background: var(--pink-1);
  color: #fff;
}
