/* Five-view species hero carousel. Frozen /kus/246 never loads this file. */
.species-hero-carousel {
    width: 100%;
    max-width: 100%;
    margin: 0 0 22px;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #d8e2dd;
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.species-hero-carousel-track {
    display: flex;
    width: 100%;
    height: 400px;
    overflow-x: auto;
    overflow-y: hidden;
    direction: ltr;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.species-hero-carousel-track::-webkit-scrollbar { display: none; }

.species-hero-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    background: #f4f0e6;
}

.species-hero-slide .detail-main-img-plate {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none;
    user-select: none;
}

/* Keep locked reference /kus/342 byte-for-byte in its established layout. */
body:not(:has(#detail-map[data-bird-id="342"])) .species-hero-carousel-track {
    height: auto;
    aspect-ratio: 3 / 2;
}

body:not(:has(#detail-map[data-bird-id="342"])) .species-hero-slide .detail-main-img-plate {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 0 !important;
}

.species-hero-carousel-nav {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
    min-height: 58px;
    padding: 7px 10px;
    box-sizing: border-box;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.species-hero-arrow {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #c8dbd2;
    border-radius: 50%;
    background: #edf7f2;
    color: #17624c;
    font-size: .9rem;
    cursor: pointer;
}

.species-hero-arrow:hover { background: #dff1e8; }
.species-hero-arrow:focus-visible { outline: 3px solid #f5b841; outline-offset: 2px; }

.species-hero-position {
    min-width: 0;
    text-align: center;
}

.species-hero-current-label {
    display: block;
    overflow: hidden;
    color: #173e33;
    font-size: .76rem;
    font-weight: 850;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.species-hero-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 5px;
}

.species-hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #c7d6cf;
    cursor: pointer;
}

.species-hero-dot[aria-current="true"] {
    width: 22px;
    border-radius: 999px;
    background: #17624c;
}

.species-hero-dot:focus-visible { outline: 2px solid #f5b841; outline-offset: 3px; }

@media (max-width: 760px) {
    .species-hero-carousel {
        margin-bottom: 4px;
        border-radius: 17px;
    }
    .species-hero-carousel-track {
        height: auto;
        aspect-ratio: 3 / 2;
    }
    .species-hero-carousel-nav {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
        min-height: 56px;
        padding: 7px 8px;
    }
    .species-hero-arrow {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .species-hero-carousel-track { scroll-behavior: auto; }
}

@media print {
    .species-hero-carousel-nav { display: none; }
    .species-hero-carousel-track { overflow: hidden; }
    .species-hero-slide:not(:first-child) { display: none; }
}
