/* Hero Slider */
.hero-slider {
    position: relative;
    height: 96vh;
    min-height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 228px !important;
}

.slider-nav {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 3;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: white;
    transform: scale(1.2);
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0;
    background-color: #f9fafb;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 4/3;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .hero-slider {
        height: 70vh;
    }
    
    .slide-content {
        margin: 0 1rem;
        padding: 1rem;
    }
}

/* Amber/orange borders for form fields (front site — overrides Tailwind gray borders) */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="reset"]):not([type="image"]),
select,
textarea {
    border-color: #d97706 !important; /* amber-600 */
}
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):not([type="reset"]):not([type="image"]):focus,
select:focus,
textarea:focus {
    border-color: #ea580c !important; /* orange-600 */
    box-shadow: 0 0 0 1px #ea580c;
    outline: none;
}

/* Detail tour/package hero: show full photo (no crop); empty bands use background */
.detail-hero-shell {
    background-color: rgb(15 23 42);
}
.detail-hero-shell > img:not([aria-hidden="true"]) {
    object-fit: contain !important;
    transform: scale(1.08);
    transform-origin: center center;
}

/* Mobile: remove slate “bar” under the photo (letterboxing from object-fit:contain) */
@media (max-width: 768px) {
    .detail-hero-shell {
        background-color: #000;
        height: 400px !important;
        max-height: 1000px !important;
        margin-top: 0px !important;
    }
    /* Fill hero height on mobile (no letterboxing from contain) */
    .detail-hero-shell > img:not([aria-hidden="true"]) {
        object-fit: fill !important;
        object-position: center center;
        transform: none;
        margin-top: 0;
    }
}

/* Hero scrim: lighter than default bg-black/10 so the photo reads clearer */
.detail-hero-shell > .absolute.inset-0:not(.z-10) {
    background-color: rgba(246, 246, 246, 0.124) !important;
}

/* Detail tour/package hero: room for long titles, safe areas, avoid overlap with fixed WhatsApp */
.detail-hero-shell > div.absolute.z-10 {
    box-sizing: border-box;
    padding-bottom: max(4.5rem, calc(env(safe-area-inset-bottom, 0px) + 3rem)) !important;
    padding-right: max(1.25rem, calc(4.75rem + env(safe-area-inset-right, 0px))) !important;
}

/* Mobile: drop extra bottom/right padding (match Tailwind pb-12 + px-4 / sm:px-6) */
@media (max-width: 639.98px) {
    .detail-hero-shell > div.absolute.z-10 {
        padding-bottom: 1rem !important;
        padding-right: 1rem !important;
    }
}
@media (min-width: 640px) and (max-width: 768px) {
    .detail-hero-shell > div.absolute.z-10 {
        padding-bottom: 3rem !important;
        padding-right: 1.5rem !important;
    }
}

.detail-hero-shell .text-white {
    max-width: min(52rem, 100%);
}

/* Detail hero title: fixed 30px (overrides Tailwind text-4xl / md:text-5xl / text-6xl on detail pages) */
.detail-hero-shell h1 {
    font-size: 30px !important;
    font-weight: 500 !important; /* medium; overrides Tailwind .font-bold (700) */
    line-height: 1.25;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.78), 0 1px 4px rgba(0, 0, 0, 0.9);
}

@media (max-width: 768px) {
    .detail-hero-shell h1 {
        font-size: 20px !important;
        line-height: 1.2em;
    }
}

.detail-hero-shell .text-white div.flex {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.75);
}

/* Tour/package card excerpts: full-width lines (justify). All breakpoints — was mobile-only and weak vs line-clamp. */
p[class*="line-clamp"] {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    overflow-wrap: break-word;
    word-break: break-word;
    /* Tighten word gaps (justify stretches spaces; narrower on mobile below) */
    word-spacing: -1.06px;
}

@media (max-width: 768px) {
    .text-3xl {
        font-size: 20px;
        line-height: 2.25rem;
    }

    p[class*="line-clamp"] {
        word-spacing: -0.12em;
    }
}

/* Itinerary day accordion: closed vs open (open height: inline/JS or none) + fade/slide */
#detailItineraryAccordion .detail-itinerary-content {
    overflow: hidden;
    transition:
        max-height 0.55s cubic-bezier(0.32, 0.72, 0, 1),
        opacity 0.42s cubic-bezier(0.33, 1, 0.68, 1) 0.05s,
        transform 0.48s cubic-bezier(0.32, 0.72, 0, 1),
        margin-top 0.38s ease,
        padding-bottom 0.38s ease;
}
#detailItineraryAccordion .detail-itinerary-content:not(.is-open) {
    max-height: 0;
    margin-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translate3d(0, -0.4rem, 0);
    pointer-events: none;
}
#detailItineraryAccordion .detail-itinerary-content.is-open {
    max-height: none; /* no flash before JS; then optional inline px/ none from detail-itinerary-accordion.js */
    margin-top: 0.5rem; /* was Tailwind mt-2 */
    padding-bottom: 0.1rem;
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}
#detailItineraryAccordion .detail-itinerary-badge {
    transition:
        background-color 0.35s ease,
        color 0.35s ease,
        transform 0.4s cubic-bezier(0.32, 0.72, 0, 1),
        box-shadow 0.35s ease;
}
#detailItineraryAccordion .detail-itinerary-badge[aria-expanded="true"] {
    transform: scale(1.04);
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.28);
}
@media (prefers-reduced-motion: reduce) {
    #detailItineraryAccordion .detail-itinerary-content,
    #detailItineraryAccordion .detail-itinerary-badge {
        transition: none;
    }
    #detailItineraryAccordion .detail-itinerary-content:not(.is-open),
    #detailItineraryAccordion .detail-itinerary-content.is-open {
        transform: none;
    }
    #detailItineraryAccordion .detail-itinerary-badge[aria-expanded="true"] {
        transform: none;
        box-shadow: none;
    }
}

/* Tour/package detail: booking sidebar — visible on mobile (top) + desktop (right) */
@media (max-width: 1023.98px) {
    section.py-16.bg-white > .max-w-7xl > .grid.grid-cols-1.lg\:grid-cols-3 > .lg\:col-span-2 {
        order: 2;
    }
    section.py-16.bg-white > .max-w-7xl > .grid.grid-cols-1.lg\:grid-cols-3 > .lg\:col-span-1 {
        order: 1;
        display: block !important;
        visibility: visible !important;
        width: 100%;
    }
    .detail-booking-sidebar {
        position: static !important;
        top: auto !important;
    }
}

@media (min-width: 1024px) {
    .detail-booking-sidebar {
        position: sticky;
        top: 1rem;
        z-index: 5;
    }
}

.detail-mobile-book-bar {
    display: none;
}

@media (max-width: 1023.98px) {
    body.has-detail-mobile-book-bar {
        padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    }
    .detail-mobile-book-bar {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9998;
        padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 251, 235, 0.98);
        border-top: 1px solid #fcd34d;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    }
    .detail-mobile-book-bar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.875rem 1rem;
        background: #d97706;
        color: #fff !important;
        font-weight: 600;
        font-size: 1.05rem;
        border-radius: 0.5rem;
        text-decoration: none;
    }
    .detail-mobile-book-bar__btn:hover {
        background: #b45309;
    }
}

