/* =========================================================
   ELEKTRO-SERVICE AXEL STEINFÜHRER – MOBILE VERSION
   Gültig ausschließlich bis 760 Pixel Bildschirmbreite.

   Grundidee:
   - styles.css enthält Desktop und allgemeine Gestaltung.
   - mobile.css überschreibt nur die Darstellung auf Smartphones.
   - Der Desktop-Header bleibt dadurch unangetastet.
   ========================================================= */

/* =========================================================
   1. GRUNDLAYOUT
   ========================================================= */

.page-frame {
  width: 100%;
  border-width: 3px;
}

.container {
  width: min(calc(100% - 24px), var(--page));
}

/* =========================================================
   2. MOBILER HEADER
   =========================================================
   Der Header bekommt im Mobilbereich keine starre Höhe mehr.
   Dadurch werden Logo, Kontaktdaten und Navigation nicht
   zusammengedrückt.
   ========================================================= */

.identity-wrap {
  height: auto;
  /*
     Gesamthöhe des mobilen Kopfbereichs.
     Von 220 px auf 210 px reduziert, damit der Abstand unter den
     Kontaktdaten bis zur grünen Linkleiste kleiner wird.
  */
  min-height: 210px;
  overflow: visible;
}

.identity {
  height: auto;
  min-height: 210px;

  /*
     Unterer Innenabstand des Headers.
     Kleinerer Wert = die Linkleiste rückt näher an die Kontaktdaten.
  */
  padding-bottom: 8px;
}

.identity-band {
  top: 24px;
  height: 38px;
}

/* Firmenlogo und Schriftzug erhalten einen eigenen Bereich. */
.identity-main {
  position: relative;
  left: auto;
  top: auto;
  width: calc(100% - 82px);
  height: 116px;
  margin: 0;
}

.identity-main::before {
  left: 50%;
  top: -1px;
  width: 146px;
  height: 73px;
  transform: translateX(-50%);
}

.identity-logo {
  left: 50%;
  top: 1px;
  width: 142px;
  height: 69px;
  transform: translateX(-50%);
}

.identity-name {
  left: 0;
  top: 73px;
  width: 100%;
  text-align: center;
}

.identity-name span {
  font-size: clamp(1.95rem, 9vw, 2.45rem);
  letter-spacing: -.055em;
}

.identity-name small {
  width: 100%;
  margin-top: 7px;
  font-size: .7rem;
  letter-spacing: .32em;
}

/* Jubiläum bleibt rechts oben und wird etwas kompakter. */
.jubilee {
  width: 68px;
  height: 68px;
  right: 10px;
  top: 8px;
}

.jubilee strong {
  font-size: 1.65rem;
}

.laurel {
  display: none;
}

/* =========================================================
   KONTAKTDATEN IM MOBILEN HEADER – DREIECKSANORDNUNG
   =========================================================
   Der Firmenname "Elektro-Service / ALLER ART" bleibt exakt
   mittig. Darunter beginnen die Kontaktdaten mit etwas Abstand:

   Telefon links                  Adresse rechts
                 E-Mail mittig

   Die E-Mail-Adresse liegt damit optisch auf derselben Mittelachse
   wie der Firmenname. Die HTML-Reihenfolge muss nicht geändert werden.
   ========================================================= */
.contact-line {
  position: relative;
  left: auto;
  right: auto;
  top: auto;

  /* Abstand unter "ALLER ART". Diesen Wert kannst du später
     z. B. zwischen 20px und 30px fein einstellen. */
  margin-top: 25px;

  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);

  /* Horizontaler Abstand zwischen Telefon und Anschrift. */
  column-gap: 8px;

  /* Abstand von oberer Zeile zur mittigen E-Mail darunter. */
  row-gap: 7px;

  padding: 0 6px;
  font-size: .72rem;
}

/* Telefonnummer oben links. */
.contact-line > a[href^="tel:"] {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: start;
  text-align: left;
  white-space: nowrap;
}

/* Anschrift oben rechts. */
.contact-line > span {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  text-align: left;
}

/* E-Mail-Adresse in der zweiten Zeile mittig unter beiden Bereichen.
   grid-column 1 / -1 richtet sie exakt zur Mitte des gesamten Headers aus. */
.contact-line > a[href^="mailto:"] {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: center;
  text-align: center;
  white-space: nowrap;
}

/* =========================================================
   3. MOBILE NAVIGATION / HAMBURGER-MENÜ
   =========================================================
   Auf Smartphones sind in der grünen Leiste nur sichtbar:

   links  = ☰ Menü
   rechts = Startseite

   Beim Antippen von „Menü“ öffnet sich das Dropdown über dem
   folgenden Bild bzw. Seiteninhalt. Der Inhalt wird dadurch
   NICHT nach unten verschoben.
   ========================================================= */

/* Die normale Desktop-Navigation auf Smartphones ausblenden. */
.nav-bar .desktop-nav {
  display: none;
}

/* Der Navigationsbalken dient als Bezugsebene für das Dropdown. */
.nav-bar {
  position: relative;
  z-index: 100;
}

/* Eigene mobile Leiste mit Menü links und Startseite rechts. */
/*
   Diese Regel ist absichtlich genauso oder stärker als die Desktop-Regel.
   So wird das Hamburger-Menü bis 760 px sicher eingeblendet.
*/
.nav-bar nav.mobile-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 24px), var(--page));
  min-height: 50px;
  margin-inline: auto;
  padding: 0;
  overflow: visible;
}

/* Das details-Element enthält den Menüknopf und das Dropdown. */
.mobile-menu {
  position: relative;
  margin: 0;
}

/* Sichtbarer Hamburger-Menüknopf. */
.mobile-menu summary {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 50px;
  padding: 0 8px;
  color: #fff;
  font-size: .95rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

/* Standard-Dreieck des details-Elements in WebKit-Browsern entfernen. */
.mobile-menu summary::-webkit-details-marker {
  display: none;
}

/* Standard-Markierung auch in modernen Browsern ausblenden. */
.mobile-menu summary::marker {
  content: "";
}

/* Hamburger-Symbol etwas größer darstellen. */
.mobile-menu .hamburger {
  font-size: 1.25rem;
  line-height: 1;
}

/*
   Ausklappmenü:
   position:absolute sorgt dafür, dass das Menü ÜBER dem folgenden
   Inhalt liegt und das Hero-Bild nicht nach unten verschiebt.
*/
.mobile-menu-links {
  position: absolute;
  top: 100%;
  left: 0;
  width: min(76vw, 300px);
  min-width: 230px;
  background: var(--green-dark);
  border: 1px solid rgba(255,255,255,.20);
  border-top: 0;
  box-shadow: 0 10px 24px rgba(0,0,0,.24);
  z-index: 2000;
}

/* Einzelne Einträge im Dropdown. */
.mobile-menu-links a {
  display: block;
  width: 100%;
  padding: 13px 16px;
  color: #fff;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  border-radius: 0;
  border-top: 1px solid rgba(255,255,255,.14);
}

/* Erster Menüpunkt benötigt oben keine zusätzliche Trennlinie. */
.mobile-menu-links a:first-child {
  border-top: 0;
}

/* Legacy-Hervorhebung entfernt: Status wird weiter unten im neuen Licht-Design geregelt. */

/* Startseite bleibt rechts immer sichtbar. */
.mobile-home {
  display: block;
  padding: 9px 10px;
  color: #fff;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 800;
  text-align: right;
  white-space: nowrap;
  border-radius: 4px;
}

/* Legacy-Startseiten-Hervorhebung entfernt: Status wird weiter unten im neuen Licht-Design geregelt. */

/* =========================================================
   4. HERO / STARTSEITE
   ========================================================= */

.hero,
.hero-content {
  height: 390px;
}

.hero-photo {
  background-position: 58% 48%;
}

.hero-card {
  left: 12px;
  top: auto;
  bottom: 18px;
  width: min(92%, 390px);
}

.hero-card h1 {
  font-size: 2rem;
}

.hero-card p {
  font-size: .86rem;
}

/* =========================================================
   5. LEISTUNGSBEREICHE
   ========================================================= */

.split-heading {
  grid-template-columns: 1fr;
  gap: 6px;
}

.section-heading h2 {
  font-size: 1.85rem;
}

.service-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* =========================================================
   6. MODERNISIERUNG / VORHER-NACHHER
   ========================================================= */

.modern-layout {
  grid-template-columns: 1fr;
}

.comparison {
  grid-template-columns: 1fr;
  gap: 7px;
}

.compare-arrow {
  transform: rotate(90deg);
  margin: -6px auto;
}

.comparison figure {
  height: 300px;
}

.modern-copy {
  background: #fff;
}

.modern-copy h3 {
  color: var(--green-dark);
}

.modern-copy p {
  color: #1c2940;
}

/* =========================================================
   7. PROJEKTE
   ========================================================= */

.project-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Auf Touch-Geräten ist Hover unzuverlässig – Text immer zeigen. */
.project-grid figcaption {
  opacity: 1;
}

/* =========================================================
   8. VERTRAUENSLEISTE / KONTAKT
   ========================================================= */

.trust-grid {
  grid-template-columns: 1fr;
  padding: 20px 0;
}

.trust .btn {
  width: 100%;
  justify-content: center;
}

/* =========================================================
   9. UNTERNEHMEN / IMPRESSUM / DATENSCHUTZ
   ========================================================= */

.legal {
  padding: 26px 0;
}

.legal article {
  padding: 22px 18px;
}

.legal h1 {
  font-size: 1.9rem;
  line-height: 1.16;
}

.legal h2 {
  font-size: 1.25rem;
  margin-top: 24px;
}

/* =========================================================
   10. KONTAKTSEITE
   ========================================================= */

.contact-page {
  padding: 24px 0 32px;
}

.contact-intro {
  margin-bottom: 20px;
}

.contact-intro h1 {
  font-size: 1.75rem;
}

.contact-layout {
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-form-box,
.contact-direct {
  padding: 19px;
}

/* Alle Felder bleiben auch mobil gleich breit und untereinander. */
.form-row {
  display: block;
}

.form-field input,
.form-field textarea,
.contact-submit {
  font-size: 16px;
}

.form-field input {
  min-height: 50px;
}

.form-field textarea {
  min-height: 240px;
}

.contact-submit {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.privacy-check {
  font-size: .86rem;
}



/* =========================================================
   KONTAKTFORMULAR: MOBILE VERSAND-RÜCKMELDUNG
   =========================================================
   Auf dem Smartphone werden die beiden Rückkehr-Schaltflächen
   untereinander über die volle Breite dargestellt.
   ========================================================= */

.contact-result {
  min-height: 360px;
  padding: 28px 0 34px;
}

.contact-result-box {
  padding: 24px 20px;
}

.contact-result-box h1 {
  font-size: 1.65rem;
}

.contact-result-actions {
  flex-direction: column;
  gap: 10px;
}

.contact-result-actions .btn {
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}

/* =========================================================
   11. FOOTER
   ========================================================= */

.footer-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

/* =========================================================
   12. KLEINE SMARTPHONES BIS 520 PX
   ========================================================= */

@media (max-width: 520px) {
  .service-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    height: 190px;
  }

  .comparison figure {
    height: 260px;
  }

  .projects-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .projects-head h2 {
    font-size: 1.6rem;
  }

  .identity-main {
    width: calc(100% - 76px);
  }

  .identity-name span {
    font-size: clamp(1.75rem, 9.5vw, 2.2rem);
  }

  .contact-line {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .contact-line > span {
    grid-column: 1;
  }
}


/* =========================================================
   VERSION 1.8d – UMLAUFENDER DOPPELBLITZ AUF TOUCH-GERÄTEN
   Start links mittig, Treffpunkt rechts mittig.
   ========================================================= */
.mobile-menu-links a, .mobile-home { position:relative; overflow:hidden; isolation:isolate; }
.mobile-menu-links a::before, .mobile-menu-links a::after,
.mobile-home::before, .mobile-home::after {
  content:""; position:absolute; z-index:4; left:0; width:100%; height:55%; opacity:0; pointer-events:none;
  background-repeat:no-repeat; background-size:100% 100%; clip-path:inset(0 100% 0 0);
  filter:drop-shadow(0 0 1px #fff) drop-shadow(0 0 3px #dffcff) drop-shadow(0 0 6px rgba(96,218,255,.95));
}
.mobile-menu-links a::before, .mobile-home::before {
  top:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 60' preserveAspectRatio='none'%3E%3Cpolyline points='0,58 8,47 14,51 20,38 27,43 34,25 42,31 49,15 58,20 68,8 79,13 90,5 101,10 112,4 124,9 136,5 148,12 159,7 170,17 180,12 189,26 197,21 204,39 211,34 216,49 220,58' fill='none' stroke='%23f8ffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.mobile-menu-links a::after, .mobile-home::after {
  bottom:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 60' preserveAspectRatio='none'%3E%3Cpolyline points='0,2 8,13 15,9 22,24 29,18 37,36 45,29 53,46 63,40 73,53 84,47 96,56 108,50 120,57 132,49 144,54 155,44 166,50 176,37 185,43 193,27 201,33 208,16 214,21 220,2' fill='none' stroke='%23f8ffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.mobile-menu-links a.electric-touch::before, .mobile-home.electric-touch::before { animation:elektro-bogen-mobile .64s ease-out 1; }
.mobile-menu-links a.electric-touch::after, .mobile-home.electric-touch::after { animation:elektro-bogen-mobile .64s ease-out 1; }
@keyframes elektro-bogen-mobile {
  0%{opacity:0;clip-path:inset(0 100% 0 0)} 6%{opacity:1;clip-path:inset(0 95% 0 0)}
  80%{opacity:1;clip-path:inset(0 0 0 0)} 92%{opacity:1;clip-path:inset(0 0 0 0)}
  100%{opacity:0;clip-path:inset(0 0 0 0)}
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu-links a::before,.mobile-menu-links a::after,.mobile-home::before,.mobile-home::after { animation:none !important; }
}


/* VERSION 1.8f – SVG-Strombogen auch beim Antippen */
.mobile-menu-links a, .mobile-home { overflow:visible; }
.mobile-menu-links a::before,.mobile-menu-links a::after,.mobile-home::before,.mobile-home::after { display:none !important; animation:none !important; }

/* VERSION 1.8g – Touch/Fokus: leicht beleuchteter 3D-Zustand vor Auswahl */
.mobile-nav a:not(.active):focus-visible,
.mobile-nav a:not(.active):active {
  background:linear-gradient(to bottom, #25b965 0%, #10954d 45%, #08773d 100%);
  border-color:rgba(225,255,235,.72);
  box-shadow:inset 0 2px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(0,65,30,.20),
             0 4px 0 rgba(2,83,39,.68), 0 7px 10px rgba(0,0,0,.18), 0 0 9px rgba(150,240,175,.26);
  transform:translateY(-2px);
}

/* VERSION 1.8h – Touch/Fokus: eingesenkter Button mit internem Lichtoval */
.mobile-nav a:not(.active):focus-visible,
.mobile-nav a:not(.active):active {
  background:
    radial-gradient(ellipse 48% 62% at 50% 50%,
      rgba(238,255,243,.34) 0%,
      rgba(190,244,205,.20) 28%,
      rgba(112,218,143,.10) 52%,
      rgba(35,164,85,.025) 72%,
      rgba(0,0,0,0) 88%),
    linear-gradient(to bottom, #18a657 0%, #0d9149 48%, #08783d 100%);
  border-color:rgba(218,248,226,.58);
  box-shadow:inset 0 3px 7px rgba(0,55,25,.22), inset 0 -1px 0 rgba(255,255,255,.20),
             inset 0 0 12px rgba(215,255,226,.10), 0 1px 1px rgba(0,0,0,.13);
  transform:translateY(2px);
}

/* Version 1.8k: derselbe SVG-Vergleichspfeil mobil, nur gedreht. */
@media (max-width:760px) {
  .compare-arrow { width:44px; height:44px; margin:-2px auto; transform:rotate(90deg); }
}

/* =========================================================
   VERSION 1.8n – MOBILE NAVIGATION IM NEUEN LICHT-DESIGN
   Gleiche visuelle Logik wie Desktop:
   - normal: ruhiger grüner Button
   - hover/focus/touch: organischer Lichtkegel nach innen
   - aktiv/offen: stärkerer Kantenkranz, der nach innen strahlt
   ========================================================= */
.mobile-menu summary,
.mobile-home,
.mobile-menu-links a {
  position:relative;
  isolation:isolate;
  overflow:hidden;
  color:#fff;
  background:linear-gradient(to bottom,#0b8844 0%,#08763b 100%);
  border:1px solid rgba(220,255,229,.16);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.13),
    inset 0 -1px 2px rgba(0,48,23,.22),
    0 2px 5px rgba(0,0,0,.12);
  transition:background .2s ease,border-color .2s ease,box-shadow .2s ease,transform .16s ease,color .2s ease;
}
.mobile-menu summary { border-radius:6px; padding-inline:11px; }
.mobile-home { border-radius:6px; }
.mobile-menu-links a { border-left:0;border-right:0;border-bottom:0;border-radius:0; }

/* Hover/Fokus: Licht aus der Mitte, an der Buttonkante sauber begrenzt. */
.mobile-menu summary:hover,
.mobile-menu summary:focus-visible,
.mobile-home:not(.active):hover,
.mobile-home:not(.active):focus-visible,
.mobile-menu-links a:not(.active):hover,
.mobile-menu-links a:not(.active):focus-visible,
.mobile-menu-links a:not(.active):active {
  color:#fff;
  transform:translateY(1px);
  border-color:rgba(224,255,232,.56);
  background:
    radial-gradient(ellipse 58% 72% at 50% 50%,rgba(250,255,251,.55) 0%,rgba(190,247,204,.28) 28%,rgba(92,208,122,.13) 54%,transparent 82%),
    linear-gradient(to bottom,#129a4f 0%,#0b8844 48%,#07733a 100%);
  box-shadow:
    inset 0 3px 7px rgba(0,58,27,.26),
    inset 0 0 14px rgba(203,255,216,.15),
    0 1px 3px rgba(0,0,0,.14);
}

/* Aktive Seite / geöffnetes Menü: heller Kantenkranz strahlt von außen nach innen. */
.mobile-home.active,
.mobile-menu-links a.active,
.mobile-menu[open] > summary {
  color:#fff;
  transform:none;
  border-color:rgba(229,255,236,.92);
  background:
    linear-gradient(to bottom,rgba(255,255,255,.17),transparent 24%,transparent 76%,rgba(210,255,222,.13)),
    radial-gradient(ellipse 68% 58% at 50% 50%,#087a3a 0%,#087438 58%,#05602e 100%);
  box-shadow:
    inset 0 0 5px 2px rgba(247,255,249,.66),
    inset 0 0 14px 5px rgba(145,241,169,.42),
    inset 0 0 27px 10px rgba(55,191,95,.18),
    0 0 4px rgba(190,250,205,.24);
  text-shadow:0 0 5px rgba(247,255,249,.45),0 1px 1px rgba(0,55,25,.42);
}

/* Dropdown bleibt kompakt und die Beleuchtung verändert keine Abmessungen. */
.mobile-menu-links { overflow:hidden; }
.mobile-menu-links a { box-sizing:border-box; }

@media (hover:none) {
  .mobile-menu summary:hover,
  .mobile-home:not(.active):hover,
  .mobile-menu-links a:not(.active):hover { transform:none; }
}

@media (prefers-reduced-motion:reduce) {
  .mobile-menu summary,.mobile-home,.mobile-menu-links a { transition:none !important; }
}


/* VERSION 1.8o – mobile aktive Links garantiert grün, kein weißer Altzustand. */
@media (max-width:760px) {
  .nav-bar nav.mobile-nav .mobile-home.active,
  .nav-bar nav.mobile-nav .mobile-menu-links a.active,
  .nav-bar nav.mobile-nav .mobile-menu[open] > summary {
    color:#fff !important;
    background:
      radial-gradient(ellipse 66% 62% at 50% 50%, rgba(224,255,232,.22) 0%, rgba(117,225,145,.13) 38%, transparent 70%),
      linear-gradient(to bottom,#10924a 0%,#087a3d 52%,#056832 100%) !important;
    border-color:rgba(236,255,241,.88) !important;
    box-shadow:
      inset 0 0 4px 1px rgba(255,255,255,.62),
      inset 0 0 11px 3px rgba(173,248,192,.34),
      inset 0 0 22px 7px rgba(68,198,103,.14),
      0 0 5px rgba(187,247,202,.20) !important;
    text-shadow:0 0 5px rgba(244,255,247,.38),0 1px 1px rgba(0,48,23,.42) !important;
  }
}

/* VERSION 1.8p – Startseite und Menü mobil exakt gleich groß. */
@media (max-width:760px) {
  .nav-bar nav.mobile-nav .mobile-menu > summary,
  .nav-bar nav.mobile-nav .mobile-home {
    box-sizing:border-box;
    width:112px;
    min-width:112px;
    height:42px;
    min-height:42px;
    padding:0 11px;
    display:flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    border-radius:6px;
    line-height:1;
  }

  .nav-bar nav.mobile-nav .mobile-menu > summary {
    gap:7px;
  }
}

/* Elektro-AS Version 1.9a */
