* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    color: white;
    background: #0b3d5c;
}


/* ================= HEADER ================= */

header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 25px 6%;
    z-index: 10;

    color: white;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 1px;
}

nav {
    display: flex;
    gap: 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    transition: 0.3s;
}

nav a:hover {
    color: #d9f3ff;
}

.login-btn {
    background: white;
    color: #1267a8;

    border: none;
    padding: 11px 22px;

    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;

    cursor: pointer;
}


/* ================= HERO ================= */

.hero {
    position: relative;

    min-height: 720px;

    background-image: url("tabarka-1.jpg");
    background-size: cover;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.hero-overlay {
    position: absolute;

    inset: 0;

    background: linear-gradient(
        rgba(0, 0, 0, 0.35),
        rgba(0, 0, 0, 0.45)
    );
}

.hero-content {
    position: relative;

    z-index: 2;

    color: white;

    max-width: 750px;

    padding: 40px 20px;
}

.location {
    display: inline-block;

    font-size: 14px;
    font-weight: bold;

    letter-spacing: 3px;

    margin-bottom: 20px;
}

.hero h1 {
    font-size: 64px;
    line-height: 1.1;

    margin-bottom: 20px;
}

.hero p {
    font-size: 21px;
    line-height: 1.6;

    margin-bottom: 35px;
}


/* ================= BUTTONS ================= */

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.primary-btn,
.secondary-btn {
    padding: 15px 28px;

    border-radius: 30px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;

    transition: 0.3s;
}

.primary-btn {
    background: #ffffff;
    color: #1267a8;

    border: 2px solid white;
}

.primary-btn:hover {
    transform: translateY(-2px);
}

.secondary-btn {
    background: transparent;
    color: white;

    border: 2px solid white;
}

.secondary-btn:hover {
    background: white;
    color: #1267a8;
}


/* ================= SEARCH ================= */

.search-section {
    padding: 70px 6%;

    text-align: center;

    background: #1267a8;
}

.search-section h2 {
    font-size: 32px;

    margin-bottom: 30px;
}

.search-box {
    max-width: 1050px;

    margin: auto;

    display: flex;
    align-items: center;

    background: white;

    border-radius: 18px;

    padding: 15px;

    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.12);
}

.search-box > div {
    flex: 1;

    text-align: left;

    padding: 10px 20px;

    border-right: 1px solid #ddd;
}

.search-box label {
    display: block;

    font-size: 13px;
    font-weight: bold;

    color: #777;

    margin-bottom: 5px;
}

.search-box p {
    font-size: 16px;
    font-weight: bold;
}

.search-btn {
    background: #1267a8;
    color: white;

    border: none;

    padding: 16px 28px;

    border-radius: 12px;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}


/* ================= FOOTER ================= */

footer {
    background: #123047;

    color: white;

    text-align: center;

    padding: 25px;
}


/* ================= MOBILE ================= */

@media (max-width: 768px) {

    header {
        padding: 20px;
    }

    nav {
        display: none;
    }

    .hero {
        min-height: 650px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero p {
        font-size: 17px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .primary-btn,
    .secondary-btn {
        width: 220px;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    .search-box > div {
        width: 100%;

        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .search-btn {
        width: 100%;
    }
}
/* =========================
   RESULTS SECTION
   ========================= */

.results-section {
    padding: 70px 6%;
    background: #f7f8fa;
    text-align: center;
}

.results-section h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #1f2937;
}

.results-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.stay-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    text-align: left;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stay-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.13);
}

.stay-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.stay-info {
    padding: 22px;
}

.stay-info h3 {
    margin: 0 0 10px;
    font-size: 21px;
    color: #1f2937;
}

.stay-info p {
    margin: 8px 0;
    color: #6b7280;
    line-height: 1.5;
}

.stay-info .price {
    margin-top: 16px;
    font-size: 18px;
    font-weight: bold;
    color: #1455a0;
}

.book-btn {
    margin-top: 15px;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: #1455a0;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.book-btn:hover {
    background: #0f4380;
}


/* =========================
   MOBILE
   ========================= */

@media (max-width: 768px) {

    .results-section {
        padding: 50px 20px;
    }

    .results-section h2 {
        font-size: 26px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

}

/* Smooth Hero Slideshow */
.hero {
    background-image: none !important;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
    z-index: 0;
}

.hero.fade-image::before {
    opacity: 0;
}

.hero-overlay {
    z-index: 1;
}

.hero-content {
    z-index: 2;
}


/* =========================
   MY BOOKINGS MODAL - نافذة حجوزاتي (الدفعة 1)
   نفس شكل نافذة الحجز الحالية
   ========================= */

.bookings-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

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

.bookings-modal-content {
    background: white;
    color: #1f2937;
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
    font-family: Arial, sans-serif;
}

.bookings-modal-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1f2937;
}

.booking-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.booking-number {
    font-size: 13px;
    font-weight: bold;
    color: #1455a0;
    margin-bottom: 6px;
}

.booking-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1f2937;
}

.booking-info p {
    margin: 4px 0;
    color: #4b5563;
    line-height: 1.5;
}

.no-bookings {
    color: #6b7280;
    margin-bottom: 10px;
}

.bookings-close-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    background: #2563eb;
    color: white;
    font-size: 16px;
    cursor: pointer;
}


/* =========================
   DELETE BOOKING MODAL - نافذة حذف الحجز (الدفعة 2)
   تستعمل نفس شكل نافذة حجوزاتي، وهذه عناصرها الإضافية فقط
   ========================= */

.modal-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    color: #1f2937;
}

.modal-input:focus {
    outline: none;
    border-color: #1455a0;
}

.modal-hint {
    font-size: 13px;
    color: #6b7280;
    margin-top: 8px;
}

.modal-error {
    min-height: 20px;
    font-size: 14px;
    color: #dc2626;
    margin-top: 6px;
}

.modal-success {
    font-size: 16px;
    color: #15803d;
    font-weight: bold;
    margin-bottom: 10px;
}

.modal-danger-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    background: #dc2626;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.modal-secondary-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #1f2937;
    font-size: 16px;
    cursor: pointer;
}


/* =====================================================================
   المرحلة 1 — هوية Darna | دارنا (التصميم الأبيض)
   كل التصميم الجديد في هذا القسم فقط، وهو يعلو على القواعد القديمة.
   لإرجاع الشكل القديم: احذف هذا القسم كاملًا.
   ===================================================================== */

:root {
    --navy: #0b3d5c;          /* اللون الرئيسي */
    --navy-dark: #072a40;
    --sand: #a87a3c;          /* الرملي على الأبيض */
    --sand-light: #e8cf9f;    /* الرملي على الأزرق */
    --sand-soft: #f6efe3;     /* خلفية رملية خفيفة جدًا */
    --ink: #1f2937;           /* لون النص */
    --muted: #5b6b78;         /* نص ثانوي */
    --line: #e7e2d8;          /* الخطوط الفاصلة */
    --bg: #ffffff;
    --radius: 18px;
    --shadow: 0 6px 24px rgba(11, 61, 92, 0.08);
    --font: "Tajawal", Arial, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
}

button, input, select {
    font-family: inherit;
}

/* ---------- الهيدر ---------- */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 24px;
    padding: 14px 5%;
    background: var(--bg);
    color: var(--navy);
    border-bottom: 1px solid var(--line);
    transition: box-shadow 0.2s ease;
}

header.scrolled {
    box-shadow: 0 4px 18px rgba(11, 61, 92, 0.08);
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    display: block;
    height: 36px;
    width: auto;
}

nav {
    gap: 28px;
}

nav a {
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--navy);
    border-bottom-color: var(--sand-light);
}

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

.language-selector select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    cursor: pointer;
}

.login-btn,
#myBookingsBtn {
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.login-btn {
    background: var(--navy);
    color: white;
    border: 1px solid var(--navy);
}

.login-btn:hover {
    background: var(--navy-dark);
}

#myBookingsBtn {
    background: var(--bg);
    color: var(--navy);
    border: 1px solid var(--line);
}

#myBookingsBtn:hover {
    box-shadow: var(--shadow);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--navy);
}

/* ---------- الواجهة (الصور المتغيرة) ---------- */

.hero {
    min-height: 560px;
    margin: 20px 5% 0;
    border-radius: 28px;
}

.hero h1 {
    font-weight: 800;
}

.location {
    color: var(--sand-light);
}

.primary-btn,
.secondary-btn {
    border-radius: 999px;
}

.primary-btn {
    color: var(--navy);
}

.secondary-btn:hover {
    color: var(--navy);
}

/* ---------- شريط البحث ---------- */

.search-section {
    position: relative;
    z-index: 5;
    margin-top: -46px;
    padding: 0 5% 10px;
    background: transparent;
}

.search-box {
    max-width: 960px;
    padding: 8px;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 12px 34px rgba(11, 61, 92, 0.14);
}

.search-box > div {
    position: relative;
    padding: 8px 22px;
    text-align: start;
    border-right: none;
    border-radius: 999px;
    transition: background 0.2s ease;
}

/* فاصل مستقيم بين الخانات، ينقلب تلقائيًا مع اتجاه اللغة */
.search-box > div + div::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 22%;
    height: 56%;
    width: 1px;
    background: var(--line);
}

.search-box > div:hover::before,
.search-box > div:hover + div::before {
    opacity: 0;
}

.search-box > div:hover {
    background: var(--sand-soft);
}

.search-box label {
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 2px;
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: var(--ink);
    font-size: 15px;
    padding: 2px 0;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 52px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--navy);
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--navy-dark);
}

/* أيقونة العدسة: تُرسم بالـ CSS حتى لا تمحوها الترجمة حين تغيّر نص الزر */
.search-btn::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---------- بطاقات الإقامات ---------- */

.results-section {
    padding: 56px 5% 70px;
    background: var(--bg);
    text-align: start;
}

.results-section h2 {
    max-width: 1200px;
    margin: 0 auto 28px;
    font-size: 28px;
    font-weight: 800;
    color: var(--ink);
}

.results-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.stay-card {
    border-radius: var(--radius);
    box-shadow: none;
    background: var(--bg);
    text-align: start;
    overflow: visible;
}

.stay-card:hover {
    transform: none;
    box-shadow: none;
}

.stay-media {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.stay-card .stay-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.stay-card:hover .stay-media img {
    transform: scale(1.04);
}

.stay-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--navy);
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.stay-info {
    padding: 14px 4px 0;
}

.stay-info h3 {
    margin: 0 0 2px;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
}

.stay-location {
    display: block;
    font-size: 14px;
    color: var(--muted);
}

.stay-info p {
    margin: 6px 0;
    font-size: 15px;
    color: var(--muted);
}

.stay-info .price {
    margin-top: 10px;
    font-size: 17px;
    font-weight: 800;
    color: var(--navy);
}

.book-btn {
    margin-top: 12px;
    border-radius: 12px;
    background: var(--navy);
    font-weight: 700;
}

.book-btn:hover {
    background: var(--navy-dark);
}

/* زر حذف الحجز: نفس المكان، بإطار حتى لا يُخلط بأزرار البطاقات */
#deleteBookingBtn {
    display: block;
    width: auto;
    margin: 36px auto 0;
    padding: 12px 28px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
}

#deleteBookingBtn:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: var(--bg);
}

/* ---------- الهاتف والجهاز اللوحي ---------- */

@media (max-width: 1024px) {

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

    .menu-toggle {
        display: flex;
    }

    /* القائمة المفتوحة على الهاتف */
    header.menu-open {
        flex-wrap: wrap;
    }

    header.menu-open nav,
    header.menu-open .header-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        order: 3;
        gap: 6px;
    }

    header.menu-open nav {
        padding-top: 10px;
        border-top: 1px solid var(--line);
    }

    header.menu-open nav a {
        padding: 10px 4px;
        font-size: 16px;
    }

    header.menu-open .header-actions {
        order: 4;
        padding-bottom: 6px;
    }

    header.menu-open .language-selector select,
    header.menu-open .login-btn,
    header.menu-open #myBookingsBtn {
        width: 100%;
        height: 44px;
    }
}

@media (max-width: 768px) {

    header {
        padding: 12px 16px;
    }

    .logo img {
        height: 30px;
    }

    .hero {
        min-height: 480px;
        margin: 12px 12px 0;
        border-radius: 22px;
    }

    .search-section {
        margin-top: -30px;
        padding: 0 16px 10px;
    }

    .search-box {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        border-radius: 22px;
    }

    .search-box > div {
        width: 100%;
        padding: 10px 14px;
        border-bottom: 1px solid var(--line);
        border-radius: 12px;
    }

    .search-box > div + div::before {
        display: none;
    }

    .hero-content {
        padding-bottom: 56px;
    }

    .search-box > div:nth-last-of-type(1) {
        border-bottom: none;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
        margin-top: 8px;
        height: 50px;
    }

    .results-section {
        padding: 40px 16px 56px;
    }

    .results-section h2 {
        font-size: 23px;
    }
}


/* =====================================================================
   المرحلة 3 — رسالة خطأ البحث، ولا توجد نتائج، ورابط صفحة حجوزاتي
   ===================================================================== */

.search-error {
    max-width: 960px;
    min-height: 22px;
    margin: 12px auto 0;
    padding: 0 12px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    color: #dc2626;
}

.no-results {
    grid-column: 1 / -1;
    margin: 0;
    padding: 40px 24px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--sand-soft);
    text-align: center;
    font-size: 16px;
    color: var(--ink);
}

.modal-link-btn {
    display: block;
    margin-top: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--navy);
    font-size: 16px;
    font-weight: 700;
}

.modal-link-btn:hover {
    background: var(--sand-soft);
}


/* ================= المرحلة 4: الحسابات ================= */
/* تحية المستخدم بجانب زر تسجيل الخروج في الشريط العلوي */

.account-greeting {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--navy);
    font-size: 14px;
    font-weight: 700;
}

.account-greeting:empty {
    display: none;
}

.login-btn[data-state="signed-in"] {
    background: var(--bg);
    color: var(--navy);
    border-color: var(--line);
}

.login-btn[data-state="signed-in"]:hover {
    background: var(--sand-soft);
}

@media (max-width: 1024px) {
    header.menu-open .account-greeting {
        max-width: none;
        padding: 6px 4px;
        text-align: center;
    }
}

/* المرحلة 4هـ: رابط "لوحة المضيف" (يظهر للمضيف فقط) */
.host-link {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--sand-soft);
    color: var(--navy);
    border: 1px solid var(--sand-light);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.host-link:hover,
.host-link[aria-current="page"] {
    border-color: var(--sand);
}

@media (max-width: 1024px) {
    header.menu-open .host-link {
        width: 100%;
        height: 44px;
        justify-content: center;
    }
}

/* ================= المرحلة 5: شريط "نسخة تجريبية" ================= */
/* يُضاف من site-notice.js فوق الهيدر في كل الصفحات. لإزالته: DARNA_SHOW_NOTICE = false */

.site-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 5%;
    background: var(--sand-soft);
    border-bottom: 1px solid var(--sand-light);
    color: var(--navy);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.site-notice-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--sand);
    color: var(--sand);
    font-size: 11px;
    font-weight: 800;
    font-family: Georgia, serif;
}

@media (max-width: 768px) {
    .site-notice {
        padding: 7px 14px;
        font-size: 12px;
        text-align: start;
    }
}
