/* Carousel na hlavnej stranke (rovnaky princip ako titi.shopweb.sk).
   Logika: assets/js/home-carousel.js, dlzku slajdu (--hc-ms) nastavuje JS. */
.hc { position: relative; }
.hc-slides { position: relative; overflow: hidden; }

/* Aktivny slajd drzi vysku. Odchadzajuci ostava pod nim, kym ho novy cely neprekryje
   - pocas prelinania tak nepresvita pozadie. */
.hc-slide {
    position: absolute; top: 0; left: 0; right: 0;
    z-index: 1; opacity: 0; visibility: hidden;
    transition: opacity 0s .7s, visibility 0s .7s;
}
.hc-slide.is-active {
    position: relative; z-index: 2; opacity: 1; visibility: visible;
    transition: opacity .7s ease, visibility 0s;
}
.hc-slide a { display: block; }

/* Pomale priblizenie; navrat na povodnu velkost az po doznieni prelinania. */
.hc-img { display: block; width: 100%; height: auto; transform: scale(1); transition: transform 0s .8s; }
.hc-slide.is-zoom .hc-img { transform: scale(1.04); transition: transform 7s ease-out; }

.hc-arrow {
    position: absolute; top: 50%; z-index: 10; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .8); color: #1f2937;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    transition: background-color .15s;
}
.hc-arrow:hover { background: #fff; }
.hc-prev { left: 16px; }
.hc-next { right: 16px; }

/* Tmavy podklad: bannery TSV byvaju dole svetle a biele bodky by na nich nebolo vidno. */
.hc-dots {
    position: absolute; left: 50%; bottom: 14px; z-index: 10; transform: translateX(-50%);
    display: flex; gap: 8px; padding: 6px 8px; border-radius: 12px; background: rgba(15, 23, 42, .45);
}
.hc-dot {
    position: relative; width: 12px; height: 12px; padding: 0; border: 0; border-radius: 6px; overflow: hidden;
    background: rgba(255, 255, 255, .5); transition: width .3s, background-color .3s;
}
.hc-dot:not(.is-active):hover { background: rgba(255, 255, 255, .75); }
.hc-dot.is-active { width: 40px; }
.hc-arrow:focus-visible, .hc-dot:focus-visible { outline: 2px solid #0d6efd; outline-offset: 2px; }

/* Indikator sa plni presne pocas casu do dalsieho slajdu. */
.hc-progress { position: absolute; top: 0; right: 0; bottom: 0; left: 0; border-radius: 6px; background: #fff; transform: scaleX(0); transform-origin: left; }
.hc-dot.is-running .hc-progress { animation: hc-progress var(--hc-ms, 5000ms) linear forwards; }
@keyframes hc-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (prefers-reduced-motion: reduce) {
    .hc-slide, .hc-slide.is-active, .hc-img, .hc-slide.is-zoom .hc-img, .hc-dot { transition: none; }
    .hc-slide.is-zoom .hc-img { transform: none; }
    .hc-dot.is-running .hc-progress { animation: none; transform: none; }
}
