/* ============================================================
    assets/css/style.css — VillaBooking Main Stylesheet
   ============================================================ */

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    --primary:       #0d4f9f;
    --primary-dark:  #0a3973;
    --primary-light: #eaf2ff;
    --accent:        #f3b81a;
    --accent-dark:   #d79d10;
    --dark:          #0b2448;
    --text:          #24364d;
    --muted:         #546174;
    --border:        #d7e3f2;
    --shadow:        0 6px 24px rgba(9, 52, 106, .08);
    --shadow-lg:     0 14px 38px rgba(9, 52, 106, .14);
    --radius:        12px;
    --radius-lg:     20px;
    --transition:    .25s ease;
}

/* ── Reset / Base ─────────────────────────────────────────── */
* { box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: #f5f8fc;
    padding-top: 0;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ── Bootstrap Primary Override ──────────────────────────── */
.btn-primary         { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover   { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-primary:focus, .btn-primary:active { box-shadow: 0 0 0 .2rem rgba(13,79,159,.35); }
.text-primary        { color: var(--primary) !important; }
.bg-primary          { background-color: var(--primary) !important; }
.border-primary      { border-color: var(--primary) !important; }

.btn-accent          { background: var(--accent); border-color: var(--accent); color: #1a2332; font-weight: 600; }
.btn-accent:hover    { background: var(--accent-dark); border-color: var(--accent-dark); color: #1a2332; }
.text-accent         { color: var(--accent); }
.bg-accent           { background: var(--accent) !important; }

/* ── Navigation ───────────────────────────────────────────── */
#mainNav {
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
    padding: .875rem 0;
}
#mainNav.scrolled {
    background: linear-gradient(90deg, #0a3973 0%, #0d4f9f 100%);
    box-shadow: 0 6px 18px rgba(11,36,72,.25);
}
#mainNav .navbar-brand {
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    letter-spacing: .1px;
    font-weight: 700;
}
#mainNav .nav-link {
    font-weight: 500;
    padding: .4rem .75rem;
    position: relative;
    color: #fff !important;
    opacity: 1;
    transition: color var(--transition);
}
#mainNav .nav-link:hover,
#mainNav .nav-link:focus {
    color: var(--accent) !important;
}
#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: .75rem; right: .75rem;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform var(--transition);
}
#mainNav .nav-link:hover::after { transform: scaleX(1); }

#mainNav:not(.scrolled) .navbar-toggler {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.55) !important;
    border-radius: 12px;
    background: rgba(255,255,255,.15);
    box-shadow: 0 6px 14px rgba(0,0,0,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background var(--transition), border-color var(--transition), transform var(--transition);
    --bs-navbar-toggler-focus-width: 0;
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.98%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

#mainNav:not(.scrolled) .navbar-toggler:hover,
#mainNav:not(.scrolled) .navbar-toggler:focus-visible {
    background: rgba(255,255,255,.24);
    border-color: rgba(255,255,255,.9) !important;
    transform: translateY(-1px);
}

#mainNav .navbar-toggler-icon {
    width: 1.22em;
    height: 1.22em;
}

#mainNav.scrolled .navbar-toggler {
    border: 0 !important;
    background: transparent;
    box-shadow: none;
    transform: none;
}

#mainNav.scrolled .navbar-toggler:hover,
#mainNav.scrolled .navbar-toggler:focus-visible {
    background: transparent;
    border: 0 !important;
    box-shadow: none;
    transform: none;
}

.btn-call-hotline {
    background: #d72638;
    border: 1px solid #d72638;
    color: #fff;
    font-weight: 700;
    border-radius: 999px;
    padding: .45rem .95rem;
    line-height: 1.2;
    white-space: nowrap;
}
.btn-call-hotline:hover,
.btn-call-hotline:focus {
    background: #b91e2e;
    border-color: #b91e2e;
    color: #fff;
}

.btn-call-hotline-mobile {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero-section {
    position: relative;
    min-height: 88vh;
    width: 100%;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(122deg, rgba(6,30,67,.42) 0%, rgba(9,52,106,.35) 45%, rgba(13,79,159,.22) 100%),
        linear-gradient(to top, rgba(3,18,41,.22) 0%, rgba(3,18,41,0) 48%),
        url('../images/banner2.png');
    background-size: cover;
    background-position: center 58%;
    background-attachment: scroll;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(7,33,72,.14) 0%, rgba(7,33,72,0) 55%);
    pointer-events: none;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 24% 66%, rgba(243,184,26,.14) 0%, transparent 58%),
        radial-gradient(ellipse at 78% 10%, rgba(255,255,255,.14) 0%, transparent 42%);
}
.hero-content { position: relative; z-index: 2; margin-top: 100px; }
.hero-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: .2px;
    text-shadow: 0 2px 16px rgba(0,0,0,.4);
    line-height: 1.15;
}
.text-white-75 { color: rgba(255,255,255,.75) !important; }
.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: .2px;
    text-shadow: 0 2px 16px rgba(0,0,0,.4);
    line-height: 1.15;
    color: var(--accent);
    font-size: calc(1.575rem + 3.9vw);
}

/* Hero Search Box */
.hero-search-box {
    background: rgba(255,255,255,.97);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    backdrop-filter: blur(8px);
    max-width: 900px;
    margin: 0 auto;
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid #e0ebf8;
}
.search-field {
    padding: 0 .75rem;
    border-right: 1px solid var(--border);
}
.search-field:last-of-type { border-right: none; }
.search-label {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: #4a5d74;
    margin-bottom: .35rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.search-input {
    border: none;
    background: transparent;
    font-size: .9rem;
    padding: .25rem 0;
    box-shadow: none !important;
    color: var(--text);
}
.search-input:focus { border: none; outline: none; background: transparent; }
.btn-search {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: var(--radius);
    border: none;
    padding: .75rem;
    font-size: 1.1rem;
    height: 100%;
    min-height: 48px;
}
.btn-search:hover { background: linear-gradient(135deg, #0b458d 0%, #082f61 100%); color: white; }

/* Hero Stats */
.hero-stats { animation: fadeInUp .6s .3s both; }
.stat-item { text-align: center; }
.stat-number { font-size: 1.3rem; font-weight: 700; color: white; }
.stat-label  { font-size: .75rem; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .5px; }
.stat-divider { width: 1px; background: rgba(255,255,255,.3); }

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.6);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(8px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Features Bar ─────────────────────────────────────────── */
.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem;
}
.feature-item i { color: var(--primary); }

/* ── Section Styles ───────────────────────────────────────── */
.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.section-subtitle {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: .5rem;
}
.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}

/* ── Resort Cards ─────────────────────────────────────────── */
.resort-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.resort-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}
.resort-card-img-link { display: block; }
.resort-card-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    background-color: #dbe8f8;
    position: relative;
    transition: transform .4s ease;
}
.resort-card:hover .resort-card-img { transform: scale(1.04); }
.resort-card-img-link { overflow: hidden; }
.resort-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7,33,72,.45) 0%, rgba(7,33,72,0) 62%);
}
.badge-featured {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--accent);
    color: #1a2332;
    font-size: .72rem;
    font-weight: 700;
    padding: .3rem .75rem;
    border-radius: 50px;
}
.resort-card-body { padding: 1.25rem 1.5rem 1.5rem; }
.resort-card-title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.resort-card-title a { color: var(--dark); }
.resort-card-title a:hover { color: var(--primary); }
.resort-card-location { color: var(--muted); font-size: .82rem; }
.resort-card-rating {
    background: #0d4f9f;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    padding: .25rem .6rem;
    border-radius: 8px;
    white-space: nowrap;
}
.resort-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Amenity Tags ─────────────────────────────────────────── */
.amenity-tag {
    display: inline-flex;
    align-items: center;
    background: var(--primary-light);
    color: #0a3973;
    font-size: .73rem;
    font-weight: 500;
    padding: .2rem .55rem;
    border-radius: 50px;
}
.resort-amenities { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Keep Featured section cards equal height across rows */
.section-featured .row > [class*='col-'] {
    display: flex;
}

.section-featured .resort-card {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.section-featured .resort-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.section-featured .resort-card-body > .d-flex:last-child {
    margin-top: auto;
}

/* ── Why Cards ────────────────────────────────────────────── */
.why-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform var(--transition);
}
.why-card:hover { transform: translateY(-4px); }
.why-icon {
    width: 64px; height: 64px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 1.5rem;
    color: #0d4f9f;
}

/* ── CTA Section ──────────────────────────────────────────── */
.section-cta {
    background: linear-gradient(135deg, #0a3973 0%, #0d4f9f 58%, #08284f 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}
.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Footer ───────────────────────────────────────────────── */
.footer { background: #081b36; }
.footer-top { border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-bottom { }
.footer-link { color: rgba(255,255,255,.72); font-size: .85rem; transition: color var(--transition); }
.footer-link:hover { color: var(--accent); }

/* ── Page Header (inner pages) ────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, #0d4f9f 0%, #0a3973 100%);
    position: relative;
}

/* ── Hotel Hero ───────────────────────────────────────────── */
.hotel-hero {
    background-size: cover;
    background-position: center 44%;
    position: relative;
}
.hotel-hero-overlay {
    background: linear-gradient(to right, rgba(9,52,106,.68) 0%, rgba(8,40,79,.5) 100%);
    padding: 4rem 0;
}

/* ── Hotels Banner ────────────────────────────────────────── */
.villa-banner {
    position: relative;
    background-size: cover;
    background-position: center 38%;
    overflow: hidden;
}
.villa-banner-overlay {
    background:
        linear-gradient(108deg, rgba(4, 23, 46, .7) 0%, rgba(6, 34, 67, .58) 48%, rgba(9, 52, 106, .38) 100%);
    padding: 8rem 0 4rem; /* extra top space for fixed navbar */
}

/* Navbar sits on top of banner with transparent background */
.page-hotels #mainNav:not(.scrolled) {
    background: transparent;
    box-shadow: none;
}
.villa-banner-content {
    max-width: 760px;
}
.villa-badge {
    display: inline-block;
    margin-bottom: .9rem;
    padding: .4rem .75rem;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 999px;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    background: rgba(255,255,255,.08);
}
.villa-title {
    margin: 0 0 .8rem;
    font-size: clamp(1.8rem, 4.3vw, 3rem);
    line-height: 1.18;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .02em;
    text-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.villa-subtitle {
    max-width: 700px;
    color: rgba(255,255,255,.9);
    font-size: 1.03rem;
    line-height: 1.75;
}
.villa-breadcrumb .breadcrumb-item,
.villa-breadcrumb .breadcrumb-item.active {
    color: rgba(255,255,255,.92);
}
.villa-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,.65);
}
.villa-breadcrumb a {
    color: rgba(255,255,255,.82);
    text-decoration: none;
}
.villa-breadcrumb a:hover {
    color: #fff;
}

/* ── Room Card ────────────────────────────────────────────── */
.room-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: box-shadow var(--transition);
}
.room-card:hover { box-shadow: var(--shadow-lg); }
.room-card-img {
    height: 100%;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #dbe8f8;
}
.room-card-price { background: #f4f8ff; }
.room-price-main { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

/* ── Search Filter Bar ────────────────────────────────────── */
.search-filter-bar {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* ── Booking Page ─────────────────────────────────────────── */
.sticky-sidebar { position: sticky; top: 90px; }
.room-summary-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #dbe8f8;
}
.booking-widget { border: 2px solid var(--primary-light) !important; }
.availability-filter { border: 2px dashed var(--border); }
.amenity-item {
    display: flex;
    align-items: center;
    padding: .5rem .75rem;
    background: var(--primary-light);
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
}

/* ── Booking History ──────────────────────────────────────── */
.booking-room-img {
    height: 100%;
    min-height: 120px;
    background-size: cover;
    background-position: center;
    background-color: #dbe8f8;
}

/* ── Booking Success ──────────────────────────────────────── */
.success-icon-circle {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(34,197,94,.3);
}
.booking-success-img {
    width: 100px; height: 80px;
    background-size: cover;
    background-position: center;
    background-color: #dbe8f8;
}
.booking-detail-item {
    background: var(--primary-light);
    border-radius: 8px;
    padding: .75rem 1rem;
}
.detail-label { font-size: .75rem; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.detail-value { font-size: 1.05rem; font-weight: 700; }
.detail-sub   { font-size: .75rem; color: var(--muted); }

/* ── Post Detail ─────────────────────────────────────────── */
.post-detail-article {
    max-width: 100%;
}
.post-content {
    font-size: 1rem;
    color: var(--text);
    word-break: break-word;
}
.post-content p,
.post-content ul,
.post-content ol,
.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    margin-bottom: 1rem;
}
.post-content img,
.post-content table,
.post-content iframe {
    max-width: 100%;
}

/* ── Auth Pages ───────────────────────────────────────────── */
.auth-page {
    background: linear-gradient(135deg, #edf3ff 0%, #f5f8fd 100%);
    min-height: 100vh;
}
.auth-card { max-width: 440px; width: 100%; }

/* ── Back to Top ──────────────────────────────────────────── */
#backToTop {
    position: fixed;
    bottom: 1.8rem; right: 1.5rem;
    width: 48px; height: 48px;
    padding: 0;
    display: none;
    z-index: 999;
    opacity: .85;
    box-shadow: 0 8px 18px rgba(9,52,106,.22);
}
#backToTop:hover { opacity: 1; }

/* ── Floating Social Links (bottom-left) ─────────────────── */
.social-fab {
    position: fixed;
    left: 1.5rem;
    bottom: 1.8rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .7rem;
}
.social-fab-link {
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .48rem .78rem;
    border-radius: 999px;
    color: #fff;
    font-size: .85rem;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(0,0,0,.16);
}
.social-fab-link:hover {
    color: #fff;
}
.social-fab-zalo {
    background: #0068ff;
}
.social-fab-facebook {
    background: #1877f2;
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 991.98px) {
    #mainNav .navbar-collapse {
        margin-top: .9rem;
        padding: 1rem;
        border-radius: 18px;
        background: linear-gradient(135deg, #0d4f9f 0%, #0a3973 100%);
        box-shadow: 0 14px 28px rgba(11,36,72,.28);
    }

    #mainNav .navbar-nav {
        gap: .2rem;
    }

    #mainNav .nav-link {
        padding: .65rem .85rem;
        border-radius: 12px;
    }

    #mainNav .nav-link:hover,
    #mainNav .nav-link:focus {
        background: rgba(255,255,255,.08);
    }

    #mainNav .nav-link::after {
        display: none;
    }

    #mainNav .navbar-toggler {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 768px) {
    .hero-section    { min-height: 100vh; background-position: center 62%; }
    .hero-search-box { padding: 1rem; border-radius: var(--radius); }
    .search-field    { border-right: none; border-bottom: 1px solid var(--border); padding: .5rem 0; }
    .search-field:last-of-type { border-bottom: none; }
    .hero-stats      { display: none !important; }
    .section-title   { font-size: 1.5rem; }
    .resort-card-img { height: 180px; }
    .room-card-img   { min-height: 200px; }
    .sticky-sidebar  { position: static; }
    .py-6 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
    .hotel-hero-overlay { padding: 2.5rem 0; }
    .villa-banner-overlay { padding: 4rem 0 3rem; }
    .villa-subtitle { font-size: .98rem; line-height: 1.65; }
}

@media (max-width: 576px) {
    .hero-section { background-position: center 66%; }
    .hero-title { font-size: 2rem; }
    .display-5  { font-size: 1.75rem; }
    .villa-banner { background-position: center 42%; }
    .social-fab { left: 1rem; bottom: 1rem; }
    #backToTop { right: 1rem; bottom: 1rem; }
}

/* ── Hotel Gallery (public detail page) ──────────────────── */
.hotel-gallery-section {
    background: #0b2448;
}
.hotel-gallery-main {
    position: relative;
    width: 100%;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b2448;
}
.hotel-gallery-main-img {
    width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    transition: opacity .2s ease;
}
.gallery-main-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.45);
    color: #fff;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s ease;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}
.gallery-main-nav:hover { background: rgba(0,0,0,.72); }
.gallery-main-prev { left: 1rem; }
.gallery-main-next { right: 1rem; }
.hotel-gallery-thumbs-outer {
    position: relative;
    background: #0b2448;
    display: flex;
    align-items: center;
}
.hotel-gallery-thumbs-wrap {
    flex: 1;
    overflow-x: auto;
    padding: .75rem 0;
    scrollbar-width: none;
}
.hotel-gallery-thumbs-wrap::-webkit-scrollbar { display: none; }
.hotel-gallery-thumbs {
    display: flex;
    gap: .5rem;
    padding: 0 1rem;
    min-width: max-content;
}
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, background .2s ease;
    backdrop-filter: blur(4px);
}
.gallery-nav-btn.visible {
    opacity: 1;
    pointer-events: auto;
}
.gallery-nav-btn:hover {
    background: rgba(255,255,255,.35);
}
.gallery-nav-prev { left: .4rem; }
.gallery-nav-next { right: .4rem; }
.gallery-thumb {
    border: 3px solid transparent;
    border-radius: 8px;
    padding: 0;
    background: none;
    cursor: pointer;
    outline: none;
    transition: border-color .2s ease, transform .2s ease;
    flex-shrink: 0;
}
.gallery-thumb img {
    width: 90px;
    height: 62px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
}
.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--accent);
    transform: scale(1.04);
}
@media (max-width: 768px) {
    .hotel-gallery-main { max-height: 320px; }
    .hotel-gallery-main-img { max-height: 320px; }
    .gallery-thumb img { width: 70px; height: 48px; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE PERFORMANCE & UX OPTIMIZATIONS
   ══════════════════════════════════════════════════════════════ */

/* ── Disable hover effects on touch devices ───────────────── */
@media (hover: none) {
    .resort-card:hover { transform: none; box-shadow: var(--shadow); }
    .resort-card:hover .resort-card-img { transform: none; }
    .why-card:hover { transform: none; }
    .gallery-thumb:hover { transform: none; }
    /* Active state for tap feedback */
    .resort-card:active { transform: scale(.985); box-shadow: var(--shadow-lg); }
    .why-card:active { transform: scale(.985); }
}

/* ── Prefer Reduced Motion ────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration:       .01ms !important;
        animation-iteration-count: 1   !important;
        transition-duration:      .01ms !important;
        scroll-behavior:          auto !important;
    }
    .scroll-indicator { animation: none; }
    .hero-stats { animation: none; }
}

/* ── Mobile Base (≤ 768px) ────────────────────────────────── */
@media (max-width: 768px) {
    /* Use small viewport height (excludes URL-bar on iOS/Android) */
    .hero-section {
        min-height: 100vh;           /* fallback */
        min-height: 100svh;          /* modern browsers */
    }

    /* Remove expensive backdrop-filter on mobile GPU */
    .hero-search-box { backdrop-filter: none; -webkit-backdrop-filter: none; }

    /* Gallery nav arrows always visible on touch scroll strip */
    .gallery-nav-btn { opacity: 1; pointer-events: auto; }

    /* Touch-friendly horizontal scroll containers */
    .hotel-gallery-thumbs-wrap {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
    }
    .gallery-thumb { scroll-snap-align: start; }

    /* Ensure minimum 44px tap targets for interactive elements */
    .btn-call-hotline-mobile { width: 44px; height: 44px; }
    .gallery-nav-btn { width: 44px; height: 44px; font-size: 1.1rem; }
    #backToTop { width: 52px; height: 52px; }

    /* Cards: better sizing on mobile */
    .resort-card-img { height: 200px; }

    /* Room card: stack image on top on small screens */
    .room-card-img { min-height: 220px; }

    /* Better section spacing */
    .py-6 { padding-top: 2.75rem !important; padding-bottom: 2.75rem !important; }

    /* Sticky sidebar disabled on mobile (already static) */
    .sticky-sidebar { top: unset; }

    /* Booking widget fix */
    .booking-widget { margin-bottom: 1.5rem; }

    /* Better hero text sizing */
    .hero-title { font-size: clamp(1.65rem, 6vw, 2.2rem); }
    .hero-subtitle { font-size: clamp(1.2rem, 4.5vw, 1.75rem); }

    /* Hero search form: stack all fields cleanly */
    #heroSearchForm .col-lg-1 { margin-top: .5rem; }
    .btn-search { min-height: 48px; font-size: 1rem; }

    /* Footer columns: better stacking */
    .footer-top .col-lg-2,
    .footer-top .col-lg-3 { margin-bottom: .5rem; }

    /* Nav collapse: smooth open */
    #mainNav .navbar-collapse { transition: none; }
}

/* ── Small screens (≤ 480px) ──────────────────────────────── */
@media (max-width: 480px) {
    /* Cards: reduce card image height */
    .resort-card-img { height: 180px; }

    /* Section titles */
    .section-title { font-size: 1.35rem; }

    /* Amenity tags: smaller on very small screens */
    .amenity-tag { font-size: .68rem; }

    /* Social FAB menu labels: always show on mobile */
    .social-fab-link span { display: inline; }

    /* Auth card padding */
    .auth-card { padding: 0 .5rem; }

    /* Booking page: no horizontal overflow */
    .booking-detail-item { font-size: .9rem; }

    /* Gallery: slightly taller thumbnail strip on small phones */
    .hotel-gallery-thumbs-wrap { padding: .5rem 0; }
}

/* ── Layout Containment for off-screen sections ───────────── */
/* Uses content-visibility for sections that are typically below the fold */
.section-featured,
.section-cta,
footer.footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

/* ── Core Web Vitals: Image loading ──────────────────────── */
/* Prevent layout shift from unloaded background images */
.resort-card-img,
.room-card-img,
.booking-room-img {
    background-color: #dbe8f8;   /* always show a placeholder color */
}

/* ── Smooth font rendering ────────────────────────────────── */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Icon font FOUT prevention ────────────────────────────── */
/* Ensure icons don't cause layout shift when font loads async */
[class^="bi-"],
[class*=" bi-"] {
    display: inline-block;
    min-width: .8em;
    font-style: normal;
    line-height: 1;
}

/* ══════════════════════════════════════════════════════════════
   ADDITIONAL MOBILE REFINEMENTS
   ══════════════════════════════════════════════════════════════ */

/* ── Booking history: scrollable status-filter tabs ──────── */
@media (max-width: 767.98px) {
    #bookingTabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: .3rem;
    }
    #bookingTabs::-webkit-scrollbar { display: none; }
    #bookingTabs .nav-link { white-space: nowrap; }

    /* Stacked card columns: replace left border with top rule */
    .booking-item .border-start {
        border-left: 0 !important;
        border-top: 1px solid var(--border);
    }
    .room-card-price.border-start {
        border-left: 0 !important;
        border-top: 1px solid var(--border);
    }

    /* Room card: proper height when image stacks to full width */
    .room-card .room-card-img { min-height: 220px; }

    /* Hero content: reduce top margin on short-screen phones */
    .hero-content { margin-top: 70px; }

    /* Footer: reduce map embed height on small screens */
    .footer .rounded.overflow-hidden iframe { height: 130px; }
}

/* ── Room card image: also ensure consistent height at md ─── */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Restore left-border when layout is side-by-side again */
    .booking-item .border-start { border-top: none; }
    .room-card-price.border-start { border-top: none; }
}

/* ── Hotel detail sidebar: sticky only when viewport is tall enough ── */
@media (max-height: 600px) {
    .sticky-sidebar { position: static !important; }
}
