/*
Theme Name: Hoa Mai Hotel & Thai Cat Restaurant
Theme URI: https://bienquynhhoamai.online
Author: AI Developer
Description: Theme tối ưu SEO, cấu trúc Modular, không dùng Plugin, tích hợp nhà hàng Thái Cát.
Version: 2.1
Text Domain: hoamai
*/

/* --- 1. VARIABLES (BIẾN MÀU SẮC) --- */
:root {
    --primary-blue: #005f9e;   /* Màu đại diện Biển/Khách sạn */
    --primary-orange: #e65100; /* Màu đại diện Nhà hàng/Hải sản */
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --dark: #222;
}

/* --- 2. RESET & GLOBAL STYLES --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html {
    scroll-behavior: smooth; /* Tạo hiệu ứng cuộn trang mượt mà */
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    line-height: 1.6; 
    color: #333; 
    background-color: #fff;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: 0.3s;
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

ul { 
    list-style: none; 
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 15px; 
}

/* --- 3. HEADER & NAVIGATION --- */
header { 
    background: var(--white); 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}

/* Fix lỗi menu bị che bởi thanh Admin Bar của WordPress */
body.admin-bar header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar header { top: 46px; }
}

.nav-wrapper { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 80px; 
    position: relative;
}

.logo { 
    font-size: 24px; 
    font-weight: bold; 
    color: var(--primary-blue); 
    display: flex; 
    flex-direction: column; 
    line-height: 1.2; 
    z-index: 1001; /* Luôn nổi trên menu mobile */
}

.logo span { 
    color: var(--primary-orange); 
    font-size: 16px; 
}

/* Nút Hamburger Menu (Mặc định ẩn trên Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    transition: 0.3s;
}

/* Hiệu ứng xoay nút khi mở */
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Menu Chính */
.main-menu ul {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-menu ul li a { 
    font-weight: 500; 
    font-size: 16px; 
    color: var(--dark);
    display: block;
    padding: 5px 0;
}

.main-menu ul li a:hover,
.main-menu ul li.current-menu-item > a { 
    color: var(--primary-orange); 
}

/* Nút Gọi Ngay */
.cta-btn { 
    background: var(--primary-orange); 
    color: white; 
    padding: 10px 20px; 
    border-radius: 4px; 
    font-weight: bold; 
    transition: background 0.3s; 
}

.cta-btn:hover { 
    background: #bf4300; 
    color: white;
}

/* --- 4. HERO SECTION --- */
.hero { 
    display: flex; 
    height: 600px; 
    position: relative; 
    flex-wrap: wrap; 
}

.hero-half { 
    flex: 1; 
    position: relative; 
    min-width: 320px; 
    overflow: hidden; 
}

.hero-half img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s; 
}

.hero-half:hover img { 
    transform: scale(1.05); 
}

.hero-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.3); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column; 
    text-align: center; 
    color: white; 
    padding: 20px; 
}

.hero-overlay h2 { 
    font-size: 32px; 
    margin-bottom: 10px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6); 
}

.hero-btn { 
    border: 2px solid white; 
    color: white; 
    padding: 10px 25px; 
    border-radius: 30px; 
    transition: 0.3s; 
    display: inline-block;
    margin-top: 15px;
}

.hero-btn:hover { 
    background: white; 
    color: var(--dark); 
}

/* --- 5. BOOKING BAR --- */
.booking-bar { 
    background: var(--primary-blue); 
    padding: 20px 0; 
    margin-top: -50px; 
    position: relative; 
    z-index: 10; 
    border-radius: 8px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
}

.booking-form { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 15px; 
    justify-content: center; 
    align-items: flex-end; 
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    color: white; 
}

.form-group label { margin-bottom: 5px; font-size: 14px; }
.form-group input, .form-group select { padding: 10px; border: none; border-radius: 4px; min-width: 180px; font-family: inherit; }

.btn-submit { 
    background: var(--primary-orange); 
    color: white; 
    border: none; 
    padding: 10px 30px; 
    font-size: 16px; 
    border-radius: 4px; 
    cursor: pointer; 
    font-weight: bold; 
    height: 42px; 
    transition: background 0.3s;
}
.btn-submit:hover { background: #bf4300; }

/* --- 6. COMMON & ROOMS --- */
.section-pad { padding: 60px 0; }
.section-title { text-align: center; margin: 60px 0 40px; }
.section-title h2 { font-size: 32px; color: var(--primary-blue); margin-bottom: 10px; }
.section-title span { display: block; width: 60px; height: 3px; background: var(--primary-orange); margin: 0 auto; }

.room-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 60px; }
.room-card { border: 1px solid #eee; border-radius: 8px; overflow: hidden; transition: 0.3s; background: #fff; }
.room-card:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); transform: translateY(-5px); }
.room-img { height: 200px; background: #ddd; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.room-img img { width: 100%; height: 100%; object-fit: cover; }
.room-info { padding: 20px; }
.room-price { color: var(--primary-orange); font-weight: bold; font-size: 18px; margin-bottom: 15px; display: block; }
.room-features { margin-top: 10px; }
.room-features li { display: inline-block; background: #f0f8ff; padding: 5px 10px; font-size: 12px; margin-right: 5px; border-radius: 4px; color: var(--primary-blue); margin-bottom: 5px; }

/* --- 7. RESTAURANT --- */
.restaurant-section { background: #fff8f0; padding: 60px 0; }
.restaurant-content { display: flex; gap: 40px; flex-wrap: wrap; }
.res-text { flex: 1; min-width: 300px; }
.res-text h3 { color: var(--primary-orange); font-size: 28px; margin-bottom: 20px; }
.res-img { flex: 1; min-width: 300px; }
.res-features li { margin-bottom: 10px; display: flex; align-items: center; }
.res-features li:before { content: "✔"; color: var(--primary-orange); margin-right: 10px; font-weight: bold; }

/* --- 8. FOOTER --- */
footer { background: #2c3e50; color: white; padding: 50px 0 20px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { margin-bottom: 20px; font-size: 18px; border-bottom: 2px solid var(--primary-orange); display: inline-block; padding-bottom: 5px; }
.footer-col ul li a { color: #ccc; }
.footer-col ul li a:hover { color: white; }
.copyright { text-align: center; border-top: 1px solid #444; padding-top: 20px; font-size: 14px; color: #aaa; }

/* --- 9. RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    .nav-wrapper { 
        flex-direction: row; 
        flex-wrap: wrap;
        height: auto; 
        padding: 15px 0; 
        align-items: center;
    }
    
    .logo {
        margin-bottom: 0;
        flex-grow: 1;
    }

    .menu-toggle {
        display: flex; /* Hiện nút trên mobile */
        margin-right: 15px; 
    }

    .cta-btn {
        display: none; /* Ẩn nút Gọi Ngay trên Header mobile */
    }

    /* Ẩn Menu mặc định */
    .main-menu {
        width: 100%;
        display: none;
        order: 3;
        margin-top: 15px;
        background: #fff;
        border-top: 1px solid #eee;
    }

    /* Hiện menu khi có class 'active' */
    .main-menu.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    .main-menu ul { 
        flex-direction: column; 
        width: 100%; 
        text-align: center; 
        gap: 0;
        margin-bottom: 0;
    }

    .main-menu ul li a {
        padding: 15px 0;
        border-bottom: 1px solid #f4f4f4;
    }

    /* Các phần khác */
    .booking-bar { margin-top: 0; border-radius: 0; }
    .booking-form { flex-direction: column; align-items: stretch; padding: 0 15px; }
    .hero { height: auto; }
    .hero-half { height: 300px; }
    .restaurant-content { flex-direction: column-reverse; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}