/* ===== GLOBALE STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  --primary-color: #1b1d1f;
  --secondary-color: #ffffff;
  --third-color: grey;
  --accent-color: #e74c3c;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --white: #ffffff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --form-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f7fa;
}

/* ===== HEADER ===== */
header {
  background: var(--primary-color);
  padding: 0.8rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1vw;
  cursor: pointer;
}

.firmenname {
  font-family: 'Pacifico', cursive;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  color: var(--white);
  letter-spacing: 0.5px;
}

.logo-img {
  height: clamp(30px, 5vw, 45px);
  width: auto;
}

/* Hamburger Menu */
.hamburger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  cursor: pointer;
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--white);
  border-radius: 3px;
  transition: all 0.3s ease;
}

/* Navigation */
nav ul {
  display: flex;
  list-style: none;
  gap: clamp(0.8rem, 3vw, 1.5rem);
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(0.9rem, 2vw, 1rem);
  transition: color 0.3s;
}

nav a:hover {
  color: var(--secondary-color);
}

nav a.active {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
}

/* ===== HAUPTCONTAINER ===== */
#page-container {
  flex: 1;
  margin-top: 70px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  text-align: center;
  min-height: 40vh;
  padding: 4rem 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 6vw, 3rem);
  margin-bottom: 1.5rem;
  line-height: 1.2;
   min-height: 1.2em; /* Verhindert Layout-Shifting */
}

.hero h1 span {
  display: block;
  font-weight: 300;
  font-size: clamp(2.0rem, 3vw, 2.8rem);
  margin-top: 0.8rem;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  max-width: 800px;
  margin: 0 auto 2rem;
}

/* ===== SERVICES SECTION ===== */
#services {
  padding: clamp(3rem, 8vh, 5rem) 5%;
  background: var(--light-bg);
}

.section {
  padding: 4rem 5%;
}

.section h2 {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 2.5rem;
  color: var(--primary-color);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: clamp(1.5rem, 3vw, 2rem);
  max-width: 1200px;
  margin: 0 auto;
}

.service-item {
  background: var(--white);
  border-radius: 8px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 280px; /* Gleiche Mindesthöhe für alle Service-Items */
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.service-item h3 {
  color: var(--primary-color);
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  margin-bottom: 0.8rem;
}

.service-item p {
  font-size: clamp(0.9rem, 2vw, 1rem);
  margin-bottom: 1.5rem;
  flex-grow: 1; /* Lässt den Textbereich wachsen, um verfügbaren Raum einzunehmen */
}

.service-cta {
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  margin-top: auto; /* Schiebt das Element an den unteren Rand */
  padding-top: 1rem;
  border-top: 1px solid #eee; /* Leichte Trennlinie */
  opacity: 0.40; /* Immer sichtbar */
}

/* Benefits-Section */
.benefits-section {
  background: linear-gradient(to right, #f8f9fa, #e9ecef);
  padding: 4rem 5%;
  text-align: center;
}

.benefits-container {
  max-width: 1200px;
  margin: 0 auto;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.benefit-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 320px; /* Gleiche Mindesthöhe für alle Benefit-Cards */
}

.benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.benefit-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.benefit-card p {
  flex-grow: 1; /* Lässt den Textbereich wachsen, um verfügbaren Raum einzunehmen */
  margin-bottom: 1.5rem;
}

.benefit-cta {
  color: var(--primary-color);
  font-weight: 600;
  text-align: center;
  margin-top: auto; /* Schiebt das Element an den unteren Rand */
  padding-top: 1rem;
  border-top: 1px solid #eee; /* Leichte Trennlinie */
  opacity: 0.4; /* Immer sichtbar */
}

.benefits-cta {
  margin-top: 3rem;
}

.cta-button {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 1rem;
  transition: background 0.3s;
}

.cta-button:hover {
  background: var(--third-color);
}

/* ===== KONTAKTFORMULAR (Überarbeitet) ===== */
#contact {
  padding: 3rem 5%;
  max-width: 800px;
  margin: 2rem auto;
}

#contact form {
  display: grid;
  gap: 1.5rem;
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--form-shadow);
}

#contact input,
#contact textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s;
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

#contact textarea {
  min-height: 150px;
  resize: vertical;
}

#contact button {
  background: var(--primary-color);
  color: white;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#contact button:hover {
  background: var(--third-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* ===== DETAILSEITEN ===== */
.back-button {
  color: var(--third-color);
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 2rem;
  display: inline-block;
}

.back-button:hover {
  text-decoration: underline;
}

.detail-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.detail-hero h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.detail-item {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.detail-item h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.benefits-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.benefit-detail-item {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.benefit-detail-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.benefit-detail-item h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.cta-section {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
  background: var(--light-bg);
  border-radius: 8px;
}

/* ===== RECHTSINHALTE ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.legal-content h3 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content h4 {
  color: var(--primary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== FOOTER ===== */
footer {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: clamp(1.2rem, 3vh, 1.8rem);
}

/* Fügen Sie dies zu Ihrer CSS-Datei hinzu */
.spam-info {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.spam-info small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Deaktivierter Button Styling */
button[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Typewriter Animation - Fixed */
.hero-content h1 {
    min-height: 120px; /* Feste Höhe verhindert Ruckeln */
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-static {
    margin-right: 8px;
}

.hero-dynamic {
    color: #ffffff; /* Hervorhebung des dynamischen Teils */
    font-weight: 700;
}

.typewriter-cursor {
    display: inline-block;
    background-color: #ffffff;
    margin-left: 2px;
    width: 3px;
    animation: blink 1s infinite;
    height: 1.2em;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Container für stabileres Layout */
.hero-content {
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Styles für verschlüsselte Kontaktdaten */
/* VEREINFACHT: Styles für verschlüsselte Kontaktdaten - Gleicher Stil wie Body */
.encrypted-contact {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    /* Keine besondere Hervorhebung - passt sich dem Design an */
}

/* Optional: Leichte Hervorhebung während des Ladens */
.encrypted-contact[data-key] {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.encrypted-contact:not([data-key]) {
    opacity: 1;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 880px) {
  header {
    padding: 0.5rem 5%;
  }
  
  .hamburger-menu {
    display: flex;
  }
  
  nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  
  nav.active {
    max-height: 300px;
  }

  .logo-container {
    margin-bottom: 0;
  }


  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  nav a {
    display: block;
    padding: 0.5rem 0;
  }
  
  #contact form {
    padding: 1.5rem;
  }
  
  .detail-grid,
  .benefits-detail-grid {
    grid-template-columns: 1fr;
  }
  
  .service-item,
  .benefit-card {
    min-height: auto; /* Auf Mobilgeräten automatische Höhe */
  }
}

@media (max-width: 480px) {
  header {
    padding: 0.4rem 5%;
  }
  
  .firmenname {
    font-size: 1.2rem;
  }
  
  .logo-img {
    height: 25px;
  }
  
  #page-container {
    margin-top: 60px;
  }
  
  .hero {
    padding: 4rem 5% 2rem;
    min-height: 30vh;
  }
  
  .service-item,
  .benefit-card {
    min-height: auto;
  }
  
  .service-cta,
  .benefit-cta {
    opacity: 1;
  }
  
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}