/* ============================================================
    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:         #677a93;
    --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;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(122deg, rgba(6,30,67,.72) 0%, rgba(9,52,106,.62) 45%, rgba(13,79,159,.42) 100%),
        linear-gradient(to top, rgba(3,18,41,.4) 0%, rgba(3,18,41,0) 48%),
        url('../images/banner2.jpg');
    background-size: cover;
    background-position: center 58%;
    background-attachment: fixed;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(7,33,72,.28) 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 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: #5f7289;
    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 #featuredGrid > [class*='col-'] {
    display: flex;
}

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

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

.section-featured #featuredGrid .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,.5); 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: 6.15rem; 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 Fab ──────────────────────────────────── */
.social-fab {
    position: fixed;
    right: 1.5rem;
    bottom: 1.8rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .7rem;
}
.social-fab-toggle {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: #0d4f9f;
    color: #fff;
    box-shadow: 0 10px 24px rgba(9,52,106,.28);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.social-fab-menu {
    display: none;
    flex-direction: column;
    gap: .55rem;
}
.social-fab.open .social-fab-menu {
    display: flex;
}
.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-attachment: scroll; 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 { right: 1rem; bottom: 1rem; }
    #backToTop { right: 1rem; bottom: 5.35rem; }
}
