body {
    font-family: Arial, sans-serif;
    background: #ffffff;
    scroll-snap-type: y mandatory;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    padding-top: calc(56px + env(safe-area-inset-top, 0px));
}

html {
    overflow-y: scroll;
}

.section {
    scroll-snap-align: start;
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 5rem 0 2rem 0;
}

#wurfplanung {
    padding-bottom: 1rem !important;
}

#kontakt {
    padding-top: 1.5rem !important;
}

.section-overlay {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    max-width: 95vw;
    margin: 0 auto;
}

#hero {
    background: transparent;
    min-height: auto;
    padding: 4rem 0 1rem 0;
    color: #212529;
}

#hero .display-3 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

#hero .lead {
    font-size: 1.5rem;
    font-weight: 400;
    opacity: 0.85;
    margin-bottom: 0;
}

.logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: none;
    background: transparent;
    transition: transform 0.3s ease;
    margin-top: 2px;
}

.logo-img:hover {
    transform: scale(1.05);
}

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

.ezfg-logo:hover {
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .logo-img, .ezfg-logo {
        height: 50px;
    }
}

.navbar-brand {
    padding-top: 0;
    padding-bottom: 0;
}

.dog-carousel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* === DEZENTER FOCUS NUR BEI TASTATUR === */
.dog-carousel:focus-visible {
    outline: 1px #666;
    outline-offset: 6px;
    border-radius: 18px;
}

.carousel-main-row {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
    height: auto;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0.6;
    outline: none;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:focus-visible {
    background: rgba(0, 0, 0, 0.8);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* FIX: immer exakt quadratisch + stabile Höhe */
.main-image-wrapper {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.main-image {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center;
    display: block;
    border-radius: 14px;
    background: transparent;
    transition: opacity 0.3s;
}

.thumbnails-wrapper {
    display: flex;
    justify-content: center;
}

.thumbnails {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-start;
    max-width: 80%;
    padding: 8px 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-gutter: stable;
}

.thumbnails::-webkit-scrollbar {
    height: 6px;
}

.thumbnails::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

.thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.thumb {
    width: 72px !important;
    height: 72px !important;
    object-fit: cover !important;
    object-position: center;
    border-radius: 10px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    flex: 0 0 72px;
    display: block;
    background: #eee;
    scroll-snap-align: center;
}

.thumb:hover {
    border-color: #212529;
    transform: scale(1.08);
}

.thumb.active {
    border-color: #212529;
    box-shadow: 0 0 0 2px white, 0 0 0 2px #212529;
}

/* ================= MOBILE ANPASSUNGEN ================= */

.email-link {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .section { 
        min-height: 80vh; 
        padding: 4rem 0 1.5rem 0;
    }
    .section-overlay { 
        padding: 1.5rem; 
    }

    #hero {
        padding: 5rem 0 1.5rem 0;
    }
    #hero .display-3 {
        font-size: 2.8rem;
    }
    #hero .lead {
        font-size: 1.3rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1.3rem;
        opacity: 0.5;
    }
    .carousel-btn.prev { left: 8px; }
    .carousel-btn.next { right: 8px; }

    .main-image-wrapper {
        aspect-ratio: 1 / 1;
        max-width: 100%;
    }

    .thumbnails {
        max-width: 100%;
        gap: 6px;
    }
    .thumb {
        width: 58px !important;
        height: 58px !important;
        flex: 0 0 58px;
    }

    .dog-carousel:focus-visible {
        outline: 1px #777;
        outline-offset: 4px;
    }
}

footer { 
    scroll-snap-align: none; 
    min-height: auto; 
    background: #f8f9fa;
    padding: 1rem 0;
}

@supports not (scroll-snap-type: y mandatory) {
    .section { scroll-snap-align: none; }
}

.navbar-fixed-safe {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding-top: env(safe-area-inset-top, 0px) !important;
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.1);
}

@supports not (padding-top: env(safe-area-inset-top)) {
    .navbar-fixed-safe {
        padding-top: 20px !important;
    }
}

@media (max-width: 576px) {
    body {
        padding-top: calc(50px + env(safe-area-inset-top, 0px));
    }
}

.section-overlay p {
    text-align: justify;
    hyphens: auto;
}

@media (prefers-color-scheme: dark) {
    body {
        background: #121212;
        color: #e0e0e0;
    }

    #hero {
        color: #e0e0e0;
    }

    .section-overlay {
        background-color: rgba(18, 18, 18, 0.98);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    }

    .navbar-fixed-safe {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-image-wrapper {
        background: #1f1f1f;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    }

    .thumb {
        background: #333;
    }

    .thumb:hover,
    .thumb.active {
        border-color: #e0e0e0;
    }

    .thumb.active {
        box-shadow: 0 0 0 2px #121212, 0 0 0 2px #e0e0e0;
    }

    .carousel-btn {
        background: rgba(255, 255, 255, 0.4);
        color: #121212;
    }

    .carousel-btn:hover,
    .carousel-btn:focus-visible {
        background: rgba(255, 255, 255, 0.8);
    }

    .dog-carousel:focus-visible {
        outline: 1px #aaa;
        outline-offset: 6px;
    }

    footer {
        background: #1f1f1f;
    }

    .ezfg-logo {
        background: #ffffff;
    }
}