/* =============================================================================
   GEBHARDT Automation – Stylesheet
   -----------------------------------------------------------------------------
   Aufbau:
     1. Design-Variablen (Farben, Schrift, Abstände)  <- hier zuerst anpassen
     2. Grundlagen / Reset
     3. Layout-Hilfen (container, grid, sections)
     4. Kopf / Navigation
     5. Fuß
     6. Bausteine (hero, cards, buttons, tables ...)
     7. Responsive (Handy / Tablet)
   ============================================================================= */

/* 1. DESIGN-VARIABLEN ------------------------------------------------------- */
:root {
    /* -------------------------------------------------------------------------
       DUNKLES FARBSCHEMA ("Dark Mode")
       Aufgebaut auf dem offiziellen BlueLine-Blau #002461 (RGB 0/36/97).
       Die Hintergründe sind tiefe, leicht blaustichige Anthrazit-Töne –
       ruhiger und augenschonender als reines Weiß.
       Alle Farben zentral hier ändern; die ganze Seite zieht mit.
    ------------------------------------------------------------------------- */
    /* Markenfarben */
    --c-blue:        #3f82c6;   /* interaktives Blau auf Dunkel (Links, aktiv, Icons) */
    --c-blue-dark:   #002461;   /* offizielles BlueLine-Blau (tiefe Flächen: Hero, CTA, Footer) */
    --c-blue-light:  #6aa9e8;   /* helles Blau (Akzente, Links, Eyebrow) */
    --c-accent:      #ff9e1b;   /* Signalfarbe (Energie / Buttons) */
    --c-ink:         #e7eef7;   /* Textfarbe (hell auf dunkel) */
    --c-heading:     #f3f8fd;   /* Überschriften (etwas heller als Fließtext) */
    --c-muted:       #9bb0c8;   /* abgeschwächter Text */
    --c-line:        #26364e;   /* Trennlinien / Ränder */
    --c-bg:          #0a1420;   /* Seitenhintergrund (dunkel) */
    --c-bg-alt:      #101d2e;   /* abwechselnder Abschnitt / dezente Flächen */
    --c-surface:     #16263c;   /* Karten, Tabellen, Menüs (leicht erhöht) */
    --c-white:       #ffffff;

    /* Schrift */
    --font-sans: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

    /* Layout */
    --maxw:    1180px;
    --gap:     2rem;
    --radius:  6px;
    --shadow:  0 6px 22px rgba(0, 0, 0, .45);

    --header-h: 76px;
}

/* 2. GRUNDLAGEN ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--c-ink);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; color: var(--c-heading); font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .6em; }
h3 { font-size: 1.25rem; margin: 0 0 .4em; }

p { margin: 0 0 1em; }

a { color: var(--c-blue-light); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .35em; }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 100;
    background: var(--c-accent); color: #000; padding: .7rem 1.2rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* 3. LAYOUT-HILFEN ---------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }

/* Schmalere Inhaltsspalte für textlastige Seiten: Fließtext, Tabellen, Bilder
   und Karten stehen dadurch alle bündig auf derselben Breite – sonst wirken die
   auf 760px begrenzten Textblöcke neben einer Tabelle in voller Breite zu
   schmal. Verwendung: <div class="container container--narrow"> */
.container--narrow { max-width: 920px; }
.container--narrow .prose,
.container--narrow .section__head { max-width: 100%; }

.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--alt { background: var(--c-bg-alt); }
.section--blue { background: var(--c-blue-dark); color: #e8f0f8; }
.section--blue h1, .section--blue h2, .section--blue h3 { color: #fff; }

.section__head { max-width: 760px; margin-bottom: 2.5rem; }
.section__head--center { margin-inline: auto; text-align: center; }

.lead { font-size: 1.2rem; color: var(--c-muted); }
.section--blue .lead { color: #b8d2ea; }

.eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: .12em;
    font-size: .8rem; font-weight: 700; color: var(--c-blue-light); margin-bottom: .6rem;
}

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* 4. KOPF / NAVIGATION ------------------------------------------------------ */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(10, 20, 32, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--c-line);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    min-height: var(--header-h); gap: 1.5rem;
}
.logo img { display: block; height: 40px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 1.5rem; }
.primary-nav__list { display: flex; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.primary-nav__item { position: relative; }

.primary-nav__link {
    display: block; padding: .6rem .85rem; color: var(--c-ink); font-weight: 600;
    border-radius: var(--radius); white-space: nowrap;
}
.primary-nav__link:hover,
.primary-nav__link.is-active { color: var(--c-blue); background: var(--c-bg-alt); text-decoration: none; }
.primary-nav__link.is-active { box-shadow: inset 0 -3px 0 var(--c-accent); }

/* Dropdown */
.submenu {
    position: absolute; top: 100%; left: 0; min-width: 220px;
    margin: 0; padding: .4rem; list-style: none;
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
    box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .15s, transform .15s;
}
.has-children:hover .submenu,
.has-children:focus-within .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu__link { display: block; padding: .55rem .75rem; border-radius: 4px; color: var(--c-ink); }
.submenu__link:hover, .submenu__link.is-active { background: var(--c-bg-alt); color: var(--c-blue); text-decoration: none; }

.lang-switch {
    border: 1.5px solid var(--c-line); border-radius: var(--radius);
    padding: .4rem .7rem; font-weight: 700; color: var(--c-blue); font-size: .9rem;
}
.lang-switch:hover { background: var(--c-blue); color: #fff; text-decoration: none; border-color: var(--c-blue); }

.nav-toggle {
    display: none; align-items: center; gap: .5rem;
    background: var(--c-blue); color: #fff; border: 0; border-radius: var(--radius);
    padding: .55rem .9rem; font: inherit; font-weight: 600; cursor: pointer;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    display: block; width: 20px; height: 2px; background: #fff; position: relative;
}
.nav-toggle__bar::before, .nav-toggle__bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bar::before { top: -6px; }
.nav-toggle__bar::after { top: 6px; }

/* 5. FUSS ------------------------------------------------------------------- */
.site-footer { background: var(--c-blue-dark); color: #cfe0f0; margin-top: 0; }
.site-footer__grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--gap);
    padding: 3.5rem 1.25rem 2.5rem;
}
.site-footer__title { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .9rem; }
.site-footer a { color: #cfe0f0; }
.site-footer a:hover { color: #fff; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer__contact, .site-footer__legal { list-style: none; margin: 0; padding: 0; line-height: 1.9; }
.site-footer__claim { color: #9fc0de; }
.site-footer__logo { margin-bottom: 1rem; height: 32px; width: auto; }
.site-footer__bar { background: #052a4d; }
.site-footer__bar-inner {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
    gap: .5rem; padding-block: 1rem; font-size: .9rem; color: #9fc0de;
}
.site-footer__slogan { font-style: italic; color: var(--c-accent); }

/* 6. BAUSTEINE -------------------------------------------------------------- */

/* Hero */
.hero {
    position: relative; color: #fff;
    /* Blauer Verlauf ÜBER dem Anlagenfoto – links kräftig (Text lesbar),
       rechts transparenter, damit die Industrieanlage durchscheint.
       Foto austauschbar: assets/img/header-startseite.jpg ersetzen. */
    background:
        linear-gradient(100deg,
            rgba(6, 14, 26, .96) 0%,
            rgba(0, 36, 97, .88) 45%,
            rgba(0, 36, 97, .50) 100%),
        url("../img/header-startseite.jpg") no-repeat center right / cover;
    overflow: hidden;
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,158,27,.18), transparent 45%);
}
.hero__inner { position: relative; z-index: 1; padding: clamp(4rem, 9vw, 7rem) 0; max-width: 760px; }
.hero h1 { color: #fff; }
.hero__slogan { font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; color: var(--c-accent); font-weight: 700; }
.hero__lead { font-size: 1.3rem; color: #dcebf8; margin-bottom: 2rem; }

/* Rotierender Banner (z.B. Engineering) – blättert mehrere Bilder durch */
.banner {
    position: relative; width: 100%;
    aspect-ratio: 928 / 225;
    border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); background: var(--c-bg-alt);
}
.banner__slide {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; opacity: 0; transition: opacity .8s ease;
}
.banner__slide.is-active { opacity: 1; }
.banner__dots {
    position: absolute; left: 0; right: 0; bottom: .7rem; z-index: 2;
    display: flex; justify-content: center; gap: .5rem;
}
.banner__dot {
    width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .55); box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}
.banner__dot.is-active { background: #fff; }
@media (prefers-reduced-motion: reduce) {
    .banner__slide { transition: none; }
}

/* Buttons */
.btn {
    display: inline-block; padding: .8rem 1.5rem; border-radius: var(--radius);
    font: inherit; font-weight: 700; line-height: 1.2; text-align: center;
    background: transparent; color: inherit; cursor: pointer;
    border: 2px solid transparent; transition: background .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--c-accent); color: #1c2733; }
.btn--primary:hover { background: #ffb24d; }
.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--c-blue-dark); }
.btn--outline { border-color: var(--c-blue); color: var(--c-blue); }
.btn--outline:hover { background: var(--c-blue); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Startseiten-Animation (Modal mit skalierter Bühne 928×390) */
.hero-ani { position: fixed; inset: 0; z-index: 200; background: rgba(5, 20, 40, .92); display: grid; place-items: center; padding: 1.5rem; }
.hero-ani[hidden] { display: none; }
.hero-ani__close {
    position: absolute; top: 1rem; right: 1.2rem; width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: #fff; color: var(--c-blue-dark); font-size: 1.7rem; line-height: 1; cursor: pointer; box-shadow: var(--shadow);
}
.hero-ani__close:hover { background: var(--c-accent); }
.hero-ani__viewport { position: relative; width: min(92vw, 1100px); aspect-ratio: 928 / 390; max-height: 82vh; }
.hero-ani__stage {
    position: absolute; top: 50%; left: 50%; width: 928px; height: 390px;
    transform: translate(-50%, -50%) scale(1); transform-origin: center center;
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}
.hero-ani__slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s ease; }
.hero-ani__slide.is-active { opacity: 1; visibility: visible; }
.hero-ani__layer { position: absolute; opacity: 0; transition: opacity .6s ease; }
.hero-ani__layer.is-in { opacity: 1; }
img.hero-ani__layer { left: 0; top: 0; width: 928px; height: 390px; }
.hero-ani__text { max-width: 430px; }
.hero-ani__text .ani-h1, .hero-ani__text .ani-h2 {
    margin: 0; color: var(--c-blue-dark); font-weight: 700; line-height: 1.15;
    text-shadow: 0 1px 3px rgba(255, 255, 255, .7);
}
.hero-ani__text .ani-h1 { font-size: 30px; }
.hero-ani__text .ani-h2 { font-size: 22px; }
.hero-ani__text.safety .ani-h1 { color: var(--c-accent); font-size: 36px; }

/* Karten */
.card {
    background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 1.8rem; box-shadow: var(--shadow); height: 100%;
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.55); border-color: var(--c-blue); }
.card__icon {
    width: 48px; height: 48px; border-radius: 10px; margin-bottom: 1rem;
    background: var(--c-bg-alt); color: var(--c-blue); display: grid; place-items: center;
    font-size: 1.5rem; font-weight: 800;
}
.card__icon .g-mark { width: 28px; height: 28px; display: block; }
.card__icon .icon { display: block; }
.btn .icon { vertical-align: -3px; margin-right: .4rem; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.card--link { display: flex; flex-direction: column; }
.card--link .card__more { margin-top: auto; padding-top: .8rem; font-weight: 700; color: var(--c-blue-light); }

/* Kennzahlen */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); text-align: center; }
.stat__num { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; color: var(--c-accent); line-height: 1; }
.stat__label { color: #c3d8ec; margin-top: .4rem; }

/* Feature-Liste mit Häkchen */
.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 1.8rem; margin-bottom: .7rem; }
.checklist li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: var(--c-blue); font-weight: 800;
}

/* Aufzählung von Tags/Badges (z.B. Produktvarianten) */
.tags { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.tags li {
    background: var(--c-bg-alt); border: 1px solid var(--c-line); border-radius: 999px;
    padding: .35rem .9rem; font-size: .92rem; font-weight: 600; color: var(--c-ink); margin: 0;
}

/* Tabelle */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: var(--c-surface); }
table.data th, table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--c-line); text-align: left; }
table.data th { background: var(--c-bg-alt); color: var(--c-heading); }

/* Kontakt-Personen */
.person { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.person__name { font-weight: 700; color: var(--c-heading); font-size: 1.1rem; }
.person__role { color: var(--c-muted); margin-bottom: .6rem; }
.person ul { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.person--media { display: flex; gap: 1.2rem; align-items: center; }
.person__photo { flex: 0 0 auto; width: 92px; height: 92px; border-radius: 50%; object-fit: cover; background: var(--c-bg-alt); }

/* Breadcrumb */
.breadcrumb { padding: 1rem 0; font-size: .9rem; color: var(--c-muted); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb span { margin: 0 .4rem; }

/* Seiteneinleitung (Unterseiten ohne großen Hero) */
.page-head { background: var(--c-bg-alt); border-bottom: 1px solid var(--c-line); padding: clamp(2.5rem,5vw,4rem) 0; }

/* Inhaltsfließtext */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }

/* CTA-Streifen */
.cta { background: var(--c-blue-dark); color: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(2rem,4vw,3rem); text-align: center; }
.cta h2 { color: #fff; }
.cta p { color: #dcebf8; max-width: 620px; margin-inline: auto; }

/* Formularfelder */
label { font-weight: 600; color: var(--c-ink); }
input, textarea, select {
    font: inherit; color: var(--c-ink);
    background: var(--c-bg-alt);
    border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: .7rem .8rem;
}
input::placeholder, textarea::placeholder { color: var(--c-muted); }
input:focus, textarea:focus, select:focus {
    outline: none; border-color: var(--c-blue);
    box-shadow: 0 0 0 3px rgba(63, 130, 198, .25);
}

/* Meldungs-Boxen (Erfolg / Fehler) */
.alert { border: 1px solid var(--c-line); border-left-width: 4px; border-radius: var(--radius);
    background: var(--c-surface); padding: 1rem 1.2rem; }
.alert--ok    { border-left-color: #43c06a; color: #b9f0cb; }
.alert--error { border-left-color: #e5605d; color: #f6c6c4; }
.alert a { color: inherit; text-decoration: underline; }

/* 7. RESPONSIVE ------------------------------------------------------------- */
@media (max-width: 960px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }

    /* Wichtig: backdrop-filter macht die Kopfleiste sonst zum Bezugsrahmen für
       das fixierte Menü-Panel (iOS Safari) – dadurch klappt das Menü nicht auf.
       Auf dem Handy daher abschalten; auf dem Desktop bleibt der Blur erhalten. */
    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; }

    .primary-nav {
        position: fixed; top: var(--header-h); right: 0; bottom: 0; left: auto;
        width: min(86%, 360px);
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--c-surface); border-left: 1px solid var(--c-line);
        padding: 1rem; overflow-y: auto;
        transform: translateX(100%); transition: transform .25s ease;
        box-shadow: var(--shadow);
    }
    .primary-nav.is-open { transform: translateX(0); }
    .primary-nav__list { flex-direction: column; gap: 0; }
    .primary-nav__link { padding: .85rem .6rem; border-bottom: 1px solid var(--c-line); border-radius: 0; }
    .submenu {
        position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: 0; border-radius: 0; padding-left: 1rem;
        max-height: 0; overflow: hidden; transition: max-height .2s ease;
    }
    .has-children.is-expanded .submenu { max-height: 500px; }
    .lang-switch { margin-top: 1rem; text-align: center; }
}

@media (max-width: 620px) {
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .site-footer__grid { grid-template-columns: 1fr; }
}

/* Bewegung reduzieren, wenn der Nutzer das wünscht */
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
