/*
 * GP Montagebau – Nachbau von www.gp-montagebau.de
 * Farben und Abstände zentral über die Variablen unten anpassbar.
 */
:root {
    --bg: #ffffff;
    --text: #444444;
    --head: #2b2b2b;
    --accent: #c1121f;      /* Akzentfarbe Rot (Links, aktiver Menüpunkt, Buttons) */
    --accent-dark: #8f0d17;
    --line: #dddddd;
    --nav-bg: #404040;
    --nav-text: #ffffff;
    --soft: #f4f4f4;
    --wrap: 1100px;
    --font: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.7 var(--font);
    overflow-wrap: break-word;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { color: var(--head); line-height: 1.3; margin: 0 0 14px; font-weight: 600; }
h1 { font-size: 30px; margin-top: 30px; }
h2 { font-size: 24px; margin-top: 28px; }
h3 { font-size: 19px; margin-top: 24px; }
h4 { font-size: 17px; }
p { margin: 0 0 14px; }
ul { margin: 0 0 14px; padding-left: 22px; }

/* ---------- Kopf ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.logo { display: block; flex: 0 0 auto; }
.logo img { display: block; max-height: 90px; width: auto; }
.header-contact { margin: 0; padding-top: 8px; align-self: flex-start; display: flex; flex-wrap: wrap; gap: 8px 40px; font-size: 14px; }
.hc-item { display: flex; align-items: center; gap: 10px; }
.hc-icon { flex: 0 0 auto; color: var(--accent); }
.header-contact strong { color: var(--accent); }
.header-contact a { color: inherit; }
.header-contact a[href^="mailto"] { color: var(--accent); }
.header-contact a:hover { color: var(--accent-dark); }

/* ---------- Navigation ---------- */
.site-nav { background: var(--nav-bg); }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav .wrap > ul { display: flex; flex-wrap: wrap; }
.site-nav li { position: relative; }
.site-nav a {
    display: block; padding: 13px 20px;
    color: var(--nav-text); font-weight: 600; text-decoration: none;
}
.site-nav a:hover,
.site-nav li.current > a,
.site-nav a[aria-current="page"] { background: var(--accent); color: #fff; text-decoration: none; }
.sub-toggle, .nav-toggle { display: none; }

/* Untermenü (Desktop: beim Überfahren / Fokus) */
.site-nav .sub {
    display: none; position: absolute; left: 0; top: 100%; z-index: 50;
    min-width: 260px; background: var(--nav-bg); box-shadow: 0 6px 14px rgba(0, 0, 0, .25);
}
.site-nav .sub a { font-weight: 400; border-top: 1px solid rgba(255, 255, 255, .12); }
.site-nav li.has-sub:hover > .sub,
.site-nav li.has-sub:focus-within > .sub { display: block; }

/* ---------- Inhalt ---------- */
.main { min-height: 50vh; padding-bottom: 40px; }
.content { padding-bottom: 10px; }
.lead { font-size: 17px; }

/* Roter Strich unter den Überschriften (wie im Original) */
.main h1, .main h2, .main h3, .download h4 { margin-bottom: 18px; }
.main h1::after, .main h2::after, .main h3::after, .download h4::after {
    content: ""; display: block; width: 35px; height: 5px; margin-top: 14px;
    border-radius: 3px; background: var(--accent);
}
.download h4::after { width: 35px; height: 4px; margin-top: 10px; }
.legal h3::after { display: none; }
.legal h3 { margin-bottom: 12px; }

/* Kopfbild einer Unterseite */
.hero { max-height: 340px; overflow: hidden; background: var(--soft); }
.hero img { display: block; width: 100%; height: 340px; object-fit: cover; }

/* Slider (Startseite) */
.slider { position: relative; background: var(--soft); overflow: hidden; }
.slides { position: relative; height: 440px; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.slide figcaption {
    position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%);
    width: min(var(--wrap), 100%); padding: 0 20px; color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}
.cap-title, .cap-sub { display: inline-block; background: rgba(0, 0, 0, .55); padding: 6px 14px; }
.cap-title { font-size: 32px; font-weight: 600; line-height: 1.25; }
.cap-sub { display: table; margin-top: 6px; font-size: 18px; }
.slide .cap-logo { bottom: auto; top: 50%; transform: translate(-50%, -50%); text-align: center; text-shadow: none; }
.slide .cap-logo img { max-width: 260px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 10px; }
.slider-dots button { width: 12px; height: 12px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: transparent; cursor: pointer; }
.slider-dots button[aria-selected="true"] { background: #fff; }
.js .slide:not(.is-active) { visibility: hidden; }
html:not(.js) .slide:not(:first-child) { display: none; }

/* Kacheln (Startseite / Produkte & Leistungen) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.card { background: #fff; border: 1px solid var(--line); padding: 0 0 6px; display: flex; flex-direction: column; }
.card-img { display: block; aspect-ratio: 3 / 2; background: var(--soft); overflow: hidden; }
.card-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card h4 { margin: 16px 18px 8px; }
.card p { margin: 0 18px 12px; }
.card p:last-child { margin-top: auto; }
.more {
    display: inline-block; font-weight: 600;
}
.card .more, .row-text .more {
    padding: 6px 16px; border: 1px solid var(--accent); color: var(--accent);
}
.card .more:hover, .row-text .more:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* Bild + Text nebeneinander */
.row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 30px; align-items: start; margin: 26px 0; }
.row-img img { display: block; width: 100%; }
.row-text h2, .row-text h3 { margin-top: 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin: 20px 0; }
.gallery figure { margin: 0; }
.gallery img { display: block; width: 100%; }
.gallery figcaption, .source { font-size: 12px; color: #777; margin-top: 4px; }

.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 24px 0; }
.product { text-align: center; }
.product img { display: block; margin: 0 auto 8px; max-height: 220px; width: auto; }

.address { font-style: normal; margin: 24px 0 10px; }
.address img { display: block; margin-bottom: 14px; }

.linklist a { display: block; margin-bottom: 6px; }
.downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; margin-top: 20px; }
.download img { display: block; max-width: 100%; border: 1px solid var(--line); }

.legal h2 { margin-top: 36px; }
.legal h3 { margin-top: 22px; font-size: 17px; }

/* ---------- Fuß ---------- */
.site-footer { background: var(--soft); border-top: 1px solid var(--line); padding: 22px 0; font-size: 13px; text-align: center; }
.site-footer p { margin: 0 0 4px; }
.site-footer a { color: var(--accent); }
.site-footer a:hover { color: var(--accent-dark); }
.site-footer .credit { margin-top: 10px; }

/* ---------- Buttons / Cookie ---------- */
.btn {
    font: inherit; font-weight: 600; cursor: pointer;
    padding: 10px 18px; min-height: 44px;
    border: 1px solid var(--nav-bg); background: var(--nav-bg); color: #fff;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-light { background: #fff; color: var(--nav-bg); }
.btn-light:hover { color: #fff; }

.cookie {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    background: #fff; border-top: 3px solid var(--accent);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .2);
    padding: 16px 20px; max-height: 85vh; overflow-y: auto;
}
.cookie[hidden], .cookie [hidden] { display: none; }
.cookie-inner { max-width: var(--wrap); margin: 0 auto; }
.cookie p { margin: 0 0 10px; }
.cookie-title { font-weight: 700; font-size: 17px; color: var(--head); }
.cookie-choices { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-hint { font-size: 13px; color: #777; }
.cookie-help { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }
.cookie-inline { margin-bottom: 14px; }

/* ---------- Mobil ---------- */
@media (max-width: 860px) {
    body { font-size: 16px; }
    h1 { font-size: 25px; }
    h2 { font-size: 21px; }

    .header-inner { flex-wrap: wrap; }
    .logo img { max-height: 64px; }
    .header-contact { order: 3; flex: 1 1 100%; text-align: left; font-size: 14px; }

    .js .nav-toggle {
        display: flex; align-items: center; justify-content: center;
        width: 46px; height: 46px; padding: 0; margin-left: auto;
        background: var(--nav-bg); border: 0; color: #fff; cursor: pointer;
    }
    .nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after {
        display: block; width: 24px; height: 3px; border-radius: 2px; background: currentColor;
        transition: transform .2s, background-color .2s;
    }
    .nav-toggle .bars { position: relative; }
    .nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle .bars::before { top: -8px; }
    .nav-toggle .bars::after { top: 8px; }
    .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
    .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(8px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-8px) rotate(-45deg); }

    .js .site-nav { display: none; }
    .js .site-nav.open { display: block; }
    .site-nav .wrap { padding: 0; }
    .site-nav .wrap > ul { display: block; }
    .site-nav li { border-top: 1px solid rgba(255, 255, 255, .15); }
    .site-nav a { padding: 14px 20px; }

    /* Untermenü: per Pfeil-Button aufklappen */
    .js .sub-toggle {
        display: block; position: absolute; right: 0; top: 0; width: 52px; height: 49px;
        background: transparent; border: 0; border-left: 1px solid rgba(255, 255, 255, .15); cursor: pointer;
    }
    .sub-toggle::before {
        content: ""; display: block; width: 9px; height: 9px; margin: 0 auto;
        border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg);
    }
    .sub-toggle[aria-expanded="true"]::before { transform: rotate(-135deg); }
    .site-nav .sub { position: static; display: none; box-shadow: none; background: rgba(0, 0, 0, .18); }
    .site-nav li.has-sub:hover > .sub { display: none; }
    .site-nav li.has-sub.open > .sub { display: block; }
    .site-nav .sub a { padding-left: 36px; }
    .site-nav li.has-sub > a { padding-right: 60px; }
    html:not(.js) .site-nav .sub { display: block; }

    .hero img { height: 200px; }
    .slides { height: 280px; }
    .cap-title { font-size: 20px; }
    .cap-sub { font-size: 14px; }
    .slide figcaption { bottom: 44px; }
    .slide .cap-logo img { max-width: 160px; }

    .row { grid-template-columns: 1fr; gap: 14px; }
    .cards { grid-template-columns: 1fr; gap: 24px; margin-top: 28px; }
    .cookie-choices .btn { width: 100%; }
    .cookie-choices li { flex: 1 1 100%; }
}
