/* === FONTS === */
/* Inter, selbst gehostet (SIL Open Font License, siehe fonts/OFL.txt).
   Kein Google-Fonts-CDN -> keine Übertragung von Besucher-IPs an Dritte.
   Variable Font: eine Datei deckt alle Schnitte von 100 bis 900 ab. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* scroll-padding-top hält Anker-Sprünge (auch index.php#kontakt) unter der fixen Navbar frei */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #2a2a2a;
    background: #fff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* === VARIABLES === */
:root {
    --color-primary: #1a2744;
    --color-accent: #8b2332;
    --color-text: #2a2a2a;
    --color-text-mid: #555;
    --color-text-light: #777;
    --color-bg: #fff;
    --color-bg-alt: #f8f9fb;
    --color-bg-dark: #1a2744;
    --nav-height: 72px;
    --container-width: 1100px;
}

/* === CONTAINER === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}
.btn-primary {
    background: var(--color-accent);
    color: #fff;
}
.btn-primary:hover {
    background: #a02a3e;
    transform: translateY(-1px);
}

/* === SECTION DEFAULTS === */
.section {
    min-height: 100vh;
    padding: 80px 0;
    display: flex;
    align-items: center;
}
.section > .container {
    width: 100%;
}
.section-headline {
    font-size: 28px;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 8px;
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 15px;
    margin-bottom: 48px;
}
.section-label {
    display: block;
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}
.section-label-light {
    color: var(--color-accent);
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background 0.3s, box-shadow 0.3s, height 0.3s;
}
/* === NAV THEME: LIGHT SECTIONS (Leistungen, Über mich, Galerie) === */
.navbar.nav-theme-light {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.navbar.nav-theme-light .nav-brand-text {
    color: var(--color-primary);
}
.navbar.nav-theme-light .nav-toggle span {
    background: var(--color-primary);
}
.navbar.nav-theme-light .nav-center-logo img {
    background: #fff;
}

/* === NAV THEME: DARK SECTIONS (Hero, Kontakt) === */
.navbar.nav-theme-dark {
    background: var(--color-bg-dark);
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.navbar.nav-theme-dark .nav-brand-text {
    color: #fff;
}
.navbar.nav-theme-dark .nav-toggle span {
    background: #fff;
}
.navbar.nav-theme-dark .nav-center-logo img {
    background: rgba(255,255,255,0.95);
}

/* legacy scrolled class for legal pages */
.navbar.scrolled {
    background: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}
.navbar.scrolled .nav-brand-text {
    color: var(--color-primary);
}
.navbar.scrolled .nav-toggle span {
    background: var(--color-primary);
}
.navbar-inner {
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* === NAV BRAND (left side text) === */
.nav-brand-text {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.3px;
    transition: color 0.3s;
}
.navbar.scrolled .nav-brand-text {
    color: var(--color-primary);
}

/* === CENTER LOGO (large, centered in navbar) === */
.nav-center-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.nav-center-logo img {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255,255,255,0.95);
    padding: 2px;
    transition: height 0.3s, width 0.3s;
}
.navbar.scrolled .nav-center-logo img {
    height: 52px;
    width: 52px;
}

/* === NAV TOGGLE (always visible, pinned to right edge) === */
.nav-toggle {
    position: fixed;
    top: 20px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 2001;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: background 0.3s, transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:first-child {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:last-child {
    transform: translateY(-7px) rotate(-45deg);
}

/* === SIDE MENU (slide-in from right) === */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    pointer-events: none;
    visibility: hidden;
}
.side-menu.open {
    pointer-events: auto;
    visibility: visible;
}
.side-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s;
}
.side-menu.open .side-menu-overlay {
    opacity: 1;
}
.side-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
}
.side-menu.open .side-menu-panel {
    transform: translateX(0);
}
.side-menu-close {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    position: relative;
    margin-bottom: 32px;
}
.side-menu-close span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-primary);
    position: absolute;
    top: 50%;
    left: 50%;
}
.side-menu-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}
.side-menu-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.side-menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.side-menu-link {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-primary);
    padding: 14px 0;
    border-bottom: 1px solid #eee;
    transition: color 0.2s;
}
.side-menu-link:hover {
    color: var(--color-accent);
}

/* Side menu dark theme (matches dark sections) */
.side-menu.menu-dark .side-menu-panel {
    background: var(--color-bg-dark);
}
.side-menu.menu-dark .side-menu-close span {
    background: #fff;
}
.side-menu.menu-dark .side-menu-link {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.15);
}
.side-menu.menu-dark .side-menu-link:hover {
    color: var(--color-accent);
}

/* === HERO === */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    background-color: var(--color-primary);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center 45%, rgba(26,39,68,0.15) 0%, rgba(26,39,68,0.55) 60%, rgba(0,0,0,0.75) 100%),
        linear-gradient(to bottom, rgba(26,39,68,0.45) 0%, rgba(26,39,68,0.25) 40%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 24px;
    max-width: 600px;
}
.hero-headline {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero-subtitle {
    font-size: 17px;
    opacity: 0.9;
    margin-bottom: 32px;
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

/* === LEISTUNGEN === */
.leistungen {
    background: var(--color-bg-alt);
    position: relative;
    overflow: hidden;
}
.leistungen::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(925px, 95vw);
    height: min(925px, 95vw);
    transform: translate(-50%, -50%);
    background: url('../img/logo.png') center / contain no-repeat;
    opacity: 0.1;
    pointer-events: none;
}
.leistungen .container {
    position: relative;
    z-index: 1;
}
.leistungen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.leistung-card {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 8px;
    padding: 28px 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--color-primary);
    transition: transform 0.2s, box-shadow 0.2s;
}
.leistung-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.leistung-card.accent-red {
    border-left-color: var(--color-accent);
}
.leistung-card.accent-blue {
    border-left-color: var(--color-primary);
}
.leistung-card h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin-bottom: 8px;
}
.leistung-card p {
    font-size: 14px;
    color: var(--color-text-mid);
    line-height: 1.7;
}

/* === ABOUT === */
.about-grid {
    display: flex;
    gap: 40px;
    align-items: center;
}
.about-image {
    flex: 1;
    min-width: 0;
    position: relative;
}
.about-image picture {
    display: block;
}
.about-image img {
    border-radius: 10px;
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    object-position: center 30%;
    box-shadow: 0 12px 40px rgba(26,39,68,0.18);
}
.about-image::after {
    content: '';
    position: absolute;
    left: -16px;
    bottom: -16px;
    width: 80px;
    height: 80px;
    border-left: 3px solid var(--color-accent);
    border-bottom: 3px solid var(--color-accent);
    border-bottom-left-radius: 10px;
    pointer-events: none;
}
.about-image-placeholder {
    background: #eef1f5;
    height: 320px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 14px;
}
.about-text {
    flex: 1.5;
    min-width: 0;
}
.about-text h2 {
    font-size: 26px;
    color: var(--color-primary);
    margin-bottom: 16px;
}
.about-text p {
    font-size: 15px;
    color: var(--color-text-mid);
    line-height: 1.8;
    margin-bottom: 14px;
}
.about-text p:last-of-type {
    margin-bottom: 0;
}
.about-cta {
    margin-top: 24px;
}

/* === GALERIE === */
.galerie {
    background: var(--color-bg-alt);
}
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.galerie-item {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}
.galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.galerie-item:hover img {
    transform: scale(1.05);
}

/* === LIGHTBOX === */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
}
.lightbox-close span {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    position: absolute;
    top: 50%;
    left: 50%;
}
.lightbox-close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
}
.lightbox-close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
}
.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 4px;
}

/* === KONTAKT === */
.kontakt {
    background: var(--color-bg-dark);
    color: #fff;
}
.kontakt-grid {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}
.kontakt-info {
    flex: 1;
    min-width: 0;
}
.kontakt-info h2 {
    font-size: 26px;
    margin-bottom: 12px;
}
.kontakt-text {
    font-size: 14px;
    opacity: 0.75;
    line-height: 1.7;
    margin-bottom: 24px;
}
/* Anrufen und WhatsApp: die beiden Wege, die auf dem Handy einen Fingertipp kosten. */
.kontakt-aktionen {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.btn-kontakt {
    flex: 1 1 140px;
    text-align: center;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
.btn-kontakt:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}
.kontakt-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255,255,255,0.06);
    border-radius: 8px;
    padding: 20px;
}
.kontakt-detail-label {
    display: block;
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 2px;
}
.kontakt-detail-value {
    font-size: 15px;
}
/* <address> kursiviert der Browser von Haus aus, hier soll es wie die anderen Zeilen aussehen. */
address.kontakt-detail-value {
    font-style: normal;
    line-height: 1.5;
}
.kontakt-detail-value a:hover {
    text-decoration: underline;
}
.kontakt-form-wrapper {
    flex: 1;
    min-width: 0;
}
.kontakt-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
}
.form-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.8;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.3);
}
.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.form-consent input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--color-accent);
    cursor: pointer;
}
.form-consent label {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.8;
    cursor: pointer;
}
.form-consent a {
    color: var(--color-accent);
    text-decoration: underline;
}
.btn-submit {
    width: 100%;
    text-align: center;
}
.btn-submit.loading {
    opacity: 0.6;
    pointer-events: none;
}
.form-status {
    font-size: 14px;
    min-height: 20px;
}
.form-status.success {
    color: #4ade80;
}
.form-status.error {
    color: #f87171;
}

.kontakt-detail-value a:hover {
    text-decoration: underline;
}

/* === SECTION NAV ARROWS === */
.section-nav {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    z-index: 900;
    display: flex;
    gap: 24px;
}
.section-nav-btn {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 0.7;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.section-nav-btn svg {
    width: 56px;
    height: 56px;
}
.section-nav-btn:hover {
    opacity: 1;
    transform: scale(1.15);
}
.section-nav-btn.disabled {
    opacity: 0.15;
    pointer-events: none;
}
.section-nav.on-light .section-nav-btn {
    color: var(--color-primary);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

@media (max-width: 1024px) {
    .section-nav {
        display: none;
    }
}

/* === FOOTER === */
.footer {
    background: #141e30;
    color: #fff;
    padding: 24px 0;
}
.footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    opacity: 0.9;
}
.footer-logo img {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
}
.footer-links {
    display: flex;
    gap: 24px;
}
.footer-links a {
    font-size: 13px;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.footer-links a:hover {
    opacity: 1;
}

/* === SCROLL ANIMATIONS === */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .leistungen-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-brand-text { display: none; }
    .nav-center-logo {
        position: static;
        transform: none;
    }

    .hero-headline { font-size: 30px; }
    .hero-subtitle { font-size: 15px; }

    .leistungen-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        flex-direction: column;
    }

    .galerie-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .kontakt-grid {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .section { padding: 60px 0; min-height: auto; }
    .section-headline { font-size: 24px; }
}

@media (max-width: 480px) {
    .galerie-grid {
        grid-template-columns: 1fr;
    }
}

/* === LEGAL PAGES === */
.legal-page {
    padding-top: calc(var(--nav-height) + 40px);
}
.legal-content {
    max-width: 720px;
    margin: 32px auto 0;
}
.legal-content h2 {
    font-size: 21px;
    color: var(--color-primary);
    margin: 40px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-bg-alt);
}
.legal-content h2:first-child {
    margin-top: 0;
}
.legal-content h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin: 24px 0 8px;
}
.legal-content h4 {
    font-size: 15px;
    color: var(--color-primary);
    margin: 18px 0 6px;
}
.legal-content p {
    font-size: 15px;
    color: var(--color-text-mid);
    line-height: 1.8;
    margin-bottom: 12px;
}
.legal-content ul {
    margin: 0 0 12px 20px;
    padding: 0;
    list-style: disc;
}
.legal-content li {
    font-size: 15px;
    color: var(--color-text-mid);
    line-height: 1.7;
    margin-bottom: 4px;
}
.legal-content a {
    color: var(--color-accent);
    word-break: break-word;
}
.legal-meta {
    margin-top: 32px;
    font-size: 13px;
    color: var(--color-text-mid);
    opacity: 0.75;
}
.legal-content a {
    color: var(--color-accent);
    text-decoration: underline;
}
.legal-content strong {
    color: var(--color-text);
}
.legal-content code {
    font-size: 13px;
    background: var(--color-bg-alt);
    padding: 1px 5px;
    border-radius: 3px;
}

/* Fehlende Pflichtangaben sollen unübersehbar sein, solange config.php Lücken hat */
.legal-warnung {
    padding: 14px 16px;
    background: #fdecea;
    border-left: 4px solid var(--color-accent);
    border-radius: 6px;
    color: #7a1f2b !important;
}
.fehlende-angabe {
    background: #ffe08a;
    color: #6b4c00;
    padding: 1px 6px;
    border-radius: 3px;
    font-style: italic;
}
