/*
 * Vondra.cz – lehký Hero slider
 * Verze 1.1.0
 *
 * Úpravy:
 * - přístupnější klikací plocha navigačních teček 48 × 48 px
 * - malé tečky jsou vykreslené pomocí ::before
 * - mobilní šipky mají minimálně 48 × 48 px
 */

.rv-hero {
    --rv-hero-arrow-size: 48px;
    --rv-hero-control-bg: rgba(0, 0, 0, 0.44);
    --rv-hero-control-bg-hover: rgba(0, 0, 0, 0.68);
    --rv-hero-focus: #ffffff;

    position: relative;
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #111111;
    isolation: isolate;
    touch-action: pan-y;
}

.rv-hero,
.rv-hero * {
    box-sizing: border-box;
}

.rv-hero__viewport,
.rv-hero__track,
.rv-hero__slide {
    position: absolute;
    inset: 0;
}

.rv-hero__slide {
    z-index: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 700ms ease,
        visibility 0s linear 700ms;
}

.rv-hero__slide.is-active {
    z-index: 1;
    opacity: 1;
    visibility: visible;
    transition:
        opacity 700ms ease,
        visibility 0s linear 0s;
}

.rv-hero__image {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center;
}

.rv-hero__arrow,
.rv-hero__dot {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    font: inherit;
    line-height: 1;
    cursor: pointer;
}

/* Šipky */

.rv-hero__arrow {
    display: none;
    position: absolute;
    z-index: 3;
    top: 50%;
    width: var(--rv-hero-arrow-size);
    height: var(--rv-hero-arrow-size);
    padding: 0;
    border-radius: 50%;
    color: #ffffff;
    background: var(--rv-hero-control-bg);
    transform: translateY(-50%);
    transition:
        background-color 180ms ease,
        transform 180ms ease;
}

.rv-hero.is-ready .rv-hero__arrow {
    display: grid;
    place-items: center;
}

.rv-hero__arrow--prev {
    left: 18px;
}

.rv-hero__arrow--next {
    right: 18px;
}

.rv-hero__arrow:hover {
    background: var(--rv-hero-control-bg-hover);
}

.rv-hero__arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.rv-hero__arrow svg {
    width: 25px;
    height: 25px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Navigační tečky */

.rv-hero__dots {
    display: none;
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 0;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    transform: translateX(-50%);
}

.rv-hero.is-ready .rv-hero__dots {
    display: flex;
}

.rv-hero__dot {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    transform: none;
}

.rv-hero__dot::before {
    content: "";
    display: block;
    width: 9px;
    height: 9px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    background: transparent;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        transform 180ms ease;
}

.rv-hero__dot:hover {
    transform: none;
}

.rv-hero__dot:hover::before {
    transform: scale(1.2);
}

.rv-hero__dot.is-active {
    background: transparent;
}

.rv-hero__dot.is-active::before {
    border-color: #ffffff;
    background: #ffffff;
}

/* Klávesnice a focus */

.rv-hero__arrow:focus-visible,
.rv-hero:focus-visible {
    outline: 3px solid var(--rv-hero-focus);
    outline-offset: 3px;
}

.rv-hero__dot:focus-visible {
    outline: 2px solid var(--rv-hero-focus);
    outline-offset: -7px;
}

/* Pomocná třída pro text dostupný jen čtečkám obrazovky. */

.rv-hero__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Mobil */

@media (max-width: 767px) {
    .rv-hero {
        --rv-hero-arrow-size: 48px;
    }

    .rv-hero__arrow--prev {
        left: 8px;
    }

    .rv-hero__arrow--next {
        right: 8px;
    }

    .rv-hero__dots {
        bottom: 0;
    }

    .rv-hero__dot::before {
        width: 8px;
        height: 8px;
    }
}

/* Omezení animací */

@media (prefers-reduced-motion: reduce) {
    .rv-hero__slide,
    .rv-hero__arrow,
    .rv-hero__dot,
    .rv-hero__dot::before {
        transition: none;
    }
}