/* Carusel imagini The Icon (acelasi model ca facilitatile din /apartamente). Folosit in galeria paginilor de apartament. */
.afs-carousel {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    background: #0b1628;
    border: 1px solid rgba(234, 214, 170, .18);
}

.afs-track {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.afs-track::-webkit-scrollbar { display: none; }
.afs-track:focus-visible { outline: 2px solid #ead6aa; outline-offset: -4px; }

.afs-slide {
    position: relative;
    flex: 0 0 100%;
    margin: 0;
    height: 0;
    padding-top: 56.25%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.afs-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.afs-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(8, 16, 32, .72));
    pointer-events: none;
}

.afs-slide figcaption {
    position: absolute;
    left: clamp(18px, 3vw, 36px);
    bottom: clamp(18px, 3vw, 34px);
    z-index: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
    color: #f4efe4;
    font-size: clamp(17px, 1.8vw, 24px);
    font-weight: 500;
    letter-spacing: -.01em;
    text-shadow: 0 2px 16px rgba(4, 9, 20, .6);
}

.afs-slide figcaption span {
    color: #ead6aa;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
}

.afs-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-top: -23px;
    padding: 0;
    border: 1px solid rgba(234, 214, 170, .55);
    border-radius: 50%;
    background: rgba(10, 20, 40, .55);
    backdrop-filter: blur(8px);
    color: #f4efe4;
    cursor: pointer;
    transition: background-color .25s ease, border-color .25s ease;
}

.afs-nav:hover { background: rgba(234, 214, 170, .2); border-color: #ead6aa; }
.afs-nav:focus-visible { outline: 2px solid #ead6aa; outline-offset: 3px; }
.afs-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.afs-prev { left: clamp(12px, 2vw, 22px); }
.afs-next { right: clamp(12px, 2vw, 22px); }

.afs-dots {
    position: absolute;
    right: clamp(18px, 3vw, 36px);
    bottom: clamp(20px, 3vw, 36px);
    z-index: 2;
    display: flex;
    gap: 7px;
}

.afs-dot {
    width: 22px;
    height: 3px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(244, 239, 228, .38);
    cursor: pointer;
    transition: width .35s ease, background-color .35s ease;
}

.afs-dot.is-active { width: 38px; background: #ead6aa; }
.afs-dot:focus-visible { outline: 2px solid #ead6aa; outline-offset: 4px; }


.afs-slide > a {
    position: absolute;
    inset: 0;
    display: block;
    cursor: zoom-in;
}

@media (max-width: 640px) {
    .afs-slide { padding-top: 75%; }
    .afs-nav { width: 40px; height: 40px; margin-top: -20px; }
    .afs-dots { left: 18px; right: auto; bottom: 20px; }
}

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

/* Miniaturi sub slider: rand orizontal, miniatura curenta are contur auriu. */
.afs-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 2px 2px 6px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.afs-thumbs::-webkit-scrollbar { display: none; }
.afs-thumb {
    flex: 0 0 auto;
    width: clamp(84px, 11vw, 132px);
    aspect-ratio: 3 / 2;
    padding: 0;
    border: 1px solid rgba(234, 214, 170, .28);
    border-radius: 8px;
    background: transparent !important;
    overflow: hidden;
    opacity: .62;
    cursor: pointer;
    scroll-snap-align: center;
    transition: opacity .25s ease, border-color .25s ease;
}
.afs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.afs-thumb:hover { opacity: .9; }
.afs-thumb.is-active { opacity: 1; border-color: #ead6aa; box-shadow: 0 0 0 1px #ead6aa; }
.afs-thumb:focus-visible { outline: 2px solid #ead6aa; outline-offset: 3px; }
