/* =====================================================
   EverBlue — Main Stylesheet
   Based on Visual Identity Manual v1.0
   Navy #1F2B3E | Blue #2F5F9D | Silver #CFCFC9 | Silver Dark #85878A
   ===================================================== */

:root {
    --navy: #1F2B3E;
    --blue: #2F5F9D;
    --silver: #CFCFC9;
    --silver-dark: #85878A;
    --white: #FFFFFF;
    --navy-light: #2A3B54;
    --success: #2E7D32;
    --danger: #C62828;

    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Poppins', sans-serif;

    --radius: 10px;
    --shadow-sm: 0 2px 8px rgba(31,43,62,0.08);
    --shadow-md: 0 6px 24px rgba(31,43,62,0.12);
    --shadow-lg: 0 12px 40px rgba(31,43,62,0.18);
    --transition: all 0.25s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-ar), var(--font-en);
    color: var(--navy);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    max-width: 100vw;
}

/* حماية عامة: أي صورة أو جدول أو حاوية زيادة عن عرض الشاشة بالغلط متكسرش تصميم الموبايل */
img, table, .container, section { max-width: 100%; }
img { height: auto; }

body.lang-en { font-family: var(--font-en), var(--font-ar); }

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 700; color: var(--navy); line-height: 1.3; }
h1 { font-size: clamp(28px, 4vw, 46px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 20px; }
p { color: #45505f; }

.section-tag {
    display: inline-block;
    color: var(--blue);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    position: relative;
    padding-inline-start: 26px;
}
.section-tag::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 3px;
    background: var(--blue);
    border-radius: 3px;
}

.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header p { margin-top: 12px; font-size: 16px; }

.section { padding: 80px 0; }
.section-alt { background: #F5F7FA; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--navy); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--blue); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--silver); }
.btn-whatsapp { background: #25D366; color: var(--white); }
.btn-whatsapp:hover { background: #1EBE57; }
.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: 9px 18px; font-size: 13px; }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #EAEDF1;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 46px; width: auto; }

@media (max-width: 480px) {
    .header-inner { gap: 10px; padding: 10px 0; }
    .brand img { height: 34px; }
    .lang-switch { font-size: 12px; padding: 3px; }
    .lang-switch a { padding: 4px 9px; }
}

.main-nav { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; }
.main-nav a {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
    transition: var(--transition);
}
.main-nav a:hover, .main-nav a.active { background: #EEF2F8; color: var(--blue); }

/* "المزيد" - قائمة منسدلة تجمع الروابط الزيادة عن العدد اللي الأدمن حدده، عشان مايحصلش زحمة في القائمة الرئيسية */
.nav-more { position: relative; }
.nav-more-btn {
    padding: 10px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}
.nav-more-btn:hover, .nav-more.open .nav-more-btn { background: #EEF2F8; color: var(--blue); }
.nav-more-menu {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    min-width: 200px;
    z-index: 50;
    flex-direction: column;
}
.nav-more.open .nav-more-menu { display: flex; }
.nav-more-menu a { padding: 10px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--navy); }
.nav-more-menu a:hover { background: #EEF2F8; color: var(--blue); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1.5px solid var(--silver);
    border-radius: 20px;
    padding: 4px;
    font-size: 13px;
    font-weight: 700;
}
.lang-switch a { padding: 5px 12px; border-radius: 16px; color: var(--silver-dark); }
.lang-switch a.active { background: var(--navy); color: var(--white); }

.mobile-toggle { display: none; font-size: 26px; color: var(--navy); }

/* الروابط دي (اطلب شقة/حسابي/اتصل بنا) بتتكرر جوه main-nav خصيصًا للموبايل، فمنسيبهاش مكررة تاني جوه main-nav على الديسكتوب */
.main-nav-mobile-extra { display: none; }

@media (max-width: 960px) {
    .main-nav {
        position: fixed;
        inset-inline-start: 0;
        top: 74px;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        box-shadow: var(--shadow-md);
        transform: translateY(-150%);
        transition: var(--transition);
        max-height: calc(100vh - 74px);
        overflow-y: auto;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a { padding: 10px 16px; border-bottom: 1px solid #F0F0F0; line-height: 1.5; }
    .mobile-toggle { display: block; }
    .header-desktop-only { display: none; }
    .main-nav-mobile-extra { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 2px solid #F0F0F0; }
    .main-nav-mobile-extra a:not(.btn) { padding: 10px 16px; border-bottom: 1px solid #F0F0F0; font-weight: 600; color: var(--navy); line-height: 1.5; }

    /* على الموبايل مفيش داعي لزرار "المزيد" - القائمة أصلًا عمودية، فبنفرد الروابط كلها زي باقي الروابط عادي */
    .nav-more-btn { display: none; }
    .nav-more-menu {
        display: flex;
        position: static;
        box-shadow: none;
        padding: 0;
        min-width: 0;
        border-radius: 0;
    }
    .nav-more-menu a { padding: 10px 16px; border-bottom: 1px solid #F0F0F0; border-radius: 0; font-size: 15px; line-height: 1.5; }
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--navy) 0%, #16202E 100%);
    color: var(--white);
    padding: 60px 0 50px;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(47,95,157,0.35), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(207,207,201,0.12), transparent 40%);
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 760px; margin: 0 auto; }
.hero h1 { color: var(--white); margin-bottom: 18px; }
.hero p { color: #C7D0DC; font-size: 18px; margin-bottom: 55px; }

.hero-stats {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat strong { display: block; font-size: 32px; color: var(--silver); font-weight: 800; }
.hero-stat span { color: #9FADC0; font-size: 14px; }

/* ---------- Search box ---------- */
.search-box {
    position: relative;
    z-index: 3;
    background: var(--white);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-lg);
    max-width: 980px;
    margin: -45px auto 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr auto;
    gap: 14px;
}
.search-field { display: flex; flex-direction: column; gap: 6px; text-align: start; }
.search-field label { font-size: 12px; font-weight: 700; color: var(--silver-dark); }
.search-field input, .search-field select {
    border: 1.5px solid #E4E7EC;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 14px;
    color: var(--navy);
    background: #FAFBFC;
}
.search-field input:focus, .search-field select:focus { outline: none; border-color: var(--blue); background: var(--white); }
.search-box .btn { height: 48px; align-self: end; }

@media (max-width: 860px) {
    .search-box { grid-template-columns: 1fr 1fr; margin-top: -30px; }
    .search-box .btn { grid-column: span 2; }
    .search-field { min-width: 0; }
    .search-field select, .search-field input { width: 100%; min-width: 0; }
}
@media (max-width: 480px) {
    .search-box { grid-template-columns: 1fr; padding: 16px; gap: 12px; }
    .search-box .btn { grid-column: span 1; }
}

/* نسخة أوسع من صندوق البحث لصفحات النتائج (فيها حقول فلترة أكتر: غرف، مساحة، سعر...) */
.search-box-wide {
    background: var(--white); border-radius: 16px; padding: 22px; box-shadow: var(--shadow-lg);
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; align-items: end;
}
.search-box-wide .btn { height: 48px; }
@media (max-width: 700px) {
    .search-box-wide { grid-template-columns: 1fr 1fr; }
}

/* =====================================================
   CARDS — Projects / Units
   ===================================================== */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #EEF0F3;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.card-image { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #E9ECEF; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.card:hover .card-image img { transform: scale(1.06); }

.card-badge {
    position: absolute;
    top: 12px;
    inset-inline-start: 12px;
    background: var(--blue);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
}
.card-badge.status-sold { background: var(--danger); }
.card-badge.status-coming { background: var(--silver-dark); }

.card-badge-resale {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: #7B4B94;
    color: var(--white);
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
}

/* =====================================================
   ANNOUNCEMENT BAR
   ===================================================== */
.announcement-bar { background: linear-gradient(90deg, var(--navy), var(--blue)); color: var(--white); font-size: 13.5px; }
.announcement-inner { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 20px; flex-wrap: wrap; position: relative; }
.announcement-msg { font-weight: 600; }
.announcement-msg a { color: var(--white); text-decoration: underline; font-weight: 700; margin-inline-start: 6px; }
.announcement-countdown { background: rgba(255,255,255,0.15); padding: 3px 12px; border-radius: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.announcement-close { position: absolute; inset-inline-end: 16px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--white); opacity: .7; cursor: pointer; font-size: 15px; }
.announcement-close:hover { opacity: 1; }

.card-body { padding: 18px; }
.card-body h3 { font-size: 17px; margin-bottom: 6px; }
.card-location { display: flex; align-items: center; gap: 6px; color: var(--silver-dark); font-size: 13px; margin-bottom: 12px; }
.card-meta { display: flex; gap: 14px; font-size: 13px; color: #5A6472; margin-bottom: 14px; flex-wrap: wrap; }
.card-meta span { display: flex; align-items: center; gap: 5px; }
.card-price { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.card-price small { font-size: 12px; font-weight: 500; color: var(--silver-dark); }

/* ---- حجم فونت أقسام الرئيسية (يتحكم فيه الأدمن من الإعدادات) ---- */
.home-font-small h2 { font-size: clamp(20px, 2.4vw, 27px); }
.home-font-small h3, .home-font-small .card-body h3 { font-size: 14px; }
.home-font-small .section-header p, .home-font-small .card-location, .home-font-small .card-meta { font-size: 11.5px; }
.home-font-small .card-price { font-size: 15px; }

.home-font-large h2 { font-size: clamp(28px, 3.6vw, 40px); }
.home-font-large h3, .home-font-large .card-body h3 { font-size: 20px; }
.home-font-large .section-header p, .home-font-large .card-location, .home-font-large .card-meta { font-size: 15px; }
.home-font-large .card-price { font-size: 21px; }

/* =====================================================
   MATERIAL PRICES — Stock board style
   ===================================================== */
.price-board {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #EEF0F3;
}
.price-filters {
    display: flex;
    gap: 10px;
    padding: 18px;
    flex-wrap: wrap;
    border-bottom: 1px solid #EEF0F3;
    background: #FAFBFC;
}
.price-filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    background: var(--white);
    border: 1.5px solid #E4E7EC;
    color: var(--silver-dark);
    transition: var(--transition);
}
.price-filter-btn.active, .price-filter-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.price-table { width: 100%; border-collapse: collapse; }
.price-table th {
    background: var(--navy);
    color: var(--white);
    text-align: start;
    padding: 14px 18px;
    font-size: 13px;
    font-weight: 700;
    position: sticky;
    top: 0;
}
.price-table td { padding: 16px 18px; border-bottom: 1px solid #F0F2F5; font-size: 14.5px; }
.price-table tr:hover td { background: #FAFBFC; }
.price-table tr:last-child td { border-bottom: none; }

.price-cat-tag { font-size: 11px; color: var(--silver-dark); display: block; margin-top: 2px; }
.price-value { font-weight: 800; font-size: 16px; color: var(--navy); }

.price-change { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13.5px; padding: 4px 10px; border-radius: 6px; }
.price-change.up { color: var(--success); background: #E8F5E9; }
.price-change.down { color: var(--danger); background: #FDECEA; }
.price-change.stable { color: var(--silver-dark); background: #F0F1F3; }

.price-updated { color: var(--silver-dark); font-size: 12.5px; }

.price-alert-box {
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
    margin-top: 40px;
}
.price-alert-box h3 { color: var(--white); margin-bottom: 8px; }
.price-alert-box p { color: #B8C2D0; margin-bottom: 22px; }
.alert-form { display: flex; gap: 12px; max-width: 460px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.alert-form input {
    flex: 1;
    min-width: 200px;
    padding: 13px 16px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
}

@media (max-width: 720px) {
    .price-table { font-size: 13px; }
    .price-table th, .price-table td { padding: 10px 12px; }
}

/* =====================================================
   SERVICES / PROCESS (Contracting)
   ===================================================== */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 960px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

.service-card {
    background: var(--white);
    border: 1px solid #EEF0F3;
    border-radius: var(--radius);
    padding: 30px 24px;
    text-align: center;
    transition: var(--transition);
}
.service-card:hover { border-color: var(--blue); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.service-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--navy), var(--blue));
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    color: var(--white);
    font-size: 26px;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}
.service-card h3 { margin-bottom: 10px; }
.service-card p { font-size: 14px; }

.process-steps { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; position: relative; }
.process-steps::before {
    content: '';
    position: absolute;
    top: 28px; inset-inline-start: 5%; inset-inline-end: 5%;
    height: 2px;
    background: var(--silver);
    z-index: 0;
}
.process-step { flex: 1; text-align: center; position: relative; z-index: 1; }
.process-num {
    width: 56px; height: 56px;
    background: var(--white);
    border: 3px solid var(--blue);
    color: var(--blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 20px;
    margin: 0 auto 14px;
}
.process-step span { font-weight: 700; font-size: 14px; }

@media (max-width: 720px) {
    .process-steps { flex-direction: column; }
    .process-steps::before { display: none; }
}

/* Before/After portfolio */
.portfolio-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; }
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; }
.portfolio-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(31,43,62,0.9), transparent 60%);
    display: flex; align-items: flex-end;
    padding: 20px;
    opacity: 0; transition: var(--transition);
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay h4 { color: var(--white); font-size: 16px; }

/* =====================================================
   SUPPLIES
   ===================================================== */
.supply-cat-card {
    background: var(--navy);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    color: var(--white);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.supply-cat-card:hover { background: var(--blue); transform: translateY(-4px); }
.supply-cat-card h3 { color: var(--white); font-size: 16px; margin-top: 12px; }
.supply-cat-card .icon { font-size: 34px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif; }

/* =====================================================
   UNIT DETAIL PAGE
   ===================================================== */

/* ===== معرض الصور الاحترافي (Pro Gallery) - يستخدم في صفحة الوحدة وصفحة تفاصيل الإعلان ===== */
.pro-gallery { display: flex; gap: 12px; margin-bottom: 10px; }
.pro-gallery-thumbs { display: flex; flex-direction: column; gap: 8px; width: 84px; flex-shrink: 0; max-height: 460px; overflow-y: auto; }
.pro-gallery-thumb { border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .6; transition: var(--transition); border: 2px solid transparent; flex-shrink: 0; }
.pro-gallery-thumb img { width: 100%; height: 64px; object-fit: cover; display: block; }
.pro-gallery-thumb:hover { opacity: .9; }
.pro-gallery-thumb.active { opacity: 1; border-color: var(--blue); }

.pro-gallery-main { position: relative; flex: 1; aspect-ratio: 4/3; max-height: 460px; border-radius: var(--radius); overflow: hidden; background: #E9ECEF; }
.pro-gallery-main-viewport { width: 100%; height: 100%; }
.pro-gallery-main-img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: opacity .25s ease; }
.pro-gallery-main-img.fading { opacity: 0; }

.pro-gallery-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(31,43,62,.55); color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: background .2s ease;
}
.pro-gallery-arrow:hover { background: rgba(31,43,62,.85); }
.pro-gallery-prev { inset-inline-start: 12px; }
.pro-gallery-next { inset-inline-end: 12px; }

.pro-gallery-zoom-btn {
    position: absolute; bottom: 12px; inset-inline-end: 12px; z-index: 2;
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(31,43,62,.55); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center;
    transition: background .2s ease;
}
.pro-gallery-zoom-btn:hover { background: rgba(31,43,62,.85); }

.pro-gallery-counter {
    position: absolute; bottom: 12px; inset-inline-start: 12px; z-index: 2;
    background: rgba(31,43,62,.55); color: #fff; font-size: 12.5px; padding: 4px 10px; border-radius: 20px;
}

@media (max-width: 760px) {
    .pro-gallery { flex-direction: column-reverse; }
    .pro-gallery-thumbs { flex-direction: row; width: 100%; max-height: none; overflow-x: auto; overflow-y: hidden; }
    .pro-gallery-thumb { width: 72px; }
    .pro-gallery-thumb img { height: 54px; }
    .pro-gallery-main { aspect-ratio: 4/3; max-height: none; }
}

/* ===== Lightbox: عارض الصور بملء الشاشة مع الزووم ===== */
.pro-gallery-lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(10,14,20,.94); flex-direction: column; align-items: center; justify-content: center;
}
.pro-gallery-lightbox.open { display: flex; }
.pro-gallery-lightbox-toolbar {
    position: absolute; top: 0; inset-inline: 0; display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; z-index: 2;
}
.pro-gallery-lightbox-counter { color: #fff; font-size: 14px; background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 20px; }
.pro-gallery-lightbox-btn {
    width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.12); color: #fff; font-size: 17px; display: flex; align-items: center; justify-content: center;
    transition: background .2s ease;
}
.pro-gallery-lightbox-btn:hover { background: rgba(255,255,255,.25); }

.pro-gallery-lightbox-stage {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
    overflow: hidden; cursor: grab; touch-action: none;
}
.pro-gallery-lightbox-stage.grabbing { cursor: grabbing; }
.pro-gallery-lightbox-stage img {
    max-width: 92vw; max-height: 82vh; object-fit: contain; user-select: none;
    transition: transform .12s ease-out; transform-origin: center center;
}
.pro-gallery-lightbox-stage img.no-transition { transition: none; }

.pro-gallery-lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,.12); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center;
    transition: background .2s ease;
}
.pro-gallery-lightbox-nav:hover { background: rgba(255,255,255,.25); }
.pro-gallery-lightbox-prev { inset-inline-start: 16px; }
.pro-gallery-lightbox-next { inset-inline-end: 16px; }

.pro-gallery-lightbox-hint {
    position: absolute; bottom: 14px; inset-inline: 0; text-align: center;
    color: rgba(255,255,255,.55); font-size: 12.5px; margin: 0; pointer-events: none;
}
@media (max-width: 640px) {
    .pro-gallery-lightbox-nav { width: 38px; height: 38px; font-size: 15px; }
    .pro-gallery-lightbox-hint { display: none; }
}

.unit-videos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.unit-video-box { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); background: #000; }
.unit-video-box iframe, .unit-video-box video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =====================================================
   MOST VIEWED SLIDER (homepage)
   ===================================================== */
.most-viewed-slider { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin: 0 -4px; }
.most-viewed-slider .card { flex: 0 0 280px; scroll-snap-align: start; }
.most-viewed-slider::-webkit-scrollbar { height: 6px; }
.most-viewed-slider::-webkit-scrollbar-thumb { background: var(--silver); border-radius: 4px; }
.slider-nav { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 16px; }
.slider-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--silver); background: var(--white); cursor: pointer; font-size: 16px; transition: var(--transition); }
.slider-nav button:hover { background: var(--navy); color: var(--white); }

/* ===== سلايدر مصغّر جوه كارت الإعلان - يعرض باقي صور الإعلان من غير الدخول لصفحته ===== */
.mini-slider-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(31,43,62,.5); color: #fff; font-size: 15px; display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s ease, background .2s ease;
}
.card-image.mini-slider:hover .mini-slider-arrow { opacity: 1; }
.mini-slider-arrow:hover { background: rgba(31,43,62,.85); }
.mini-slider-prev { inset-inline-start: 8px; }
.mini-slider-next { inset-inline-end: 8px; }
.mini-slider-dots { position: absolute; bottom: 8px; inset-inline: 0; z-index: 3; display: flex; justify-content: center; gap: 5px; }
.mini-slider-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.55); transition: background .2s ease, transform .2s ease; }
.mini-slider-dot.active { background: #fff; transform: scale(1.25); }
@media (hover: none) {
    .mini-slider-arrow { opacity: 1; } /* على الموبايل مفيش hover، فالأسهم تفضل ظاهرة على طول */
}
.card-views-badge { position: absolute; bottom: 10px; inset-inline-start: 10px; background: rgba(31,43,62,.75); color: #fff; font-size: 12px; padding: 4px 10px; border-radius: 20px; }

.unit-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin-top: 40px; align-items: start; }
@media (max-width: 900px) { .unit-layout { grid-template-columns: 1fr; } }

.unit-quick-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; }
@media (max-width: 620px) { .unit-quick-facts { grid-template-columns: repeat(2, 1fr); } }
.quick-fact { background: #F5F7FA; border-radius: 10px; padding: 16px; text-align: center; }
.quick-fact strong { display: block; font-size: 18px; color: var(--navy); }
.quick-fact span { font-size: 12px; color: var(--silver-dark); }

.sticky-sidebar { position: sticky; top: 100px; }
.contact-card {
    background: var(--white);
    border: 1px solid #EEF0F3;
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow-sm);
}
.contact-card .price-value { font-size: 26px; margin-bottom: 4px; }
.contact-card .btn { margin-top: 10px; }

.payment-plan-box { background: #F5F7FA; border-radius: 10px; padding: 20px; margin-top: 20px; }
.payment-plan-box h4 { margin-bottom: 12px; font-size: 15px; }
.payment-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #DDE1E6; font-size: 14px; }
.payment-row:last-child { border-bottom: none; }

.map-embed { border-radius: var(--radius); overflow: hidden; height: 300px; margin-top: 24px; background: #E9ECEF; }

/* =====================================================
   ABOUT / STATS
   ===================================================== */
.stats-strip { background: var(--navy); padding: 50px 0; }
.stats-strip .grid-4 { text-align: center; }
.stats-strip strong { display: block; font-size: 36px; color: var(--silver); font-weight: 800; }
.stats-strip span { color: #9FADC0; font-size: 14px; }

.pillar-card { text-align: center; padding: 30px; }
.pillar-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius);
    border: 1px solid transparent;
    transition: var(--transition);
}
.pillar-card-link:hover {
    border-color: var(--blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-6px);
}
.pillar-card-link:hover .pillar-icon {
    background: var(--blue);
    color: var(--white);
    transform: scale(1.12) rotate(-6deg);
}
.pillar-icon {
    width: 78px; height: 78px;
    border: 2px solid var(--blue);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
    color: var(--blue);
    font-size: 30px;
    transition: var(--transition);
    /* بعض متصفحات الكمبيوتر (خصوصًا ويندوز) بترندر الإيموجي بالخط الافتراضي كرمز واحد اللون
       بيتلوّن بلون النص (color) بدل الشكل الملون الأصلي - ده اللي بيخلي الأيقونة تبان دايرة زرقا فاضية
       بدل الإيموجي. إجبار خط إيموجي ملون معروف بيحل المشكلة على كل الأجهزة */
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
}

/* =====================================================
   TESTIMONIALS
   ===================================================== */
.testimonial-card {
    background: var(--white);
    border: 1px solid #EEF0F3;
    border-radius: var(--radius);
    padding: 26px;
}
.testimonial-stars { color: #F5B301; font-size: 15px; margin-bottom: 12px; }
.testimonial-text { font-size: 14.5px; color: #45505f; margin-bottom: 18px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-author img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.testimonial-author strong { font-size: 14px; display: block; }

/* =====================================================
   FORMS
   ===================================================== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: var(--navy); }
.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #E4E7EC;
    border-radius: 8px;
    font-size: 14.5px;
    background: #FAFBFC;
    transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--blue); background: var(--white); }
textarea.form-control { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer { background: var(--navy); color: #C7D0DC; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-grid img { height: 42px; margin-bottom: 16px; }
.footer-grid p { color: #9FADC0; font-size: 14px; }
.footer-grid h4 { color: var(--white); font-size: 16px; margin-bottom: 18px; }
.footer-links li { margin-bottom: 11px; }
.footer-links a { color: #9FADC0; font-size: 14px; transition: var(--transition); }
.footer-links a:hover { color: var(--silver); padding-inline-start: 4px; }

.footer-contact li { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: #9FADC0; font-size: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    transition: var(--transition);
}
.footer-social a:hover { background: var(--blue); }
.footer-social a { font-size: 13px; font-weight: 700; text-transform: uppercase; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #7C8AA0;
}

/* =====================================================
   WhatsApp floating button
   ===================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    inset-inline-end: 24px;
    width: 58px; height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 28px;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    transition: var(--transition);
}
.whatsapp-float:hover { transform: scale(1.08); }

.back-to-top {
    position: fixed;
    bottom: 24px;
    inset-inline-start: 24px;
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--blue), var(--navy));
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(31,43,62,0.35);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(.85);
    transition: opacity .3s ease, visibility .3s ease, transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.back-to-top:hover { box-shadow: 0 8px 26px rgba(31,43,62,0.5); transform: translateY(-4px) scale(1.06); }
.back-to-top svg { width: 22px; height: 22px; }

/* زر تليجرام العايم: بياخد شكل زر الواتساب (.whatsapp-float) ويقعد فوق زر الشات
   ترتيب الزراير من تحت لفوق: واتساب (24px) ← شات (92px، في chatbot.css) ← تليجرام (92 + 58 + 10 = 160px) */
.telegram-float { bottom: 160px; background: #229ED9; }
.telegram-float:hover { background: #1B87B9; }
.telegram-float svg { width: 32px; height: 32px; }

/* الموبايل: أزرار أصغر ومسافات أضيق عشان مايغطوش الحقول (الشات في chatbot.css بنفس الأرقام) */
@media (max-width: 600px) {
    .whatsapp-float { width: 48px; height: 48px; font-size: 22px; bottom: 14px; inset-inline-end: 14px; }
    .telegram-float { bottom: 126px; }              /* 14 + 48 + 8 (شات) + 48 + 8 */
    .telegram-float svg { width: 26px; height: 26px; }
    .back-to-top { width: 44px; height: 44px; bottom: 14px; inset-inline-start: 14px; }
    .back-to-top svg { width: 20px; height: 20px; }
}

/* لما قائمة الموبايل تكون مفتوحة: نخبّي الأزرار العايمة كلها مع بعض (المتصفحات القديمة اللي مش بتدعم :has بتتجاهل القاعدة دي) */
@media (max-width: 960px) {
    body:has(.main-nav.open) .whatsapp-float,
    body:has(.main-nav.open) .chatbot-float,
    body:has(.main-nav.open) .back-to-top { opacity: 0; visibility: hidden; pointer-events: none; }
}

/* =====================================================
   Breadcrumb
   ===================================================== */
.breadcrumb { background: #F5F7FA; padding: 16px 0; font-size: 13.5px; color: var(--silver-dark); }
.breadcrumb a { color: var(--blue); }

/* =====================================================
   Page hero (inner pages)
   ===================================================== */
.page-hero {
    background: linear-gradient(135deg, var(--navy), #16202E);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero p { color: #B8C2D0; }

/* Utility */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--silver-dark); }

/* ===== محادثة الأسئلة عن الوحدة (unit-detail.php) ===== */
.unit-comments-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid #EEF0F3; }
.comments-thread { display: flex; flex-direction: column; gap: 12px; margin: 20px 0; max-height: 420px; overflow-y: auto; padding-inline-end: 6px; }
.comment-bubble { max-width: 78%; padding: 12px 16px; border-radius: 14px; position: relative; }
.comment-bubble.comment-customer { align-self: flex-end; background: var(--blue); color: #fff; border-end-end-radius: 4px; }
.comment-bubble.comment-admin { align-self: flex-start; background: #F0F2F5; color: var(--navy); border-end-start-radius: 4px; }
.comment-sender { display: block; font-size: 11.5px; font-weight: 700; opacity: .75; margin-bottom: 4px; }
.comment-bubble p { margin: 0; font-size: 14px; line-height: 1.7; white-space: pre-wrap; }
.comment-time { display: block; font-size: 10.5px; opacity: .6; margin-top: 6px; }
.comment-reactions { display: flex; gap: 8px; margin-top: 8px; }
.comment-reaction-btn { font-size: 15px; text-decoration: none; opacity: .45; transition: opacity .2s ease, transform .2s ease; filter: grayscale(1); }
.comment-reaction-btn:hover { opacity: .8; }
.comment-reaction-btn.active { opacity: 1; filter: grayscale(0); transform: scale(1.15); }
.comment-form { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.comment-form textarea { flex: 1; border: 1.5px solid #E4E7EC; border-radius: 10px; padding: 12px 14px; font-family: inherit; font-size: 14px; resize: vertical; }
.comment-form textarea:focus { outline: none; border-color: var(--blue); }
.comment-form button { height: 44px; padding: 0 20px; }
@media (max-width: 600px) {
    .comment-bubble { max-width: 90%; }
    .comment-form { flex-direction: column; align-items: stretch; }
}

/* ===== جرس الإشعارات (العميل - هيدر الموقع) ===== */
.site-bell { position: relative; font-size: 20px; text-decoration: none; display: flex; align-items: center; }
.site-bell-badge {
    position: absolute; top: -6px; inset-inline-end: -8px;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 17px; height: 17px; padding: 0 4px;
    background: #E53935; color: #fff; border-radius: 10px; font-size: 10px; font-weight: 700;
}

/* ===== المفضلة (Favorites) ===== */
.fav-btn { position: absolute; bottom: 10px; inset-inline-start: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #B0B6BE; font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.18); transition: transform .15s, color .15s; }
.fav-btn:hover { transform: scale(1.1); }
.fav-btn.is-fav { color: #E53935; }
.fav-btn.fav-btn-labeled { position: static; width: auto; height: auto; border-radius: 999px; padding: 8px 16px; gap: 6px; font-size: 14px; font-weight: 700; background: #F1F3F6; color: var(--navy); box-shadow: none; }
.fav-btn.fav-btn-labeled .fav-heart { color: #B0B6BE; }
.fav-btn.fav-btn-labeled.is-fav .fav-heart { color: #E53935; }
