/* Critical: Prevent layout shift */
img {
    content-visibility: auto;
}

/* Reduce Cumulative Layout Shift */
.hotel-card img {
    aspect-ratio: 4/3;
}

#hero-slideshow img {
    aspect-ratio: 3/4;
}

@media (min-width: 1024px) {
    #hero-slideshow img {
        aspect-ratio: auto;
    }
}

/* Font Imports */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* Global overflow protection */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

*,
*::before,
*::after {
    max-width: 100%;
}

/* Exempt scrollable containers from max-width constraint */
.service-tabs-bar *,
.filter-tabs-wrapper *,
#filter-tabs,
#desktop-service-tabs,
#mobile-service-tabs {
    max-width: none;
}

/* Gallery grid must not be constrained by the global max-width rule */
#gallery-grid,
#gallery-grid * {
    max-width: none;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

:root {
    /* Modern Palette (Airbnb-esque structure) */
    --color-primary: #d4f249;
    /* Lakshya Lime - Kept for Brand Identity, used sparingly */
    --color-primary-dark: #b8d635;

    --color-text-main: #0f172a;
    /* Slate 900 */
    --color-text-muted: #64748b;
    /* Slate 500 */
    --color-text-light: #94a3b8;
    /* Slate 400 */

    --color-bg-page: #ffffff;
    --color-bg-surface: #f8fafc;
    /* Slate 50 */
    --color-border: #e2e8f0;
    /* Slate 200 */

    /* Variables for components */
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* Base Reset */
body {
    background-color: var(--color-bg-page);
    color: var(--color-text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Cards */
.hotel-card {
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.hotel-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-border);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Smooth Fade In */
.fade-in {
    animation: fadeIn 0.6s ease forwards;
    animation-play-state: paused;
    opacity: 0;
    transform: translateY(10px);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Heart toggle */
.heart-btn.active {
    color: #ef4444;
    background: white;
}

.heart-btn.active i {
    font-weight: 900;
}

/* WhatsApp pulse */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

a[aria-label="Chat on WhatsApp"] {
    animation: pulse-ring 2s infinite;
}

/* Services Dropdown */
#services-panel {
    animation: dropDown 0.15s ease;
    transform-origin: top center;
    box-sizing: border-box;
    overflow: hidden;
}

#services-panel * {
    box-sizing: border-box;
    max-width: 100%;
}

@keyframes dropDown {
    from {
        opacity: 0;
        transform: translate(-50%, -8px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

#services-chevron {
    transition: transform 0.2s ease;
}

#services-chevron.rotate-180 {
    transform: rotate(180deg);
}

#services-panel a:hover {
    background-color: #f8fafc;
}

/* ============================
   PHOTO GALLERY — Hotel Details
   ============================ */

/* Desktop Grid */
#desktop-gallery {
    max-width: 100%;
    overflow: hidden;
}

#desktop-gallery img {
    transition: transform 0.5s ease;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#desktop-gallery .group:hover img {
    transform: scale(1.03);
}

/* Mobile Carousel */
#mobile-gallery {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

#mobile-gallery::-webkit-scrollbar {
    display: none;
}

#mobile-gallery>div {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#mobile-gallery img {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Photo dots active state */
.photo-dot {
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.photo-dot:hover {
    opacity: 0.8;
}

/* Counter pill */
#photo-counter {
    font-variant-numeric: tabular-nums;
}

/* Booking card */
@media (min-width: 1024px) {
    .lg\:sticky {
        position: sticky;
    }
}

/* Date input styling */
input[type="date"] {
    color-scheme: light;
    min-width: 0;
    width: 100%;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.5;
    cursor: pointer;
}

/* Prevent form inputs from causing overflow */
input,
select,
textarea {
    min-width: 0;
    max-width: 100%;
}

/* Mobile booking card adjustments */
@media (max-width: 639px) {

    #price-calc,
    #price-subtotal,
    #price-total {
        font-size: 0.8rem;
    }
}

/* Form validation shake */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.animate-shake {
    animation: shake 0.4s ease;
}

/* Required field highlight */
#detail-name:focus,
#detail-phone:focus {
    border-bottom: 2px solid #0f172a;
    padding-bottom: calc(0.75rem - 2px);
}

/* Mobile rules chips */
@media (max-width: 639px) {
    #rules-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    #rules-grid>div {
        flex-shrink: 0;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
}

/* Description toggle arrow */
#desc-arrow.rotate-180 {
    transform: rotate(180deg);
}

/* Mobile Search Bar on Hero */
#mobile-search-wrapper {
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.12));
}

#mobile-search-wrapper select,
#mobile-search-wrapper input {
    font-size: 13px;
}

#mobile-search-wrapper input[type="date"] {
    min-height: 20px;
}

/* Smooth entrance for mobile search */
@media (max-width: 1023px) {
    #mobile-search-wrapper {
        animation: slideUp 0.5s ease 0.4s both;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Tighten hero spacing on mobile */
    #home {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    /* On mobile, hero text comes after image */
    #home>div {
        gap: 1.5rem;
    }
}

/* Extra small screens (iPhone SE etc) */
@media (max-width: 374px) {
    #mobile-search-wrapper {
        padding-left: 0;
        padding-right: 0;
    }

    #mobile-search-wrapper .bg-white {
        padding: 0.5rem;
        border-radius: 0.75rem;
    }

    #mobile-search-wrapper select,
    #mobile-search-wrapper input {
        font-size: 12px;
    }
}

/* ============================
   CARD SLIDER (Mobile)
   ============================ */

/* Hide scrollbar but keep scroll */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Slider button hover */
#slider-prev:hover,
#slider-next:hover,
#similar-prev:hover,
#similar-next:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

#slider-prev:active,
#slider-next:active,
#similar-prev:active,
#similar-next:active {
    transform: scale(0.95);
}

/* Smooth snap deceleration */
#hotels-slider,
#similar-stays {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* On mobile, add padding for last card peek */
@media (max-width: 767px) {

    #hotels-slider::after,
    #similar-stays::after {
        content: '';
        flex-shrink: 0;
        width: 4px;
    }

    /* Fade edges to hint scrollability */
    #hotels-slider-wrapper::before,
    #similar-slider-wrapper::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 8px;
        background: linear-gradient(to right, rgb(248 250 252), transparent);
        z-index: 5;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s;
    }

    #hotels-slider-wrapper::after,
    #similar-slider-wrapper::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, rgb(248 250 252), transparent);
        z-index: 5;
        pointer-events: none;
    }
}

/* On desktop, remove all slider-specific visuals */
@media (min-width: 768px) {

    #hotels-slider-wrapper::before,
    #hotels-slider-wrapper::after,
    #similar-slider-wrapper::before,
    #similar-slider-wrapper::after {
        display: none;
    }

    #hotels-slider,
    #similar-stays {
        scroll-behavior: auto;
    }
}

/* ============================
   PHOTO GALLERY — Hotel Details
   ============================ */

/* Mobile Carousel */
#mobile-gallery {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

#mobile-gallery::-webkit-scrollbar {
    display: none;
}

#mobile-gallery>div {
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

#mobile-gallery img {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Photo dots */
.photo-dot {
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.photo-dot:hover {
    opacity: 0.8;
}

#photo-counter {
    font-variant-numeric: tabular-nums;
}

/* Desktop Photo Viewer */
#desktop-main-photo {
    transition: background-color 0.3s ease;
    position: relative;
}

#desktop-main-photo img {
    user-select: none;
    -webkit-user-drag: none;
}

#desktop-current-photo {
    transition: opacity 0.2s ease;
}

/* Desktop Thumbnails */
#desktop-thumbnails {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

#desktop-thumbnails::-webkit-scrollbar {
    display: none;
}

.desktop-thumb {
    cursor: pointer;
    transition: all 0.2s ease;
}

.desktop-thumb:hover {
    opacity: 0.85 !important;
    transform: translateY(-1px);
}

.desktop-thumb.border-slate-900 {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

/* Desktop counter */
#desktop-photo-counter {
    font-variant-numeric: tabular-nums;
}

/* Zoom hint */
#desktop-zoom-hint {
    transition: opacity 0.2s ease;
}

/* Photo viewer arrow hover effects */
#desktop-photo-prev,
#desktop-photo-next {
    opacity: 0;
    transition: all 0.2s ease;
}

#desktop-main-photo:hover #desktop-photo-prev,
#desktop-main-photo:hover #desktop-photo-next {
    opacity: 1;
}

#desktop-photo-prev:hover,
#desktop-photo-next:hover {
    background-color: rgba(255, 255, 255, 0.35) !important;
}

/* Responsive heights */
@media (min-width: 768px) and (max-width: 1023px) {
    #desktop-main-photo {
        height: 400px !important;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    #desktop-main-photo {
        height: 460px !important;
    }
}

@media (min-width: 1280px) {
    #desktop-main-photo {
        height: 520px !important;
    }
}

/* Mobile gallery responsive heights */
@media (max-width: 374px) {
    #mobile-gallery>div {
        height: 240px !important;
    }
}

@media (min-width: 375px) and (max-width: 639px) {
    #mobile-gallery>div {
        height: 300px !important;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    #mobile-gallery>div {
        height: 360px !important;
    }
}

#mobile-gallery-wrapper {
    overflow: hidden;
    max-width: 100vw;
}

/* ============================
   PHOTO LIGHTBOX
   ============================ */

#photo-lightbox {
    -webkit-tap-highlight-color: transparent;
}

#lightbox-image {
    user-select: none;
    -webkit-user-drag: none;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
}

/* Thumbnail strip scrollbar hide */
#lightbox-thumbnails {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

#lightbox-thumbnails::-webkit-scrollbar {
    display: none;
}

/* Lightbox button hover */
#lightbox-close:hover,
#lightbox-prev:hover,
#lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

#lightbox-close:active,
#lightbox-prev:active,
#lightbox-next:active {
    transform: scale(0.93);
}

#lightbox-prev {
    transition: all 0.15s ease;
}

#lightbox-next {
    transition: all 0.15s ease;
}

/* Lightbox entrance animation */
#photo-lightbox:not(.hidden) {
    animation: lightboxFadeIn 0.2s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Zoom hint on photos */
@media (max-width: 767px) {

    /* Auto-hide zoom hint after 3 seconds on mobile */
    #mobile-gallery>div>div:last-child {
        animation: hintFade 4s ease forwards;
    }

    @keyframes hintFade {

        0%,
        70% {
            opacity: 1;
        }

        100% {
            opacity: 0;
            pointer-events: none;
        }
    }
}

/* On desktop, show zoom hint only on hover */
@media (min-width: 768px) {
    #desktop-gallery>div {
        cursor: pointer;
    }
}

/* Upload drop zone states */
.drop-zone.dragover {
    border-color: #d4f249 !important;
    background-color: #fefff5 !important;
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.drop-zone {
    transition: all 0.2s ease;
}

/* Uploading photo pulse */
@keyframes uploadPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 0.4;
    }
}

.border-brand-lime img.opacity-70 {
    animation: uploadPulse 1.5s ease infinite;
}

/* Thumbnail active state */
.lightbox-thumb {
    transition: all 0.2s ease;
}

.lightbox-thumb img {
    pointer-events: none;
    user-select: none;
}

/* Logo image protection */
a>img[alt="Lakshya 360 Holidays"] {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

a:has(> img[alt="Lakshya 360 Holidays"]) {
    pointer-events: auto;
}

/* Favicon override */
@media (prefers-color-scheme: dark) {
    img[alt="Lakshya 360 Holidays"] {
        filter: none;
    }
}

/* ============================
   HERO SLIDESHOW
   ============================ */

#hero-slideshow {
    position: absolute !important;
    inset: 0;
}

.hero-slide {
    will-change: opacity;
    backface-visibility: hidden;
}

.hero-slide img {
    user-select: none;
    -webkit-user-drag: none;
}

/* Ken Burns subtle zoom effect on active slide */
.hero-slide.opacity-100 img {
    animation: kenBurns 6s ease-in-out forwards;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.06);
    }
}

/* Reset zoom when slide becomes inactive */
.hero-slide.opacity-0 img {
    transform: scale(1);
    animation: none;
}

/* Dot indicators */
.hero-dot {
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
    height: 10px;
    border-radius: 999px;
}

.hero-dot:hover {
    background-color: rgba(255, 255, 255, 0.7) !important;
}

/* Location label transition */
#slide-location-text {
    transition: opacity 0.3s ease;
}

/* On mobile, move dots above the gradient */
@media (max-width: 1023px) {
    #hero-slideshow .hero-dot {
        width: 8px;
        height: 8px;
    }

    #hero-slideshow .hero-dot.w-6 {
        width: 20px !important;
    }
}

/* Smooth image object position for different aspect ratios */
.hero-slide img {
    object-position: center 30%;
}

@media (max-width: 1023px) {
    .hero-slide img {
        object-position: center 25%;
    }
}

@media (min-width: 1024px) {
    .hero-slide img {
        object-position: center 35%;
    }
}

/* ============================================
   SCROLLBAR HIDE UTILITY
   ============================================ */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ============================================
   MMT-STYLE SERVICE TABS (Hero-Attached)
   ============================================ */

/* Desktop Service Tabs Bar */
.service-tabs-bar {
    display: flex;
    gap: 2px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 4px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow-x: auto;
    scrollbar-width: none;
}

.service-tabs-bar::-webkit-scrollbar {
    display: none;
}

.svc-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
}

.svc-tab i {
    font-size: 13px;
    transition: color 0.2s ease;
}

.svc-tab:hover {
    background: rgba(15, 23, 42, 0.05);
    color: #0f172a;
}

.svc-tab.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.svc-tab.active i {
    color: #d4f249;
}

/* Mobile Service Tabs */
.mob-svc-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 12px 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    color: #94a3b8;
    font-family: inherit;
    border-bottom: 2px solid transparent;
    min-width: 0;
    flex: 1;
}

.mob-svc-tab i {
    font-size: 16px;
    transition: color 0.2s ease;
}

.mob-svc-tab span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.mob-svc-tab:hover {
    color: #64748b;
}

.mob-svc-tab.active {
    color: #0f172a;
    border-bottom-color: #0f172a;
}

/* Desktop Service Content Panels */
.desktop-svc-content {
    animation: svcFadeIn 0.25s ease;
}

/* Mobile Service Content Panels */
.mobile-svc-content {
    animation: svcFadeIn 0.25s ease;
}

@keyframes svcFadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   SCROLLABLE FILTER TABS
   ============================================ */
.filter-tabs-wrapper {
    max-width: 100%;
    position: relative;
}

#filter-tabs {
    gap: 4px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    .filter-tabs-wrapper {
        max-width: calc(100vw - 32px);
    }

    #filter-tabs {
        padding-right: 12px;
    }
}

/* ============================================
   SERVICE CONTENT TRANSITIONS
   ============================================ */
.service-content {
    animation: fadeInContent 0.3s ease;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================
   GALLERY SECTION
   ============================================ */
.gallery-item {
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Masonry-style: make some items span 2 rows */
#gallery-grid .gallery-item:nth-child(5n+1) {
    grid-row: span 2;
}

#gallery-grid .gallery-item:nth-child(7n+4) {
    grid-column: span 2;
}

@media (max-width: 640px) {
    #gallery-grid .gallery-item:nth-child(7n+4) {
        grid-column: span 1;
    }
}

/* Lightbox overlay animation */
#gallery-lightbox {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}