/* =========================================================
   ملف التصميم المشترك: الهيدر + القائمة الجانبية + الفوتر + الأزرار العائمة
   أي تعديل هنا يظهر في كل صفحات الموقع
   ========================================================= */

:root {
    --primary-color: #467d58;
    --secondary-color: #272727;
    --accent-color: #5ca374;
    --light-color: #f5f9f7;
    --border-radius: 10px;
    --transition: all 0.3s ease;
}

.site-legacy-stubs { display: none !important; }

a.logo { text-decoration: none; }

.logo-text .logo-name { display: block; }
.logo-text .logo-sub { display: block; }

/* الرابط النشط في القائمة */
header nav ul li a.active::after { width: 100%; }
.mobile-nav ul li a.active { background: var(--primary-color); color: #fff; }
.mobile-nav ul li a.active i { color: #fff; }

/* زر اللغة كرابط */
a.lang-toggle, a.mobile-lang-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.mobile-actions a.lang-toggle { display: flex; }

header {
            background-color: var(--primary-color);
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
            transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

header {
            display: flow-root; /* يمنع انهيار الهوامش ليظهر الهيدر العائم بمسافة من الأعلى */
}

header.scrolled {
            background-color: transparent;
            box-shadow: none;
}

header .header-main {
            transition: all 0.35s ease;
            margin: 0 auto;
            max-width: 100%;
            border: 1px solid transparent;
}

header.scrolled .header-main {
            /* نفس الارتفاع الكلي تقريبًا لتجنب أي اهتزاز في الصفحة */
            padding: 0.6rem 0;
            margin: 0.6rem auto;
            max-width: 1240px;
            width: calc(100% - 2rem);
            border-radius: 18px;
            background: rgba(70, 125, 88, 0.72);
            -webkit-backdrop-filter: blur(16px) saturate(170%);
            backdrop-filter: blur(16px) saturate(170%);
            border: 1px solid rgba(255, 255, 255, 0.22);
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

header.scrolled .header-main .container {
            width: 100%;
            padding: 0 1.5rem;
}

@media (max-width: 768px) {
header.scrolled .header-main {
                width: calc(100% - 1rem);
                margin: 0.5rem auto;
                padding: 0.7rem 0;
                border-radius: 14px;
}

header.scrolled .header-main .container {
                padding: 0 1rem;
}
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
header.scrolled .header-main {
                background: rgba(70, 125, 88, 0.95);
}
}

.header-top {
            background-color: var(--secondary-color);
            color: white;
            padding: 0.6rem 0;
            font-size: 0.7rem;
}

.header-top-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
}

.contact-info {
            display: flex;
            gap: 1.5rem;
}

.contact-info a {
            color: white;
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: var(--transition);
}

.contact-info a:hover {
            color: var(--accent-color);
}

.social-links {
            display: flex;
            gap: 1rem;
}

.social-links a {
            color: white;
            font-size: 1.1rem;
            transition: var(--transition);
}

.social-links a:hover {
            color: var(--accent-color);
            transform: translateY(-2px);
}

.header-main {
            padding: 1.2rem 0;
}

.header-content {
            display: flex;
            justify-content: space-between;
            align-items: center;
}

.logo {
            display: flex;
            align-items: center;
            gap: 1rem;
}

.logo-text {
            display: flex;
            flex-direction: column;
}

.logo-text .logo-name {
            font-size: 2.2rem;
            color: white;
            font-weight: 800;
            line-height: 1;
            letter-spacing: -0.5px;
}

.logo-text .logo-sub {
            font-size: 1rem;
            color: white;
            font-weight: 500;
            letter-spacing: 1.5px;
            opacity: 0.9;
}

header nav ul {
            display: flex;
            list-style: none;
            gap: 1.8rem;
}

header nav ul li a {
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 0.5rem 0;
            transition: var(--transition);
            position: relative;
            font-size: 1.05rem;
}

header nav ul li a:hover {
            color: #e8f5e8;
}

header nav ul li a::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 0;
            height: 3px;
            background-color: white;
            transition: var(--transition);
}

header nav ul li a:hover::after {
            width: 100%;
}

.header-actions {
            display: flex;
            align-items: center;
            gap: 0.7rem;
}

.lang-toggle {
            background-color: transparent;
            color: white;
            border: 1px solid white;
            padding: 0.6rem 1.2rem;
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
}

.lang-toggle:hover {
            background-color: white;
            color: var(--primary-color);
            transform: translateY(-2px);
}

.cta-button {
            background-color: white;
            color: var(--primary-color);
            border: none;
            padding: 0.8rem 1.8rem;
            border-radius: var(--border-radius);
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
            font-size: 1rem;
}

a.cta-button {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            text-decoration: none;
}

a.login-btn {
            position: relative;
            overflow: hidden;
            isolation: isolate;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 1.15rem;
            border-radius: 999px;
            background: #ffffff;
            color: var(--primary-color);
            font-weight: 700;
            font-size: 0.86rem;
            line-height: 1.2;
            text-decoration: none;
            border: 1px solid #ffffff;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
            transition: color 0.35s ease, transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease;
            -webkit-tap-highlight-color: transparent;
}

a.login-btn::before {
            content: '';
            position: absolute;
            inset: 0;
            z-index: -1;
            background: linear-gradient(135deg, var(--secondary-color), #3a3a3a);
            transform: scaleX(0);
            transform-origin: right;
            transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

html[dir="ltr"] a.login-btn::before {
            transform-origin: left;
}

a.login-btn:hover {
            background: #ffffff;
            color: #ffffff;
            border-color: var(--secondary-color);
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

a.login-btn:hover::before {
            transform: scaleX(1);
}

a.login-btn:active {
            transform: scale(0.95);
            transition-duration: 0.08s;
}

a.login-btn:focus-visible {
            outline: 3px solid rgba(255, 255, 255, 0.7);
            outline-offset: 3px;
}

a.login-btn .ripple {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.35);
            transform: scale(0);
            animation: login-ripple 0.6s ease-out forwards;
            pointer-events: none;
}

@keyframes login-ripple {
            to { transform: scale(4); opacity: 0; }
        }

.header-actions .lang-toggle {
            border-radius: 999px;
            padding: 0.45rem 0.95rem;
            font-size: 0.82rem;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.6);
}

.lang-toggle:active {
            transform: scale(0.95);
}

.mobile-actions a.login-btn {
            width: 100%;
            padding: 0.8rem;
            font-size: 0.95rem;
            background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
            border-color: transparent;
            color: #fff;
}

.mobile-actions a.login-btn:hover {
            background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
            color: #fff;
}

.mobile-header-tools {
            display: none;
            align-items: center;
            gap: 0.5rem;
}

.mobile-lang-btn,
.mobile-header-tools .mobile-menu-btn {
            height: 40px;
            min-width: 40px;
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.45);
            background: rgba(255, 255, 255, 0.12);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: background 0.25s ease, transform 0.15s ease, color 0.25s ease;
            -webkit-tap-highlight-color: transparent;
}

.mobile-lang-btn {
            padding: 0 0.75rem;
            font-weight: 700;
            font-size: 0.82rem;
            letter-spacing: 0.5px;
}

.mobile-header-tools .mobile-menu-btn {
            padding: 0;
            font-size: 1.15rem;
}

.mobile-lang-btn:active,
.mobile-header-tools .mobile-menu-btn:active {
            transform: scale(0.92);
            background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
.mobile-header-tools {
                display: flex;
}

.mobile-header-tools .mobile-menu-btn {
                display: inline-flex;
}
}

.mobile-actions .lang-toggle {
            border-radius: 999px;
}

.cta-button:hover {
            background-color: var(--secondary-color);
            color: white;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            padding: 0.5rem;
            transition: var(--transition);
}

.mobile-menu-btn:hover {
            color: var(--accent-color);
}

.mobile-menu {
            position: fixed;
            top: 0;
            right: -300px;
            width: 280px;
            height: 100vh;
            background: white;
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            z-index: 2000;
            transition: var(--transition);
            padding: 1.5rem;
            overflow-y: auto;
}

.mobile-menu.active {
            right: 0;
}

.mobile-menu-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 2px solid var(--light-color);
}

.mobile-menu-header .logo-text .logo-name {
            color: var(--primary-color);
            font-size: 1.6rem;
}

.mobile-menu-header .logo-text .logo-sub {
            color: var(--secondary-color);
            font-size: 0.8rem;
}

.close-menu {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--secondary-color);
            cursor: pointer;
            transition: var(--transition);
}

.close-menu:hover {
            color: var(--primary-color);
            transform: rotate(90deg);
}

.mobile-nav ul {
            list-style: none;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
}

.mobile-nav ul li a {
            display: flex;
            align-items: center;
            padding: 1rem 1rem;
            color: var(--secondary-color);
            text-decoration: none;
            font-weight: 600;
            transition: var(--transition);
            font-size: 0.8rem;
            border-radius: var(--border-radius);
            background: var(--light-color);
}

.mobile-nav ul li a i {
            margin-left: 0.8rem;
            width: 20px;
            text-align: center;
            color: var(--primary-color);
            font-size: 1.2rem;
}

.mobile-nav ul li a:hover {
            background: var(--primary-color);
            color: white;
            transform: translateX(-5px);
}

.mobile-nav ul li a:hover i {
            color: white;
}

.mobile-actions {
            margin-top: 2rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
}

.mobile-actions .lang-toggle {
            width: 100%;
            text-align: center;
            border-color: var(--primary-color);
            color: var(--primary-color);
            padding: 0.8rem;
}

.mobile-actions .cta-button {
            width: 100%;
            background-color: var(--primary-color);
            color: white;
            padding: 0.8rem;
}

.mobile-actions .cta-button:hover {
            background-color: var(--accent-color);
}

.mobile-contact-info {
            margin-top: 2rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--light-color);
}

.mobile-contact-item {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            margin-bottom: 1rem;
            color: var(--secondary-color);
            font-size: 0.8rem;
}

.mobile-contact-item i {
            color: var(--primary-color);
            width: 16px;
            font-size: 1rem;
}

.overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1999;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
}

.overlay.active {
            opacity: 1;
            visibility: visible;
}

.back-to-top {
            position: fixed;
            bottom: 175px;
            left: 25px;
            width: 65px;
            height: 65px;
            background-color: var(--secondary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.8rem;
            box-shadow: 0 4px 20px rgba(39, 39, 39, 0.5);
            z-index: 1000;
            transition: var(--transition);
            opacity: 0;
            visibility: hidden;
            cursor: pointer;
            text-decoration: none;
}

.back-to-top.show {
            opacity: 1;
            visibility: visible;
}

.back-to-top:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 25px rgba(39, 39, 39, 0.7);
            background-color: var(--primary-color);
}

.back-to-top-tooltip {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--secondary-color);
            color: white;
            padding: 0.8rem 1.2rem;
            border-radius: var(--border-radius);
            font-size: 0.9rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-to-top-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 8px;
            border-style: solid;
            border-color: var(--secondary-color) transparent transparent transparent;
}

.back-to-top:hover .back-to-top-tooltip {
            opacity: 1;
            visibility: visible;
            bottom: 75px;
}

.call-button {
            position: fixed;
            bottom: 100px;
            left: 25px;
            width: 65px;
            height: 65px;
            background-color: var(--primary-color);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 1.8rem;
            box-shadow: 0 4px 20px rgba(70, 125, 88, 0.5);
            z-index: 1000;
            transition: var(--transition);
            animation: pulse-call 2s infinite;
            text-decoration: none;
}

.call-button:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 25px rgba(70, 125, 88, 0.7);
}

@keyframes pulse-call {
            0% {
                box-shadow: 0 0 0 0 rgba(70, 125, 88, 0.7);
            }
            70% {
                box-shadow: 0 0 0 15px rgba(70, 125, 88, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(70, 125, 88, 0);
            }
        }

.call-tooltip {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--secondary-color);
            color: white;
            padding: 0.8rem 1.2rem;
            border-radius: var(--border-radius);
            font-size: 0.5rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.call-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 8px;
            border-style: solid;
            border-color: var(--secondary-color) transparent transparent transparent;
}

.call-button:hover .call-tooltip {
            opacity: 1;
            visibility: visible;
            bottom: 75px;
}

.whatsapp-button {
            position: fixed;
            bottom: 25px;
            left: 25px;
            width: 65px;
            height: 65px;
            background-color: #25D366;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 2rem;
            box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
            z-index: 1000;
            transition: var(--transition);
            animation: pulse 2s infinite;
            text-decoration: none;
}

.whatsapp-button:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 25px rgba(37, 211, 102, 0.7);
}

@keyframes pulse {
            0% {
                box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
            }
            70% {
                box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
            }
            100% {
                box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
            }
        }

.whatsapp-tooltip {
            position: absolute;
            bottom: 80px;
            left: 50%;
            transform: translateX(-50%);
            background-color: var(--secondary-color);
            color: white;
            padding: 0.8rem 1.2rem;
            border-radius: var(--border-radius);
            font-size: 0.5rem;
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.whatsapp-tooltip::after {
            content: '';
            position: absolute;
            top: 100%;
            left: 50%;
            transform: translateX(-50%);
            border-width: 8px;
            border-style: solid;
            border-color: var(--secondary-color) transparent transparent transparent;
}

.whatsapp-button:hover .whatsapp-tooltip {
            opacity: 1;
            visibility: visible;
            bottom: 75px;
}

footer {
            position: relative;
            background: #1e1e1e;
            color: #fff;
            padding: 4.5rem 0 0;
            overflow: hidden;
            isolation: isolate;
}

footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
}

footer::after {
            content: '';
            position: absolute;
            width: 500px;
            height: 500px;
            top: -250px;
            right: -150px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(70, 125, 88, 0.22), rgba(70, 125, 88, 0) 70%);
            z-index: -1;
            pointer-events: none;
}

.footer-grid {
            display: grid;
            grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
            gap: 2.5rem;
            margin-bottom: 3rem;
}

.footer-brand .logo-text .logo-name {
            font-size: 2rem;
            font-weight: 800;
            line-height: 1;
            letter-spacing: -0.5px;
            color: #fff;
}

.footer-brand .logo-text .logo-sub {
            display: block;
            font-size: 0.85rem;
            letter-spacing: 1.5px;
            color: rgba(255, 255, 255, 0.7);
            margin-top: 0.3rem;
}

.footer-brand p {
            color: rgba(255, 255, 255, 0.7);
            font-size: 0.92rem;
            line-height: 1.8;
            margin: 1.2rem 0 1.5rem;
}

.footer-social {
            display: flex;
            gap: 0.6rem;
            flex-wrap: wrap;
}

.footer-social a {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #fff;
            font-size: 1rem;
            text-decoration: none;
            transition: background 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.footer-social a:hover {
            background: var(--primary-color);
            border-color: var(--primary-color);
            transform: translateY(-3px);
}

.footer-col h3 {
            font-size: 1.05rem;
            font-weight: 700;
            margin-bottom: 1.3rem;
            display: flex;
            align-items: center;
            gap: 0.6rem;
}

.footer-col h3::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--accent-color);
            box-shadow: 0 0 0 4px rgba(92, 163, 116, 0.2);
            flex-shrink: 0;
}

.footer-col ul {
            list-style: none;
}

.footer-col ul li {
            margin-bottom: 0.4rem;
}

.footer-col ul li a {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.3rem 0;
            color: rgba(255, 255, 255, 0.72);
            text-decoration: none;
            font-size: 0.93rem;
            transition: color 0.25s ease, transform 0.25s ease;
}

.footer-col ul li a i {
            font-size: 0.65rem;
            color: var(--accent-color);
            opacity: 0;
            transform: translateX(6px);
            transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer-col ul li a:hover {
            color: #fff;
            transform: translateX(-4px);
}

.footer-col ul li a:hover i {
            opacity: 1;
            transform: translateX(0);
}

html[dir="ltr"] .footer-col ul li a i { transform: scaleX(-1) translateX(6px);
}

html[dir="ltr"] .footer-col ul li a:hover i { transform: scaleX(-1);
}

html[dir="ltr"] .footer-col ul li a:hover { transform: translateX(4px);
}

.contact-info-footer {
            display: flex;
            flex-direction: column;
            gap: 0.9rem;
}

.contact-item {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            color: rgba(255, 255, 255, 0.78);
            font-size: 0.92rem;
            text-decoration: none;
            transition: color 0.25s ease;
}

a.contact-item:hover {
            color: #fff;
}

.contact-item .ci-icon {
            width: 38px;
            height: 38px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: rgba(70, 125, 88, 0.2);
            color: var(--accent-color);
            font-size: 0.95rem;
            flex-shrink: 0;
            transition: background 0.3s ease, color 0.3s ease;
}

a.contact-item:hover .ci-icon {
            background: var(--primary-color);
            color: #fff;
}

.footer-grid > * { min-width: 0;
}

.contact-item > span:last-child { min-width: 0;
}

.contact-item .ltr {
            direction: ltr;
            unicode-bidi: embed;
}

.footer-bottom {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            flex-wrap: wrap;
            padding: 1.4rem 0;
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            font-size: 0.85rem;
            color: rgba(255, 255, 255, 0.6);
}

.footer-bottom-links {
            display: flex;
            gap: 1.4rem;
}

.footer-bottom-links a {
            color: rgba(255, 255, 255, 0.6);
            text-decoration: none;
            transition: color 0.25s ease;
}

.footer-bottom-links a:hover {
            color: #fff;
}

@media (max-width: 992px) {
.footer-grid {
                grid-template-columns: 1fr 1fr;
}
}

@media (max-width: 576px) {
footer {
                padding-top: 3.5rem;
}

.footer-grid {
                grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
                gap: 2rem 1.2rem;
}

.footer-brand,
.footer-contact {
                grid-column: 1 / -1;
}

.footer-bottom {
                flex-direction: column;
                text-align: center;
}
}

@media (max-width: 992px) {
.header-content {
                flex-direction: column;
                gap: 1.8rem;
}

header nav ul {
                flex-wrap: wrap;
                justify-content: center;
}
}

@media (max-width: 768px) {
.header-top {
                display: none;
}

.header-main nav {
                display: none;
}

.mobile-nav {
                display: block;
}

.header-actions {
                display: none;
}

.mobile-menu-btn {
                display: block;
}

.header-content {
                flex-direction: row;
                justify-content: space-between;
}

.back-to-top,
.call-button,
.whatsapp-button {
                width: 60px;
                height: 60px;
                font-size: 1.6rem;
                left: 20px;
}

.back-to-top {
                bottom: 150px;
}

.call-button {
                bottom: 80px;
}

.whatsapp-button {
                bottom: 20px;
}
}

@media (max-width: 576px) {
.logo-text .logo-name {
                font-size: 1.8rem;
}

.logo-text .logo-sub {
                font-size: 0.85rem;
}

.mobile-menu {
                width: 260px;
}

.back-to-top,
.call-button,
.whatsapp-button {
                width: 55px;
                height: 55px;
                font-size: 1.4rem;
                left: 15px;
}

.back-to-top {
                bottom: 140px;
}

.call-button {
                bottom: 75px;
}

.whatsapp-button {
                bottom: 15px;
}

.back-to-top-tooltip,
.call-tooltip,
.whatsapp-tooltip {
                font-size: 0.8rem;
                padding: 0.6rem 1rem;
}
}

/* في الإنجليزي: الأزرار العائمة على اليمين حتى لا تغطي بداية النص */
html[dir="ltr"] .back-to-top,
html[dir="ltr"] .call-button,
html[dir="ltr"] .whatsapp-button { left: auto; right: 25px; }
@media (max-width: 768px) {
    html[dir="ltr"] .back-to-top,
    html[dir="ltr"] .call-button,
    html[dir="ltr"] .whatsapp-button { right: 20px; }
}
@media (max-width: 576px) {
    html[dir="ltr"] .back-to-top,
    html[dir="ltr"] .call-button,
    html[dir="ltr"] .whatsapp-button { right: 15px; }
}

/* منع أي تمرير أفقي بسبب القائمة الجانبية المخفية */
html, body { overflow-x: clip; }
/* للمتصفحات القديمة التي لا تدعم clip */
@supports not (overflow-x: clip) { body { overflow-x: hidden; } }

/* حماية عامة من خروج أي عنصر عن عرض الشاشة */
img, video, iframe, embed, object { max-width: 100%; }
body { overflow-wrap: break-word; }
.breadcrumb-content { flex-wrap: wrap; row-gap: 0.3rem; min-width: 0; }
.mobile-menu { right: 0; }
.mobile-menu:not(.active) { display: none; }
.mobile-menu.active { animation: siteMenuIn 0.3s ease; }
@keyframes siteMenuIn { from { transform: translateX(100%); } to { transform: none; } }

/* =========================================================
   القائمة الجانبية للموبايل - التصميم الجديد
   ========================================================= */
.mobile-menu {
    width: min(320px, 86vw);
    padding: 1.1rem 1.1rem 1.4rem;
    background: #fff;
    border-radius: 24px 0 0 24px;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mobile-menu:not(.active) { display: none; }

.overlay { background: rgba(20, 30, 24, 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }

.mobile-menu .mobile-menu-header {
    margin: 0;
    padding: 0.2rem 0.2rem 0.9rem;
    border-bottom: 1px solid #eef2ef;
}
.mobile-menu .mobile-menu-header .logo-text { text-decoration: none; }
.mobile-menu .mobile-menu-header .logo-text .logo-name { color: var(--primary-color); font-size: 1.5rem; font-weight: 800; line-height: 1; }
.mobile-menu .mobile-menu-header .logo-text .logo-sub { color: #6b7280; font-size: 0.68rem; letter-spacing: 1.4px; margin-top: 0.2rem; }

.mobile-menu .close-menu {
    width: 38px; height: 38px; border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f2f5f3; color: var(--secondary-color); font-size: 1.05rem;
    transition: background 0.2s ease, transform 0.2s ease;
}
.mobile-menu .close-menu:hover { background: #e6ece8; color: var(--secondary-color); transform: rotate(90deg); }

/* روابط القائمة */
.mobile-menu .mobile-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.mobile-menu .mobile-nav ul li a {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.55rem 0.6rem; border-radius: 14px;
    background: transparent; color: var(--secondary-color);
    font-size: 0.95rem; font-weight: 600; text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.mobile-menu .mobile-nav ul li a:hover { background: #f4f7f5; color: var(--secondary-color); transform: none; }
.mobile-menu .mobile-nav .mm-icon {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(70, 125, 88, 0.1); color: var(--primary-color);
    transition: background 0.2s ease, color 0.2s ease;
}
.mobile-menu .mobile-nav ul li a i { margin: 0; width: auto; font-size: 0.95rem; color: inherit; }
.mobile-menu .mobile-nav .mm-label { flex: 1; }
.mobile-menu .mobile-nav .mm-arrow { font-size: 0.7rem !important; color: #c0c7c2 !important; transition: transform 0.2s ease, color 0.2s ease; }
html[dir="ltr"] .mobile-menu .mobile-nav .mm-arrow { transform: scaleX(-1); }
.mobile-menu .mobile-nav ul li a:hover .mm-arrow { color: var(--primary-color) !important; transform: translateX(-3px); }
html[dir="ltr"] .mobile-menu .mobile-nav ul li a:hover .mm-arrow { transform: scaleX(-1) translateX(-3px); }

.mobile-menu .mobile-nav ul li a.active { background: rgba(70, 125, 88, 0.09); color: var(--primary-color); }
.mobile-menu .mobile-nav ul li a.active .mm-icon { background: linear-gradient(135deg, var(--primary-color), var(--accent-color)); color: #fff; }
.mobile-menu .mobile-nav ul li a.active .mm-arrow { color: var(--primary-color) !important; }

/* ظهور الروابط بالتتابع */
.mobile-menu.active .mobile-nav li { animation: mmItemIn 0.35s ease both; animation-delay: calc(0.05s * var(--i, 0) + 0.08s); }
@keyframes mmItemIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* التواصل */
.mm-section-title { font-size: 0.75rem; font-weight: 700; color: #9ca3af; letter-spacing: 0.3px; padding: 0 0.3rem; margin-bottom: -0.5rem; }
.mm-contact { display: flex; flex-direction: column; gap: 0.25rem; padding-top: 0.2rem; }
.mm-contact a {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.45rem 0.5rem; border-radius: 12px;
    color: #4b5563; font-size: 0.86rem; text-decoration: none;
    transition: background 0.2s ease;
}
.mm-contact a:hover { background: #f4f7f5; }
.mm-c-icon {
    width: 32px; height: 32px; border-radius: 10px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f2f5f3; color: var(--primary-color); font-size: 0.82rem;
}
.mm-c-icon.mm-wa { background: rgba(37, 211, 102, 0.12); color: #1ea952; }

/* الأزرار */
.mobile-menu .mobile-actions { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.mobile-menu .mobile-actions .lang-toggle {
    width: 100%; height: 44px; padding: 0; gap: 0.4rem;
    border-radius: 12px; border: 1.5px solid #dfe5e1; background: #fff;
    color: var(--secondary-color); font-size: 0.88rem; font-weight: 700;
}
.mobile-menu .mobile-actions .lang-toggle i { color: var(--primary-color); font-size: 0.9rem; }
.mobile-menu .mobile-actions .lang-toggle:hover { background: #f4f7f5; color: var(--secondary-color); transform: none; }
.mobile-menu .mobile-actions a.login-btn { height: 44px; padding: 0; border-radius: 12px; font-size: 0.88rem; }

/* السوشيال */
.mm-social { display: flex; justify-content: center; gap: 0.5rem; padding-top: 0.2rem; }
.mm-social a {
    width: 36px; height: 36px; border-radius: 11px;
    display: inline-flex; align-items: center; justify-content: center;
    background: #f2f5f3; color: #4b5563; font-size: 0.9rem; text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.mm-social a:hover { background: var(--primary-color); color: #fff; }

@media (max-height: 640px) {
    .mobile-menu { gap: 0.7rem; }
    .mobile-menu .mobile-nav ul li a { padding: 0.4rem 0.5rem; }
    .mobile-menu .mobile-nav .mm-icon { width: 34px; height: 34px; }
}

/* القائمة كلوحة عائمة بمسافة من حواف الشاشة */
.mobile-menu,
.mobile-menu.active {
    top: 10px;
    bottom: 10px;
    right: 10px;
    height: auto;
    width: min(320px, calc(100vw - 50px));
    border-radius: 24px;
}
@keyframes siteMenuIn { from { transform: translateX(calc(100% + 20px)); } to { transform: none; } }

/* =========================================================
   شاشة الانتقال بين الصفحات: رسم علامة إتقان (نفس شاشة النظام)
   ========================================================= */
.page-transition {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.page-transition.active,
html.pt-arriving .page-transition {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.12s ease, visibility 0s;
}

.page-transition .ld-mk {
    position: relative;
    width: 110px;
    aspect-ratio: 290 / 186;
}

.page-transition .ld-mk img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    max-width: none;
}

/* العلامة تُرسم مرة واحدة فقط عند الضغط على الرابط */
.page-transition.active .ld-gr {
    animation: ldCk 0.6s cubic-bezier(0.6, 0, 0.2, 1) both;
}

/* في الصفحة الجديدة: العلامة تظهر مكتملة بدون إعادة رسم، ثم تختفي الشاشة */
html.pt-arriving .page-transition .ld-gr {
    animation: none;
    clip-path: none;
}

@keyframes ldCk {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

@media (prefers-reduced-motion: reduce) {
    .page-transition .ld-gr { animation: none !important; }
}

/* ===== خط Cairo للموقع كله ===== */
html body { font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif; font-weight: 500; }
button, input, select, textarea, optgroup { font-family: inherit; }

/* ===== الشعار جنب الاسم + الاسم بالعربي في الصفحات العربية ===== */
.logo { gap: .7rem; }
.logo .logo-mark { height: 50px; width: auto; display: block; flex: none; }
html[dir="rtl"] .logo-text .logo-name { letter-spacing: 0; line-height: 1.05; }
html[dir="rtl"] .logo-text .logo-sub { letter-spacing: 0; }
html[dir="rtl"] header .logo-text .logo-name { font-size: 2.1rem; }
html[dir="rtl"] header .logo-text .logo-sub { font-size: 1rem; margin-top: .1rem; }
.mobile-menu .mobile-menu-header .menu-brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.mobile-menu .mobile-menu-header .menu-brand .logo-mark { height: 38px; width: auto; display: block; }
.mobile-menu .mobile-menu-header .menu-brand .logo-text { display: flex; flex-direction: column; }
.mobile-menu .mobile-menu-header .menu-brand .logo-name { color: var(--primary-color); font-size: 1.45rem; font-weight: 800; line-height: 1.05; }
.mobile-menu .mobile-menu-header .menu-brand .logo-sub { color: #6b7280; font-size: .68rem; letter-spacing: 1.4px; margin-top: .15rem; }
html[dir="rtl"] .mobile-menu .mobile-menu-header .menu-brand .logo-sub { font-size: .8rem; letter-spacing: 0; }
.footer-brand .footer-logo { display: flex; align-items: center; gap: .7rem; }
.footer-brand .footer-logo .logo-mark { height: 46px; width: auto; display: block; }
@media (max-width: 576px) {
    .logo .logo-mark { height: 40px; }
    .logo { gap: .55rem; }
    html[dir="rtl"] header .logo-text .logo-name { font-size: 1.75rem; }
    html[dir="rtl"] header .logo-text .logo-sub { font-size: .85rem; }
}
.logo-text .logo-name, .logo-text .logo-sub { white-space: nowrap; }
@media (max-width: 576px) {
    html[dir="ltr"] header .logo-text .logo-name { font-size: 1.6rem; }
    html[dir="ltr"] header .logo-text .logo-sub { font-size: .72rem; letter-spacing: 1px; }
}
