/* ============================================================
   AquaFit Erlebnisbad – Custom Styles
   Aufbauend auf dem Rivora HTML Template
   ============================================================ */

/* --- Farben / Variablen ------------------------------------ */
:root {
  --af-green:        #7DB928;
  --af-green-dark:   #5e8e1a;
  --af-green-light:  #a8d46f;
  --af-blue:         #1a4a7a;
  --af-blue-light:   #2a6cb0;
  --af-dark:         #1a1a1a;
  --af-grey:         #f4f4f4;
  --af-text:         #333333;
  --af-muted:        #777777;
  --font-body:       'Inter', 'Segoe UI', sans-serif;
  --font-heading:    'Playfair Display', 'Georgia', serif;
  --radius:          12px;
  --radius-lg:       20px;
  --shadow:          0 4px 24px rgba(0,0,0,.10);
  --shadow-hover:    0 8px 40px rgba(0,0,0,.16);
  --transition:      .3s ease;
}

/* --- Rivora Override: primäre Akzentfarbe ----------------- */
:root {
  --primary-color:     #7DB928;
  --primary-color-rgb: 125, 185, 40;
  --secondary-color:   #7DB928;
}

/* --- Basis ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--af-text);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-heading); }

a { color: var(--af-green); transition: color var(--transition); }
a:hover { color: var(--af-green-dark); }

img { max-width: 100%; height: auto; }

/* --- Logo -------------------------------------------------- */
#logo img { height: 52px; width: auto; }

/* --- Navigation -------------------------------------------- */
header.header-light { background: rgba(255,255,255,.95); backdrop-filter: blur(8px); }

#mainmenu > li > a {
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* --- CTA-Button -------------------------------------------- */
.btn-main {
  background: var(--af-green) !important;
  border-color: var(--af-green) !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 50px;
  padding: .65rem 1.8rem;
  transition: all var(--transition);
}
.btn-main:hover {
  background: var(--af-green-dark) !important;
  border-color: var(--af-green-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(125,185,40,.35);
}

/* --- Hero Bereich ------------------------------------------ */
.af-hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.af-hero .swiper { width: 100%; height: 100%; }

.af-hero-slide {
  background-size: cover;
  background-position: center;
  position: relative;
}

.af-hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.2) 0%, rgba(0,0,0,.55) 100%);
}

.af-hero-content {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 5rem 3rem 4rem;
  z-index: 10;
  color: #fff;
}

.af-hero-content h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}

.af-hero-content .subline {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: .9;
  margin-bottom: 2rem;
  font-family: var(--font-body);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* --- Quick Links (schwebend rechts) ------------------------ */
.af-quicklinks {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.af-quicklinks a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: var(--af-green);
  color: #fff;
  padding: .7rem 1rem;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .8rem;
  font-weight: 600;
  text-decoration: none;
  gap: .5rem;
  min-width: 48px;
  overflow: hidden;
  transition: all var(--transition);
  max-width: 48px;
  white-space: nowrap;
}

.af-quicklinks a:hover {
  max-width: 220px;
  background: var(--af-green-dark);
  color: #fff;
}

.af-quicklinks a .ql-label {
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: all var(--transition);
}

.af-quicklinks a:hover .ql-label {
  opacity: 1;
  max-width: 180px;
}

.af-quicklinks a i { font-size: 1rem; flex-shrink: 0; }

/* --- Sektionen allgemein ----------------------------------- */
.af-section { padding: 80px 0; }
.af-section-sm { padding: 50px 0; }
.af-section-dark { background: var(--af-dark); color: #fff; }
.af-section-grey { background: var(--af-grey); }

.af-section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.15;
}

.af-section-title.light { color: #fff; }

.af-divider {
  width: 60px;
  height: 4px;
  background: var(--af-green);
  border-radius: 2px;
  margin: 1rem 0 2rem;
}

.af-divider.center { margin: 1rem auto 2rem; }

/* --- Welcome Sektion --------------------------------------- */
.af-welcome-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.af-welcome-img img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

/* --- Bereichs-Tabs ---------------------------------------- */
.af-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 2rem;
  list-style: none;
  padding: 0;
}

.af-tabs-nav .af-tab-btn {
  padding: .6rem 1.5rem;
  border-radius: 50px;
  border: 2px solid var(--af-green);
  background: transparent;
  color: var(--af-green);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .04em;
  cursor: pointer;
  transition: all var(--transition);
  text-transform: uppercase;
}

.af-tabs-nav .af-tab-btn:hover,
.af-tabs-nav .af-tab-btn.active {
  background: var(--af-green);
  color: #fff;
}

.af-tab-pane { display: none; }
.af-tab-pane.active { display: block; }

/* Galerie-Grid in Tab */
.af-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.af-gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.af-gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.af-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.af-gallery-item:hover img { transform: scale(1.05); }

/* --- Großes Feature-Bild (Imagefilm/Rundgang) -------------- */
.af-feature-box {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.af-feature-box img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.af-feature-box:hover img { transform: scale(1.04); }

.af-feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.7) 0%, rgba(0,0,0,.1) 60%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}

.af-feature-overlay h3 {
  color: #fff;
  font-size: 1.5rem;
  margin: 0;
}

.af-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--af-green);
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
}

.af-feature-box:hover .af-play-btn {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--af-green);
  color: #fff;
}

/* --- Preise & Öffnungszeiten ------------------------------ */
.af-price-table { width: 100%; }

.af-price-table thead th {
  background: var(--af-green);
  color: #fff;
  font-weight: 700;
  padding: .85rem 1.2rem;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.af-price-table tbody tr:nth-child(odd) { background: #f9f9f9; }

.af-price-table tbody td {
  padding: .75rem 1.2rem;
  border-bottom: 1px solid #ececec;
}

.af-price-table tbody td:last-child {
  font-weight: 700;
  color: var(--af-green-dark);
}

.af-hours-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4rem 1.5rem;
  align-items: start;
}

.af-hours-day { font-weight: 700; white-space: nowrap; }

/* --- Gastro / Kindergeburtstag ---------------------------- */
.af-gastro-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 420px;
}

.af-gastro-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.af-birthday-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 1.5rem;
}

.af-birthday-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.af-birthday-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* --- Events Karten ---------------------------------------- */
.af-event-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.af-event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.af-event-card-img {
  height: 200px;
  background: var(--af-grey);
  overflow: hidden;
  flex-shrink: 0;
}

.af-event-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

.af-event-card:hover .af-event-card-img img { transform: scale(1.06); }

.af-event-card-body { padding: 1.4rem; flex: 1; display: flex; flex-direction: column; }

.af-event-date {
  display: inline-block;
  background: var(--af-green);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .3rem .75rem;
  border-radius: 50px;
  margin-bottom: .75rem;
  letter-spacing: .04em;
}

.af-event-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
  line-height: 1.3;
}

.af-event-card p {
  font-size: .9rem;
  color: var(--af-muted);
  flex: 1;
}

/* --- Kurse Karten ----------------------------------------- */
.af-course-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition);
}

.af-course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.af-course-icon {
  width: 52px;
  height: 52px;
  background: var(--af-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.af-course-info h4 { font-size: 1rem; font-weight: 700; margin: 0 0 .3rem; }
.af-course-info p  { font-size: .85rem; color: var(--af-muted); margin: 0; }

.af-course-spots {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  margin-top: .5rem;
  color: var(--af-muted);
}

.af-spot-bar {
  flex: 1;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}

.af-spot-fill {
  height: 100%;
  background: var(--af-green);
  border-radius: 3px;
  transition: width .5s ease;
}

.af-spot-fill.warn { background: #e68a00; }
.af-spot-fill.full { background: #c0392b; }

/* --- FAQ -------------------------------------------------- */
.af-faq-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 1.2rem 0;
}

.af-faq-question {
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--af-dark);
  transition: color var(--transition);
}

.af-faq-question:hover { color: var(--af-green); }

.af-faq-question .faq-icon {
  font-size: .85rem;
  color: var(--af-green);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.af-faq-item.open .faq-icon { transform: rotate(45deg); }

.af-faq-answer {
  display: none;
  padding-top: .75rem;
  color: var(--af-muted);
  line-height: 1.7;
  font-size: .95rem;
}

.af-faq-item.open .af-faq-answer { display: block; }

/* --- Footer ----------------------------------------------- */
footer.af-footer {
  background: #0f1f12;
  color: rgba(255,255,255,.75);
  padding: 60px 0 30px;
}

footer.af-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
footer.af-footer a:hover { color: var(--af-green); }

.af-footer-logo img { height: 56px; filter: brightness(0) invert(1); }

.af-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.af-footer-links li + li { margin-top: .5rem; }

.af-social-links {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
}

.af-social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}

.af-social-links a:hover {
  background: var(--af-green);
  border-color: var(--af-green);
  color: #fff;
}

.af-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 40px;
  padding-top: 24px;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

/* --- Popup Modal ------------------------------------------ */
.af-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.af-popup {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  position: relative;
  animation: popupIn .35s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.af-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(0,0,0,.15);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 1;
}

.af-popup-close:hover { background: var(--af-green); }

.af-popup-img { width: 100%; max-height: 280px; object-fit: cover; display: block; }

.af-popup-body { padding: 2rem; }
.af-popup-body h3 { font-size: 1.5rem; margin-bottom: .75rem; }
.af-popup-body p  { color: var(--af-muted); line-height: 1.7; }

/* --- Sprachschalter --------------------------------------- */
.af-lang-switch {
  display: flex;
  gap: 8px;
  align-items: center;
}

.af-lang-switch img {
  width: 28px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
  cursor: pointer;
  opacity: .6;
  transition: opacity var(--transition);
}

.af-lang-switch img:hover,
.af-lang-switch img.active { opacity: 1; }

/* --- Tabs (Preise / Öffnungszeiten) ----------------------- */
.af-area-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.af-area-tab {
  padding: .75rem 1.5rem;
  border: none;
  background: none;
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--af-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.af-area-tab:hover { color: var(--af-green); }

.af-area-tab.active {
  color: var(--af-green);
  border-bottom-color: var(--af-green);
}

.af-tab-content { display: none; }
.af-tab-content.active { display: block; }

/* --- Responsive ------------------------------------------- */
@media (max-width: 991px) {
  .af-quicklinks { display: none; }
  .af-hero-content h1 { font-size: clamp(2rem, 10vw, 4rem); }
  .af-hero-content { padding: 2rem 1.5rem 3rem; }
}

@media (max-width: 767px) {
  .af-section { padding: 50px 0; }
  .af-section-title { font-size: 1.8rem; }
  .af-gallery-grid { grid-template-columns: 1fr 1fr; }
}

/* --- Hilfskassen ------------------------------------------ */
.text-green  { color: var(--af-green) !important; }
.bg-green    { background: var(--af-green) !important; }
.rounded-xl  { border-radius: var(--radius-lg) !important; }
.img-cover   { object-fit: cover !important; }

/* --- Scroll-Animation ------------------------------------- */
[data-aos] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-aos].aos-animate { opacity: 1; transform: translateY(0); }
