/* =========================================================
   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;
  min-height: 220px;
  overflow: visible;
}

.identity {
  height: auto;
  min-height: 220px;
  padding-bottom: 14px;
}

.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: 12px;

  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;
}

/* Aktive Seite und Fokus/Hover im Dropdown hervorheben. */
.mobile-menu-links a:hover,
.mobile-menu-links a:focus,
.mobile-menu-links a.active {
  background: #fff;
  color: var(--green-dark);
}

/* 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;
}

/* Auf der Startseite wird der sichtbare Startseiten-Link markiert. */
.mobile-home:hover,
.mobile-home:focus,
.mobile-home.active {
  background: #fff;
  color: var(--green-dark);
}

/* =========================================================
   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;
  }
}
