/* Aktualisierte style.css — nur die .usp- und .leistungen-Regeln wurden ergänzt,
   alles andere exakt wie in deiner Style Test belassen. */

/* ---------------------------
   CSS Variables (easy tuning)
   --------------------------- */
:root{
  --header-height: 68px;
  --nav-accent: #0f3460;
  --nav-accent-hover: #123a63;
  --nav-text-color: #ffffff;
  --brand-blue: #1e40af;
  --brand-green: #22c55e;
}

/* ---------------------------
   Base / Reset-ish
   --------------------------- */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body { font-family: Arial, sans-serif; margin:0; padding:0; color:#333; background:#fff; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; }

/* ---------------------------
   Header & Navigation
   --------------------------- */
header {
  min-height: var(--header-height);
  height: var(--header-height);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 120;
}
header img { height: 50px; display:block; }
.logo { cursor:pointer; display:flex; align-items:center; gap:12px; }
.nav-area { display:flex; align-items:center; gap:12px; position:relative; }

.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: transparent; border: none; padding: 6px; }
.menu-toggle span { width: 25px; height: 3px; background: #333; border-radius: 2px; display: block; }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--header-height);
  line-height: var(--header-height);
  padding: 0 18px;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.08s;
}
.nav-links a:hover,
.nav-links a:focus {
  background-color: var(--nav-accent-hover);
  color: var(--nav-text-color) !important;
  outline: none;
}
.nav-links a.active {
  background-color: var(--nav-accent);
  color: var(--nav-text-color) !important;
  box-shadow: 0 4px 14px rgba(15,52,96,0.12);
  border: 1px solid rgba(255,255,255,0.03);
}
.nav-links a:focus { outline: 3px solid rgba(16,185,129,0.12); }

/* ---------------------------
   Mobile Drawer Behavior (final)
   - stricter overrides: line-height, margin, font-size to ensure compact rows
   --------------------------- */
@media (max-width: 768px) {
  .menu-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--header-height) + 6px);
    right: 12px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 8px;
    flex-direction: column;
    min-width: 220px;
    z-index: 500;
    gap: 4px; /* engerer Abstand */
    align-items: stretch;
  }
  .nav-links.active { display: flex; }

  /* stronger selector and explicit overrides to prevent desktop rules from leaking in */
  nav#navMenu.nav-links > a,
  .nav-links > a {
    display: block !important;
    height: auto !important;
    padding: 6px 10px !important;   /* kompakter vertical padding */
    margin: 0 !important;
    line-height: 1.15 !important;   /* verhindert großes Zeilenmaß */
    font-size: 0.98rem !important;
    white-space: normal !important;
    text-align: left !important;
  }

  .nav-links a.active { box-shadow: none; color: var(--nav-text-color) !important; background-color: var(--nav-accent); }
}

/* ---------------------------
   HERO
   --------------------------- */
.hero {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  color: #fff;
  text-align: center;
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 0;
}
.hero h1 { font-size: 2.5em; margin-bottom: 20px; hyphens: none; overflow-wrap: break-word; }
.hero p { font-size: 1.2em; margin-bottom: 30px; }
.hero button {
  background: #fff; color: var(--brand-blue); border: none; padding: 12px 24px; font-size: 1em; font-weight:600; border-radius:8px; cursor:pointer;
}
.hero button:hover { background: var(--brand-blue); color: #fff; }

/* ---------------------------
   Sections / Layout
   --------------------------- */
section { padding: 60px 20px; max-width: 1200px; margin: auto; }
h2 { text-align: center; font-size: 2em; margin-bottom: 40px; hyphens: auto; overflow-wrap: break-word; }

 /* ---------------------------
   Anpassung: "Meine Leistungen" - feste 4 Spalten auf Desktop
   --------------------------- */
.leistungen {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 nebeneinander auf großen Bildschirmen */
  gap: 20px;
  align-items: stretch;
  margin: 0 auto;
}
@media (max-width: 1100px) {
  /* fallback: responsive */
  .leistungen { grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); }
}

/* card defaults (wie vorher) */
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.card h3 { color: var(--brand-blue); margin-bottom: 10px; }

/* ---------------------------
   Anpassung: "Warum ENERCON4U" (.usp) 3 nebeneinander
   --------------------------- */
.usp {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* genau 3 nebeneinander auf Desktop */
  gap: 20px;
  align-items: stretch;
  text-align: center;
}
.usp .card { font-weight: 600; color: var(--brand-blue); display: flex; align-items: center; justify-content: center; padding: 20px; }

/* responsive: stack on small screens */
@media (max-width: 900px) {
  .usp { grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); }
}

/* ---------------------------
   About
   --------------------------- */
.about-inner { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:30px; max-width:900px; margin:auto; }
.about-inner img { max-width:250px; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,0.12); }
.about-inner p { flex:1; min-width:250px; font-size:1.05em; line-height:1.6; }

/* ---------------------------
   Gallery / Projects
   --------------------------- */
.gallery { display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.gallery img { width:100%; border-radius:12px; cursor:pointer; transition: transform 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.08); display:block; }
.gallery img:hover { transform: scale(1.05); }

/* Coming-soon */
.project {
  position: relative;
  display: inline-block;
  border-radius: 12px;
  overflow: hidden;
}

.project.coming-soon img {
  opacity: 0.6;
  filter: grayscale(100%);
  border-radius: 12px;
  display: block;
  transition: transform 200ms ease;
}

.project .overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-20deg);
  color: #123e8a;
  font-size: 2em;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
  text-shadow: 0 2px 0 rgba(255,255,255,0.65);

  white-space: nowrap;   /* verhindert Zeilenumbruch */
  text-align: center;    /* falls später mehr Text genutzt wird */
}

.project.coming-soon:hover img {
  transform: scale(1.02);
}

/* ---------------------------
   Flyer grid & modal (keine Änderung hier)
   --------------------------- */
#flyer-aktion { text-align:center; padding:40px 20px; }
.flyer-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:18px; margin-top:20px; }
.flyer-item img { width:100%; border-radius:12px; cursor:pointer; transition:0.3s; display:block; }
.flyer-item.inactive img { filter: blur(6px) contrast(1.2); transform:scale(1.02); image-rendering:pixelated; pointer-events:none; opacity:0.42; }

#flyer-fortschritt { margin-top:40px; text-align:center; }
.flyer-mini-grid { display:flex; justify-content:center; gap:20px; margin-top:10px; }
.flyer-mini { width:70px; height:70px; opacity:0.12; transition:0.3s; border-radius:8px; overflow:hidden; box-shadow:0 2px 6px rgba(0,0,0,0.06); }
.flyer-mini img { width:100%; height:100%; object-fit:cover; display:block; }
.flyer-mini.active { opacity:1; transform:translateY(-4px); box-shadow:0 6px 18px rgba(0,0,0,0.12); cursor:pointer; }

 /* rest unchanged: modal, card flip, footer, responsive tweaks */

/* Modal base */
.modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.85); padding:20px; z-index:1500; }

/* Project modal */
.project-modal .modal-dialog { position:relative; max-width:900px; margin:40px auto; padding:22px; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,0.28); text-align:center; }
.project-modal img#projectImage { width:100%; max-height:65vh; object-fit:contain; border-radius:10px; box-shadow:0 6px 22px rgba(0,0,0,0.12); display:block; margin:0 auto 12px auto; }
.project-modal-text { text-align:left; color:#222; max-width:820px; margin:8px auto 0 auto; font-size:1rem; line-height:1.5; }
.project-modal-text h3 { color:var(--brand-blue); font-weight:800; }

/* Projekt Modal Close Button über dem Bild, exakt wie bei Flyern */
.project-modal .modal-close {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 100%;
  height: 42px;
  background: #f5f5f5 !important;  /* hellgrau, wie bei Flyern */
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.08);
  color: #123e8a !important;       /* dunkelblau Textfarbe für X */
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 25;
  transition: background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Hover-Farbe hellgrau → dunkleres Grau */
.project-modal .modal-close:hover,
.project-modal .modal-close:focus {
  background: #d1d5db !important;  /* dunkleres Grau beim Hover */
  color: #123e8a !important;       /* Textfarbe bleibt dunkelblau */
}

/* Abstand Bild nach unten, damit Close-Button darüber liegt */
.project-modal img#projectImage {
  margin-top: 62px; /* genug Platz für den Button über dem Bild inkl. Rand oben */
  display: block;
  max-width: 100%;
}


/* Abstand Bild nach unten, damit Close-Button darüber liegt */
.project-modal img#projectImage {
  margin-top: 48px; /* genug Platz für den Button über dem Bild */
  display: block;
  max-width: 100%;
}

/* Hover / Focus wie bei Flyern */
.project-modal .modal-close:hover,
.project-modal .modal-close:focus {
  background: var(--brand-blue);
  color: #fff;
}



.project-modal-prev, .project-modal-next { position:absolute; top:50%; transform:translateY(-50%); width:50px; height:50px; border-radius:10px; border:none; background:rgba(255,255,255,0.98); color:var(--brand-blue); font-size:30px; box-shadow:0 6px 20px rgba(0,0,0,0.12); display:flex; align-items:center; justify-content:center; cursor:pointer; z-index:5; }
.project-modal-prev { left:-20px; } .project-modal-next { right:-20px; }

/* ---------------------------
   FLYER MODAL – FINAL VERSION
   (ohne Pfeile, kein Wischen)
   --------------------------- */

.flyer-modal {
  display: none;
  position: fixed;
  z-index: 1600;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0,0,0,0.85);
  align-items: center;
  justify-content: center;
}

.flyer-modal-dialog {
  background: #fff;
  border-radius: 12px;
  max-width: 850px;
  width: 96%;
  min-width: 300px;
  margin: auto;
  padding: 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.flyer-modal-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
  height: 100%;
}

/* Entfernt komplett die Pfeile */
.flyer-modal-prev,
.flyer-modal-next {
  display: none !important;
}

.flyer-modal-toptext {
  width: 100%;
  max-width: 850px;
  padding: 12px 14px;
  text-align: center;
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 1.15rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(30,64,175,0.04);
  flex: 0 0 auto;
}

.flyer-modal-content {
  display: block;
  width: auto;
  max-width: 97%;
  max-height: calc(90vh - 240px);
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
  flex: 0 0 auto;
  /* WICHTIG FÜR HORIZONTALE ZENTRIERUNG */
  margin: 0 auto;
}

.flyer-modal-bottomtext {
  font-size: 1.05em;
  text-align: center;
  color: #222;
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 850px;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(30,64,175,0.04);
  border-top: 1px solid #eee;
  flex: 0 0 auto;
  max-height: 28vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* MOBILE */
@media (max-width: 700px) {

  .flyer-modal-dialog {
    padding: 12px;
    max-height: calc(100vh - 20px);
  }

  .flyer-modal-content {
    max-height: 38vh;
    width: 95%;
  }

  .flyer-modal-bottomtext {
    max-height: calc(100vh - 38vh - 160px);
    font-size: 1rem;
  }

  .flyer-modal-toptext,
  .flyer-modal-bottomtext {
    max-width: 850px !important;
  }
}

@media (max-width:700px) { .flyer-modal-dialog { padding:14px; } .flyer-modal-content { max-height:calc(70vh - 120px); } .flyer-modal-bottomtext { max-height:32vh; font-size:1rem; } .flyer-modal-prev, .flyer-modal-next { width:36px; height:36px; font-size:1.3rem; } }

/* Contact / EE-Logo */
.kontakt { text-align:center; }
.kontakt p { margin:10px 0; }
.ee-logo { margin-top:14px; text-align:center; }
.ee-logo img { max-width:180px; width:100%; height:auto; display:inline-block; }

/* Card flip */
.card-container { perspective:1000px; width:350px; margin:20px auto; cursor:pointer; }
.card-inner { position:relative; width:100%; height:200px; text-align:center; transition:transform .8s; transform-style:preserve-3d; }
.card-container.flipped .card-inner { transform:rotateY(180deg); }
.card-front, .card-back { position:absolute; width:100%; height:100%; backface-visibility:hidden; border-radius:12px; box-shadow:0 4px 12px rgba(0,0,0,0.12); }
.card-front img, .card-back img { width:100%; height:100%; border-radius:12px; }
.card-back { transform:rotateY(180deg); }

/* Footer */
footer { background:#1f2937; color:#eee; text-align:center; padding:20px; font-size:0.9em; }
footer a { color:#ccc; margin:0 10px; text-decoration:none; }
footer a:hover { color:var(--brand-green); }

/* Responsive tweaks */
@media (max-width:1200px) { .hero { padding:60px 16px; } header { padding:0 18px; } }
@media (max-width:800px) { .flyer-grid { grid-template-columns: repeat(2,1fr); } .flyer-mini-grid { gap:12px; } .about-inner { gap:18px; padding:0 8px; } }



/* Fügt ans Ende von style.css ein — entfernt Unterstreichung in Header-Links
   und stellt Hover/Active-Farbe (weiß auf dunklem Blau) sicher. */

header a,
header nav a,
.nav-area a {
  text-decoration: none !important;
  color: inherit !important;
}

/* Sicherstellen für alle Zustände */
header a:link,
header a:visited,
header a:hover,
header a:focus,
header a:active,
header nav a:link,
header nav a:visited,
header nav a:hover,
header nav a:focus,
header nav a:active {
  text-decoration: none !important;
  color: inherit !important;
}

/* Hover/Focus und .active explizit in weiß stellen */
header nav a:hover,
header nav a:focus,
header nav a.active {
  color: var(--nav-text-color, #fff) !important;
}
/* Mobile fixes für Flyer-Modal: Layout wie Desktop, nur kleiner anpassen */

@media (max-width: 700px) {

  /* Dialog bleibt voll sichtbar */
  .flyer-modal-dialog {
    max-height: calc(100vh - 20px) !important;
    padding: 10px !important;
  }

  /* Bild kleiner, aber Desktop-Struktur bleibt */
  .flyer-modal-content {
    max-height: 35vh !important;
    width: 95% !important;
    object-fit: contain !important;
  }

  /* Bottomtext scrollbar */
  .flyer-modal-bottomtext {
    max-height: calc(100vh - 35vh - 150px) !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Pfeile: mobil links/rechts wie Desktop */
  .flyer-modal-prev,
  .flyer-modal-next {
    width: 44px !important;
    height: 60px !important;
    font-size: 32px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
  }

  .flyer-modal-prev {
    left: 8px !important;
  }

  .flyer-modal-next {
    right: 8px !important;
  }

  /* 🔥 Hier richtig eingebaut */
  .flyer-modal-toptext,
  .flyer-modal-bottomtext {
    max-width: 850px !important;
  }

  /* Desktop-Close-Button nicht überschreiben */
}

/* ===============================
   FLYER CLOSE BUTTON – FIX ALL BROWSERS
   =============================== */

/* Normalzustand */
.flyer-modal-close {
  background: #e5e7eb !important;   /* hellgrau */
  color: #374151 !important;        /* dunkles Grau für X */
  border: 1px solid rgba(0,0,0,0.15);
  transition: background 0.15s ease, color 0.15s ease;
}

/* Hover & Focus */
.flyer-modal-close:hover,
.flyer-modal-close:focus {
  background: #9ca3af !important;   /* dunkleres Grau */
  color: #111827 !important;
}

/* Entfernt Browser-eigene Styles (Opera!) */
.flyer-modal-close::-moz-focus-inner {
  border: 0;
}
.flyer-modal-close {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}
