/* --- style.css --- */

/* Variables & Reset */
:root {
  --primary-color: #007399;
  --secondary-color: #005f73;
  --accent-color: #0a9396;
  --light-bg: #e0f7fa;
  --lighter-bg: #f0fdfd;
  --text-color: #004d66;
  --white-color: #ffffff;
  --light-text-footer: #e0f7fa;
  --success-color: #2e7d32;
  --error-color: #c62828;
  --border-color: #b3e0e6;
  --shadow-light: rgba(0,0,0,0.07);
  --shadow-medium: rgba(0,0,0,0.1);
  --hero-overlay-color: rgba(0, 77, 102, 0.55);
  --section-bg-overlay: rgba(255, 255, 255, 0.92);
  --parakur-overlay-color: rgba(0, 77, 102, 0.8);
  --parakur-overlay-hover-color: rgba(0, 77, 102, 0.85);
  --focus-ring-color: rgba(10, 147, 150, 0.6);
  --checkmark-svg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

html { scroll-behavior: smooth; box-sizing: border-box; }
*, *::before, *::after { box-sizing: inherit; }

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background:
    linear-gradient(rgba(224, 247, 250, 0.3), rgba(224, 247, 250, 0.3)),
    url('images/global-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-color);
  line-height: 1.6;
  font-size: 16px;
  transition: overflow 0.3s ease;
}
body.modal-open { overflow: hidden; }

/* Header & Navigation */
header {
  position: sticky; top: 0; z-index: 1000;
  background-color: rgba(0, 115, 153, 0.95);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 25px; transition: background-color .3s, box-shadow .3s;
}
header.scrolled { background-color: var(--primary-color); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
header .header-left h1 { margin: 0; }

.logo-link { display: inline-flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--white-color); line-height: 1.2; border-radius: 4px; }
.logo-title { font-family: 'Baguet Script', cursive; font-weight: 400; font-size: .9em; position: relative; padding-bottom: 2px; }
.logo-subtitle { font-family: 'Baguet Script', cursive; font-size: .6em; font-weight: 400; margin-top: -3px; letter-spacing: .5px; opacity: .9; }
.logo-title::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background-color: var(--white-color); transition: width .3s; }
.logo-link.active .logo-title::after { width: 80%; }

.menu-toggle { display: none; flex-direction: column; justify-content: space-around; width: 30px; height: 25px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 10; border-radius: 4px; }
.menu-toggle:focus-visible, .logo-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring-color); }
.menu-toggle .bar { display: block; width: 100%; height: 3px; background-color: var(--white-color); border-radius: 2px; transition: all .3s; }
.menu-toggle.active .bar1 { transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle.active .bar2 { opacity: 0; }
.menu-toggle.active .bar3 { transform: rotate(-45deg) translate(6px, -6px); }

.header-right nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.header-right nav ul li a {
  color: var(--white-color); text-decoration: none; font-weight: 500; font-size: .9em;
  padding: 8px 12px; display: block; border-radius: 6px; position: relative; overflow: hidden; transition: color .3s;
}
.header-right nav ul li a::after {
  content: ''; position: absolute; bottom: 4px; left: 50%; width: 0; height: 1.5px;
  background-color: var(--white-color); transform: translateX(-50%); transition: width .3s;
}
.header-right nav ul li a:hover::after,
.header-right nav ul li a:focus-visible::after,
.header-right nav ul li a.active::after { width: 70%; }
.header-right nav ul li a:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring-color); }

/* Sections (gestrafft) */
main { display: block; }
section {
  padding: 48px 18px;
  margin: 30px auto;
  width: 90%; max-width: 1200px;
  background-color: var(--section-bg-overlay);
  border-radius: 12px; box-shadow: 0 4px 15px var(--shadow-light);
  position: relative; overflow: hidden;
}
#about-me { background-color: var(--lighter-bg); overflow: visible; }
section h2 { text-align: center; color: var(--secondary-color); margin: 0 0 22px; font-size: 2em; }
section p { text-align: center; max-width: 800px; margin: 0 auto 16px; color: var(--text-color); }
.section-subtitle { font-size: 1.2em; font-weight: 500; color: var(--accent-color); text-align: center; max-width: 700px; margin-bottom: 28px; }
.button-container { text-align: center; margin-top: 12px; }
.btn { background-color: var(--primary-color); color: var(--white-color); font-weight: 700; font-size: 1.05em; padding: 10px 26px; border: none; border-radius: 50px; cursor: pointer; transition: background-color .3s, transform .3s, box-shadow .3s; text-decoration: none; display: inline-block; }
.btn:hover, .btn:focus-visible { background-color: var(--secondary-color); transform: scale(1.04); box-shadow: 0 4px 10px rgba(0,95,115,.3); }
.btn:focus-visible { outline: none; box-shadow: 0 4px 10px rgba(0,95,115,.3), 0 0 0 3px var(--focus-ring-color); }
.btn:disabled { background-color: #999; cursor: not-allowed; transform: none; box-shadow: none; }

/* Hero */
#home { padding: 56px 18px; background-image: url('images/bg.jpg'); background-size: cover; background-position: center; background-attachment: fixed; color: var(--white-color); box-shadow: none; z-index: 1; background-color: transparent; }
#home::before { content: ''; position: absolute; inset: 0; background-color: var(--hero-overlay-color); z-index: -1; border-radius: inherit; }
#home h2 { color: var(--white-color); font-size: 2.6em; text-shadow: 2px 2px 4px rgba(0,0,0,.5); margin-bottom: 16px; }
#home p { color: var(--white-color); font-size: 1.2em; text-shadow: 1px 1px 3px rgba(0,0,0,.6); max-width: 700px; margin-bottom: 0; }

/* Verein */
#verein h3 { color: var(--secondary-color); }
#verein .why-list { list-style: none; padding-left: 0; max-width: 800px; margin: 16px auto 24px; }
#verein .why-list li { text-align: left; margin-bottom: 12px; padding-left: 1.5em; position: relative; line-height: 1.7; }
#verein .why-list li::before { content: '✓'; position: absolute; left: 0; top: 1px; color: var(--accent-color); font-weight: bold; }
#verein .verein-closing { text-align: left; max-width: 800px; margin: 0 auto; }

/* About / Personenliste */
.self-intro { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; padding: 16px 0; }
.self-intro-image img { display: block; width: 150px; height: 150px; border-radius: 50%; object-fit: cover; object-position: center; box-shadow: 0 4px 15px rgba(0,0,0,.2); margin-bottom: 12px; }
.team-separator { border: none; height: 1px; background-color: var(--border-color); width: 60%; margin: 0 auto; }

.inspiration-container { max-width: 900px; margin: 0 auto; text-align: center; }
.inspiration-container .toggle-btn { margin-left: auto; margin-right: auto; display: inline-flex; }
.toggle-btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 22px; background-color: var(--primary-color); color: var(--white-color); border: none; border-radius: 999px; cursor: pointer; font-size: 1.05em; font-weight: 700; transition: background-color .3s ease; }
.toggle-btn:hover { background-color: var(--secondary-color); }
.arrow-icon { font-size: .9em; transition: transform .3s ease; }
.toggle-btn.active .arrow-icon { transform: rotate(180deg); }

/* Collapsible */
.inspiration-collapsible-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  margin-top: 0;
  transition: max-height .5s ease, opacity .3s ease, visibility 0s .5s, margin-top .3s ease;
}
.inspiration-collapsible-content.expanded {
  opacity: 1;
  visibility: visible;
  margin-top: 16px; /* Abstand nach Aufklappen */
}

/* Personenkarten */
.person-entry {
  display: flex; align-items: center; gap: 14px; flex-wrap: nowrap;
  margin-bottom: 18px; padding: 14px;
  border: 1px solid #eee; border-radius: 8px;
  background-color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.05);
  opacity: 0; transform: translateY(20px);
  transition: opacity .5s ease-out, transform .5s ease-out;
}
.person-entry.visible { opacity: 1; transform: translateY(0); }
.person-entry:hover { transform: translateY(-4px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }

.person-image { width: 80px; height: 80px; border-radius: 50%; overflow: hidden; flex-shrink: 0; background-color: #ccc; }
.person-image img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.person-entry.single-image .person-image { width: 120px; height: 120px; }
.person-entry.dual-image .person-image { width: 70px; height: 70px; }
.person-entry.dual-image { gap: 12px; }

/* Fokus-Utilities */
.person-image.focus-top img { object-position: top; }
.person-image.focus-center img { object-position: center; }
.person-image.focus-bottom img { object-position: bottom; }

/* Alternierende Ausrichtung: Bild links/rechts (Desktop) */
#inspirationListContent .person-entry { flex-direction: row; }
#inspirationListContent .person-entry:nth-child(even) { flex-direction: row-reverse; }

/* (a) Bei Bild rechts: Text rechtsbündig an Bild ausrichten */
#inspirationListContent .person-entry:nth-child(even) .person-details {
  align-items: flex-end;
  text-align: right;
}
#inspirationListContent .person-entry:nth-child(even) .person-details h4,
#inspirationListContent .person-entry:nth-child(even) .person-details p {
  text-align: right;
}

/* Personendetails: Name + Unterzeile untereinander */
#inspirationListContent .person-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}
#inspirationListContent .person-details h4,
#inspirationListContent .person-details p { margin-left: 0; }
#inspirationListContent .person-details h4 { margin: 0; font-size: 1.12em; color: var(--primary-color); }
#inspirationListContent .person-details p { margin: 4px 0 0; font-size: .95em; color: var(--text-color); line-height: 1.45; }

/* Health Talk */
#health-talk { background-color: var(--light-bg); }
.health-talk-container { display: flex; flex-wrap: wrap; gap: 24px; margin-bottom: 28px; }
.health-talk-box { flex: 1 1 400px; background-color: rgba(255,255,255,.6); padding: 24px; border-radius: 10px; border: 1px solid var(--border-color); box-shadow: 0 3px 10px var(--shadow-light); transition: transform .3s, box-shadow .3s; }
.health-talk-box:hover { transform: translateY(-4px); box-shadow: 0 6px 15px var(--shadow-medium); }
.health-talk-box h3 { margin: 0 0 16px; color: var(--secondary-color); text-align: center; font-size: 1.35em; }
.health-talk-cta { text-align: center; font-size: 1.05em; margin-top: 24px; margin-bottom: 16px; max-width: 800px; }

/* Membership */
#membership h3 { color: var(--secondary-color); text-align: center; font-size: 1.35em; margin: 24px 0 12px; }
#membership > p:not(.section-subtitle):not(.membership-cta) { text-align: left; max-width: 800px; margin: 0 auto; }
#membership ul { list-style: none; padding-left: 0; max-width: 600px; margin: 16px auto 24px; }
#membership li { margin-bottom: 9px; padding-left: 1.5em; position: relative; line-height: 1.7; text-align: left; }
#membership li::before { content: '✓'; position: absolute; left: 0; top: 1px; color: var(--accent-color); font-weight: bold; }
#membership .membership-cta { text-align: center; font-size: 1.05em; margin-top: 24px; margin-bottom: 16px; max-width: 800px; }

/* Research */
#research { background-color: var(--lighter-bg); }
.research-projects-container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin-top: 24px; }
.research-project-box { flex: 1 1 350px; max-width: 450px; display: flex; flex-direction: column; text-align: left; background-color: rgba(255,255,255,.6); padding: 20px; border-radius: 10px; border: 1px solid var(--border-color); box-shadow: 0 3px 10px var(--shadow-light); transition: transform .3s, box-shadow .3s; min-height: 240px; }
.research-project-box:hover { transform: translateY(-4px); box-shadow: 0 6px 15px var(--shadow-medium); }
.research-project-box h3 { margin: 0 0 12px; color: var(--secondary-color); text-align: center; font-size: 1.35em; }
#research .research-project-box p { margin-bottom: 12px; text-align: left; }
.research-project-image { width: 100%; height: 100%; min-height: 220px; }
.research-project-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.research-project-box .button-container { margin-top: auto; padding-top: 12px; }

/* Events */
#events { background-color: var(--light-bg); }
.event-cards-container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: center; margin-top: 24px; }
.event-card { flex: 1 1 350px; max-width: 450px; display: flex; flex-direction: column; text-align: left; background-color: rgba(255,255,255,.6); border-radius: 10px; overflow: hidden; padding: 0; border: 1px solid var(--border-color); box-shadow: 0 3px 10px var(--shadow-light); transition: transform .3s, box-shadow .3s, background-color .3s; position: relative; min-height: 300px; }
.event-card:hover { transform: translateY(-4px); box-shadow: 0 6px 15px var(--shadow-medium); }
.event-card-parakur { background-image: url('images/parakur.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat; color: var(--white-color); }
.event-card-parakur::before { content: ''; position: absolute; inset: 0; background-color: var(--parakur-overlay-color); border-radius: inherit; z-index: 1; transition: background-color .3s; }
.event-card-parakur:hover::before { background-color: var(--parakur-overlay-hover-color); }
.event-card-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; position: relative; z-index: 2; }
#events .event-card p { margin-bottom: 8px; text-align: left; }
#events .event-card strong { color: var(--primary-color); }
.event-card-parakur .event-card-content h3,
.event-card-parakur .event-card-content p { color: var(--white-color); text-shadow: 1px 1px 2px rgba(0,0,0,.6); }

/* Contact */
#contact { background-color: var(--section-bg-overlay); }
#contact .form-heading { text-align: center; margin: 28px 0 12px; color: var(--secondary-color); font-size: 1.45em; }

/* (b) Inputs wieder vollbreit + sauber ausgerichtet */
#contact #event-form {
  display: flex; flex-direction: column; gap: 16px;
  max-width: 550px; margin: 16px auto 0; padding: 24px;
  background-color: var(--lighter-bg); border-radius: 12px; box-shadow: 0 4px 12px var(--shadow-light);
}
#contact .form-group { width: 100%; }

#contact #event-form label {
  display: block; margin-bottom: 6px; font-weight: 700; font-size: .95em; color: var(--secondary-color);
}

/* WICHTIG: Breite und Erscheinung der Felder */
#contact #event-form input[type="text"],
#contact #event-form input[type="email"],
#contact #event-form input[type="tel"],
#contact #event-form textarea {
  width: 100%;
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.3;
  transition: border-color .2s, box-shadow .2s;
  background: #fff;
}

#contact #event-form textarea { min-height: 140px; resize: vertical; }

#contact #event-form input:focus,
#contact #event-form textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}
#contact #event-form input:focus-visible,
#contact #event-form textarea:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring-color);
}

#contact #form-message {
  margin-top: 20px; text-align: center; font-size: 1.05em; font-weight: 700;
  min-height: 1.5em; padding: 10px; border-radius: 6px;
}
#contact #form-message.success { color: var(--success-color); background-color: #e8f5e9; }
#contact #form-message.error { color: var(--error-color); background-color: #ffebee; }

/* Checkbox */
.form-group.checkbox-group { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-group input[type="checkbox"] { flex-shrink: 0; opacity: 0; width: 0; height: 0; position: absolute; }
.checkbox-group label { font-weight: 600; font-size: 0.95em; color: var(--text-color); line-height: 1.45; padding-left: 30px; position: relative; }
.checkbox-group label a { font-weight: 800; }
.checkbox-group label::before { content: ''; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border: 2px solid var(--border-color); background-color: var(--white-color); border-radius: 4px; transition: all 0.2s ease; }
.checkbox-group label::after { content: ''; position: absolute; left: 4px; top: 5px; width: 12px; height: 12px; background-image: var(--checkmark-svg); background-size: contain; background-repeat: no-repeat; opacity: 0; transform: scale(0.5); transition: all 0.2s ease-out; }
.checkbox-group:hover label::before { border-color: var(--primary-color); }
.checkbox-group input[type="checkbox"]:checked + label::before { background-color: var(--primary-color); border-color: var(--primary-color); }
.checkbox-group input[type="checkbox"]:checked + label::after { opacity: 1; transform: scale(1); }
.form-group.is-invalid label { color: var(--error-color); }
.form-group.is-invalid input, .form-group.is-invalid textarea { border-color: var(--error-color) !important; }
.form-group.is-invalid.checkbox-group label::before { border-color: var(--error-color) !important; }

/* Footer */
footer { text-align: center; padding: 22px 18px; background-color: var(--secondary-color); color: var(--light-text-footer); margin-top: 40px; font-size: .9em; }
footer p { margin: 4px 0; }

/* Modal */
.modal-overlay {
  visibility: hidden; opacity: 0;
  position: fixed; inset: 0; display: flex; justify-content: center; align-items: center;
  background-color: rgba(0, 77, 102, 0.7); z-index: 2000; padding: 20px;
  transition: opacity .3s, visibility 0s .3s;
}
.modal-overlay.active { visibility: visible; opacity: 1; transition: opacity .3s; }
.modal-content { background-color: var(--lighter-bg); padding: 28px 32px; border-radius: 12px; box-shadow: 0 5px 20px rgba(0,0,0,.2); max-width: 800px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; color: var(--text-color); transform: scale(.9); transition: transform .3s; }
.modal-overlay.active .modal-content { transform: scale(1); }
.modal-close { position: absolute; top: 10px; right: 15px; background: transparent; border: none; font-size: 2em; font-weight: 700; color: var(--secondary-color); cursor: pointer; line-height: 1; padding: 0; }

/* Responsive */
@media (max-width: 768px) {
  body, #home { background-attachment: scroll !important; }
  header { padding: 8px 15px; }

  .menu-toggle { display: flex; }
  .header-right nav ul {
    flex-direction: column; background-color: rgba(0,115,153,.97);
    position: absolute; top: 100%; left: 0; width: 100%; padding: 5px 0;
    box-shadow: 0 4px 8px var(--shadow-medium);
    visibility: hidden; opacity: 0; transform: translateY(-10px);
    transition: opacity .3s, transform .3s, visibility 0s .3s; z-index: 999;
  }
  .header-right nav ul.show { visibility: visible; opacity: 1; transform: translateY(0); transition: opacity .3s, transform .3s, visibility 0s 0s; }
  .header-right nav ul li { width: 100%; text-align: center; }
  .header-right nav ul li a { padding: 8px 15px; font-size: .95em; }
  .logo-title::after, .header-right nav ul li a::after { display: none; }
  .header-right nav ul li a:hover,
  .header-right nav ul li a:focus-visible,
  .header-right nav ul li a.active { background-color: var(--accent-color); color: var(--white-color); }
}

@media (max-width: 550px) {
  /* Auf Mobile: Karten immer untereinander */
  #inspirationListContent .person-entry { flex-direction: column !important; }

  /* Bei Mobile wieder linksbündig/zentriert – keine Rechtsausrichtung nötig */
  #inspirationListContent .person-entry:nth-child(even) .person-details {
    align-items: center;
    text-align: center;
  }
  #inspirationListContent .person-entry:nth-child(even) .person-details h4,
  #inspirationListContent .person-entry:nth-child(even) .person-details p {
    text-align: center;
  }

  .person-entry.dual-image .person-image { width: 90px; height: 90px; }

  section { padding: 40px 15px; }
  section h2 { font-size: 1.8em; }
  #home { padding: 40px 15px; }
  #home h2 { font-size: 2em; }
  #home p { font-size: 1.1em; }

  .self-intro-image img { width: 130px; height: 130px; }
}

/* Motion reduce */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
