/* =============================================================================
 * Tour Detail — Hawaii templejt scoped styles (Sesija 4, 2026-05-31).
 *
 * Učitava se SAMO na `/{archive-slug}/{tour-slug}` stranici preko
 * `<link>` u app/views/tours/detail.php. Sve klase su scoped pod
 * `.tour-detail` wrapper-om da ne kontaminiraju globalni dizajn.
 *
 * Klase iz Hawaii templejta (03-Detalji-tura-1.html <style> blok):
 *   - .tab-buttons-wrap, .tab-button, .tab-button.active
 *   - .tab-content, .tab-content.active
 *   - .itinerary-item, .itinerary-icon
 *   - .carousel-container, .carousel-slide, .carousel-button
 *   - .start-time-option, .time-separator
 *   - .badge-wrap, .badges
 *   - .reservation-sidebar
 *   - .review (review kartica sa avatar + ime + country + body)
 * ===========================================================================*/

/* === Image Carousel === */
.tour-detail .carousel-container {
    position: relative;
    width: 100%;
    height: 602px;
    overflow: hidden;
}

.tour-detail .carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.tour-detail .carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.tour-detail .carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tour-detail .carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #222;
    border: none;
    width: 100%;
    max-width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    padding: 0;
}

.tour-detail .carousel-button:hover {
    background: #d4af37;
}

.tour-detail .carousel-button.prev { left: 20px; }
.tour-detail .carousel-button.next { right: 20px; }

/* Badge overlay row (bottom-left preko carousel-a, paritet sa Hawaii dizajnom) */
.tour-detail .badge-wrap {
    position: relative;
}

.tour-detail .badges {
    bottom: 20px;
    left: 20px;
    z-index: 10;
}

@media (max-width: 768px) {
    .tour-detail .badges {
        bottom: 10px;
        left: 10px;
    }
}

/* === Tabbed Navigation === */
.tour-detail .tab-buttons-wrap {
    background-color: #F5F5F5;
}

.tour-detail .tab-button {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    color: #222;
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0.35px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.5s;
    padding: 20px 10px;
}

.tour-detail .tab-button.active {
    background: linear-gradient(90deg, #9d6321 0%, #e2dc90 50%, #9d6321 100%);
    color: #fff;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-detail .tab-content {
    display: none;
    padding: 50px 43px;
    background-color: #fff;
    box-shadow: 0px 0px 20px 0px #0000001F;
}

.tour-detail .tab-content.active {
    display: block;
}

/* === Itinerary === */
.tour-detail .itinerary-item {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.tour-detail .itinerary-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-top: 4px;
}

/* === Reservation Sidebar === */
.tour-detail .reservation-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 163px;
    height: fit-content;
}

.tour-detail .start-time-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 9px;
    font-weight: 600;
    font-size: 24px;
    color: #D4AF37;
    background: transparent;
    border: 2px solid transparent;
    /* cursor: pointer; */
    transition: all 0.2s ease;
    font-family: inherit;
    border-radius: 4px;
    line-height: 1;
    flex: 0 0 33%;
}

/* .tour-detail .start-time-option:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.4);
} */

.tour-detail .start-time-option.is-active,
.tour-detail .start-time-option[aria-pressed="true"] {
    background: #D4AF37;
    color: #fff;
    border-color: #D4AF37;
}

.tour-detail .time-separator {
    width: 1px;
    height: 34px;
    background: #2222221A;
    margin: 0;
}

/* "+N" indikator — sažima polaske preko prva 3 (sprečava overflow box-a).
   Gold paleta paritet sa .start-time-option; klik otkriva .start-times-extra. */
.tour-detail .start-time-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-family: inherit;
    font-weight: 700;
    font-size: 20px;
    line-height: 1;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex: 0 0 100%;
    width: max-content;
    max-width: max-content;
}
.tour-detail .start-time-more:hover {
    background: #D4AF37;
    color: #fff;
    border-color: #D4AF37;
}

/* Otkriveni preostali polasci — wrap red ispod glavnog (ne lomi layout). */
.tour-detail .start-times-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 0px;
    margin-top: 12px;
}
.tour-detail .start-times-extra[hidden] { display: none; }

@media (max-width: 640px) {
    .tour-detail .start-time-more { font-size: 16px !important; }
}

/* Reviews layout je SAV iz hawaii.css `.review { display: grid; }` koji ima
   `!important` — ne dodajemo override-e ovdje. View-i koriste TAČNO Tailwind
   klase iz Hawaii templejta `03-Detalji-tura-1.html:716+` (gap-[35px],
   w-[100px], flex items-center, flex-1, itd.) jer su sve pre-build-ovane
   u hawaii-tailwind.css. */

/* === Responsive === */
@media (max-width: 1024px) {
    .tour-detail .main-content-wrapper {
        flex-direction: column !important;
        gap: 0 !important;
    }
    .tour-detail .reservation-sidebar {
        width: 100% !important;
        position: relative !important;
        top: 0 !important;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .tour-detail .tab-buttons-wrap {
        display: flex !important;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }
    .tour-detail .carousel-container {
        height: 350px;
    }
    .tour-detail .carousel-button {
        max-width: 35px;
        height: 35px;
        max-height: 35px;
    }
    .tour-detail .carousel-button.prev { left: 10px; }
    .tour-detail .carousel-button.next { right: 10px; }
    .tour-detail .tab-content { padding: 25px 15px; }
    .tour-detail .tab-button { font-size: 11px; padding: 15px 5px; }
    .tour-detail .itinerary-item { gap: 8px; margin-bottom: 20px; }
    .tour-detail .itinerary-icon { width: 20px; height: 20px; }
    .tour-detail h1 { font-size: 22px !important; line-height: 28px !important; }
    .tour-detail h2 { font-size: 28px !important; line-height: 36px !important; }
    .tour-detail h3 { font-size: 18px !important; line-height: 22px !important; }
    .tour-detail .start-time-option { font-size: 18px !important; }
    .tour-detail .time-separator { height: 24px; }
    .tour-detail .review { padding: 15px; }
}

@media (max-width: 480px) {
    .tour-detail .carousel-container { height: 280px; }
    .tour-detail h1 { font-size: 18px !important; line-height: 24px !important; }
    .tour-detail h2 { font-size: 24px !important; line-height: 30px !important; }
    .tour-detail .tab-content { padding: 20px 12px; }
}
