/* ==========================================================
           COMPACT MODERN FOOTER PATCH
           فوتر أصغر وحديث، مناسب للجوال ولا يأخذ مساحة كبيرة
           ========================================================== */
        .site-footer-compact {
            position: relative !important;
            z-index: 20 !important;
            margin-top: 24px !important;
            padding: 0 14px 10px !important;
            background: transparent !important;
            border-top: 0 !important;
            color: var(--text-color) !important;
            text-align: initial !important;
            box-shadow: none !important;
            -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
        }

        .site-footer-compact::before {
            display: none !important;
            content: none !important;
        }

        .compact-footer-inner {
            width: min(1120px, 100%) !important;
            margin: 0 auto !important;
            border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22)) !important;
            border-radius: 22px 22px 14px 14px !important;
            background: var(--card-bg-solid, #101f34) !important;
            box-shadow: 0 14px 38px rgba(0, 0, 0, 0.12) !important;
            overflow: hidden !important;
        }

        .compact-footer-main {
            display: grid !important;
            grid-template-columns: 1fr 1.35fr 1fr !important;
            gap: 12px !important;
            align-items: center !important;
            padding: 13px 18px !important;
        }

        .compact-footer-block {
            min-width: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 7px !important;
            text-align: center !important;
        }

        .compact-footer-block h3 {
            margin: 0 !important;
            color: var(--secondary-color) !important;
            font-family: 'Tajawal', sans-serif !important;
            font-size: 0.96rem !important;
            font-weight: 800 !important;
            line-height: 1.25 !important;
            position: relative !important;
            padding-bottom: 6px !important;
        }

        .compact-footer-block h3::after {
            content: '' !important;
            position: absolute !important;
            bottom: 0 !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            width: 28px !important;
            height: 2px !important;
            border-radius: 999px !important;
            background: var(--secondary-color) !important;
            box-shadow: none !important;
        }

        .compact-footer-link,
        .branch-chip {
            text-decoration: none !important;
            color: var(--text-secondary) !important;
            transition: all 0.22s ease !important;
        }

        .compact-footer-link {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 7px !important;
            font-size: 0.86rem !important;
            line-height: 1.3 !important;
            max-width: 100% !important;
            word-break: break-word !important;
        }

        .compact-footer-link i {
            color: var(--secondary-color) !important;
            font-size: 0.88rem !important;
        }

        .compact-footer-link:hover,
        .branch-chip:hover {
            color: var(--secondary-color) !important;
            transform: translateY(-1px) !important;
        }

        .branch-chips {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            flex-wrap: wrap !important;
            gap: 7px !important;
        }

        .branch-chip {
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 6px !important;
            padding: 6px 10px !important;
            border-radius: 999px !important;
            background: var(--surface-soft, rgba(255, 255, 255, 0.055)) !important;
            border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22)) !important;
            font-size: 0.84rem !important;
            font-weight: 700 !important;
            line-height: 1.2 !important;
            white-space: nowrap !important;
        }

        .branch-chip i {
            color: var(--secondary-color) !important;
            font-size: 0.76rem !important;
        }

        .branch-chip small {
            color: var(--text-secondary) !important;
            font-size: 0.72rem !important;
            font-weight: 600 !important;
            direction: ltr !important;
        }

        .site-footer-compact .social-icons {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            gap: 8px !important;
            margin: 0 !important;
        }

        .site-footer-compact .social-icons a {
            width: 32px !important;
            height: 32px !important;
            margin: 0 !important;
            display: inline-flex !important;
            align-items: center !important;
            justify-content: center !important;
            border-radius: 50% !important;
            background: var(--surface-soft, rgba(255, 255, 255, 0.055)) !important;
            border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22)) !important;
            color: var(--text-secondary) !important;
            font-size: 0.96rem !important;
            line-height: 1 !important;
        }

        .site-footer-compact .social-icons a::after {
            display: none !important;
            content: none !important;
        }

        .site-footer-compact .social-icons a:hover {
            color: var(--secondary-color) !important;
            background: rgba(45, 212, 191, 0.10) !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 8px 18px rgba(15, 143, 150, 0.12) !important;
        }

        .compact-footer-bottom {
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            gap: 9px !important;
            flex-wrap: wrap !important;
            padding: 7px 13px !important;
            border-top: 1px solid var(--border-color, rgba(148, 163, 184, 0.22)) !important;
            background: rgba(2, 12, 27, 0.10) !important;
            color: var(--text-secondary) !important;
            font-size: 0.74rem !important;
            line-height: 1.4 !important;
            text-align: center !important;
        }

        .compact-footer-bottom span,
        .compact-footer-bottom a {
            color: var(--text-secondary) !important;
            text-decoration: none !important;
            font-size: inherit !important;
            line-height: inherit !important;
            margin: 0 !important;
        }

        .compact-footer-bottom a:hover {
            color: var(--secondary-color) !important;
        }

        .compact-footer-separator {
            opacity: 0.45 !important;
        }

        html[data-theme="light"] .compact-footer-inner,
        body[data-theme="light"] .compact-footer-inner {
            background: #ffffff !important;
            box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
        }

        html[data-theme="light"] .compact-footer-bottom,
        body[data-theme="light"] .compact-footer-bottom {
            background: #f8fafc !important;
        }

        @media (max-width: 768px) {
            .site-footer-compact {
                margin-top: 16px !important;
                padding: 0 9px 8px !important;
            }

            .compact-footer-inner {
                border-radius: 18px 18px 12px 12px !important;
            }

            .compact-footer-main {
                grid-template-columns: 1fr !important;
                gap: 9px !important;
                padding: 11px !important;
            }

            .compact-footer-block {
                gap: 5px !important;
            }

            .compact-footer-block h3 {
                font-size: 0.86rem !important;
                padding-bottom: 5px !important;
            }

            .compact-footer-link {
                font-size: 0.76rem !important;
            }

            .branch-chips {
                gap: 6px !important;
            }

            .branch-chip {
                padding: 5px 8px !important;
                font-size: 0.74rem !important;
                gap: 5px !important;
            }

            .branch-chip small {
                display: none !important;
            }

            .site-footer-compact .social-icons a {
                width: 29px !important;
                height: 29px !important;
                font-size: 0.86rem !important;
            }

            .compact-footer-bottom {
                padding: 6px 8px !important;
                gap: 5px !important;
                font-size: 0.66rem !important;
            }

            .compact-footer-separator {
                display: none !important;
            }

            .chat-bot-button {
                bottom: 46px !important;
            }

            .back-to-top {
                bottom: 46px !important;
            }

            .dark-mode-toggle {
                bottom: 104px !important;
            }
        }

        @media (max-width: 420px) {
            .site-footer-compact {
                padding-inline: 7px !important;
            }

            .compact-footer-main {
                padding: 9px 7px !important;
                gap: 8px !important;
            }

            .compact-footer-block h3 {
                font-size: 0.80rem !important;
            }

            .compact-footer-link {
                font-size: 0.68rem !important;
            }

            .branch-chip {
                padding: 4px 7px !important;
                font-size: 0.66rem !important;
            }

            .compact-footer-bottom {
                font-size: 0.58rem !important;
                line-height: 1.35 !important;
            }
        }


/* ==========================================================
   OFFICE GALLERY RESPONSIVE
   ========================================================== */
@media (min-width: 769px) and (max-width: 1100px) {
    .office-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .office-card-image {
        height: 390px;
    }
}

@media (max-width: 768px) {
    .office-gallery-section {
        padding: 65px 0;
    }

    .office-gallery-heading {
        padding: 0 20px;
        margin-bottom: 28px;
    }

    .office-gallery-heading h2 {
        font-size: 1.9rem;
    }

    .office-gallery-heading p {
        font-size: 0.95rem;
    }

    .office-slider-wrapper {
        width: 100%;
    }

    .office-gallery {
        display: flex;
        grid-template-columns: none;
        gap: 16px;
        width: 100%;
        padding: 5px 22px 18px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        direction: ltr;
        scrollbar-width: none;
    }

    .office-gallery::-webkit-scrollbar {
        display: none;
    }

    .office-card {
        direction: rtl;
        flex: 0 0 calc(100% - 44px);
        max-width: 370px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .office-card:hover {
        transform: none;
    }

    .office-card-image {
        height: 390px;
    }

    .office-card-content {
        min-height: 125px;
        padding: 18px;
    }

    .office-card-content h3 {
        font-size: 1.2rem;
    }

    .office-slider-arrow {
        position: absolute;
        top: 47%;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        padding: 0;
        color: var(--secondary-color);
        background: rgba(10, 25, 47, 0.9);
        border: 1px solid rgba(100, 255, 218, 0.32);
        border-radius: 50%;
        cursor: pointer;
        transform: translateY(-50%);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    }

    .office-slider-next {
        right: 6px;
    }

    .office-slider-prev {
        left: 6px;
    }

    .office-slider-arrow:disabled {
        opacity: 0.38;
        cursor: default;
    }

    .office-slider-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 8px;
    }

    .office-slider-dot {
        width: 8px;
        height: 8px;
        padding: 0;
        background: rgba(255, 255, 255, 0.25);
        border: 0;
        border-radius: 50%;
        cursor: pointer;
        transition: width 0.3s ease, background 0.3s ease;
    }

    .office-slider-dot.active {
        width: 24px;
        background: var(--secondary-color);
        border-radius: 20px;
    }

    .office-swipe-hint {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 7px;
        margin: 12px 20px 0;
        color: var(--text-secondary);
        font-size: 0.8rem;
        text-align: center;
    }

    .office-swipe-hint i {
        color: var(--secondary-color);
    }

    html[data-theme="light"] .office-slider-dot,
    body[data-theme="light"] .office-slider-dot {
        background: rgba(15, 23, 42, 0.22);
    }
}

@media (max-width: 400px) {
    .office-card {
        flex-basis: calc(100% - 32px);
    }

    .office-card-image {
        height: 350px;
    }
}

/* ==================================================
   تصغير واجهة اللابتوب إلى 77%
   مع إبقاء القسم الرئيسي بارتفاع الشاشة كاملًا
================================================== */

@media
  (min-width: 1024px)
  and (max-width: 1920px)
  and (hover: hover)
  and (pointer: fine) {

    html {
        zoom: 0.77;
    }

    body {
        margin: 0;
        min-height: 129.87vh;
    }

    html body .main {
        height: 129.87vh !important;
        min-height: 129.87vh !important;
        max-height: none !important;

        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
    }
}

@media (min-width: 769px) and (max-width: 1023px) {
    .travel-office-style .office-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .travel-office-style .office-card-image {
        height: 390px;
    }
}

@media (max-width: 768px) {
    .travel-office-style {
        padding: 65px 0;
    }

    .travel-office-style .office-gallery-heading {
        padding: 0 20px;
        margin-bottom: 28px;
    }

    .travel-office-style .office-gallery-heading h2 {
        font-size: 2rem;
    }

    .travel-office-style .office-gallery-heading p {
        font-size: 0.96rem;
    }

    .travel-office-style .office-gallery {
        display: flex;
        grid-template-columns: none;
        gap: 16px;
        width: 100%;
        padding: 5px 22px 18px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        direction: ltr;
        scrollbar-width: none;
    }

    .travel-office-style .office-gallery::-webkit-scrollbar {
        display: none;
    }

    .travel-office-style .office-card {
        direction: rtl;
        flex: 0 0 calc(100% - 44px);
        max-width: 370px;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .travel-office-style .office-card-image {
        height: 390px;
    }
}

@media (max-width: 400px) {
    .travel-office-style .office-card {
        flex-basis: calc(100% - 32px);
    }

    .travel-office-style .office-card-image {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .travel-office-style .office-gallery {
        display: flex;
        gap: 16px;
        width: 100%;
        padding: 5px 18px 18px;

        overflow-x: auto;
        overflow-y: hidden;

        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;

        direction: ltr;
        scrollbar-width: none;
    }

    .travel-office-style .office-gallery::-webkit-scrollbar {
        display: none;
    }

    /* البطاقة بعرض 90% من شاشة الجوال */
    .travel-office-style .office-card {
        direction: rtl;
        flex: 0 0 90%;
        width: 90%;
        max-width: 360px;

        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    /* تصغير ارتفاع الصورة قليلًا */
    .travel-office-style .office-card-image {
        height: 350px;
    }

    .travel-office-style .office-card-content {
        padding: 16px;
    }

    .travel-office-style .office-card-content h3 {
        font-size: 1.1rem;
    }

    .travel-office-style .office-card-content p {
        font-size: 0.9rem;
        line-height: 1.75;
    }
}


@media (max-width: 400px) {
    .travel-office-style .office-card {
        flex-basis: 88%;
        width: 88%;
    }

    .travel-office-style .office-card-image {
        height: 320px;
    }

    .travel-office-style .office-gallery-heading h2 {
        font-size: 1.7rem;
    }

    .travel-kicker {
        font-size: 0.78rem;
        padding: 8px 12px;
    }
}


/* ==================================================
   تصغير الصفحة كاملة إلى 90% على شاشات الجوال فقط
================================================== */

@supports (zoom: 1) {
    @media (max-width: 768px) {

        html {
            zoom: 0.90;

            /* منع الجوال من تكبير الخطوط تلقائياً */
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            /*
             * تعويض نسبة التصغير:
             * 100 ÷ 0.90 = 111.111
             */
            min-height: 111.112vh;
            overflow-x: hidden;
        }

        /*
         * تعويض ارتفاع الواجهة الرئيسية حتى تظل
         * صورة البداية تغطي شاشة الجوال كاملة.
         */
        .main {
            min-height: 111.112vh !important;
            min-height: 111.112svh !important;
            height: auto !important;
        }
    }
}

/* ==========================================================
   FINAL FIX: الفوتر الداكن + تثبيت شريط الحقوق بدون فراغ أبيض
   ========================================================== */

/* خلفية مساحة الفوتر كاملة داكنة في الوضعين */
footer.site-footer-compact {
    position: relative !important;
    z-index: 20 !important;
    margin-bottom: 0 !important;
    padding-bottom: 46px !important;
    background: #051223 !important;
    border-top: 0 !important;
}

/* لا نضيف مساحة أسفل body حتى لا تظهر منطقة بيضاء في الوضع الفاتح */
body {
    padding-bottom: 0 !important;
}

/* قسم التواصل والفروع يبقى داخل الصفحة وغير ثابت */
footer.site-footer-compact .compact-footer-inner,
footer.site-footer-compact .compact-footer-main {
    position: relative !important;
    bottom: auto !important;
    margin-bottom: 0 !important;
    background: #061426 !important;
}

/* إزالة الحواف السفلية الدائرية حتى يتصل القسم بصرياً بالشريط الداكن */
footer.site-footer-compact .compact-footer-inner {
    border-radius: 22px 22px 0 0 !important;
    border-color: rgba(100, 255, 218, 0.22) !important;
    overflow: hidden !important;
}

/* تثبيت شريط الحقوق فقط */
footer.site-footer-compact .compact-footer-bottom {
    position: fixed !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 9999 !important;

    box-sizing: border-box !important;
    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;
    margin: 0 !important;
    padding: 7px 24px !important;

    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 12px !important;

    background: #051223 !important;
    border-top: 1px solid rgba(100, 255, 218, 0.35) !important;
    box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.32) !important;

    color: #aebbd0 !important;
    font-size: 0.82rem !important;
    line-height: 1.35 !important;
    text-align: center !important;

    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

/* ألوان شريط الحقوق ثابتة وواضحة في الوضعين */
footer.site-footer-compact .compact-footer-bottom span {
    color: #aebbd0 !important;
    opacity: 1 !important;
}

footer.site-footer-compact .compact-footer-bottom strong {
    color: #ffffff !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

footer.site-footer-compact .compact-footer-bottom a,
footer.site-footer-compact .compact-footer-bottom a i {
    color: #20e0d0 !important;
    opacity: 1 !important;
    text-decoration: none !important;
}

footer.site-footer-compact .compact-footer-separator {
    display: inline-block !important;
    color: rgba(255, 255, 255, 0.36) !important;
    opacity: 1 !important;
}

/* تثبيت ألوان الجزء العلوي من الفوتر حتى في الوضع الفاتح */
html[data-theme="light"] footer.site-footer-compact,
body[data-theme="light"] footer.site-footer-compact,
html[data-theme="light"] footer.site-footer-compact .compact-footer-inner,
body[data-theme="light"] footer.site-footer-compact .compact-footer-inner,
html[data-theme="light"] footer.site-footer-compact .compact-footer-main,
body[data-theme="light"] footer.site-footer-compact .compact-footer-main {
    background: #061426 !important;
}

html[data-theme="light"] footer.site-footer-compact .compact-footer-block h3,
body[data-theme="light"] footer.site-footer-compact .compact-footer-block h3 {
    color: #20e0d0 !important;
}

html[data-theme="light"] footer.site-footer-compact .compact-footer-link,
html[data-theme="light"] footer.site-footer-compact .branch-chip,
html[data-theme="light"] footer.site-footer-compact .branch-chip span,
html[data-theme="light"] footer.site-footer-compact .branch-chip small,
html[data-theme="light"] footer.site-footer-compact .social-icons a,
body[data-theme="light"] footer.site-footer-compact .compact-footer-link,
body[data-theme="light"] footer.site-footer-compact .branch-chip,
body[data-theme="light"] footer.site-footer-compact .branch-chip span,
body[data-theme="light"] footer.site-footer-compact .branch-chip small,
body[data-theme="light"] footer.site-footer-compact .social-icons a {
    color: #aebbd0 !important;
    opacity: 1 !important;
}

html[data-theme="light"] footer.site-footer-compact .compact-footer-link i,
html[data-theme="light"] footer.site-footer-compact .branch-chip i,
body[data-theme="light"] footer.site-footer-compact .compact-footer-link i,
body[data-theme="light"] footer.site-footer-compact .branch-chip i {
    color: #20e0d0 !important;
}

html[data-theme="light"] footer.site-footer-compact .branch-chip,
html[data-theme="light"] footer.site-footer-compact .social-icons a,
body[data-theme="light"] footer.site-footer-compact .branch-chip,
body[data-theme="light"] footer.site-footer-compact .social-icons a {
    background: #0b1d34 !important;
    border-color: rgba(32, 224, 208, 0.24) !important;
}

/* رفع الأزرار العائمة فوق الشريط المثبت */
.chat-bot-button,
.back-to-top {
    bottom: 62px !important;
}

.dark-mode-toggle {
    bottom: 138px !important;
}

/* الجوال والتابلت */
@media (max-width: 768px) {
    footer.site-footer-compact {
        padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important;
    }

    footer.site-footer-compact .compact-footer-inner {
        border-radius: 18px 18px 0 0 !important;
    }

    footer.site-footer-compact .compact-footer-bottom {
        height: auto !important;
        min-height: 58px !important;
        padding:
            7px
            8px
            calc(7px + env(safe-area-inset-bottom))
            !important;

        flex-wrap: wrap !important;
        gap: 3px 7px !important;
        font-size: 0.68rem !important;
    }

    footer.site-footer-compact .compact-footer-separator {
        display: none !important;
    }

    .chat-bot-button,
    .back-to-top {
        bottom: calc(78px + env(safe-area-inset-bottom)) !important;
    }

    .dark-mode-toggle {
        bottom: calc(145px + env(safe-area-inset-bottom)) !important;
    }
}

@media (max-width: 400px) {
    footer.site-footer-compact {
        padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
    }

    footer.site-footer-compact .compact-footer-bottom {
        min-height: 64px !important;
        padding:
            6px
            5px
            calc(6px + env(safe-area-inset-bottom))
            !important;
        gap: 2px 5px !important;
        font-size: 0.60rem !important;
    }
}
