/* ==========================================================================
   MÂY DE HOMESTAY & VILLA - LUXURY DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,700;0,800;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #064e3b;          /* Forest Emerald */
    --primary-light: #047857;
    --primary-dark: #022c22;
    --accent: #d97706;           /* Warm Sunset Gold */
    --accent-light: #f59e0b;
    --accent-hover: #b45309;
    --bg-cream: #fafaf9;          /* Warm Cream Background */
    --bg-card: #ffffff;
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #78716c;
    --border: #e7e5e4;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 35px -10px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, .font-serif {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    cursor: pointer;
    font-family: var(--font-body);
    transition: var(--transition);
}

/* Header & Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    padding: 12px 0;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-heading);
}

.site-header.scrolled .logo {
    color: var(--primary-dark);
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--accent);
    color: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.site-header.scrolled .nav-link {
    color: var(--text-secondary);
}

.nav-link:hover {
    color: var(--accent-light);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-cta {
    background: var(--accent);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    border: none;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.btn-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 85vh;
    min-height: 600px;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.6) 0%, rgba(2, 44, 34, 0.75) 100%),
                url('https://images.unsplash.com/photo-1566073771259-6a8506099945?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    padding: 0 20px;
}

.hero-content {
    max-width: 850px;
    margin-top: 40px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fde68a;
    border: 1px solid rgba(253, 230, 138, 0.3);
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

/* Floating Search Bar */
.search-bar-container {
    max-width: 1100px;
    margin: -60px auto 60px;
    position: relative;
    z-index: 20;
    padding: 0 20px;
}

.search-bar {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px 30px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) auto;
    gap: 20px;
    align-items: center;
}

.search-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid var(--border);
    padding-right: 16px;
}

.search-item:last-of-type {
    border-right: none;
}

.search-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-input {
    border: none;
    outline: none;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
}

.search-btn {
    background: var(--primary);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(6, 78, 59, 0.3);
}

.search-btn:hover {
    background: var(--primary-light);
    transform: scale(1.03);
}

/* Room Section */
.section {
    padding: 80px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 50px;
}

.section-subtitle {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tab-btn {
    background: #ffffff;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.room-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.room-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.room-thumb {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

.room-card:hover .room-img {
    transform: scale(1.08);
}

.room-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(6, 78, 59, 0.85);
    backdrop-filter: blur(6px);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.room-price-tag {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: #ffffff;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
}

.room-price-tag span {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.room-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.room-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.room-specs {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.room-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.room-actions {
    margin-top: auto;
    display: flex;
    gap: 12px;
}

.btn-outline {
    flex: 1;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 10px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
}

.btn-outline:hover {
    background: rgba(6, 78, 59, 0.05);
}

.btn-book {
    flex: 1.2;
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 10px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(6, 78, 59, 0.2);
    text-align: center;
}

.btn-book:hover {
    background: var(--primary-light);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    padding: 32px;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Floating Widgets */
.floating-widgets {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 990;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.float-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.float-btn:hover {
    transform: scale(1.1);
}

.float-zalo { background: #0084ff; }
.float-phone { background: #10b981; }

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 78, 59, 0.15);
}

/* Mobile Navigation & Menu Drawer */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
}

.site-header.scrolled .mobile-menu-btn {
    color: var(--primary-dark);
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #022c22;
    z-index: 2500;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-drawer.active {
    right: 0;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2400;
    display: none;
}

.mobile-nav-overlay.active {
    display: block;
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-links a {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    transition: background 0.2s;
}

.mobile-nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-light);
}

/* Mobile Fixed Bottom Navigation Bar */
.mobile-bottom-bar {
    display: none;
}

/* Responsive Styles for Mobile */
@media (max-width: 768px) {
    body {
        padding-bottom: 75px;
    }

    .site-header {
        padding: 12px 0;
    }

    .site-header.scrolled {
        padding: 10px 0;
    }

    .logo {
        font-size: 1.15rem;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .nav-links, .header-actions {
        display: none !important;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-section {
        height: auto;
        min-height: 500px;
        padding: 100px 16px 60px 16px;
    }

    .hero-title {
        font-size: 2.1rem;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 24px;
    }

    .search-bar-container {
        margin: -40px auto 40px;
        padding: 0 14px;
    }

    .search-bar {
        grid-template-columns: 1fr;
        padding: 18px 16px;
        gap: 14px;
        border-radius: 18px;
    }

    .search-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 12px;
    }

    .search-item:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }

    .search-input {
        font-size: 1rem !important; /* 16px prevents iOS zoom */
        padding: 10px 12px;
    }

    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding: 6px 14px 12px 14px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex-shrink: 0;
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .room-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        padding: 0 14px !important;
    }

    .room-card {
        border-radius: 18px !important;
    }

    .room-actions {
        flex-direction: row;
        gap: 8px;
    }

    .btn-outline, .btn-book {
        padding: 12px 8px;
        font-size: 0.82rem;
    }

    /* Fixed Bottom Bar on Mobile */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: rgba(2, 44, 34, 0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
        padding-bottom: env(safe-area-inset-bottom);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
    }

    .mobile-bar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255, 255, 255, 0.75);
        font-size: 0.7rem;
        font-weight: 600;
        text-decoration: none;
        flex: 1;
        height: 100%;
        border: none;
        background: transparent;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .mobile-bar-item i {
        font-size: 1.2rem;
    }

    .mobile-bar-item.highlight {
        color: #ffffff;
        background: linear-gradient(135deg, var(--accent) 0%, #b45309 100%);
        border-radius: 12px;
        margin: 4px;
        height: 48px;
        box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
    }

    /* Move float buttons up on mobile so they don't block bottom bar */
    .floating-widgets {
        bottom: 76px;
        right: 14px;
        gap: 10px;
    }

    .float-btn {
        width: 44px;
        height: 44px;
        font-size: 1.15rem;
    }

    .modal-card {
        padding: 20px 16px;
        margin: 10px;
        max-height: 88vh;
        border-radius: 20px;
    }
}

