/* إعدادات خطية وعامة */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: #f4f7f6;
    color: #2c3e50;
    direction: rtl;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* الهيدر وقائمة الهواتف الذكية */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: #ffffff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #1e5631;
}

.logo span {
    color: #4c9a2a;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #444;
    font-weight: 700;
    font-size: 15px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #1e5631;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #1e5631;
}

/* واجهة البانير الرئيسي والبحث */
.hero {
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)), url('https://images.unsplash.com/photo-1580587771525-78b9dba3b914?auto=format&fit=crop&w=1200&q=80') center/cover;
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
}

.hero-subtitle {
    font-size: 17px;
    margin-bottom: 25px;
    opacity: 0.95;
}

.features-pills {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.features-pills span {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(5px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

/* صندوق البحث المحدث */
.search-box {
    background: #ffffff;
    padding: 22px;
    border-radius: 14px;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    color: #333;
    text-align: right;
}

.input-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #555;
}

.input-group select, 
.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 14px;
    outline: none;
}

/* إصلاح بعثرة نص مدخل التاريخ في الهواتف والـ RTL */
input[type="date"] {
    direction: ltr !important;
    text-align: right !important;
}

.btn-search {
    grid-column: 1 / -1;
    background-color: #1e5631;
    color: white;
    border: none;
    padding: 13px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background-color: #143d22;
}

/* الإعلانات */
.ad-container {
    max-width: 1000px;
    margin: 20px auto;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

/* بطاقات العرض والأقسام */
.places-container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 15px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 20px;
    border-right: 5px solid #1e5631;
    padding-right: 10px;
}

.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
}

.place-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.place-card:hover {
    transform: translateY(-5px);
}

.place-card img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.place-card-body {
    padding: 18px;
}

.place-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.place-card .location {
    color: #777;
    font-size: 13px;
    margin-bottom: 12px;
}

.place-card .price {
    font-size: 17px;
    font-weight: 800;
    color: #1e5631;
    margin-bottom: 15px;
}

.btn-details {
    width: 100%;
    padding: 10px;
    background-color: #f0f4f1;
    color: #1e5631;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

/* لوحة المسؤول المخفية */
.admin-panel {
    background-color: #ffffff;
    border: 2px solid #1e5631;
    padding: 25px;
    margin: 25px auto;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.close-admin-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.full-width {
    grid-column: 1 / -1;
}

.btn-submit {
    margin-top: 18px;
    width: 100%;
    padding: 12px;
    background-color: #1e5631;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

/* نافذة عرض التفاصيل (Modal) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 15px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 12px;
    left: 15px;
    font-size: 26px;
    border: none;
    background: none;
    cursor: pointer;
}

.gallery-container img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.thumbnails img {
    width: 65px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
}

.thumbnails img.active {
    opacity: 1;
    border: 2px solid #1e5631;
}

.modal-info {
    margin-top: 18px;
}

.info-box {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
}

.map-btn, .whatsapp-btn {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 12px;
}

.map-btn {
    background: #e8f0fe;
    color: #1a73e8;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
}

/* أقسام التعريف والاتصال والفوتر */
.about-section, .contact-section {
    background: white;
    max-width: 1100px;
    margin: 25px auto;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.contact-info div {
    margin: 8px 0;
}

footer {
    background: #1e5631;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

.footer-links a {
    color: #d1e7dd;
    text-decoration: none;
    font-size: 13px;
    margin: 0 8px;
}

.admin-login-link {
    color: #ffd700 !important;
}

/* الاستجابة للهواتف الذكية */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 15px 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 12px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .hero h1 {
        font-size: 22px;
    }

    .features-pills {
        flex-direction: column;
    }
}
/* إصلاح نهائي لبعثرة حروف حقل التاريخ على الهواتف */
#searchDate, 
input[type="date"] {
    direction: ltr !important;
    text-align: right !important;
    -webkit-appearance: listbox;
}

/* ضبط ظهور النص التوضيحي */
#searchDate::placeholder {
    direction: rtl !important;
    text-align: right !important;
    color: #777;
}