/* ================================================================
   1. FARBEN UND GRUNDEINSTELLUNGEN
   ================================================================ */

/* Zentrale Farben: Änderungen hier wirken auf die gesamte Website. */
:root {
    --primary-color: #1a1a1a;
    --accent-color: #d4af37;
    --bg-color: #fdfbf7;
    --text-color: #4a4a4a;
}

/* Entfernt Browser-Standardabstände und erleichtert Größenberechnungen. */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* Allgemeines Erscheinungsbild der Seite. */
body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Hält Sprungziele beim Anklicken unterhalb des festen Headers sichtbar. */
#start,
#galerie,
#zertifikate {
    scroll-margin-top: 115px;
}

/* Einheitliche Schrift für alle Überschriften. */
h1,
h2,
h3 {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
}

/* ================================================================
   2. HEADER UND NAVIGATION
   ================================================================ */

/* Weißer, beim Scrollen sichtbarer Seitenkopf. */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: #ffffff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

/* Positioniert die Navigation exakt in der Mitte des Headers. */
.nav-section {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Logo und leichte Vergrößerung beim Darüberfahren. */
.logo-section {
    display: flex;
    align-items: center;
    border-radius: 8px;
    text-decoration: none;
}

.main-logo {
    width: auto;
    height: 72px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* Der Menüknopf wird nur auf Smartphones eingeblendet. */
.menu-toggle {
    display: none;
}

.logo-section:hover .main-logo {
    transform: scale(1.03);
}

/* Anordnung der Navigationslinks. */
.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Gemeinsames Aussehen für Header- und Footer-Links. */
.nav-links a,
.footer-links a {
    position: relative;
    padding-bottom: 5px;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s ease, transform 0.25s ease;
}

/* Goldene Linie unter einem Link beim Darüberfahren. */
.nav-links a::after,
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.3s ease;
}

.nav-links a:hover,
.footer-links a:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.nav-links a:hover::after,
.footer-links a:hover::after,
.nav-links a:focus-visible::after,
.footer-links a:focus-visible::after {
    transform: translateX(-50%) scaleX(1);
}

/* Telefonnummer und Social-Media-Symbole rechts im Header. */
.contact-section {
    display: flex;
    align-items: center;
    gap: 30px;
}

.phone-wrapper,
.footer-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.25s ease, transform 0.25s ease;
}

.phone-wrapper:hover,
.footer-phone:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

.phone-wrapper i,
.footer-phone i {
    transition: transform 0.25s ease;
}

.phone-wrapper:hover i,
.footer-phone:hover i {
    transform: rotate(-10deg) scale(1.12);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--accent-color);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 7px 16px rgba(212, 175, 55, 0.35);
}

/* Gut sichtbarer Fokus für die Bedienung mit der Tastatur. */
a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.55);
    outline-offset: 4px;
}

.nav-links a:focus-visible,
.footer-links a:focus-visible {
    color: var(--accent-color);
}

/* ================================================================
   3. GROSSES HEADERBILD (HERO)
   ================================================================ */

/* Bereich für das große Titelbild. */
.hero-section {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    background: #333333;
}

/* Das Bild füllt den Hero-Bereich vollständig aus. */
.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

/* Weißer Textkasten über dem Hero-Bild. */
.hero-text-box {
    position: relative;
    z-index: 10;
    max-width: 650px;
    padding: 40px 50px;
    transform: translateY(100px);
    border-top: 4px solid var(--accent-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hero-text-box h2 {
    font-size: 28px;
    line-height: 1.4;
}

/* ================================================================
   4. EINLEITUNGSBEREICH
   ================================================================ */

/* Gemeinsame maximale Breite und Abstände der Inhaltsbereiche. */
.content-section,
.certificates-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 5%;
}

/* Text und Bild stehen auf großen Bildschirmen nebeneinander. */
.content-row {
    display: flex;
    align-items: center;
    gap: 60px;
}

.text-column,
.image-column {
    flex: 1;
}

.image-column img {
    width: 100%;
    height: 470px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Überschriften mit kurzer goldener Linie. */
.section-title {
    position: relative;
    margin-bottom: 25px;
    padding-bottom: 15px;
    font-size: 42px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.text-column p {
    margin-bottom: 20px;
    font-size: 18px;
}

/* ================================================================
   5. BILDER-SLIDER UND VORSCHAUBILDER
   ================================================================ */

.slider-section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5% 80px;
}

.gallery-title {
    margin-bottom: 35px;
    text-align: center;
}

.gallery-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Sichtbarer Rahmen des großen Slider-Bildes. */
.slider {
    position: relative;
    height: min(65vw, 680px);
    min-height: 420px;
    overflow: hidden;
    border-radius: 12px;
    background: #222222;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.slider-track,
.slide {
    width: 100%;
    height: 100%;
}

/* Alle Bilder liegen übereinander; nur das aktive ist sichtbar. */
.slide {
    position: absolute;
    inset: 0;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.slide.active {
    opacity: 1;
}

/* Runde Pfeiltasten links und rechts. */
.slider-button {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    font-size: 18px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.3s, color 0.3s;
}

.slider-button:hover {
    background: var(--accent-color);
    color: #ffffff;
}

.slider-button.prev {
    left: 24px;
}

.slider-button.next {
    right: 24px;
}

/* Horizontal scrollbare Leiste mit allen Vorschaubildern. */
.slider-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 4px 2px 12px;
    overflow-x: auto;
    scrollbar-color: var(--accent-color) #eeeeee;
}

.slider-thumbnails button {
    flex: 0 0 100px;
    height: 72px;
    padding: 0;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 7px;
    background: #ffffff;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.25s, border-color 0.25s, transform 0.25s;
}

.slider-thumbnails button:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.slider-thumbnails button.active {
    border-color: var(--accent-color);
    opacity: 1;
}

.slider-thumbnails img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================================================
   6. ZERTIFIKATE
   ================================================================ */

.certificates-section {
    padding-top: 10px;
    text-align: center;
}

/* Zentriert die goldene Linie unter der Überschrift. */
.centered-title {
    display: inline-block;
}

.centered-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.certificates-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 70px;
    margin-top: 25px;
}

.certificates-grid img {
    width: min(100%, 360px);
    height: 250px;
    padding: 22px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    object-fit: contain;
}

/* ================================================================
   7. FOOTER
   ================================================================ */

.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 45px 5%;
    border-top: 3px solid var(--accent-color);
    background: #ffffff;
}

.footer-brand p {
    margin: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.footer-links {
    display: flex;
    gap: 30px;
}

/* ================================================================
   8. IMPRESSUM UND DATENSCHUTZ
   ================================================================ */

.legal-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.legal-content {
    flex: 1;
    width: min(900px, 90%);
    margin: 0 auto;
    padding: 70px 0;
}

.legal-content h2 {
    margin: 32px 0 10px;
    font-size: 25px;
}

.legal-content p {
    margin-bottom: 14px;
}

/* Hervorgehobene Telefonnummern innerhalb der Rechtstexte. */
.legal-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 8px;
    border-radius: 6px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration-color: var(--accent-color);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.legal-phone-link i {
    color: var(--accent-color);
    font-size: 0.85em;
    transition: transform 0.25s ease;
}

.legal-phone-link:hover {
    background: rgba(212, 175, 55, 0.12);
    color: #9b7916;
    transform: translateY(-1px);
}

.legal-phone-link:hover i {
    transform: rotate(-10deg) scale(1.1);
}

/* ================================================================
   9. TABLETS UND KLEINERE BILDSCHIRME
   ================================================================ */

@media (max-width: 1180px) {
    /* Header-Elemente werden untereinander dargestellt. */
    .main-header {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 12px 24px;
        padding: 16px 20px;
    }

    .nav-section {
        position: static;
        grid-column: 1 / -1;
        grid-row: 2;
        transform: none;
    }

    .nav-links {
        justify-content: center;
    }

    .contact-section {
        justify-self: end;
    }

    /* Text und Inhaltsbild stehen untereinander. */
    .content-row {
        flex-direction: column;
    }

    .hero-text-box {
        margin: 0 20px;
        padding: 30px;
        transform: translateY(60px);
    }

    .section-title {
        font-size: 32px;
    }

    .slider {
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .main-footer {
        flex-direction: column;
        text-align: center;
    }

    .footer-phone {
        justify-content: center;
    }

    .footer-brand {
        justify-content: center;
    }
}

/* ================================================================
   10. SMARTPHONES
   ================================================================ */

@media (max-width: 600px) {
    #start,
    #galerie,
    #zertifikate {
        scroll-margin-top: 82px;
    }

    .main-header {
        grid-template-columns: 1fr auto auto;
        gap: 0 12px;
        padding: 10px 16px 12px;
    }

    .logo-section {
        justify-content: flex-start;
    }

    .main-logo {
        height: 58px;
    }

    .nav-section {
        grid-column: 1 / -1;
        grid-row: auto;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.25s ease, visibility 0.35s;
    }

    .nav-links {
        flex-direction: column;
        gap: 4px;
        padding: 18px 0 10px;
    }

    .nav-links a {
        width: 100%;
        padding: 9px 4px;
        font-size: 14px;
        text-align: center;
    }

    .contact-section {
        display: contents;
    }

    .contact-section .social-icons {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .contact-section .phone-wrapper {
        grid-column: 1 / -1;
        grid-row: 3;
        justify-self: center;
        max-height: 0;
        margin: 0;
        padding: 0 18px;
        overflow: hidden;
        border: 1px solid transparent;
        border-radius: 999px;
        background: rgba(212, 175, 55, 0.1);
        box-shadow: 0 6px 18px rgba(26, 26, 26, 0.08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: max-height 0.3s ease, margin 0.3s ease, padding 0.3s ease, opacity 0.25s ease, transform 0.25s ease, visibility 0.3s, background-color 0.25s ease;
    }

    .contact-section .phone-wrapper i {
        display: grid;
        place-items: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: var(--accent-color);
        color: #ffffff;
        font-size: 12px;
    }

    .main-header.menu-open .nav-section {
        max-height: 190px;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-header.menu-open .phone-wrapper {
        max-height: 64px;
        margin: 10px 0 6px;
        padding-block: 8px;
        border-color: rgba(212, 175, 55, 0.45);
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-header.menu-open .phone-wrapper:hover {
        background: var(--accent-color);
        color: #ffffff;
        transform: translateY(-2px);
    }

    .main-header.menu-open .phone-wrapper:hover i {
        background: #ffffff;
        color: var(--accent-color);
    }

    .menu-toggle {
        display: flex;
        grid-column: 3;
        grid-row: 1;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        align-self: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border: 1px solid rgba(212, 175, 55, 0.45);
        border-radius: 9px;
        background: transparent;
        cursor: pointer;
        transition: background-color 0.25s ease;
    }

    .menu-toggle:hover {
        background: rgba(212, 175, 55, 0.12);
    }

    .menu-toggle span {
        width: 22px;
        height: 2px;
        border-radius: 2px;
        background: var(--primary-color);
        transition: transform 0.3s ease, opacity 0.2s ease, background-color 0.25s ease;
    }

    .menu-open .menu-toggle span {
        background: var(--accent-color);
    }

    .menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .phone-wrapper {
        font-size: 14px;
    }

    .social-icons a {
        width: 34px;
        height: 34px;
    }

    .hero-section {
        height: min(72svh, 560px);
        min-height: 380px;
    }

    .hero-text-box {
        margin: 0 16px;
        padding: 22px 18px;
        transform: translateY(35px);
    }

    .hero-text-box h2 {
        font-size: clamp(19px, 5.5vw, 23px);
    }

    .content-section {
        padding: 60px 6%;
    }

    .image-column img {
        height: auto;
        max-height: 420px;
        aspect-ratio: 4 / 3;
    }

    .slider-section {
        padding: 0 14px 60px;
    }

    .gallery-title {
        margin-bottom: 24px;
        padding-inline: 8px;
    }

    .slider {
        min-height: 0;
        height: clamp(300px, 105vw, 460px);
        aspect-ratio: auto;
        border-radius: 12px;
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
        touch-action: pan-y;
    }

    .slider-button {
        width: 38px;
        height: 38px;
        background: rgba(255, 255, 255, 0.85);
        font-size: 15px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    }

    .slider-button.prev {
        left: 10px;
    }

    .slider-button.next {
        right: 10px;
    }

    .slider-thumbnails {
        gap: 8px;
        margin-top: 10px;
        padding: 3px 2px 9px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .slider-thumbnails::-webkit-scrollbar {
        display: none;
    }

    .slider-thumbnails button {
        flex-basis: 72px;
        height: 54px;
        border-width: 2px;
        border-radius: 6px;
        scroll-snap-align: center;
    }

    .certificates-section {
        padding: 10px 6% 60px;
    }

    .certificates-grid {
        gap: 24px;
    }

    .certificates-grid img {
        height: auto;
        min-height: 190px;
    }

    .main-footer {
        gap: 24px;
        padding: 34px 6%;
    }

    .legal-content {
        width: 88%;
        padding: 45px 0;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 380px) {
    .main-header {
        padding-inline: 10px;
    }

    .nav-links a {
        font-size: 13px;
        letter-spacing: 0.5px;
    }

    .hero-section {
        min-height: 350px;
    }
}

/* Animationen respektieren die Systemeinstellung der Besucher. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto;
        transition-duration: 0.01ms !important;
    }
}
