/* ============================================================
   Bauelemente Technik und Service — Site-Template
   Nachbau der Gestaltung von fenster-undicht.de (WordPress/Tanj)
   als eigenständiges HOCONE-Site-Template.

   Die Messwerte stammen aus dem Original:
     Fließtext      Lato 16/26, #444444
     Überschriften  Montserrat 700, #232323 (h1 35 · h2 32 · h3 30 · h4 24)
     Akzent         #dd3333        Footer-Balken   #cb433c
     Topbar         #f5f5f5        Sektionston     #f4f8fb
     Container      1170px (1080px zwischen 1200 und 1380px)
   ============================================================ */

/* ── Schriften (selbst gehostet, wie im Original) ─────────── */
@font-face {
    font-family: 'Montserrat';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/montserrat-var.woff2') format('woff2');
}
@font-face {
    font-family: 'Montserrat';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/montserrat-var-italic.woff2') format('woff2');
}
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/lato-300.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/lato-400.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lato-700.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 900; font-display: swap; src: url('../fonts/lato-900.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/lato-400-italic.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: italic; font-weight: 700; font-display: swap; src: url('../fonts/lato-700-italic.woff2') format('woff2'); }

/* ── Grundlagen ──────────────────────────────────────────── */
:root {
    --accent:        #dd3333;
    --accent-footer: #cb433c;
    --ink:           #232323;
    --text:          #444444;
    --topbar:        #f5f5f5;
    --tint:          #f4f8fb;
    --hairline:      #f0f5f9;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    color: var(--text);
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 20px;
    line-height: 1.3;
}
h1 { font-size: 35px; }
h2 { font-size: 32px; }
h3 { font-size: 30px; }
h4 { font-size: 24px; }
h5 { font-size: 22px; }
h6 { font-size: 16px; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; border: 0; }

ul { margin: 0 0 20px; padding-left: 20px; }

.container {
    width: 100%;
    max-width: 1200px;   /* 1170px Inhalt + 15px Luft je Seite, wie im Original */
    margin: 0 auto;
    padding: 0 15px;
}
@media (min-width: 1200px) and (max-width: 1380px) {
    .container { max-width: 1110px; }
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
    background: var(--topbar);
    padding: 5px 0;
}
.topbar .container {
    display: flex;
    align-items: center;
    min-height: 53px;
}
.topbar a {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
}
.topbar a:hover { color: var(--accent); text-decoration: none; }
.topbar a .icons { font-size: 14px; }

/* ── Kopfbereich: Logo + Kontaktangaben ──────────────────── */
.masthead { background: #ffffff; }
.masthead .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding-top: 40px;
    padding-bottom: 40px;
}
.site-logo img { width: 250px; max-width: 100%; display: block; }

.head-contact {
    display: flex;
    align-items: flex-start;   /* Anschrift und Telefon oben bündig, wie im Original */
    gap: 15px;
    margin-left: auto;
    margin-right: -15px;   /* die Blöcke ragen im Original 15px über den Container */
}
.head-contact > .contact-info:first-child { min-width: 270px; }
.head-contact > .contact-info + .contact-info { min-width: 200px; }
/* Aufbau wie im Original: Symbol, dünner senkrechter Trennstrich, Text.
   Der Telefonblock hat kein Symbol — nur den Trennstrich. */
.contact-info {
    display: flex;
    align-items: stretch;
    gap: 14px;
    font-size: 14px;
    line-height: 22px;
}
.contact-info .ci-text {
    border-left: 1px solid #e2e2e2;
    padding-left: 14px;
}
.contact-info .icons {
    color: var(--accent);
    font-size: 22px;
    line-height: 1;
    margin-top: 2px;
}
.contact-info strong { color: var(--ink); font-weight: 700; }
.contact-info a { color: inherit; }
.contact-info a:hover { color: var(--accent); text-decoration: none; }

@media (max-width: 991px) {
    .head-contact { display: none; }
}

/* ── Hauptnavigation ─────────────────────────────────────── */
/* Die Trennlinie läuft im Original nur über die Containerbreite (plus die
   15px Randluft der Zeile), nicht über die volle Fensterbreite. */
.mainnav { background: #ffffff; }
.mainnav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--hairline);
    /* Zeilenhöhe 69px wie im Original — in den unteren Teil zieht sich der
       Slider-Kasten der Startseite hinein (margin-top:-85px). */
    padding-top: 15px;
    padding-bottom: 15px;
}
.nav-toggle {
    display: none;
    background: none;
    border: 0;
    padding: 14px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
    cursor: pointer;
    align-items: center;
    gap: 8px;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 6px;
    display: flex;
    flex-wrap: wrap;
}
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block;
    padding: 10px 25px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 17px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ink);
}
.nav-list > li > a:hover,
.nav-list > li.is-current > a,
.nav-list > li.is-ancestor > a { color: var(--accent); text-decoration: none; }

.nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .12);
    border-top: 2px solid var(--accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 60;
}
.nav-list > li:hover .sub-menu,
.nav-list > li:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-list .sub-menu a {
    display: block;
    padding: 9px 22px;
    font-size: 15px;
    color: var(--text);
}
.nav-list .sub-menu a:hover,
.nav-list .sub-menu li.is-current > a { color: var(--accent); text-decoration: none; }

@media (max-width: 991px) {
    .nav-toggle { display: inline-flex; }
    .mainnav .container { flex-wrap: wrap; }
    .nav-list {
        display: none;
        width: 100%;
        flex-direction: column;
        padding-bottom: 10px;
    }
    .nav-list.is-open { display: flex; }
    .nav-list > li > a { padding: 12px 0; }
    .nav-list > li:first-child > a { padding-left: 0; }
    .nav-list .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: 0;
        border-left: 2px solid var(--hairline);
        padding: 0 0 6px 0;
        margin: 0 0 6px 2px;
        min-width: 0;
    }
    .nav-list .sub-menu a { padding: 7px 14px; }
}

/* ── Startseite: Slider-Box ──────────────────────────────── */
.home-intro {
    background: var(--tint);
    margin-top: 55px;
    padding: 20px 0 60px;
}
/* .slider-overlap-section im Original: der Kasten wird 85px nach oben in den
   weißen Kopfbereich gezogen und überlappt die Navigationszeile. */
.intro-card {
    background: #ffffff;
    box-shadow: 0 0 24px 0 rgba(0, 0, 0, .15);
    padding: 20px 0 80px 10px;   /* rechts bündig, links 10px — wie im Original */
    margin: -85px -15px 0;   /* 15px breiter als der Container, wie die VC-Zeile */
}
@media (max-width: 767px) {
    .intro-card { margin-top: 50px; }
}
.intro-card > .inner { padding: 0 15px; }

.slider {
    position: relative;
    overflow: hidden;
    background: #000;
}
.slider-track {
    display: flex;
    transition: transform .6s ease;
}
.slider-track > figure {
    flex: 0 0 100%;
    margin: 0;
    min-width: 100%;
}
.slider-track img {
    display: block;
    width: 100%;
    height: auto;
}
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .75);
    color: var(--ink);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, color .2s ease;
}
.slider-nav:hover { background: var(--accent); color: #fff; }
.slider-nav.prev { left: 14px; }
.slider-nav.next { right: 14px; }
.slider-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
}
.slider-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    cursor: pointer;
}
.slider-dots button.is-active { background: var(--accent); }

.intro-card h3 { margin: 34px 0 22px; }
.intro-card h2 { color: var(--accent); }
.lead-italic {
    font-size: 17px;
    font-style: italic;
    line-height: 26px;
}

/* ── Startseite: Leistungs-Kacheln ───────────────────────── */
.services-teaser { padding: 100px 0 0; }

.dt-title {
    text-align: center;
    margin-bottom: 20px;
}
.dt-title h2 {
    /* Im Original 56px in der Akzentfarbe — und ohne Unterstrich. */
    font-size: 56px;
    line-height: 68px;
    color: var(--accent);
    margin: 0 0 20px;
}
.dt-subtitle {
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    margin: 0 auto;
    max-width: 900px;
}

/* Die Kachelreihe läuft im Original über die volle Fensterbreite mit 10%
   Innenabstand, nicht nur über die Containerbreite. */
.icon-boxes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    padding: 90px 10% 80px;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}
/* Im Original sind das keine Kreise, sondern um 45° gedrehte Quadrate
   (dt-sc-icon-box type5): 120x120, 3px Radius, leichter Schatten; das
   Symbol wird gegengedreht. */
/* Im Original je eine Sechstel-Spalte (vc_col-lg-2) — das ergibt die
   Zwischenräume zwischen den Rauten. */
.icon-box {
    flex: 0 0 16.666%;
    max-width: 16.666%;
    margin-bottom: 30px;
    text-align: center;
}
.icon-box .icon-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 50px;
    border-radius: 3px;
    background-color: #808080;
    color: #ffffff;
    box-shadow: 4px 0 8px 0 rgba(0, 0, 0, .04);
    transform: rotate(45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .25s ease;
}
.icon-box .icon-wrapper span {
    font-size: 40px;
    line-height: 40px;
    transform: rotate(-45deg);
}
.icon-box:hover .icon-wrapper { background-color: var(--accent); }
.icon-box h4 { font-size: 18px; text-transform: uppercase; margin: 0; }
.icon-box h4 a { color: var(--ink); }
.icon-box:hover h4 a { color: var(--accent); text-decoration: none; }

/* ── Innenseiten ─────────────────────────────────────────── */
.page-body { padding: 35px 0 80px; }   /* Inhalt beginnt 35px unter der Navigation */

.with-sidebar {
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
}
.with-sidebar > .side { flex: 0 0 27%; max-width: 27%; }
.with-sidebar > .content { flex: 1 1 0; min-width: 0; }
@media (max-width: 767px) {
    .with-sidebar > .side { flex-basis: 100%; max-width: 100%; }
}

.side-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}
.side-nav li { margin-bottom: 7px; overflow: hidden; }   /* verbirgt den Balken, bis er einfährt */
.side-nav a {
    position: relative;
    display: block;
    padding: 12px 30px 12px 20px;
    font-family: 'Lato', sans-serif;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    color: #000000;
    background-color: var(--tint);
    transition: color .3s linear;
}
.side-nav a::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 5px;
    height: 100%;
    background-color: var(--accent);
    transition: right .3s linear;
}
.side-nav a:hover,
.side-nav li.is-current a { color: var(--accent); text-decoration: none; }
.side-nav a:hover::after,
.side-nav li.is-current a::after { right: 0; }

/* Galerie-Slider auf den Leistungsseiten: die Bilder sind teils quer,
   teils hoch. Feste Höhe + contain hält das Layout ruhig, statt bei
   jedem Bildwechsel zu springen. */
.slider--gallery { background: #f2f2f2; }
.slider--gallery .slider-track > figure { display: flex; }
.slider--gallery a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 480px;
}
.slider--gallery img {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
@media (max-width: 767px) {
    .slider--gallery a { height: 320px; }
}

/* ── Leistungs-Übersicht (Karten) ────────────────────────── */
.service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 57px 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}
@media (max-width: 991px) { .service-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .service-cards { grid-template-columns: 1fr; } }
/* Im Original keine Kartenrahmen: quadratisches Bild, darunter mit 15px
   Abstand die Überschrift in Versalien und Akzentfarbe (18px). */
.service-card { background: none; border: 0; text-align: center; }
.service-card .thumb { display: block; }
.service-card .thumb img { width: 100%; height: auto; display: block; }
.service-card h3 {
    font-size: 18px;
    text-transform: uppercase;
    color: var(--accent);
    margin: 15px 0 0;
}
.service-card h3 a { color: inherit; }
.service-card h3 a:hover { color: var(--ink); text-decoration: none; }

/* ── Kontakt ─────────────────────────────────────────────── */
.map-embed { line-height: 0; }
.map-embed iframe { width: 100%; height: 450px; border: 0; display: block; }
.contact-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}
.contact-columns > div { flex: 1 1 340px; min-width: 0; }

.side-heading {
    position: relative;
    padding-left: 18px;
    font-size: 22px;
    text-transform: uppercase;
    margin-bottom: 26px;
}
.side-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--accent);
}

.hoc-form .field { margin-bottom: 18px; }
.hoc-form input[type="text"],
.hoc-form input[type="email"],
.hoc-form textarea {
    width: 100%;
    padding: 12px 15px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: var(--text);
    background: #fff;
    border: 1px solid #dfe6ec;
    border-radius: 0;
}
.hoc-form input:focus,
.hoc-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.hoc-form textarea { min-height: 190px; resize: vertical; }
.hoc-form .check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 24px;
}
.hoc-form .check input { margin-top: 5px; }
.hoc-form .hint { font-size: 13px; line-height: 21px; color: #7a8792; }

.btn-send {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #ffffff;
    background: var(--accent);
    border: 0;
    cursor: pointer;
    transition: background .2s ease;
}
.btn-send:hover { background: #b92a2a; }

.form-note {
    display: none;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 15px;
}
.form-note.is-visible { display: block; }
.form-note.ok { background: #e8f6ec; border-left: 4px solid #34a853; color: #1e6b33; }
.form-note.err { background: #fdecec; border-left: 4px solid var(--accent); color: #a32020; }

/* ── Rechtstexte ─────────────────────────────────────────── */
.legal-page { max-width: 860px; }
.legal-page h1 { margin-bottom: 30px; }
.legal-page p { line-height: 27px; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
    background: var(--accent-footer);
    color: #ffffff;
    padding: 15px 0 10px;
    margin-top: 0;
}
.site-footer .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 30px;
}
.site-footer .copyright {
    font-size: 13px;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
}
.footer-nav {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin: 0;
    padding: 0;
}
.footer-nav a {
    color: #ffffff;
    font-size: 13px;
    text-transform: uppercase;
    padding: 5px 10px;
}
.footer-nav a:hover { text-decoration: underline; }

/* Auf schmalen Fenstern passen die 5 Sechstel-Spalten nicht mehr: die
   gedrehten Rauten haben eine Grundfläche von 120·√2 ≈ 170px und ragen sonst
   aus dem Fenster (waagerechtes Scrollen). Darum weniger Spalten und ab
   Handygröße kleinere Rauten. */
@media (max-width: 991px) {
    .icon-box { flex: 0 0 33.333%; max-width: 33.333%; }
}

@media (max-width: 767px) {
    .site-footer .container { justify-content: center; text-align: center; }
    .footer-nav { justify-content: center; }
    h1 { font-size: 28px; }
    h2 { font-size: 26px; }
    h3 { font-size: 24px; }
    .services-teaser { padding-top: 60px; }
    .intro-card > .inner { padding: 0 10px; }

    .dt-title h2 { font-size: 34px; line-height: 44px; }
    .dt-subtitle { font-size: 16px; line-height: 26px; }

    .icon-boxes { padding: 50px 15px 20px; }
    .icon-box { flex: 0 0 50%; max-width: 50%; margin-bottom: 20px; }
    .icon-box .icon-wrapper {
        width: 90px;
        height: 90px;
        margin-bottom: 40px;
    }
    .icon-box .icon-wrapper span { font-size: 30px; line-height: 30px; }
    .icon-box h4 { font-size: 16px; }
}

/* ── 404 ─────────────────────────────────────────────────── */
.notfound { padding: 90px 0 110px; text-align: center; }
.notfound .code {
    font-family: 'Montserrat', sans-serif;
    font-size: 96px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
    margin: 0 0 18px;
}

/* ── Nach-oben-Knopf ─────────────────────────────────────── */
/* Im Original ein gedrehtes dunkles Quadrat unten rechts (#toTop). */
#toTop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 71px;
    height: 71px;
    border: 0;
    padding: 0;
    background: #333333;
    color: #ffffff;
    box-shadow: 0 0 1px 0 rgba(0, 0, 0, .3);
    transform: rotate(-45deg);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 90;
    transition: background .2s ease;
}
#toTop.is-visible { display: flex; }
#toTop:hover { background: var(--accent); }
#toTop i { transform: rotate(45deg); font-size: 20px; }
