.foto-tanatorio {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    overflow: clip;
    border-radius: .4rem;
    background: #101627;
}

.foto-tanatorio > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.foto-tanatorio.foto-tanatorio--encuadrada > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 1152px;
    height: 2048px;
    max-width: none;
    transform-origin: 0 0;
}

.foto-tanatorio--hero {
    max-width: 320px;
    margin-inline: auto;
}

.foto-tanatorio-tarjeta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 2 / 3;
}

.foto-tanatorio-tarjeta > .foto-tanatorio {
    width: 84.375%;
}

.ratio > .foto-tanatorio.foto-tanatorio--contenida {
    left: 50%;
    width: 42.1875%;
    height: 100%;
    transform: translateX(-50%);
}

.tv-slider {
    display: none;
    position: absolute;
    left: 6.4%;
    top: 34.3%;
    width: 86.1%;
    height: 32.6%;
    overflow: hidden;
    border-radius: 3%;
    background: #0d1c43;
}

.foto-tanatorio--encuadrada .tv-slider--listo {
    display: block;
}

.tv-slider > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transition: opacity .7s ease;
}

.tv-slider > img.tv-slider--activa {
    opacity: 1;
}

.tv-slider-controles {
    display: none;
    position: absolute;
    top: 76%;
    left: 6.4%;
    width: 86.1%;
    align-items: center;
    justify-content: center;
    gap: .35rem;
}

.foto-tanatorio--encuadrada:has(.tv-slider--listo) .tv-slider-controles {
    display: flex;
}

.tv-slider-controles > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.tv-slider-controles > button[data-tv-foto]::before {
    content: '';
    width: 6px;
    height: 6px;
    border: 1px solid #fff;
    border-radius: 50%;
}

.tv-slider-controles > button[aria-current="true"]::before {
    background: #fff;
}

.tv-slider-controles > button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .tv-slider > img { transition: none; }
}
