/* ------------------------------------------------------------
   style.css - Vollständig, responsive, Hero-Overlay unten (mit Abstand)
   Hinweis: Pfade sind auf die Ordnerstruktur angepasst (css/ -> ../font/, ../pic/, ...)
------------------------------------------------------------ */

/* ---------------------------
   GLOBAL RESET & TYPOGRAPHY
--------------------------- */

@font-face {
  font-family: "Inter";
  src: url("../font/inter/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/inter/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/inter/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../font/inter/Inter-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", Arial, Helvetica, sans-serif;
}

html, body { height: 100%; }

body {
    background: #f2f2f2;
    color: #111;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

/* Typographie: größere, gut lesbare Absätze, Blocksatz */
p {
    font-size: 17px;
    color: #333;
    text-align: justify;
    max-width: 900px;
    margin-bottom: 18px;
}

/* HEADINGS */
h1 { font-size: 40px; line-height:1.05; margin-bottom:12px; font-weight:600; }
h2 { font-size: 26px; margin-bottom:12px; }

/* Links */
a { color: inherit; text-decoration: none; }

/* Page container */
.page {
    max-width: 1200px;
    margin: 30px auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

/* ---------------------------
   HEADER / NAVIGATION
--------------------------- */
.header {
    padding: 25px 40px;
    display: flex;
    justify-content: flex-start; /* statt space-between */
    align-items: center;
    background: #fff;
    position: relative;
    gap: 14px;
}

.header-logo{
    display:block;
    width:138px;
    height:100px;
    object-fit:contain;
    margin-right:14px;
}

.logo {
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 1px;
}

.header-home{
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: inherit;
}
.header-home:focus{
    outline: 2px solid rgba(0,0,0,0.35);
    outline-offset: 4px;
    border-radius: 10px;
}

/* Desktop nav */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Versteckte, dezente Scrollbar */
.nav::-webkit-scrollbar { height: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 10px; }
.nav::-webkit-scrollbar-track { background: transparent; }

.nav a {
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.nav a:hover { background: #f2f2f2; }
.nav a.active {
    background: #111;
    color: #fff;
}

/* ---------------------------
   HERO
--------------------------- */
.hero {
    position: relative;
}

.hero-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}

/* Overlay-Box im unteren Bildbereich (links/rechts mit Abstand) */
.hero-overlay {
    position: absolute;
    left: clamp(16px, 5vw, 60px);
    right: clamp(16px, 5vw, 60px);
    bottom: 30px;
    z-index: 10;

    background: rgba(255,255,255,0.92);
    padding: 28px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    text-align: left;
    max-width: 900px;
}

.hero-overlay h1 { font-size: 34px; }
.hero-overlay p { margin: 10px 0 18px; max-width: 700px; }

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-external {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 600;
    transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    user-select: none;
}

.btn-primary {
    background: #111;
    color: #fff;
}

.btn-primary:hover { transform: translateY(-1px); background: #000; }

.btn-secondary {
    background: #f3f3f3;
    color: #111;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-secondary:hover { transform: translateY(-1px); background: #e9e9e9; }

.btn-external {
    width: 100%;
    background: #f5f5f5;
    border: 1px solid rgba(0,0,0,0.08);
}

.btn-external:hover { background: #ededed; transform: translateY(-1px); }

/* ---------------------------
   CONTENT
--------------------------- */
.content {
    padding: 60px;
}

.intro,
.leistungen,
.cta {
    margin-bottom: 44px;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 16px;
}

.card {
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 18px 18px 14px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.card p {
    margin-bottom: 0;
    text-align: left;
    max-width: none;
}

/* CTA: Spalten optisch ausbalancieren */
.cta-left,
.cta-right{
    padding: 18px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
}

/* Vertikale Trennlinie wirkt oft schön – hier über Border gelöst */
.cta-grid{
    gap: 14px; /* etwas kompakter */
}

/* CTA: nebeneinander (Desktop) */
.cta .cta-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    align-items: start;
}

/* erst ab kleinerem Bildschirm untereinander */
@media (max-width: 700px){
    .cta .cta-grid{
        grid-template-columns: 1fr;
    }
}

/* Mobile: gleiche Optik, sauber untereinander */
@media (max-width: 900px){
    .cta-left,
    .cta-right{
        padding: 16px;
    }
}

/* ---------------------------
   EXTERNAL LINKS (E-Mail / Telefon Buttons)
--------------------------- */
.external-links {
    padding: 0 60px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.external-btn-box {
    width: 100%;
}

/* ---------------------------
   FOOTER
--------------------------- */
/* ---------------------------
   FOOTER (heller Bereich + dunkler Footer)
--------------------------- */

/* Heller Bereich oberhalb des dunklen Footers */
.footer-top{
    background: #fff;
    padding: 30px 40px;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.footer-top-inner{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
}

.footer-col{ width: 100%; }

.footer-headline{
    font-weight: 700;
    letter-spacing: 0.8px;
    font-size: 14px;
    margin-bottom: 10px;
    color: #111;
}

.footer-text{
    margin: 0;
    text-align: left;
    font-size: 15px;
    color: #333;
    max-width: none;
    line-height: 1.7;
}

.footer-text a{
    color: #111;
    text-decoration: underline;
}

.footer-text a:hover{
    opacity: 0.85;
}

/* Dunkler Footer-Bereich */
footer{
    padding: 25px 40px;
    background: #111;
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
}

footer a{
    color: #fff;
    text-decoration: underline;
}

footer a:hover{
    opacity: 0.85;
}

/* Responsiv */
@media (max-width: 760px){
    .footer-top{
        padding: 22px 22px;
    }

    .footer-top-inner{
        grid-template-columns: 1fr;
        gap: 16px;
    }

    footer{
        padding: 22px 22px;
    }
}

.back-to-top{
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(17,17,17,0.92);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
    z-index: 9999;
}

.back-to-top:hover{ background: #000; }

.back-to-top.is-visible{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:focus{
    outline: 2px solid rgba(255,255,255,0.65);
    outline-offset: 3px;
}

.back-to-top-icon{
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}

html{
    hyphens: auto;
}

body{
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* Fließtext überall im Blocksatz */
p, li, .card p, .footer-text, .cta p{
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    overflow-wrap: break-word;
}

/* Überschriften linksbündig lassen */
h1, h2, h3{
    text-align: left;
    hyphens: none;
}


/* ============================================================
   MOBILE-OPTIMIERUNGEN – bitte ganz ans ENDE deiner style.css setzen
   (überschreibt bestehende Regeln zuverlässig)
============================================================ */

/* 1) Leistungen (Cards) sicher untereinander + angenehme Abstände */
@media (max-width: 900px){
    .cards{
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .card{
        padding: 16px !important;
    }
}

/* 2) Seitenränder/Innenabstände auf Mobile konsistent reduzieren */
@media (max-width: 760px){
    .content{
        padding: 22px !important;
    }

    .external-links{
        padding: 0 22px 24px !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .footer-top{
        padding: 22px !important;
    }

    footer{
        padding: 22px !important;
    }

    /* Header etwas kompakter */
    .header{
        padding: 18px 22px !important;
    }

    /* Logo etwas kleiner */
    .header-logo{
        width: 120px !important;
        height: 86px !important;
    }
}

/* 3) Hero-Overlay auf Mobile: mehr Luft, weniger „wuchtig“ */
@media (max-width: 600px){
    .hero-img{
        height: 320px !important;
    }

    .hero-overlay{
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        padding: 14px 14px !important;
        border-radius: 12px;
    }

    .hero-overlay h1{
        font-size: 22px !important;
        margin-bottom: 8px;
    }

    .hero-overlay p{
        font-size: 15px;
        margin: 8px 0 12px !important;
    }

    .hero-buttons{
        gap: 8px !important;
    }

    .btn-primary,
    .btn-secondary{
        width: 100%;
    }
}

/* 4) CTA: auf Mobile ruhiger (untereinander + Buttons volle Breite) */
@media (max-width: 900px){
    .cta-grid{
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .cta-left,
    .cta-right{
        padding: 16px !important;
    }

    .cta-buttons{
        grid-template-columns: 1fr !important;
        max-width: none !important;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary{
        width: 100% !important;
    }
}

/* 5) Sehr kleine Geräte: noch kompaktere Ränder */
@media (max-width: 420px){
    .content{
        padding: 16px !important;
    }

    .external-links{
        padding: 0 16px 20px !important;
    }

    .footer-top{
        padding: 16px !important;
    }

    footer{
        padding: 16px !important;
    }

    .header{
        padding: 16px 16px !important;
    }

    .header-logo{
        width: 110px !important;
        height: 80px !important;
    }
}
