﻿/* =========================================================
   HERO CAROUSEL — fullscreen image + card (cross-fade, 900ms)
   ========================================================= */

.hero-carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    z-index: 0;
}

/* Pozadinske slike (dva sloja) */
.hero-carousel-container .hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.9) contrast(1.05);
    z-index: 0;
    opacity: 0;
    transition: opacity 900ms ease-in-out;
    /* ⬅︎ */
    will-change: opacity;
}

.hero-carousel-container .hero-bg.is-active {
    opacity: 1;
}

/* Tamni overlay iznad slika (radi čitljivosti teksta) */
.hero-carousel-container::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, .10) 40%, rgba(0, 0, 0, .05) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Kartica */
.hero-carousel-container .hero-card {
    position: absolute;
    right: clamp(32px, 6vw, 80px);
    bottom: clamp(32px, 6vw, 80px);
    width: min(520px, 40vw);
    background: #fff;
    color: #111;
    padding: 24px 28px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, .06);
    box-shadow: 0 18px 36px rgba(0, 0, 0, .25);
    z-index: 2;
    transition: transform .25s ease, box-shadow .25s ease;
}

.hero-carousel-container .hero-card-title {
    font-size: 1.9rem;
    font-weight: 800;
    margin: 0 0 .5rem 0;
}

.hero-carousel-container .hero-card-text {
    font-size: 1.05rem;
    line-height: 1.55;
    color: #333;
    margin: 0;
}

@media (hover:hover) and (pointer:fine) {
    .hero-carousel-container .hero-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 22px 48px rgba(0, 0, 0, .32);
    }
}

/* Kontrole (Prev / Next) */
.hero-control {
    position: absolute;
    top: 50%;
    translate: 0 -50%;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.8);
    color: #111;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero-control:hover {
    background: #fff;
    scale: 1.1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Show arrows on hover over the container */
.hero-carousel-container:hover .hero-control {
    opacity: 1;
    pointer-events: auto;
}

.hero-control.prev {
    left: calc(3vw + 20px);
}

.hero-control.next {
    right: calc(3vw + 20px);
}

/* Indikatori (tačkice) */
.hero-indicators {
    position: absolute;
    left: 50%;
    bottom: 18px;
    translate: -50% 0;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-indicators .dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .25);
    cursor: pointer;
    padding: 0;
}

.hero-indicators .dot.active {
    background: #fff;
}

/* Responsivnost */
@media (max-width: 992px) {
    .hero-carousel-container {
        height: 75vh;
    }

    .hero-carousel-container .hero-card {
        width: min(560px, 72vw);
        right: clamp(16px, 4vw, 48px);
        bottom: clamp(16px, 4vw, 48px);
        padding: 20px 22px;
    }

    .hero-carousel-container .hero-card-title {
        font-size: 1.6rem;
    }

    .hero-carousel-container .hero-card-text {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-carousel-container {
        height: 100vh !important;
    }

    .hero-carousel-container .hero-card {
        width: calc(100% - 32px);
        /* Malo uže od ivice */
        left: 16px;
        right: 16px;
        bottom: 85px;
        /* Malo više gore zbog navigacije telefona */
        padding: 16px 18px;
        /* Kompaktniji padding */
        border-radius: 16px;
        /* Blur effect za eleganciju */
        backdrop-filter: blur(8px);
        background: rgba(255, 255, 255, 0.92);
    }

    .hero-card-title {
        font-size: 1.25rem;
        /* Smanjeno sa 1.9rem -> elegantnije */
        margin-bottom: 0.4rem;
        line-height: 1.25;
        font-weight: 700;
    }

    .hero-card-text {
        font-size: 0.85rem !important;
        /* Sitniji tekst */
        line-height: 1.4;
        color: #444;
        /* Malo mekša crna */
    }

    /* Sakrivanje kontrola na mobilnom */
    .hero-control {
        display: none;
    }

    /* Indikatori bliže dnu */
    .hero-indicators {
        bottom: 20px;
    }

    .hero-indicators .dot {
        width: 8px;
        height: 8px;
        background: rgba(255, 255, 255, 0.4);
        border-color: rgba(255, 255, 255, 0.8);
    }

    .hero-indicators .dot.active {
        background: #fff;
        transform: scale(1.2);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-carousel-container .hero-bg {
        transition: none !important;
    }

    .hero-carousel-container .hero-card {
        transition: none !important;
    }
}