/* ==========================================================================
   Wasser Wärme Klein – Custom Design CSS
   Tailwind CDN v3 + Custom Animations, Slideshow, Timeline, Partner Grid
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --navy:        #1e3a5f;
  --navy-dark:   #0d1d30;
  --navy-light:  #2d5a9e;
  --green:      #07a544;
  --green-dark: #059337;
}

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

/* ---------- Sticky Navbar ---------- */
#site-header {
  transition: background 400ms ease, box-shadow 400ms ease, backdrop-filter 400ms ease;
  background: linear-gradient(to bottom, rgba(13,29,48,0.55) 0%, rgba(13,29,48,0.0) 100%);
}
#site-header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 2px 24px rgba(0,0,0,0.10);
  backdrop-filter: blur(12px);
}
/* Header inner bar height */
#site-header > div > div {
  transition: height 400ms ease;
}
#site-header:not(.scrolled) > div > div {
  height: 96px;
}
#site-header.scrolled > div > div {
  height: 72px;
}
/* Nav links colour states */
#site-header .nav-link {
  color: rgba(255,255,255,0.9);
  transition: color 0.25s;
}
#site-header .nav-link:hover,
#site-header .nav-link.active {
  color: #07a544;
}
#site-header.scrolled .nav-link {
  color: #1e3a5f;
}
#site-header.scrolled .nav-link:hover,
#site-header.scrolled .nav-link.active {
  color: #07a544;
}
/* Logo: white pill container on transparent header, normal on scrolled */
#site-header:not(.scrolled) .logo-img {
  background: rgba(255,255,255,0.92);
  border-radius: 6px;
  padding: 3px 8px;
  filter: none;
  height: 88px;
  transition: height 400ms ease, padding 400ms ease;
}
#site-header.scrolled .logo-img {
  filter: none;
  background: none;
  padding: 0;
  height: 56px;
  transition: height 400ms ease, padding 400ms ease;
}
/* Phone CTA button */
#site-header .phone-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
#site-header.scrolled .phone-btn {
  background: #07a544;
  color: white;
  border-color: #07a544;
}
#site-header .phone-btn:hover {
  background: #07a544;
  border-color: #07a544;
}
/* Mobile menu button */
#site-header .menu-btn-icon {
  color: white;
  transition: color 0.3s;
}
#site-header.scrolled .menu-btn-icon {
  color: #1e3a5f;
}

/* ---------- Hero Slideshow (index.html) ---------- */
.hero-container {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.6s ease-in-out;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(13,29,48,0.80) 0%,
    rgba(30,58,95,0.55) 55%,
    rgba(7,165,68,0.18) 100%
  );
}
.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 0 2rem;
  max-width: 56rem;
  margin: 0 auto;
  left: 0; right: 0;
}
.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.6rem;
  z-index: 10;
}
.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  padding: 0;
}
.hero-dot.active {
  background: #07a544;
  transform: scale(1.4);
}
.hero-scroll-hint {
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.6);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounceScroll 2s infinite;
}
@keyframes bounceScroll {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ---------- Page Hero (alle Unterseiten) ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
  padding: 7rem 1.5rem 4rem;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h40v40H0V0zm40 40h40v40H40V40zm0-40h2l-2 2V0zm0 4l4-4h2l-6 6V4zm0 4l8-8h2L40 10V8zm0 4L52 0h2L40 14v-2zm0 4L56 0h2L40 18v-2zm0 4L60 0h2L40 22v-2zm0 4L64 0h2L40 26v-2zm0 4L68 0h2L40 30v-2zm0 4L72 0h2L40 34v-2zm0 4L76 0h2L40 38v-2zm0 4L80 0v2L42 40h-2zm4 0L80 4v2L46 40h-2zm4 0L80 8v2L50 40h-2zm4 0L80 12v2L54 40h-2zm4 0L80 16v2L58 40h-2zm4 0L80 20v2L62 40h-2zm4 0L80 24v2L66 40h-2zm4 0L80 28v2L70 40h-2zm4 0L80 32v2L74 40h-2zm4 0L80 36v2L78 40h-2zm4 0L80 40v0h-2l-2-2'/%3E%3C/g%3E%3C/svg%3E");
}
.page-hero::after {
  content: '';
  position: absolute;
  right: -5%;
  top: -30%;
  width: 35%;
  height: 160%;
  background: radial-gradient(ellipse at center, rgba(7,165,68,0.18) 0%, transparent 65%);
  pointer-events: none;
}

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-44px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(44px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* ---------- Service Cards ---------- */
.service-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2rem 1.75rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: block;
  color: inherit;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e3a5f, #07a544);
  opacity: 0;
  transition: opacity 0.35s;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.14);
}
.service-card:hover::before { opacity: 1; }

.service-icon {
  width: 3.75rem;
  height: 3.75rem;
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a9e 100%);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  transition: transform 0.35s ease;
}
.service-card:hover .service-icon {
  transform: scale(1.1) rotate(6deg);
}
.service-icon svg { width: 1.875rem; height: 1.875rem; color: white; }

/* ---------- Stat Counter Cards ---------- */
.stat-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  position: relative;
}
.stat-number {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #07a544 0%, #4dc87a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Feature List Items ---------- */
.feature-li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.6rem 0;
}
.feature-li-icon {
  flex-shrink: 0;
  width: 1.625rem;
  height: 1.625rem;
  background: linear-gradient(135deg, #1e3a5f, #2d5a9e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}
.feature-li-icon svg { width: 0.875rem; height: 0.875rem; color: white; }

/* ---------- CTA Section ---------- */
.cta-section {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
}
.cta-section::after {
  content: '';
  position: absolute;
  right: -4%;
  top: -60%;
  width: 42%;
  height: 220%;
  background: radial-gradient(ellipse, rgba(7,165,68,0.22) 0%, transparent 68%);
  pointer-events: none;
}

/* ---------- Timeline (unternehmen.html) ---------- */
.timeline { position: relative; padding: 2rem 0; }
.timeline::before {
  content: '';
  position: absolute;
  left: calc(50% - 1px);
  top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--navy), var(--green), var(--navy));
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 0.5rem 3.5rem 2rem 0;
  text-align: right;
}
.timeline-item:nth-child(even) {
  left: 50%;
  padding: 0.5rem 0 2rem 3.5rem;
  text-align: left;
}
.timeline-dot {
  position: absolute;
  right: -0.875rem;
  top: 1.25rem;
  width: 1.75rem;
  height: 1.75rem;
  background: #07a544;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: 0 0 0 3px #1e3a5f;
  z-index: 2;
}
.timeline-item:nth-child(even) .timeline-dot {
  left: -0.875rem;
  right: auto;
}
.timeline-year {
  display: inline-block;
  background: linear-gradient(135deg, #1e3a5f, #2d5a9e);
  color: white;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.875rem;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
}
.timeline-card {
  background: white;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
@media (max-width: 768px) {
  .timeline::before { left: 0.875rem; }
  .timeline-item, .timeline-item:nth-child(even) {
    width: 100%;
    left: 0;
    padding: 0.25rem 0 1.5rem 3.5rem;
    text-align: left;
  }
  .timeline-dot, .timeline-item:nth-child(even) .timeline-dot {
    left: 0;
    right: auto;
    top: 1rem;
  }
}

/* ---------- Partner Grid ---------- */
.partner-logo-btn {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.875rem;
  padding: 1.25rem 1rem;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}
.partner-logo-btn:hover {
  border-color: #07a544;
  box-shadow: 0 0 22px rgba(7,165,68,0.22);
  transform: scale(1.06);
}
.partner-logo-btn img {
  max-height: 58px;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(0.2);
  transition: filter 0.3s;
}
.partner-logo-btn:hover img { filter: grayscale(0); }

/* ---------- Partner Modal ---------- */
#partner-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}
#partner-modal-overlay.open { display: flex; }
#partner-modal {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 460px;
  width: 92%;
  max-height: 82vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 70px rgba(0,0,0,0.28);
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
#partner-modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2rem; height: 2rem;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.375rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
#partner-modal-close:hover { background: #07a544; color: white; }
#partner-modal-logo img { max-height: 72px; object-fit: contain; margin-bottom: 1rem; }
#partner-modal-category {
  color: #1e3a5f;
  font-weight: 700;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.625rem;
}
#partner-modal-info { color: #475569; font-size: 0.9rem; line-height: 1.7; }
#partner-modal-info .pm-label { color: #1e3a5f; font-weight: 600; margin-right: 0.375rem; }
#partner-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 1rem;
  color: #07a544;
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}
#partner-modal-link:hover { color: #059337; text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  color: rgba(255,255,255,0.78);
}
.site-footer h3 {
  color: white;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1.125rem;
}
.site-footer a {
  color: rgba(255,255,255,0.68);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover { color: #07a544; }
.footer-divider { border-color: rgba(255,255,255,0.10); margin: 0; }

/* ---------- Mobile Menu ---------- */
#mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 290px;
  background: white;
  box-shadow: -6px 0 30px rgba(0,0,0,0.16);
  z-index: 200;
  padding: 5rem 2rem 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              visibility 0s linear 0.35s;
}
#mobile-menu.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94),
              visibility 0s linear 0s;
}
#mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.38);
  z-index: 40;
}
#mobile-backdrop.visible { display: block; }
.mobile-nav-link {
  display: block;
  padding: 0.875rem 0;
  border-bottom: 1px solid #f1f5f9;
  color: #1e3a5f;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-nav-link:hover { color: #07a544; padding-left: 0.5rem; }
.mobile-nav-link.active { color: #07a544; font-weight: 700; }

/* ---------- Info Table (Anfahrt, Impressum) ---------- */
.info-table { width: 100%; border-collapse: collapse; }
.info-table th {
  text-align: left;
  padding: 0.875rem 1rem 0.875rem 0;
  color: #1e3a5f;
  font-weight: 600;
  width: 35%;
  vertical-align: top;
}
.info-table td { padding: 0.875rem 0; color: #475569; }
.info-table tr { border-bottom: 1px solid #f1f5f9; }
.info-table tr:last-child { border-bottom: none; }

/* ---------- Anfahrt Image Hover (preserved) ---------- */
#image_large { position: relative; display: inline-block; }
#image_large img.large {
  display: none;
  position: absolute;
  left: 0; top: 0;
  max-width: 520px;
  border-radius: 0.875rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.28);
  z-index: 10;
}
#image_large:hover img.large { display: block; }
#image_large img:first-child { max-width: 220px; border-radius: 0.625rem; cursor: zoom-in; }

/* ---------- Glassmorphism accents ---------- */
.glass-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 1.25rem;
}

/* ---------- Image zoom on hover ---------- */
.img-zoom-wrap { overflow: hidden; border-radius: 1rem; }
.img-zoom-wrap img { transition: transform 0.6s ease; display: block; width: 100%; height: 100%; object-fit: cover; }
.img-zoom-wrap:hover img { transform: scale(1.05); }

/* ---------- green badge ---------- */
.badge-green {
  display: inline-block;
  background: linear-gradient(135deg, #07a544, #4dc87a);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.875rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.breadcrumb a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: white; }
.breadcrumb span { color: rgba(255,255,255,0.9); }
.breadcrumb svg { color: rgba(255,255,255,0.4); }

/* ---------- Checklist download card ---------- */
.download-card {
  background: white;
  border-radius: 1.25rem;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: box-shadow 0.3s, transform 0.3s;
  border-left: 4px solid #07a544;
}
.download-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
  transform: translateX(4px);
}

/* ---------- Gas safety step card ---------- */
.gas-step-card {
  background: white;
  border-radius: 1.25rem;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  border-top: 3px solid transparent;
  transition: border-color 0.3s, transform 0.3s;
}
.gas-step-card:hover {
  border-top-color: #07a544;
  transform: translateY(-4px);
}

/* ---------- Sanierung step ---------- */
.sanierung-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}
.sanierung-step:last-child { border-bottom: none; }
.sanierung-step-num {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  background: linear-gradient(135deg, #1e3a5f, #2d5a9e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1rem;
}

/* ---------- Quote / Testimonial ---------- */
.testimonial-block {
  border-left: 4px solid #07a544;
  padding: 1.25rem 1.75rem;
  background: #fff7f0;
  border-radius: 0 0.875rem 0.875rem 0;
  margin: 1.5rem 0;
}

/* ---------- Print ---------- */
@media print {
  #site-header, .cta-section, .site-footer, #mobile-menu, #mobile-backdrop { display: none !important; }
  .page-hero { background: white !important; color: black !important; min-height: auto; padding: 1rem; }
  .page-hero h1, .page-hero p { color: black !important; }
}
