/* =========================================================
   GM UNTERNEHMENSBERATUNG
   STARTSEITE – home.css
   ========================================================= */


/* =========================================================
   1. GRUNDEINSTELLUNGEN / VARIABLEN
   ========================================================= */

:root {
  --navy: #0b3454;
  --navy2: #123a5a;
  --red: #c93232;
  --cream: #f3eee6;
  --text: #0b3454;
  --muted: #51687b;
  --line: #d8e0e6;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 30px;
}


/* =========================================================
   2. HEADER – GRUNDSTRUKTUR
   ========================================================= */

header .wrap.nav {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 5%;
}

header {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid #edf0f2;
  display: flex;
  align-items: center;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}


/* ---------------------------------------------------------
   Marke / Firmenname
   --------------------------------------------------------- */

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gm {
  font-size: 39px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1;
}

.brandtext strong {
  display: block;
  font-size: 15px;
  line-height: 1.15;
}

.brandtext span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 5px;
  color: #526d82;
}


/* =========================================================
   3. HAUPTNAVIGATION
   ========================================================= */

.menu {
  display: flex;
  align-items: stretch;
  gap: 34px;
  font-size: 14px;
}

.menu > a {
  padding: 30px 0 27px;
}


/* ---------------------------------------------------------
   Beratung – Dropdown
   --------------------------------------------------------- */

.menu-dropdown {
  position: relative;
}

.menu-dropdown summary {
  list-style: none;
  cursor: pointer;
  padding: 30px 0 27px;
  white-space: nowrap;
}

.menu-dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown-arrow {
  font-size: 11px;
  margin-left: 4px;
}

.submenu {
  display: none;
  position: absolute;
  z-index: 20;
  top: 68px;
  left: -18px;
  min-width: 245px;
  background: #fff;
  border: 1px solid #e5eaee;
  box-shadow: 0 10px 28px rgba(11, 52, 84, .14);
  padding: 8px 0;
}

.submenu a {
  display: block;
  padding: 11px 18px;
  white-space: nowrap;
}

.submenu a:hover,
.submenu a:focus {
  background: #f3eee6;
  color: var(--red);
}

.menu-dropdown[open] .submenu {
  display: block;
}

@media (min-width: 821px) {
  .menu-dropdown:hover .submenu,
  .menu-dropdown:focus-within .submenu {
    display: block;
  }
}


/* =========================================================
   4. HERO / EINSTIEG
   ========================================================= */

.hero {
  min-height: 530px;
  display: grid;
  grid-template-columns: 52% 48%;
  overflow: hidden;
}

.hero-copy {
  padding:
    70px
    max(30px, calc((100vw - 1180px) / 2 + 30px))
    60px
    max(30px, calc((100vw - 1180px) / 2 + 30px));

  padding-right: 55px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.redline {
  width: 45px;
  height: 2px;
  background: var(--red);
  margin: 0 0 26px;
}

h1 {
  font-size: 48px;
  line-height: 1.12;
  font-weight: 400;
  margin: 0 0 26px;
  letter-spacing: -.02em;
}

h1 strong {
  font-weight: 700;
}

.hero-copy p {
  font-size: 17px;
  max-width: 610px;
  margin: 0 0 30px;
}


/* ---------------------------------------------------------
   Hero-Bild und Wortmarke
   --------------------------------------------------------- */

.hero-img {
  background: url("startseite-hero-clean.webp") center / cover no-repeat;
  min-height: 530px;
  position: relative;
}

.hero-words {
  position: absolute;
  top: 34%;
  left: 71%;
  padding: 8px 0 8px 22px;
  background: transparent;
  border-left: 3px solid var(--red);
  color: #173f60;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  line-height: 1.9;
  box-shadow: none;
}

.hero-words span {
  display: block;
}


/* ---------------------------------------------------------
   Allgemeiner Button
   --------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 15px 24px;
  font-weight: 600;
}


/* =========================================================
   5. MEIN ANSATZ
   ========================================================= */

.approach {
  background: var(--cream);
  padding: 40px 0;
}

h2 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 400;
  margin: 0 0 14px;
}

.approach p {
  font-size: 16px;
  margin: 0;
  max-width: 880px;
}


/* =========================================================
   6. BERATUNGSFELDER
   ========================================================= */

.services {
  padding: 50px 0 58px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.card h3 {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 500;
  margin: 16px 0 10px;
}

.card .smallline {
  width: 42px;
  height: 2px;
  background: var(--red);
  margin: 0 0 13px;
}

.card p {
  font-size: 15px;
  color: #294c67;
  min-height: 72px;
  margin: 0 0 16px;
}

.more {
  color: var(--red);
  font-weight: 600;
}


/* =========================================================
   7. AKTUELLER IMPULS
   ========================================================= */

.impulse {
  background: linear-gradient(110deg, #0a2f4c, #123d5f);
  color: #fff;
  padding: 38px 0;
}

.impulse-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 45px;
  align-items: center;
}

.impulse h2 {
  font-size: 30px;
  color: #fff;
  margin-bottom: 12px;
}

.impulse p {
  margin: 0;
  max-width: 790px;
}


/* =========================================================
   8. ÜBER GERALD MORGNER
   ========================================================= */

.about {
  padding: 55px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 34% 66%;
  gap: 45px;
  align-items: center;
}

.about-portrait {
  overflow: hidden;
}

.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
}

.about p {
  margin: 0 0 12px;
}

.about .more {
  display: inline-block;
  margin-top: 6px;
}


/* =========================================================
   9. CALL TO ACTION / KONTAKT
   ========================================================= */

.cta {
  background: var(--cream);
  padding: 40px 0;
}

.cta-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.cta h2 {
  margin: 0;
}

.cta p {
  margin: 8px 0 0;
}


/* =========================================================
   10. FOOTER – ursprüngliche Seitendefinition
   ========================================================= */

footer {
  background: linear-gradient(100deg, #0a2f4d, #123b5b);
  color: #fff;
  padding: 42px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.2fr 1.25fr 1fr;
  align-items: center;
}

.footer-col {
  padding: 0 28px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-col:first-child {
  padding-left: 0;
}

.footer-col + .footer-col {
  border-left: 2px solid var(--red);
}

.footer-title {
  font-weight: 700;
}

.footer-small {
  font-size: 13px;
  opacity: .96;
}

.footer-links {
  gap: 5px;
}


/* =========================================================
   11. RESPONSIVE BASIS – TABLET / SMARTPHONE
   ursprüngliche Regeln
   ========================================================= */

@media (max-width: 820px) {

  header {
    height: auto;
  }

  .nav {
    padding-top: 18px;
    padding-bottom: 18px;
    align-items: flex-start;
  }

  .menu {
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
  }

  .menu > a,
  .menu-dropdown summary {
    padding: 5px 0;
  }

  .menu-dropdown {
    position: relative;
  }

  .submenu {
    top: 30px;
    left: auto;
    right: 0;
    min-width: 235px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 55px 28px;
  }

  .hero-img {
    min-height: 330px;
  }

  .hero-words {
    top: 24%;
    left: 48%;
    font-size: 13px;
  }

  h1 {
    font-size: 40px;
  }

  .cards,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .card img {
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
  }

  .card p {
    min-height: 0;
  }

  .cta-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }

  .footer-col {
    padding: 0 20px;
  }

  .footer-col:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
}


@media (max-width: 520px) {

  .wrap {
    padding: 0 20px;
  }

  .brandtext {
    display: none;
  }

  .menu {
    font-size: 12px;
  }

  .hero-copy {
    padding: 45px 20px;
  }

  .hero-words {
    left: 40%;
    font-size: 11px;
    letter-spacing: .18em;
  }

  h1 {
    font-size: 34px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-col {
    border-left: 0 !important;
    padding: 0 !important;
  }
}


/* =========================================================
   12. EINHEITLICHE HAUPTNAVIGATION
   Beratung als Navigationseinstieg
   ========================================================= */

.menu-dropdown {
  position: relative;
  display: block;
}

.menu-dropdown summary {
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}

.menu-dropdown summary::-webkit-details-marker {
  display: none;
}

.dropdown-arrow {
  font-size: .78em;
  margin-left: 4px;
}

.submenu {
  display: none;
  position: absolute;
  z-index: 100;
  top: calc(100% - 1px);
  left: -18px;
  min-width: 245px;
  background: #fff;
  border: 1px solid #e5eaee;
  box-shadow: 0 10px 28px rgba(11, 52, 84, .14);
  padding: 8px 0;
}

.submenu a {
  display: block !important;
  padding: 11px 18px !important;
  white-space: nowrap;
  border: 0 !important;
  color: #0b3454 !important;
  text-decoration: none !important;
}

.submenu a:hover,
.submenu a:focus,
.submenu a.current-subpage {
  background: #f3eee6;
  color: #cf2e2e !important;
}

.menu-dropdown[open] .submenu {
  display: block;
}

.menu-dropdown.active > summary {
  border-bottom: 2px solid #d32f2f;
}

@media (min-width: 821px) {

  .menu-dropdown:hover .submenu,
  .menu-dropdown:focus-within .submenu {
    display: block;
  }
}

@media (max-width: 820px) {

  .menu-dropdown {
    position: relative;
  }

  .submenu {
    top: 100%;
    left: auto;
    right: 0;
    min-width: 235px;
  }
}


/* =========================================================
   13. HEADER-AUSRICHTUNG
   Kompatibilität mit bestehenden Seitentemplates
   ========================================================= */

.site-header nav > .menu-dropdown {
  align-self: stretch;
}

.site-header nav > .menu-dropdown > summary {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 14px;
  position: relative;
  padding: 0;
}

.site-header nav > .menu-dropdown.active > summary:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--red, #d32f2f);
}

.menu > .menu-dropdown {
  align-self: stretch;
}

.menu > .menu-dropdown > summary {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
}

.main-nav > .menu-dropdown {
  align-self: stretch;
}

.main-nav > .menu-dropdown > summary {
  display: flex;
  align-items: center;
  height: 100%;
  font-size: 15px;
  position: relative;
}

.main-nav > .menu-dropdown.active > summary {
  border-bottom: 3px solid var(--red, #d32f2f);
}


/* =========================================================
   14. SMARTPHONE – HERO-WORTMARKE AUSBLENDEN
   bestehende Sicherheitsregel
   ========================================================= */

@media (max-width: 520px) {

  .hero-img .hero-words {
    display: none !important;
  }
}


/* =========================================================
   15. MOBILE FIX – BERATUNG-UNTERMENÜ
   Untermenü vollständig im Viewport halten
   ========================================================= */

@media (max-width: 820px) {

  .main-nav .menu-dropdown,
  .site-header .menu-dropdown,
  .menu-dropdown {
    position: static !important;
  }

  .main-nav .menu-dropdown .submenu,
  .site-header .menu-dropdown .submenu,
  .menu-dropdown .submenu {
    position: fixed !important;
    top: 72px !important;
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    transform: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    z-index: 10000 !important;
  }
}


/* =========================================================
   16. MOBILE FIX – HERO-WORTMARKE
   dekorative Wortmarke auf Smartphone ausblenden
   ========================================================= */

@media (max-width: 820px) {

  .hero-words,
  .hero-img .hero-words {
    display: none !important;
    visibility: hidden !important;
  }
}


/* =========================================================
   17. MOBILE FIX – DROPDOWN-TYPOGRAFIE
   Unterpunkte auf allen Seiten identisch
   ========================================================= */

@media (max-width: 820px) {

  .menu-dropdown .submenu a,
  .main-nav .menu-dropdown .submenu a,
  .site-header .menu-dropdown .submenu a,
  .menu .menu-dropdown .submenu a {
    display: block !important;
    padding: 11px 18px !important;
    margin: 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    white-space: normal !important;
    text-transform: none !important;
    border: 0 !important;
    text-decoration: none !important;
  }
}


/* =========================================================
   18. MOBILE FIX – STARTSEITENBILD
   bereinigtes Hero-Bild erzwingen
   ========================================================= */

@media (max-width: 820px) {

  .hero-img {
    background-image: url("startseite-hero-clean.webp") !important;
    background-position: center center !important;
    background-size: cover !important;
  }

  .hero-img .hero-words,
  .hero-words {
    display: none !important;
    visibility: hidden !important;
  }
}


/* =========================================================
   19. MOBILE FIX – STARTSEITEN-HEROQUELLE
   finale cache-sichere Definition
   ========================================================= */

@media screen and (max-width: 820px) {

  section.hero .hero-img,
  .hero .hero-img,
  div.hero-img {
    background:
      url("startseite-hero-clean.webp")
      center center / cover no-repeat !important;
  }

  section.hero .hero-img .hero-words,
  .hero .hero-img .hero-words,
  .hero-words {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}


/* =========================================================
   20. MOBILE FIX – BERATUNGS-UNTERPUNKTE
   alle Unterpunkte exakt gleich darstellen
   ========================================================= */

@media screen and (max-width: 820px) {

  .submenu {
    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }

  .submenu > a,
  .menu-dropdown .submenu > a,
  .main-nav .menu-dropdown .submenu > a,
  .site-header .menu-dropdown .submenu > a,
  .menu .menu-dropdown .submenu > a,
  .submenu > a:first-child,
  .submenu > a.current-subpage {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 11px 18px !important;
    margin: 0 !important;
    text-indent: 0 !important;
    transform: none !important;

    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 14px !important;
    font-style: normal !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;

    -webkit-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    white-space: normal !important;
    border: 0 !important;
    text-decoration: none !important;
  }
}


/* =========================================================
   21. HEADER – VOLLE SEITENBREITE
   finale Desktop-Ausrichtung
   ========================================================= */

header .wrap.nav {
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: max(5vw, 44px);
  padding-right: max(5vw, 44px);
}


/* =========================================================
   22. FINAL MOBILE HEADER
   Firmenname und Navigation auf Smartphone
   ========================================================= */

@media screen and (max-width: 820px) {

  header .wrap.nav {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }


  /* -------------------------------------------------------
     Marke / Firmenname
     ------------------------------------------------------- */

  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .brandtext {
    display: block !important;
    text-align: left;
  }

  .brandtext strong {
    display: block;
    font-size: 13px;
    line-height: 1.15;
  }

  .brandtext span {
    display: block;
    font-size: 11px;
    line-height: 1.2;
  }


  /* -------------------------------------------------------
     Hauptnavigation
     ------------------------------------------------------- */

  .menu {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 6px 16px;
    font-size: 12px;
  }

  .menu > a,
  .menu > .menu-dropdown {
    margin: 0;
  }

  .menu > a,
  .menu-dropdown > summary {
    padding: 3px 0;
  }
}