:root {
    --primary: #D4A373;
    --dark: #1A1A1A;
    --light: #F8F5F0;
    --gray: #888888;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
img { max-width: 100%; height: auto; display: block; border-radius: 8px;}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

header {
    background-color: var(--dark); color: var(--white); position: fixed;
    width: 100%; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text h1 { color: var(--primary); font-size: 1.5rem; letter-spacing: 2px; line-height: 1; margin:0;}
.logo-text span { font-size: 0.7rem; letter-spacing: 4px; color: var(--gray); }

.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--light); font-weight: 600; font-size: 1.1rem; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.lang-switch { border: 1px solid var(--primary); padding: 5px 10px; border-radius: 4px; font-size: 0.9rem !important;}
.lang-switch:hover { background: var(--primary); color: var(--dark) !important; }

.btn-primary { background-color: var(--primary); color: var(--dark); padding: 10px 25px; border-radius: 5px; font-weight: 700; border: 2px solid var(--primary); }
.btn-primary:hover { background-color: transparent; color: var(--primary); }

.mobile-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.mobile-toggle span { width: 25px; height: 3px; background: var(--primary); transition: var(--transition); }

.hero-section {
    height: 100vh; min-height: 600px;
    background-image: url('../assets/img/hero_pool.jpg');
    background-size: cover; background-position: center; position: relative;
    display: flex; align-items: center; justify-content: center; text-align: center; padding-top: 80px;
}
.hero-section .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(26, 26, 26, 0.4); }
.hero-content { position: relative; z-index: 2; color: var(--white); }
.hero-title { font-size: 4rem; color: var(--primary); margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 1.5rem; margin-bottom: 40px; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }

.booking-engine { background: var(--white); padding: 20px; border-radius: 10px; box-shadow: 0 15px 30px rgba(0,0,0,0.2); max-width: 900px; margin: 0 auto; }
#bookingForm { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; }
.form-group { flex: 1; min-width: 150px; text-align: start; }
.form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--dark); font-size: 0.9rem; }
.form-group input, .form-group select { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 5px; font-family: 'Cairo', sans-serif; font-size: 1rem; background: var(--light); }
.btn-book { width: 100%; padding: 12px 25px; background: var(--dark); color: var(--primary); border: none; border-radius: 5px; font-size: 1.1rem; font-weight: bold; cursor: pointer; transition: var(--transition); }
.btn-book:hover { background: var(--primary); color: var(--dark); }

.features-section, .gallery-section, .reviews-section, .blog-section, .blog-post-page { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 2.5rem; color: var(--dark); }
.divider { width: 60px; height: 3px; background: var(--primary); margin: 15px auto; }
.section-header p { color: var(--gray); font-size: 1.1rem; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature-card { background: var(--white); padding: 40px 20px; border-radius: 10px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); border-bottom: 3px solid transparent; }
.feature-card:hover { transform: translateY(-10px); border-bottom-color: var(--primary); }
.feature-card .icon svg { width: 50px; height: 50px; stroke: var(--primary); margin-bottom: 20px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.gallery-item { position: relative; border-radius: 10px; overflow: hidden; height: 300px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; border-radius: 0;}
.gallery-item:hover img { transform: scale(1.1); }
.item-overlay { position: absolute; bottom: 0; left: 0; width: 100%; padding: 20px; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: var(--white); pointer-events: none;}

.reviews-section { background: var(--dark); color: var(--white); }
.reviews-section .section-header h2 { color: var(--white); }
.reviews-slider { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.review-card { background: rgba(255,255,255,0.05); padding: 30px; border-radius: 10px; border: 1px solid rgba(212, 163, 115, 0.2); }
.stars { color: var(--primary); margin-bottom: 15px; font-size: 1.2rem; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.blog-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column;}
.blog-img { height: 250px; background-size: cover; background-position: center; border-radius: 0;}
.blog-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column;}
.blog-content h3 { font-size: 1.3rem; margin-bottom: 10px; color: var(--dark); }
.blog-content p { color: var(--gray); margin-bottom: 15px; font-size: 0.95rem; flex-grow: 1;}
.read-more { color: var(--primary); font-weight: bold; margin-top: auto;}

.blog-post-page { margin-top: 80px; background: var(--white); padding-bottom: 100px;}
.blog-hero { height: 50vh; background-size: cover; background-position: center; position: relative; display: flex; align-items: center; justify-content: center;}
.blog-hero .overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.4);}
.blog-hero h1 { position: relative; z-index: 2; color: var(--white); font-size: 3rem; text-align: center; padding: 0 20px; text-shadow: 2px 2px 5px rgba(0,0,0,0.6);}
.blog-body { max-width: 800px; margin: -50px auto 0; background: var(--white); padding: 50px; border-radius: 10px; position: relative; z-index: 3; box-shadow: 0 10px 30px rgba(0,0,0,0.1); line-height: 1.8; font-size: 1.1rem;}
.blog-body h2 { color: var(--primary); margin: 30px 0 15px; }

.footer { background: #111; color: var(--white); padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.footer-logo h2 { color: var(--primary); letter-spacing: 2px; margin:0;}
.footer-col h3 { margin-bottom: 20px; color: var(--primary); font-size: 1.2rem; }
.links-col ul li { margin-bottom: 10px; }
.links-col ul li a:hover { color: var(--primary); }
.contact-col p { margin-bottom: 15px; color: var(--gray); display: flex; align-items: center; gap: 10px;}
.contact-col svg { width: 20px; height: 20px; stroke: var(--primary); flex-shrink: 0;}
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #333; color: var(--gray); font-size: 0.9rem; }


/* ==========================================================
   AZOZER - MOBILE RESPONSIVE FIXES (FULL & CLEAN)
   ========================================================== */

@media (max-width: 991px) {
    
    /* 1. إظهار وتنسيق زر القائمة (Hamburger Menu) */
    .mobile-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        cursor: pointer;
        z-index: 10001;
    }
    
    .mobile-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--primary);
        border-radius: 2px;
    }

    /* 2. التحكم في القائمة المنسدلة على الموبايل */
    #navbar {
        display: none !important;
        position: absolute !important;
        top: 80px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background-color: var(--dark) !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important;
        padding: 20px 0 !important;
        z-index: 10000 !important;
    }

    #navbar.active {
        display: block !important;
    }

    /* إظهار الروابط وترتيبها عمودياً عند تفعيل الكلاس active */
    #navbar ul.nav-links {
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    #navbar.active ul.nav-links {
        display: flex !important;
    }

    #navbar ul.nav-links li {
        width: 100% !important;
        text-align: center !important;
    }

    #navbar ul.nav-links li a {
        display: block !important;
        padding: 10px !important;
        font-size: 1.1rem !important;
        color: var(--light) !important;
        text-decoration: none !important;
    }

    #navbar ul.nav-links li a:hover, 
    #navbar ul.nav-links li a.active {
        color: var(--primary) !important;
    }

    /* إخفاء زر الحجز العلوي في الهيدر على الموبايل لمنع التكدس */
    .desktop-only {
        display: none !important;
    }

    /* 3. إصلاح نموذج الحجز (إزاحة للأسفل لظهور خانة الاسم بالكامل وعرض 100%) */
    .booking-engine, 
    #bookingBox {
        width: 92% !important;
        max-width: 100% !important;
        margin: 40px auto 20px auto !important;
        padding: 20px 15px !important;
        position: relative !important;
        z-index: 999 !important;
        background-color: var(--white) !important;
        border-radius: 10px;
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        box-sizing: border-box !important;
    }

    #bookingForm {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
        width: 100% !important;
    }

    #bookingForm .form-group {
        width: 100% !important;
        flex-basis: 100% !important;
        max-width: 100% !important;
        margin-right: 0 !important;
        margin-left: 0 !important;
        margin-bottom: 0 !important;
    }

    /* اتجاه النصوص في الحقول حسب لغة الصفحة */
    [dir="rtl"] #bookingForm .form-group {
        text-align: right;
    }
    [dir="ltr"] #bookingForm .form-group {
        text-align: left;
    }

    #bookingForm input[type="text"],
    #bookingForm input[type="email"],
    #bookingForm input[type="date"],
    #bookingForm select {
        display: block !important;
        width: 100% !important;
        height: 48px !important;
        padding: 10px 12px !important;
        font-size: 16px !important; /* يمنع الزووم التلقائي في الآيفون */
        border: 1px solid #ddd !important;
        border-radius: 6px !important;
        background-color: var(--light) !important;
        box-sizing: border-box !important;
    }

    #bookingForm label {
        display: block !important;
        margin-bottom: 5px !important;
        font-weight: bold;
        color: var(--dark);
    }

    #bookingForm .btn-group {
        width: 100% !important;
    }

    #bookingForm .btn-book {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px !important;
    }
}