/* ===================================================================
   موقع المهندس المعماري والاستشاري نوفل قائد سيف المهير
   نظام الهوية المعمارية الملكية v5.1 — Premium Architectural Design System
   تصميم فائق الجودة مع تأثيرات بصرية متقدمة وتجاوب احترافي شامل
=================================================================== */

/* ==================== رموز الألوان والسمات المعمارية ==================== */
:root {
    /* باليت الأساس الداكن (Obsidian & Deep Navy) */
    --primary: #060b19;
    --primary-surface: #0a1226;
    --primary-card: #0f1c38;
    --primary-light: #16264c;
    --dark: #040711;
    --black: #020409;

    /* باليت الذهب المعماري الملكي الموحد (Royal Champagne Gold) */
    --accent: #c99b42;
    --accent-gold: #dfb15b;
    --accent-light-gold: #ebd090;
    --accent-hover: #b88628;
    --accent-dark: #8c6317;
    --accent-light: rgba(223, 177, 91, 0.12);
    --accent-glow: rgba(223, 177, 91, 0.35);

    /* التدرجات المعمارية الملكية */
    --accent-gradient: linear-gradient(135deg, #dfb15b 0%, #c99b42 50%, #9e7529 100%);
    --accent-gradient-hover: linear-gradient(135deg, #e8c26f 0%, #d4a74c 50%, #ab8031 100%);
    --dark-gradient: linear-gradient(180deg, rgba(6, 11, 25, 0.95) 0%, rgba(10, 18, 38, 0.98) 100%);
    --glass-card-bg: rgba(255, 255, 255, 0.92);

    /* الأسطح الفاتحة والخلفيات */
    --light-bg: #f5f7fb;
    --light-surface: #edf1f8;
    --white: #ffffff;
    --text-main: #141b2d;
    --text-muted: #5e6d82;
    --text-light: #94a3b8;
    --text-on-dark: #f1f5f9;

    /* الحدود والزجاج */
    --border-glass: rgba(255, 255, 255, 0.14);
    --border-glass-gold: rgba(223, 177, 91, 0.25);
    --border-subtle: rgba(10, 18, 38, 0.08);
    --border-gold: rgba(223, 177, 91, 0.38);

    /* الظلال */
    --shadow-sm: 0 4px 14px rgba(6, 11, 25, 0.04);
    --shadow-card: 0 10px 30px -5px rgba(6, 11, 25, 0.07), 0 4px 12px -2px rgba(6, 11, 25, 0.03);
    --shadow-hover: 0 20px 40px -10px rgba(6, 11, 25, 0.15), 0 0 20px rgba(223, 177, 91, 0.15);
    --shadow-gold: 0 8px 25px rgba(201, 155, 66, 0.35);
    --shadow-glow: 0 0 30px rgba(223, 177, 91, 0.25), 0 0 60px rgba(223, 177, 91, 0.1);

    /* القياسات والانتقالات */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --section-padding: clamp(5rem, 8vw, 8rem) 0;
    --border-radius-sm: 10px;
    --border-radius: 18px;
    --border-radius-lg: 26px;
    --header-height: 76px;
    --bottom-bar-height: 68px;
}

/* ==================== إعادة التعيين العام والخطوط ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body,
button,
input,
select,
textarea {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
    scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        padding-bottom: calc(var(--bottom-bar-height) + 14px);
    }
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ==================== شريط التقدم في الهيدر (Scroll Progress) ==================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1100;
    background: transparent;
}

.scroll-progress .progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    box-shadow: 0 0 10px rgba(223, 177, 91, 0.6);
    transition: width 0.1s linear;
    border-radius: 0 4px 4px 0;
}

/* ==================== Preloader — شاشة التحميل الملكية ==================== */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    border-radius: 18px;
    border: 2px solid var(--border-glass-gold);
    object-fit: contain;
    animation: preloaderPulse 1.4s ease-in-out infinite;
    margin-bottom: 28px;
}

.preloader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(223, 177, 91, 0.15);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.preloader-text {
    color: var(--accent-gold);
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.7;
}

@keyframes preloaderPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.08);
        opacity: 0.8;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== نظام التأثيرات البصرية المتقدمة ==================== */
/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delay classes */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

.delay-6 {
    transition-delay: 0.6s;
}

.delay-7 {
    transition-delay: 0.7s;
}

.delay-8 {
    transition-delay: 0.8s;
}

/* زخارف هندسية عائمة */
.section-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.04;
}

.section-decoration.geo-1 {
    top: 10%;
    left: -40px;
    width: 200px;
    height: 200px;
    border: 3px solid var(--accent-gold);
    border-radius: 50%;
    animation: floatGeo 12s ease-in-out infinite;
}

.section-decoration.geo-2 {
    bottom: 15%;
    right: -30px;
    width: 140px;
    height: 140px;
    border: 3px solid var(--accent-gold);
    transform: rotate(45deg);
    animation: floatGeo 10s ease-in-out infinite reverse;
}

.section-decoration.geo-3 {
    top: 40%;
    right: 5%;
    width: 80px;
    height: 80px;
    border: 2px solid var(--accent-gold);
    border-radius: 20px;
    transform: rotate(30deg);
    animation: floatGeo 8s ease-in-out infinite 2s;
}

@keyframes floatGeo {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(5deg);
    }

    50% {
        transform: translateY(-10px) rotate(-3deg);
    }

    75% {
        transform: translateY(-25px) rotate(2deg);
    }
}

/* فواصل الموجات بين الأقسام */
.wave-divider {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.wave-divider svg {
    display: block;
    width: calc(100% + 1px);
    height: 60px;
}

.wave-divider-top {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
    transform: rotate(180deg);
}

.wave-divider-top svg {
    display: block;
    width: calc(100% + 1px);
    height: 60px;
}

/* تأثير Shimmer للبطاقات المميزة */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.shimmer-border {
    position: relative;
}

.shimmer-border::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(223, 177, 91, 0.4) 25%,
            rgba(223, 177, 91, 0.7) 50%,
            rgba(223, 177, 91, 0.4) 75%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: -1;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: xor;
    -webkit-mask-composite: xor;
    padding: 2px;
}

/* نص متدرج */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== الأيقونات البصرية (SVG Icon System) ==================== */
.svg-icon {
    width: 1.18em;
    height: 1.18em;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    fill: currentColor;
    stroke: none;
    transition: var(--transition);
}

.svg-icon.stroke-icon {
    fill: none;
    stroke: currentColor;
}

/* ==================== العناوين والمسافات ==================== */
section {
    padding: var(--section-padding);
    position: relative;
    overflow: hidden;
    scroll-margin-top: calc(var(--header-height) + 20px);
}

.section-title {
    text-align: center;
    margin-bottom: clamp(3rem, 5.5vw, 4.5rem);
    position: relative;
    z-index: 2;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 20px;
    background: var(--accent-light);
    color: var(--accent-gold);
    border: 1px solid var(--border-gold);
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 12px rgba(223, 177, 91, 0.1);
    backdrop-filter: blur(8px);
}

.badge-pill .svg-icon {
    color: var(--accent-gold);
}

.section-title h2 {
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    color: var(--primary);
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
}

.section-title h2::after {
    content: "";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3.5px;
    background: var(--accent-gradient);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(201, 155, 66, 0.35);
}

.section-title p {
    font-size: clamp(1.02rem, 1.8vw, 1.18rem);
    color: var(--text-muted);
    max-width: 720px;
    margin: 1.6rem auto 0;
    line-height: 1.85;
}

/* ==================== نظام الأزرار المعماري الموحد ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    background: var(--accent-gradient);
    color: var(--white);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.02rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
    user-select: none;
    white-space: nowrap;
}

.btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(201, 155, 66, 0.48);
    color: var(--white);
}

.btn:active {
    transform: scale(0.97) translateY(-1px);
}

.btn .svg-icon {
    font-size: 1.15rem;
    transition: transform 0.3s ease;
}

.btn:hover .svg-icon {
    transform: scale(1.1);
}

/* الزر الزجاجي (Frosted Glass) */
.btn-frosted {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-frosted:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(223, 177, 91, 0.25);
}

/* الزر المحدد (Outline) */
.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--border-subtle);
    box-shadow: none;
}

.btn-outline::before {
    display: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-card);
}

/* زر الهيدر المدمج الفاخر */
.btn-header {
    height: 42px;
    padding: 0 20px;
    font-size: 0.92rem;
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(201, 155, 66, 0.35);
}

.btn-sm {
    padding: 9px 20px;
    font-size: 0.92rem;
}

/* ==================== الهيدر وشريط التنقل الملكي ==================== */
header#main-header {
    background: rgba(6, 11, 25, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-glass-gold);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

header#main-header.scrolled {
    background: rgba(4, 7, 17, 0.98);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.55);
    height: 66px;
}

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

/* الشعار المعماري المتناسق */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
}

.logo img {
    height: 46px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    border: 1.5px solid var(--border-glass-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 20px rgba(223, 177, 91, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.25;
}

.logo-brand {
    font-size: 1.22rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -0.2px;
}

.logo-brand strong {
    color: var(--accent-gold);
    font-weight: 900;
}

.logo-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* قائمة التصفح لسطح المكتب */
.desktop-nav {
    display: flex;
    align-items: center;
    flex-shrink: 1;
}

.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}

.desktop-nav ul li a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px 13px;
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}

.desktop-nav ul li a:hover,
.desktop-nav ul li a.active {
    color: var(--accent-gold);
    background: rgba(223, 177, 91, 0.1);
}

.desktop-nav ul li a.active::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 15%;
    right: 15%;
    height: 2.5px;
    background: var(--accent-gradient);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(223, 177, 91, 0.5);
}

.header-cta-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.menu-toggle-btn {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--white);
    font-size: 1.3rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.menu-toggle-btn:hover {
    background: var(--accent-light);
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* ==================== درج القائمة الجانبي للهواتف (Mobile Drawer) ==================== */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 17, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 84%;
    max-width: 360px;
    height: 100vh;
    height: 100dvh;
    background: var(--primary);
    color: var(--white);
    border-left: 1px solid var(--border-glass-gold);
    z-index: 1999;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: right 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    padding: 24px 20px;
    overflow-y: auto;
}

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

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-glass);
}

.drawer-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #cbd5e1;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.drawer-close-btn:hover {
    background: #ef4444;
    color: var(--white);
    border-color: #ef4444;
}

.drawer-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 22px 0;
}

.drawer-menu li {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-drawer.active .drawer-menu li {
    opacity: 1;
    transform: translateX(0);
}

.mobile-drawer.active .drawer-menu li:nth-child(1) {
    transition-delay: 0.05s;
}

.mobile-drawer.active .drawer-menu li:nth-child(2) {
    transition-delay: 0.1s;
}

.mobile-drawer.active .drawer-menu li:nth-child(3) {
    transition-delay: 0.15s;
}

.mobile-drawer.active .drawer-menu li:nth-child(4) {
    transition-delay: 0.2s;
}

.mobile-drawer.active .drawer-menu li:nth-child(5) {
    transition-delay: 0.25s;
}

.mobile-drawer.active .drawer-menu li:nth-child(6) {
    transition-delay: 0.3s;
}

.mobile-drawer.active .drawer-menu li:nth-child(7) {
    transition-delay: 0.35s;
}

.mobile-drawer.active .drawer-menu li:nth-child(8) {
    transition-delay: 0.4s;
}

.drawer-menu li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.drawer-menu li a .svg-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-gold);
}

.drawer-menu li a:hover,
.drawer-menu li a.active {
    background: var(--accent-light);
    color: var(--accent-gold);
    transform: translateX(-4px);
}

.drawer-footer {
    padding-top: 18px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-footer .btn {
    width: 100%;
}

/* ==================== السلايدر الرئيسي البانورامي (Hero Section) ==================== */
.hero-slider {
    padding: 0;
    margin-top: var(--header-height);
    height: calc(100vh - var(--header-height));
    min-height: 580px;
    max-height: 880px;
    position: relative;
    background: var(--black);
}

.home-slider {
    width: 100%;
    height: 100%;
}

.home-slider .swiper-slide {
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center center !important;
    display: flex;
    align-items: center;
    position: relative;
}

.home-slider .swiper-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
            rgba(6, 11, 25, 0.96) 0%,
            rgba(6, 11, 25, 0.82) 40%,
            rgba(6, 11, 25, 0.55) 70%,
            rgba(6, 11, 25, 0.35) 100%);
    z-index: 1;
}

/* خطوط هندسية في الخلفية */
.home-slider .swiper-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, transparent 48%, rgba(223, 177, 91, 0.03) 48%, rgba(223, 177, 91, 0.03) 52%, transparent 52%),
        linear-gradient(45deg, transparent 48%, rgba(223, 177, 91, 0.02) 48%, rgba(223, 177, 91, 0.02) 52%, transparent 52%);
    background-size: 80px 80px;
    z-index: 1;
    pointer-events: none;
}

.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 840px;
    padding: 0 24px;
}

.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(223, 177, 91, 0.12);
    border: 1px solid var(--accent);
    border-radius: 50px;
    color: var(--accent-gold);
    font-weight: 800;
    font-size: 0.92rem;
    margin-bottom: 1.6rem;
    backdrop-filter: blur(12px);
    animation: fadeInUp 0.8s ease 0.3s both;
}

.slide-badge .svg-icon {
    color: var(--accent-gold);
}

.slide-content h2 {
    font-size: clamp(2rem, 4.6vw, 3.5rem);
    font-weight: 900;
    line-height: 1.25;
    margin-bottom: 1.4rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
    letter-spacing: -0.5px;
    animation: fadeInUp 0.8s ease 0.5s both;
    text-wrap: balance;
}

.slide-content p {
    font-size: clamp(1.02rem, 1.8vw, 1.22rem);
    line-height: 1.85;
    color: #e2e8f0;
    margin-bottom: 2.4rem;
    max-width: 700px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.8s ease 0.7s both;
}

.slide-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.9s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swiper-button-next,
.swiper-button-prev {
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    color: var(--white);
    backdrop-filter: blur(12px);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: var(--accent-gradient);
    border-color: var(--accent);
    transform: scale(1.12);
    box-shadow: 0 4px 20px rgba(223, 177, 91, 0.45);
}

.swiper-button-next::after,
.swiper-button-prev::after {
    display: none;
}

.swiper-button-next .svg-icon,
.swiper-button-prev .svg-icon {
    width: 22px;
    height: 22px;
}

.swiper-pagination {
    bottom: 28px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transition: var(--transition);
}

.swiper-pagination-bullet-active {
    width: 34px;
    border-radius: 6px;
    background: var(--accent-gradient);
    box-shadow: 0 0 12px rgba(223, 177, 91, 0.6);
}

/* ==================== قسم عن المهندس ==================== */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}

.about-video-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 3px solid var(--white);
    background: var(--dark);
}

.about-video-wrapper::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--border-radius-lg) + 3px);
    background: var(--accent-gradient);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.about-video-wrapper:hover::before {
    opacity: 1;
}

.about-video-wrapper video {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.about-experience-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(6, 11, 25, 0.92);
    backdrop-filter: blur(16px);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    border-right: 4px solid var(--accent-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 14px;
}

.about-experience-badge .badge-number {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--accent-gold);
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.about-experience-badge .badge-text {
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
}

.about-text h3 {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    color: var(--primary);
    font-weight: 900;
    line-height: 1.35;
    margin-bottom: 1.2rem;
}

.about-text h3 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 1.08rem;
    color: var(--text-muted);
    line-height: 1.85;
    margin-bottom: 1.2rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 1.8rem 0;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--primary);
    font-size: 0.95rem;
    background: var(--light-bg);
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.highlight-item::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.highlight-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(223, 177, 91, 0.12);
    border: 1px solid rgba(223, 177, 91, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
    font-size: 1.15rem;
    transition: var(--transition);
}

.highlight-text {
    line-height: 1.4;
}

.highlight-item:hover {
    border-color: var(--border-gold);
    background: var(--white);
    transform: translateX(-4px);
    box-shadow: 0 4px 14px rgba(6, 11, 25, 0.06);
}

.highlight-item:hover .highlight-icon {
    background: var(--accent-gradient);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(201, 155, 66, 0.35);
}

.highlight-item:hover::before {
    transform: scaleY(1);
}

.about-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 1.8rem;
}

/* الصناديق الإحصائية */
.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(1rem, 2.5vw, 1.8rem);
    margin-top: 4.5rem;
}

.stat-box {
    background: var(--light-bg);
    padding: 2.4rem 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.stat-box:hover {
    transform: translateY(-8px);
    background: var(--white);
    border-color: var(--border-gold);
    box-shadow: var(--shadow-hover);
}

.stat-box:hover::before {
    transform: scaleX(1);
}

.stat-box .stat-icon {
    font-size: 2.2rem;
    color: var(--accent);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-box .stat-icon .svg-icon {
    width: 44px;
    height: 44px;
}

.stat-box h3 {
    font-size: clamp(2rem, 3.4vw, 2.9rem);
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.3rem;
    line-height: 1;
    font-family: 'Outfit', sans-serif;
}

.stat-box p {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* ==================== قسم الخدمات الهندسية ==================== */
.services {
    background: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.2rem, 2.5vw, 1.8rem);
}

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.4rem 1.8rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 3.5px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card::after {
    content: "";
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(223, 177, 91, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-gold);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover::after {
    opacity: 1;
}

.service-card .service-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition-bounce);
}

.service-card img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.service-card:hover .service-icon {
    background: var(--accent-gradient);
    transform: rotate(6deg) scale(1.08);
    box-shadow: 0 8px 20px rgba(201, 155, 66, 0.3);
}

.service-card h3 {
    font-size: 1.4rem;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.8rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.75;
    margin-bottom: 1.4rem;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    margin-top: auto;
}

.service-link .svg-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-link {
    color: var(--accent-hover);
}

.service-card:hover .service-link .svg-icon {
    transform: translateX(-6px);
}

/* ==================== قسم المشاريع ==================== */
.projects {
    background: var(--white);
}

.projects-filter-wrapper {
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 2.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    position: relative;
}

.projects-filter-wrapper::-webkit-scrollbar {
    display: none;
}

/* مؤشر التمرير للموبايل */
.projects-filter-wrapper::after {
    content: "";
    display: none;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    width: max-content;
    margin: 0 auto;
}

.filter-btn {
    padding: 10px 24px;
    background: var(--light-bg);
    border: 1px solid var(--border-subtle);
    color: var(--primary);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.96rem;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(6, 11, 25, 0.2);
    transform: translateY(-2px);
}

.filter-btn.active .svg-icon {
    color: var(--accent-gold);
}

@media (min-width: 769px) {
    .projects-grid {
        display: flex;
        flex-wrap: wrap;
        gap: clamp(1.2rem, 2.5vw, 2rem);
        justify-content: center;
    }

    .projects-grid>.project-item {
        flex: 0 1 calc(50% - 1rem);
        min-width: 320px;
        max-width: calc(50% - 1rem);
    }
}

.project-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-gold);
}

.project-img {
    position: relative;
    height: 260px;
    overflow: hidden;
    background: var(--dark);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-item:hover .project-img img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 11, 25, 0.1) 0%, rgba(6, 11, 25, 0.85) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-overlay .view-gallery {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    transition: var(--transition-bounce);
    transform: scale(0.6);
    opacity: 0;
}

.project-item:hover .project-overlay .view-gallery {
    transform: scale(1);
    opacity: 1;
}

.project-overlay .view-gallery:hover {
    transform: scale(1.14);
    box-shadow: 0 8px 30px rgba(201, 155, 66, 0.5);
}

.project-info {
    padding: 1.6rem;
}

.project-category {
    display: inline-block;
    color: var(--accent);
    font-size: 0.86rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    letter-spacing: 0.3px;
}

.project-info h3 {
    font-size: 1.38rem;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.75;
}

/* ==================== قسم شعارات العملاء ==================== */
.clients-section {
    background: var(--light-bg);
    padding: 4rem 0;
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(0.8rem, 2vw, 1.5rem);
    align-items: center;
}

.client-logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    background: var(--white);
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    aspect-ratio: 16/10;
}

.client-logo-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: var(--accent);
}

.client-logo-item img {
    max-width: 100%;
    height: 50px;
    object-fit: contain;
    filter: grayscale(85%);
    opacity: 0.7;
    transition: var(--transition);
}

.client-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ==================== قسم شركاء النجاح ==================== */
.partners-section {
    background: var(--white);
}

.partners-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.main-partner {
    background: var(--light-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.main-partner:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-gold);
}

.main-partner-image {
    width: 42%;
    min-height: 380px;
    max-height: 480px;
    object-fit: cover;
}

.main-partner-info {
    width: 58%;
    padding: clamp(2rem, 4vw, 3.2rem);
}

.partner-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--accent-light);
    color: var(--accent);
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.main-partner-name {
    font-size: clamp(1.7rem, 2.8vw, 2.2rem);
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.8rem;
}

.main-partner-bio {
    color: var(--text-muted);
    font-size: 1.08rem;
    line-height: 1.85;
    margin-bottom: 1.8rem;
}

.secondary-partners {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: clamp(1.2rem, 2vw, 1.8rem);
}

.partner-card {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.partner-card:hover {
    transform: translateY(-6px);
    background: var(--white);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-gold);
}

.partner-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.partner-card:hover .partner-image {
    transform: scale(1.05);
}

.partner-info {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.partner-name {
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.partner-bio {
    color: var(--text-muted);
    font-size: 0.94rem;
    line-height: 1.7;
    margin-bottom: 1.4rem;
    min-height: 58px;
}

/* ==================== قسم باقات الأسعار ==================== */
.pricing {
    background: var(--light-bg);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(1.5rem, 3vw, 2.2rem);
    align-items: stretch;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: clamp(2.5rem, 4vw, 3.2rem) clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-subtle);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pricing-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--border-gold);
}

.pricing-card:hover::before {
    transform: scaleX(1);
}

.pricing-card.recommended {
    border: 2px solid var(--accent);
    transform: scale(1.03);
    box-shadow: var(--shadow-hover), 0 0 40px rgba(223, 177, 91, 0.1);
    background: linear-gradient(180deg, rgba(223, 177, 91, 0.04) 0%, var(--white) 30%);
}

.pricing-card.recommended::before {
    transform: scaleX(1);
}

.pricing-card.recommended:hover {
    transform: translateY(-10px) scale(1.03);
}

.recommended-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-gradient);
    color: var(--white);
    padding: 6px 24px;
    border-radius: 0 0 14px 14px;
    font-size: 0.86rem;
    font-weight: 900;
    box-shadow: var(--shadow-gold);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pricing-icon {
    font-size: 2.6rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
}

.pricing-icon .svg-icon {
    width: 50px;
    height: 50px;
}

.pricing-card h3 {
    font-size: 1.72rem;
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.7rem;
}

.price {
    font-size: clamp(2.3rem, 3.8vw, 2.8rem);
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    font-family: 'Outfit', sans-serif;
}

.price span {
    font-size: 0.96rem;
    color: var(--text-muted);
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2.2rem;
    text-align: right;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-features li .svg-icon {
    color: #10b981;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* ==================== قسم التواصل ==================== */
.contact {
    background: var(--primary);
    color: var(--white);
    position: relative;
}

.contact::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(223, 177, 91, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(223, 177, 91, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: stretch;
    position: relative;
    z-index: 2;
}

.contact-map {
    height: 100%;
    min-height: 480px;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    border: 2px solid rgba(255, 255, 255, 0.12);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.contact-form-wrapper {
    background: var(--white);
    color: var(--text-main);
    padding: clamp(2rem, 4vw, 3rem);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.contact-form-wrapper h3 {
    font-size: clamp(1.65rem, 2.8vw, 2.1rem);
    color: var(--primary);
    font-weight: 900;
    margin-bottom: 0.4rem;
}

.contact-form-wrapper p {
    color: var(--text-muted);
    margin-bottom: 1.8rem;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.3rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 800;
    color: var(--primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    background: #f8fafc;
    transition: var(--transition);
    color: var(--text-main);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    background: var(--white);
    outline: none;
    box-shadow: 0 0 0 4px rgba(223, 177, 91, 0.15);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.submit-btn:hover::before {
    width: 400px;
    height: 400px;
}

.submit-btn:hover {
    background: var(--accent-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(201, 155, 66, 0.48);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn:disabled::before {
    display: none;
}

/* SVG Spinner for submit button */
.btn-spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

.alert {
    padding: 15px 18px;
    margin-bottom: 20px;
    border-radius: var(--border-radius-sm);
    display: none;
    font-weight: 700;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 0.4s ease;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==================== الفوتر الملكي ==================== */
footer {
    background: var(--black);
    color: var(--white);
    padding: 5rem 0 2.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 650px;
    height: 400px;
    background: radial-gradient(circle, rgba(223, 177, 91, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.footer-royal {
    background: #030712;
    color: var(--white);
    padding: 4.5rem 0 2.2rem;
    border-top: 1px solid rgba(223, 177, 91, 0.2);
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr 0.9fr 1.3fr;
    gap: clamp(1.5rem, 3.5vw, 3rem);
    position: relative;
    z-index: 2;
    margin-bottom: 3.5rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--white);
    margin-bottom: 1.2rem;
    transition: var(--transition);
}

.footer-logo:hover {
    transform: translateY(-2px);
}

.footer-logo img {
    height: 46px;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(223, 177, 91, 0.3);
}

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

.footer-logo-text .logo-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--white);
    line-height: 1.2;
}

.footer-logo-text .logo-title strong {
    color: var(--accent-gold);
}

.footer-logo-text .logo-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    font-weight: 500;
}

.footer-desc {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: right;
}

.footer-badge-trust {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(223, 177, 91, 0.08);
    border: 1px solid rgba(223, 177, 91, 0.25);
    padding: 8px 16px;
    border-radius: 50px;
    width: fit-content;
}

.footer-badge-trust .trust-number {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--accent-gold);
    line-height: 1;
}

.footer-badge-trust .trust-label {
    font-size: 0.85rem;
    color: #e2e8f0;
    font-weight: 700;
}

.footer-col-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.4rem;
    position: relative;
    padding-bottom: 10px;
    text-align: right;
}

.footer-col-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 32px;
    height: 2px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 600;
    transition: var(--transition);
}

.footer-links-list li a .svg-icon {
    font-size: 0.85rem;
    color: var(--accent-gold);
    transition: transform 0.25s ease;
}

.footer-links-list li a:hover {
    color: var(--accent-gold);
    transform: translateX(-4px);
}

.footer-links-list li a:hover .svg-icon {
    transform: translateX(-3px);
}

/* بطاقات التواصل في الفوتر */
.footer-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--white);
    transition: var(--transition);
}

.footer-card-item:hover {
    background: rgba(223, 177, 91, 0.08);
    border-color: rgba(223, 177, 91, 0.4);
    transform: translateY(-2px);
}

.footer-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(223, 177, 91, 0.12);
    border: 1px solid rgba(223, 177, 91, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    flex-shrink: 0;
    font-size: 1.15rem;
    transition: var(--transition);
}

.footer-card-icon.wa-icon {
    color: #25d366;
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
}

.footer-card-item:hover .footer-card-icon {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(223, 177, 91, 0.3);
}

.footer-card-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    min-width: 0;
}

.footer-card-label {
    font-size: 0.74rem;
    color: #94a3b8;
    font-weight: 500;
}

.footer-card-val {
    font-size: 0.88rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* شريط الفوتر السفلي */
.footer-bottom-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}

.social-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icons a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(223, 177, 91, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.15rem;
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--accent-gradient);
    color: #060b19;
    border-color: var(--accent-gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(201, 155, 66, 0.4);
}

.copyright {
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0;
}

/* ==================== زر العودة للأعلى (Back to Top) ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent-gold);
    border: 1.5px solid var(--border-glass-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-gradient);
    color: var(--white);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.back-to-top .svg-icon {
    width: 22px;
    height: 22px;
}

/* SVG circle progress ring */
.back-to-top svg.progress-ring {
    position: absolute;
    top: -3px;
    left: -3px;
    width: 56px;
    height: 56px;
    transform: rotate(-90deg);
}

.back-to-top .progress-ring-circle {
    fill: none;
    stroke: var(--accent-gold);
    stroke-width: 2;
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    transition: stroke-dashoffset 0.2s ease;
}

/* ==================== شريط الإجراءات السفلي للموبايل (Mobile Bottom Bar) ==================== */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1500;
    background: linear-gradient(to top, rgba(6, 11, 25, 0.98), rgba(6, 11, 25, 0.92));
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border-top: 1px solid rgba(223, 177, 91, 0.1);
    box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.4), 0 -1px 0 rgba(223, 177, 91, 0.06);
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
    align-items: stretch;
    gap: 2px;
}

.mobile-bottom-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    gap: 3px;
    padding: 7px 4px 5px;
    border-radius: 12px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    min-width: 0;
}

.mobile-bottom-bar a .svg-icon {
    width: 21px;
    height: 21px;
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.25s ease;
}

.mobile-bottom-bar a:hover,
.mobile-bottom-bar a:active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-bottom-bar a:hover .svg-icon,
.mobile-bottom-bar a:active .svg-icon {
    color: var(--accent-gold);
    transform: translateY(-1px);
}

.mobile-bottom-bar a.bar-cta {
    background: var(--accent-gradient);
    color: var(--white);
    border-radius: 14px;
    margin: -6px 2px 2px;
    padding: 9px 10px 7px;
    box-shadow: 0 4px 16px rgba(201, 155, 66, 0.3), 0 2px 6px rgba(201, 155, 66, 0.2);
    transform: translateY(-4px);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.mobile-bottom-bar a.bar-cta .svg-icon {
    color: var(--white);
    width: 20px;
    height: 20px;
}

.mobile-bottom-bar a.bar-cta:active {
    transform: translateY(-2px) scale(0.96);
    box-shadow: 0 2px 10px rgba(201, 155, 66, 0.25);
}

/* ==================== زر الواتساب الفاخر لسطح المكتب ==================== */
.floating-desktop-pill {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-whatsapp-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    background: #25d366;
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.98rem;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transition: var(--transition-bounce);
    animation: pulseWhatsapp 2.4s infinite;
}

.floating-whatsapp-pill .svg-icon {
    font-size: 1.45rem;
}

.floating-whatsapp-pill:hover {
    transform: scale(1.06) translateY(-3px);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.55);
    color: var(--white);
}

@keyframes pulseWhatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }

    70% {
        box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* ==================== منع السكرول الخلفي (Background Scroll Lock) ==================== */
html.modal-locked {
    overflow: hidden !important;
    touch-action: none;
}

body.modal-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    touch-action: none;
    -webkit-overflow-scrolling: auto;
}

/* ==================== النوافذ المنبثقة المطورة (Premium Modals) ==================== */
.gallery-modal,
.partner-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: clamp(10px, 2.5vw, 24px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.gallery-modal.active,
.partner-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal-backdrop,
.partner-modal-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(10, 20, 38, 0.94) 0%, rgba(3, 7, 18, 0.98) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: -1;
    cursor: pointer;
}

/* بطاقة نافذة المعرض الفاخرة */
.gallery-modal-dialog {
    width: 100%;
    max-width: 980px;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(6, 11, 25, 0.99));
    border: 1px solid rgba(223, 177, 91, 0.35);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(223, 177, 91, 0.15);
    padding: clamp(0.9rem, 1.8vw, 1.4rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    max-height: 92vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    transform: scale(0.94) translateY(18px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.gallery-modal.active .gallery-modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* إخفاء شريط التمرير بالكامل في النوافذ المنبثقة مع بقاء التمرير متاحاً بالماوس أو اللمس */
.gallery-modal-dialog,
.partner-modal-card,
.gallery-modal,
.partner-modal {
    scrollbar-width: none !important;
    /* Firefox */
    -ms-overflow-style: none !important;
    /* IE & Edge */
}

.gallery-modal-dialog::-webkit-scrollbar,
.partner-modal-card::-webkit-scrollbar,
.gallery-modal::-webkit-scrollbar,
.partner-modal::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* شريط رأس المعرض */
.gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-header-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gallery-category-badge {
    background: rgba(223, 177, 91, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(223, 177, 91, 0.35);
    padding: 4px 12px;
    border-radius: var(--border-radius-full);
    font-size: 0.82rem;
    font-weight: 700;
}

.gallery-counter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    padding: 4px 10px;
    border-radius: var(--border-radius-full);
    font-size: 0.82rem;
    font-family: var(--font-en);
    font-weight: 600;
}

.gallery-counter-badge svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-gold);
}

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

.gallery-action-btn,
.close-gallery {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-action-btn:hover {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--primary-dark);
    transform: scale(1.05);
}

.close-gallery:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.gallery-action-btn svg,
.close-gallery svg {
    width: 20px;
    height: 20px;
}

/* كانفاس السلايدر الرئيسي */
.gallery-container {
    width: 100%;
    height: 44vh;
    min-height: 250px;
    max-height: 390px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(14, 25, 48, 0.75) 0%, rgba(3, 7, 18, 0.98) 100%);
    border: 1px solid rgba(223, 177, 91, 0.22);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
    flex-shrink: 0;
}

.main-slider {
    width: 100%;
    height: 100%;
}

.main-slider .swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden;
    padding: 10px;
    width: 100%;
    height: 100%;
}

.main-slider img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border-radius: var(--border-radius);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.35s ease;
    cursor: zoom-in;
}

.main-slider.zoomed img {
    transform: scale(1.6);
    cursor: zoom-out;
}

/* أزرار التنقل الفاخرة بين الصور */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(8, 14, 28, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(223, 177, 91, 0.4);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.gallery-nav-btn:hover {
    background: var(--accent-gold);
    color: var(--primary-dark);
    box-shadow: 0 0 18px rgba(223, 177, 91, 0.6);
    border-color: var(--accent-gold);
}

.gallery-nav-btn svg {
    width: 20px;
    height: 20px;
}

.gallery-nav-next {
    left: 14px;
}

.gallery-nav-prev {
    right: 14px;
}

/* شريط الصور المصغرة (Thumbnails) المُوسط هندسياً بنسبة 100% وبدون تشوه */
.thumbnail-slider {
    width: fit-content !important;
    max-width: 90% !important;
    margin: 0.15rem auto 0 !important;
    height: 78px;
    flex-shrink: 0;
    padding: 4px 6px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thumbnail-slider .swiper-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
}

.thumbnail-slider .swiper-slide {
    width: 106px !important;
    height: 70px !important;
    flex: 0 0 106px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    margin: 0 5px;
}

.thumbnail-slider .swiper-slide:hover {
    opacity: 0.88;
    border-color: rgba(223, 177, 91, 0.6);
    transform: translateY(-2px);
}

.thumbnail-slider .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--accent-gold);
    box-shadow: 0 0 18px rgba(223, 177, 91, 0.65), 0 4px 15px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px) scale(1.05);
}

.thumbnail-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 7px;
}

/* تفاصيل ومواصفات المشروع في المنتصف بتناغم */
.project-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding-top: 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-details-text {
    text-align: center;
    max-width: 820px;
    margin: 0 auto;
}

.project-details-text h3 {
    font-size: 1.35rem;
    color: var(--accent-gold);
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.project-details-text p {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.6;
    margin-bottom: 0.4rem;
}

.project-specs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.4rem;
}

.project-spec-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(223, 177, 91, 0.2);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 0.82rem;
    color: #e2e8f0;
}

.project-spec-item strong {
    color: var(--accent-gold);
    font-weight: 600;
}

/* أزرار الإجراء السريع في المعرض */
.gallery-cta-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 0.4rem;
}

.gallery-cta-actions .gallery-order-btn {
    flex: 1 1 240px;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.95rem;
}

.gallery-cta-actions .gallery-wa-btn {
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.35);
    background: rgba(37, 211, 102, 0.08);
    padding: 10px 18px;
    font-size: 0.95rem;
}

.gallery-cta-actions .gallery-wa-btn:hover {
    background: #25d366;
    color: #060b19;
    border-color: #25d366;
}

/* ==================== بطاقة نافذة الشريك والاستشاري ==================== */
.partner-modal-card {
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.98), rgba(6, 11, 25, 0.99));
    border: 1px solid rgba(223, 177, 91, 0.35);
    max-width: 580px;
    width: 100%;
    border-radius: var(--border-radius-lg);
    padding: clamp(1.8rem, 3.5vw, 2.5rem);
    position: relative;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px rgba(223, 177, 91, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.partner-modal.active .partner-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.partner-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.partner-modal-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.partner-modal-header {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.partner-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.partner-avatar-wrap img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 8px 22px rgba(223, 177, 91, 0.25);
}

.partner-status-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    background: var(--accent-gold);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.partner-status-badge svg {
    width: 14px;
    height: 14px;
    fill: var(--primary-dark);
    stroke: var(--primary-dark);
}

.partner-header-titles {
    flex: 1;
    text-align: right;
}

.partner-modal-role {
    display: inline-block;
    background: rgba(223, 177, 91, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(223, 177, 91, 0.3);
    padding: 3px 10px;
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.partner-modal-header h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 0.25rem;
    font-weight: 800;
}

.partner-modal-dept {
    color: #94a3b8;
    font-size: 0.88rem;
    margin: 0;
}

.partner-modal-body {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.partner-bio-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius);
    padding: 1.1rem;
}

.partner-bio-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.partner-bio-title svg {
    width: 16px;
    height: 16px;
}

.partner-bio-card p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.8;
    margin: 0;
}

.partner-expertise-section {
    text-align: right;
}

.partner-expertise-title {
    font-size: 0.9rem;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.partner-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.partner-tag-pill {
    background: rgba(223, 177, 91, 0.1);
    border: 1px solid rgba(223, 177, 91, 0.25);
    color: var(--accent-gold);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition);
}

.partner-tag-pill:hover {
    background: rgba(223, 177, 91, 0.2);
    border-color: var(--accent-gold);
}

.partner-modal-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 0.4rem;
}

.partner-modal-footer .partner-consult-btn {
    flex: 1;
    justify-content: center;
    padding: 10px 18px;
    font-size: 0.95rem;
}

.partner-modal-footer .partner-wa-btn {
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.35);
    background: rgba(37, 211, 102, 0.08);
    padding: 10px 18px;
    font-size: 0.95rem;
}

.partner-modal-footer .partner-wa-btn:hover {
    background: #25d366;
    color: #060b19;
    border-color: #25d366;
}

/* ==================== نقاط التجاوب الحاسمة (Breakpoints) ==================== */
@media (max-width: 1140px) {

    .desktop-nav,
    .header-cta-box {
        display: none !important;
    }

    .menu-toggle-btn {
        display: flex !important;
    }
}

@media (max-width: 1240px) {
    .desktop-nav ul li a {
        padding: 7px 10px;
        font-size: 0.91rem;
    }
}

@media (max-width: 992px) {

    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-video-wrapper video {
        height: 380px;
    }

    .main-partner {
        flex-direction: column;
    }

    .main-partner-image {
        width: 100%;
        min-height: 280px;
        max-height: 340px;
    }

    .main-partner-info {
        width: 100%;
        padding: 2rem;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-map {
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: clamp(3.5rem, 6vw, 5rem) 0;
    }

    .mobile-bottom-bar {
        display: flex;
    }

    .floating-desktop-pill {
        display: none;
    }

    .back-to-top {
        bottom: 84px;
        right: 16px;
        left: auto;
        width: 44px;
        height: 44px;
    }

    .back-to-top svg.progress-ring {
        width: 50px;
        height: 50px;
    }

    /* === قسم الهيرو === */
    .hero-slider {
        height: 88vh;
        min-height: 500px;
        max-height: none;
    }

    .slide-content {
        padding: 0 16px 26px;
    }

    .hero-slider .swiper-pagination {
        bottom: 12px !important;
    }

    .slide-content h2 {
        font-size: clamp(1.5rem, 5.2vw, 2.05rem);
        line-height: 1.34;
        text-wrap: balance;
    }

    .slide-content p {
        font-size: 1rem;
        margin-bottom: 1.6rem;
        line-height: 1.75;
    }

    .slide-badge {
        font-size: 0.82rem;
        padding: 6px 14px;
    }

    .slide-actions {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .slide-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }

    /* منع إخفاء العناصر أو إزاحتها في وضع الموبايل لضمان قراءة فورية وسلسة */
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* === قسم عن المهندس - تحسين شامل للموبايل === */
    .about-content {
        gap: 1.8rem;
    }

    .about-video-wrapper video {
        height: 250px;
        border-radius: var(--border-radius);
    }

    .about-experience-badge {
        bottom: 12px;
        right: 12px;
        padding: 8px 14px;
        gap: 10px;
        max-width: calc(100% - 24px);
        box-sizing: border-box;
    }

    .about-experience-badge .badge-number {
        font-size: 1.6rem;
    }

    .about-experience-badge .badge-text {
        font-size: 0.78rem;
        line-height: 1.25;
    }

    .about-text h3 {
        font-size: 1.35rem;
        margin-bottom: 0.8rem;
        line-height: 1.35;
    }

    .about-text p {
        font-size: 0.94rem;
        line-height: 1.75;
        margin-bottom: 0.8rem;
    }

    /* شبكة مميزات وخبرات المهندس - بدون تمرير مخفي */
    .about-highlights {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 1.4rem 0;
        overflow: visible;
    }

    .about-highlights .highlight-item {
        flex: none;
        width: 100%;
        min-width: 0;
        padding: 10px 12px;
        font-size: 0.86rem;
        gap: 10px;
    }

    .about-highlights .highlight-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        border-radius: 8px;
    }

    /* أزرار السيرة في نبذة المهندس */
    .about-actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 1.4rem;
    }

    .about-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 11px 16px;
        font-size: 0.92rem;
    }

    /* === الصناديق الإحصائية - شبكة 2x2 متناسقة تماماً === */
    .stats-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 2.8rem;
        overflow: visible;
    }

    .stats-container .stat-box {
        flex: none;
        width: 100%;
        min-width: 0;
        padding: 1.6rem 1rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .stats-container .stat-box .stat-icon {
        margin-bottom: 0.5rem;
    }

    .stats-container .stat-box .stat-icon .svg-icon {
        width: 36px;
        height: 36px;
    }

    .stats-container .stat-box h3 {
        font-size: 1.75rem;
    }

    .stats-container .stat-box p {
        font-size: 0.85rem;
    }

    /* === الشريك الرئيسي - تحسين === */
    .main-partner {
        border-radius: var(--border-radius);
    }

    .main-partner-image {
        width: 100%;
        min-height: 260px;
        max-height: 320px;
    }

    .main-partner-info {
        width: 100%;
        padding: 1.6rem;
    }

    .main-partner-name {
        font-size: 1.5rem;
    }

    .main-partner-bio {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 1.2rem;
    }

    /* === قسم التواصل - تصغير وتحسين شامل === */
    .contact-container {
        gap: 1.2rem;
    }

    .contact-map {
        min-height: 220px;
        max-height: 250px;
        border-radius: var(--border-radius);
    }

    .contact-form-wrapper {
        padding: 1.5rem 1.2rem;
        border-radius: var(--border-radius);
    }

    .contact-form-wrapper h3 {
        font-size: 1.25rem;
        margin-bottom: 0.2rem;
    }

    .contact-form-wrapper>p {
        font-size: 0.88rem;
        margin-bottom: 1.2rem;
    }

    .form-group {
        margin-bottom: 0.9rem;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .form-group textarea {
        min-height: 80px;
    }

    .submit-btn {
        padding: 12px;
        font-size: 0.95rem;
    }

    .alert {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    /* === الفوتر الملكي - تحسين شامل للموبايل === */
    footer,
    .footer-royal {
        padding: 3rem 0 calc(2.2rem + var(--bottom-bar-height, 68px));
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.2rem;
        margin-bottom: 2rem;
    }

    .footer-col-brand {
        text-align: center;
        align-items: center;
    }

    .footer-desc {
        text-align: center;
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .footer-badge-trust {
        margin: 0 auto;
    }

    .footer-col-title {
        text-align: right;
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .footer-links-list {
        gap: 8px;
    }

    .footer-links-list li a {
        font-size: 0.88rem;
    }

    .footer-contact-cards {
        gap: 10px;
    }

    .footer-card-item {
        padding: 10px 12px;
    }

    .footer-card-icon {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }

    .footer-card-val {
        font-size: 0.84rem;
    }

    .footer-bottom-bar {
        padding-top: 1.5rem;
        gap: 1.2rem;
    }

    .social-icons a {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .copyright p {
        font-size: 0.82rem;
        line-height: 1.65;
    }

    /* === العناوين والنصوص === */
    .section-title h2 {
        font-size: clamp(1.6rem, 5.5vw, 2.2rem);
    }

    .section-title p {
        font-size: 0.98rem;
    }

    /* === نظام التمرير الأفقي للموبايل (للخدمات والشركاء والباقات) === */
    .services-grid,
    .secondary-partners,
    .pricing-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        padding: 8px 0 20px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        will-change: scroll-position;
        contain: layout style;
    }

    .services-grid::-webkit-scrollbar,
    .secondary-partners::-webkit-scrollbar,
    .pricing-grid::-webkit-scrollbar {
        display: none;
    }

    .services-grid>.service-card,
    .secondary-partners>.partner-card {
        flex: 0 0 82% !important;
        min-width: 270px !important;
        max-width: 340px !important;
        scroll-snap-align: center;
    }

    .pricing-grid>.pricing-card {
        flex: 0 0 80% !important;
        min-width: 260px !important;
        max-width: 340px !important;
        scroll-snap-align: center;
        padding: 1.8rem 1.4rem;
    }

    .pricing-card h3 {
        font-size: 1.35rem;
    }

    .price {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .pricing-features li {
        padding: 8px 0;
        font-size: 0.88rem;
    }

    .pricing-features {
        margin-bottom: 1.2rem;
    }

    .pricing-icon .svg-icon {
        width: 36px;
        height: 36px;
    }

    .pricing-icon {
        margin-bottom: 0.6rem;
    }

    /* === قسم المشاريع المطور للموبايل: تمرير أفقي فاخر ومتناسق 100% بدون أي قص أو تداخل === */
    .projects-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 16px !important;
        padding: 10px 24px 26px !important;
        margin: 0 -16px !important;
        width: calc(100% + 32px) !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        scroll-padding: 0 24px !important;
        will-change: scroll-position !important;
    }

    .projects-grid::-webkit-scrollbar {
        display: none !important;
    }

    .projects-grid>.project-item {
        flex: 0 0 calc(100vw - 48px) !important;
        width: calc(100vw - 48px) !important;
        min-width: 260px !important;
        max-width: 330px !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
        border-radius: var(--border-radius) !important;
        box-shadow: 0 8px 24px rgba(6, 11, 25, 0.08) !important;
        background: var(--white) !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        margin: 0 auto !important;
    }

    .project-img {
        height: 220px !important;
    }

    .project-info {
        padding: 1.3rem 1.15rem !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .project-category {
        font-size: 0.82rem !important;
        margin: 0 auto 0.4rem !important;
        white-space: normal !important;
        display: inline-block !important;
        text-align: center !important;
    }

    .project-info h3 {
        font-size: 1.22rem !important;
        line-height: 1.4 !important;
        margin: 0 auto 0.5rem !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
    }

    .project-info p {
        font-size: 0.9rem !important;
        line-height: 1.7 !important;
        margin: 0 auto !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
    }

    /* === شريط فلتر المشاريع الأفقي المتدفق بسلاسة تامة بدون أي تداخل === */
    .projects-filter-wrapper {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        margin: 0 -16px 1.6rem !important;
        padding: 4px 16px 10px !important;
        width: calc(100% + 32px) !important;
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
        text-align: center !important;
    }

    .projects-filter-wrapper::-webkit-scrollbar {
        display: none !important;
    }

    .projects-filter {
        display: inline-flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 100% !important;
        width: max-content !important;
        margin: 0 auto !important;
        padding: 0 8px !important;
        box-sizing: border-box !important;
    }

    .filter-btn {
        flex-shrink: 0 !important;
        width: auto !important;
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
        gap: 6px !important;
        border-radius: 50px !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(6, 11, 25, 0.05) !important;
    }

    .filter-btn .svg-icon {
        width: 15px !important;
        height: 15px !important;
        flex-shrink: 0 !important;
    }

    /* === شبكة عملاء النجاح === */
    .clients-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .client-logo-item {
        padding: 12px 8px;
    }

    .pricing-card.recommended {
        transform: none;
    }

    .pricing-card.recommended:hover {
        transform: translateY(-4px);
    }

    /* مؤشرات التلميح البصرية للتمرير الأفقي */
    .services,
    .partners-section,
    .pricing {
        position: relative;
    }

    .services::after,
    .partners-section::after,
    .pricing::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 28px;
        background: linear-gradient(to right, var(--light-bg) 0%, transparent 100%);
        pointer-events: none;
        z-index: 3;
        opacity: 0.7;
    }

    .projects::after {
        display: none !important;
    }

    .partners-section::after {
        background: linear-gradient(to right, var(--white) 0%, transparent 100%);
    }

    /* تحسين أداء البطاقات أثناء التمرير */
    .service-card,
    .project-item,
    .partner-card,
    .pricing-card {
        will-change: auto;
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    /* === نقاط مؤشر التمرير الأفقي (Scroll Dots) === */
    .scroll-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        padding: 8px 0 4px;
    }

    .scroll-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--border-subtle);
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        outline: none;
    }

    .scroll-dot.active {
        width: 24px;
        border-radius: 10px;
        background: var(--accent-gradient);
        box-shadow: 0 2px 8px rgba(201, 155, 66, 0.3);
    }
}

@media (max-width: 540px) {
    .container {
        width: 92%;
        padding: 0 12px;
    }

    .home-slider .swiper-slide::before {
        background: linear-gradient(180deg,
            rgba(6, 11, 25, 0.70) 0%,
            rgba(6, 11, 25, 0.58) 45%,
            rgba(6, 11, 25, 0.88) 100%);
    }

    .about-video-wrapper video {
        height: 230px;
    }

    .about-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stats-container .stat-box {
        padding: 1.2rem 0.8rem;
    }

    .stats-container .stat-box h3 {
        font-size: 1.55rem;
    }

    .clients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .client-logo-item {
        padding: 10px 6px;
    }

    .client-logo-item img {
        height: 38px;
    }

    .gallery-container {
        height: 40vh;
        min-height: 220px;
    }

    .thumbnail-slider {
        height: 58px;
    }

    .gallery-modal-dialog {
        padding: 1rem 0.85rem;
        gap: 0.8rem;
    }

    .gallery-header {
        padding-bottom: 0.6rem;
    }

    .gallery-category-badge {
        font-size: 0.75rem;
        padding: 3px 10px;
    }

    .project-details-text h3 {
        font-size: 1.2rem;
    }

    .project-details-text p {
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .gallery-cta-actions .btn {
        width: 100%;
        font-size: 0.88rem;
        padding: 8px 14px;
    }

    .partner-modal-card {
        padding: 1.5rem 1.1rem;
        gap: 1rem;
    }

    .partner-modal-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .partner-header-titles {
        text-align: center;
    }

    .partner-avatar-wrap img {
        width: 86px;
        height: 86px;
    }

    .partner-modal-footer {
        flex-direction: column;
    }

    .partner-modal-footer .btn {
        width: 100%;
    }

    .logo-brand {
        font-size: 1.08rem;
    }

    .logo-sub {
        font-size: 0.68rem;
    }

    .hero-slider {
        height: 92vh;
        min-height: 460px;
    }

    .slide-content h2 {
        font-size: 1.6rem;
    }

    .service-card {
        padding: 2rem 1.4rem;
    }

    /* services-grid handled by horizontal scroll system */
}

@media (max-width: 360px) {
    .logo img {
        height: 38px;
    }

    .logo-brand {
        font-size: 1rem;
    }

    .slide-content h2 {
        font-size: 1.45rem;
    }

    .stats-container .stat-box {
        padding: 1rem 0.5rem;
    }

    .stats-container .stat-box h3 {
        font-size: 1.35rem;
    }

    .stats-container .stat-box p {
        font-size: 0.78rem;
    }

    .about-experience-badge {
        padding: 6px 10px;
        gap: 8px;
    }

    .about-experience-badge .badge-number {
        font-size: 1.35rem;
    }

    .about-experience-badge .badge-text {
        font-size: 0.72rem;
    }
}

/* ==================== احترام تقليل الحركة (Reduced Motion) ==================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==================== تأثيرات الطباعة (Print Styles) ==================== */
@media print {

    header,
    footer,
    .mobile-bottom-bar,
    .floating-desktop-pill,
    .back-to-top,
    .scroll-progress,
    .preloader {
        display: none !important;
    }

    section {
        break-inside: avoid;
        padding: 2rem 0;
    }

    body {
        background: white;
        color: black;
    }
}
/* ===================================================================
   v7.0 UX layer: language direction, persistent theme, and compact controls
   =================================================================== */
.site-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 8px;
    margin-inline-start: 8px;
}
.site-control-btn {
    min-width: 42px;
    min-height: 42px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-gold);
    border-radius: 12px;
    background: var(--white);
    color: var(--text-main);
    font: 700 .88rem/1 'Outfit', 'Tajawal', sans-serif;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.site-control-btn:hover { border-color: var(--accent); background: var(--accent-light); transform: translateY(-1px); }
.site-control-btn:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 2px; }
.theme-toggle { font-size: 1.25rem; }

html[lang="en"] body,
html[lang="en"] body button,
html[lang="en"] body input,
html[lang="en"] body select,
html[lang="en"] body textarea {
    font-family: 'Outfit', 'Segoe UI', sans-serif;
}
html[dir="ltr"] body { direction: ltr !important; text-align: left !important; }
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="ltr"] .logo-text,
html[dir="ltr"] .footer-logo-text,
html[dir="ltr"] .footer-desc,
html[dir="ltr"] .footer-col-title,
html[dir="ltr"] .footer-card-info,
html[dir="ltr"] .partner-header-titles,
html[dir="ltr"] .partner-expertise-section,
html[dir="ltr"] .partner-bio-card,
html[dir="ltr"] .pricing-features,
html[dir="ltr"] .project-info,
html[dir="ltr"] .project-details-text,
html[dir="ltr"] .gallery-modal .project-details,
html[dir="ltr"] .contact-form,
html[dir="ltr"] .contact-info,
html[dir="ltr"] .about-text { text-align: left; }
html[dir="ltr"] .footer-col-title::after { right: auto; left: 0; }
html[dir="ltr"] .footer-links-list a,
html[dir="ltr"] .pricing-features li,
html[dir="ltr"] .project-spec-item,
html[dir="ltr"] .contact-info-item { direction: ltr; }
html[dir="ltr"] .desktop-nav ul { direction: ltr; }
html[dir="ltr"] .header-content,
html[dir="ltr"] .header-cta-box,
html[dir="ltr"] .site-controls { direction: ltr; }
html[dir="ltr"] .slide-actions,
html[dir="ltr"] .gallery-cta-actions { direction: ltr; }
html[dir="ltr"] .back-to-top { right: 16px; left: auto; }
html[dir="ltr"] .mobile-bottom-bar { direction: ltr; }

html[data-theme="dark"] {
    color-scheme: dark;
    --light-bg: #0b1120;
    --light-surface: #111c2f;
    --white: #111c2f;
    --glass-card-bg: rgba(17, 28, 47, .96);
    --text-main: #e7edf7;
    --text-muted: #a6b4c9;
    --text-light: #8494ad;
    --border-subtle: rgba(226, 232, 240, .13);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, .2);
    --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, .25), 0 4px 12px -2px rgba(0, 0, 0, .16);
    --shadow-hover: 0 20px 40px -10px rgba(0, 0, 0, .45), 0 0 20px rgba(223, 177, 91, .08);
}
html[data-theme="dark"] body { background: var(--light-bg); color: var(--text-main); }
html[data-theme="dark"] section:not(.hero-slider),
html[data-theme="dark"] .about-section,
html[data-theme="dark"] .services-section,
html[data-theme="dark"] .projects-section,
html[data-theme="dark"] .clients-section,
html[data-theme="dark"] .partners-section,
html[data-theme="dark"] .pricing-section,
html[data-theme="dark"] .contact-section { color: var(--text-main); }
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .project-item,
html[data-theme="dark"] .pricing-card,
html[data-theme="dark"] .partner-card,
html[data-theme="dark"] .client-card,
html[data-theme="dark"] .stat-box,
html[data-theme="dark"] .contact-form,
html[data-theme="dark"] .contact-info-card,
html[data-theme="dark"] .contact-info-item,
html[data-theme="dark"] .project-info,
html[data-theme="dark"] .project-spec-item,
html[data-theme="dark"] .service-card-inner,
html[data-theme="dark"] .footer-card-item {
    background-color: #111c2f !important;
    color: var(--text-main);
    border-color: rgba(223, 177, 91, .18);
}
html[data-theme="dark"] .project-info p,
html[data-theme="dark"] .service-card p,
html[data-theme="dark"] .pricing-card p,
html[data-theme="dark"] .partner-card p,
html[data-theme="dark"] .contact-form p,
html[data-theme="dark"] .contact-info-item p,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .about-text p { color: var(--text-muted); }
html[data-theme="dark"] .project-info h3,
html[data-theme="dark"] .service-card h3,
html[data-theme="dark"] .pricing-card h3,
html[data-theme="dark"] .partner-card h3,
html[data-theme="dark"] .project-spec-item strong,
html[data-theme="dark"] .contact-form label { color: var(--text-main); }
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #0b1425;
    color: #e7edf7;
    border-color: rgba(226, 232, 240, .2);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #8494ad; }
html[data-theme="dark"] .site-control-btn { background: #111c2f; color: var(--text-main); }
html[data-theme="dark"] .projects-filter .filter-btn:not(.active) { color: var(--text-muted); border-color: rgba(226,232,240,.17); }
html[data-theme="dark"] .pricing-features li { border-bottom-color: rgba(226,232,240,.12); }
html[data-theme="dark"] .mobile-drawer { background: #0b1425; }
html[data-theme="dark"] .mobile-drawer a { color: var(--text-main); }
html[data-theme="dark"] .gallery-modal .project-details,
html[data-theme="dark"] .partner-modal-card { background: #0e1728; color: var(--text-main); }
html[data-theme="dark"] .gallery-modal .project-details p,
html[data-theme="dark"] .partner-modal-card p { color: var(--text-muted); }
html[data-theme="dark"] .scroll-dots .scroll-dot { background: rgba(226,232,240,.3); }

@media (max-width: 1140px) {
    .site-controls { margin-inline-start: auto; }
}
@media (max-width: 768px) {
    .site-controls { gap: 6px; margin-inline-start: auto; }
    .site-control-btn { min-width: 38px; min-height: 38px; border-radius: 11px; }
    .header-content { gap: 8px; }
    html[dir="ltr"] .project-details-text,
    html[dir="ltr"] .gallery-modal .project-details { text-align: left; }
}
@media (max-width: 390px) {
    .site-controls { gap: 4px; }
    .site-control-btn { min-width: 34px; min-height: 36px; padding: 0 7px; }
    .header-content { padding-inline: 10px; }
}

/* Graceful native gallery fallback if the optional Swiper CDN cannot load. */
.swiper-unavailable .gallery-modal .main-slider .swiper-slide[hidden] { display: none !important; }
.swiper-unavailable .gallery-modal .main-slider .swiper-slide:not([hidden]) { width: 100%; }
.swiper-unavailable .gallery-modal .thumbnail-slider .swiper-slide { cursor: pointer; }
.swiper-unavailable .gallery-modal .thumbnail-slider .swiper-slide.is-current { outline: 2px solid var(--accent-gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .site-control-btn { transition: none; }
}

/* Core carousel structure is local so the layout remains valid without the optional CDN CSS. */
.swiper-wrapper { display: flex; position: relative; z-index: 1; width: 100%; height: 100%; box-sizing: content-box; }
.swiper-slide { position: relative; flex-shrink: 0; width: 100%; height: 100%; }
[hidden] { display: none !important; }
.swiper-unavailable .home-slider .swiper-wrapper { display: block; transform: none !important; height: 100%; }
.swiper-unavailable .home-slider .swiper-slide[hidden] { display: none !important; }
.swiper-unavailable .home-slider .swiper-slide:not([hidden]) { display: flex; width: 100%; height: 100%; animation: native-hero-enter .38s ease both; }
.native-pagination-bullet {
    width: 9px;
    height: 9px;
    padding: 0;
    margin: 0 4px;
    border: 0;
    border-radius: 99px;
    background: rgba(255,255,255,.45);
    cursor: pointer;
    transition: width .2s ease, background-color .2s ease;
}
.native-pagination-bullet.is-active { width: 26px; background: var(--accent-gold); }
.native-pagination-bullet:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.swiper-unavailable .hero-slider .swiper-pagination { display: flex; align-items: center; justify-content: center; gap: 4px; }
.swiper-unavailable .gallery-modal .thumbnail-slider .swiper-wrapper { display: flex; gap: 10px; overflow-x: auto; }
.swiper-unavailable .gallery-modal .thumbnail-slider .swiper-slide { flex: 0 0 auto; width: 86px; height: 64px; }
.swiper-unavailable .gallery-modal .thumbnail-slider .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
@keyframes native-hero-enter { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .swiper-unavailable .home-slider .swiper-slide:not([hidden]) { animation: none; }
    .native-pagination-bullet { transition: none; }
}

.swiper-unavailable .hero-slider .swiper-pagination { position: absolute; inset-inline: 0; bottom: 28px !important; z-index: 20; }
.swiper-unavailable .hero-slider .swiper-button-next,
.swiper-unavailable .hero-slider .swiper-button-prev { position: absolute; top: 50%; z-index: 20; transform: translateY(-50%); cursor: pointer; }
.swiper-unavailable .hero-slider .swiper-button-next { inset-inline-end: 24px; inset-inline-start: auto; }
.swiper-unavailable .hero-slider .swiper-button-prev { inset-inline-start: 24px; inset-inline-end: auto; }

/* Fine-grained layout mirroring for English LTR and medium desktop widths. */
html[dir="ltr"] .slide-content,
html[dir="ltr"] .about-text,
html[dir="ltr"] .service-card,
html[dir="ltr"] .section-title,
html[dir="ltr"] .contact-form-wrapper,
html[dir="ltr"] .footer-desc,
html[dir="ltr"] .footer-col-title { text-align: start; }
html[dir="ltr"] .mobile-drawer { left: -100%; right: auto; border-left: 0; border-right: 1px solid var(--border-glass-gold); transition-property: left; }
html[dir="ltr"] .mobile-drawer.active { left: 0; right: auto; }
html[dir="ltr"] .mobile-drawer .drawer-menu li { transform: translateX(-30px); }
html[dir="ltr"] .mobile-drawer.active .drawer-menu li { transform: translateX(0); }
html[dir="ltr"] .mobile-drawer .drawer-menu li a:hover,
html[dir="ltr"] .mobile-drawer .drawer-menu li a.active { transform: translateX(4px); }
html[dir="ltr"] .mobile-drawer-overlay { direction: ltr; }
html[dir="ltr"] .desktop-nav ul li a.active::after { left: 15%; right: 15%; }
html[dir="ltr"] .gallery-nav-next { right: 14px; left: auto; }
html[dir="ltr"] .gallery-nav-prev { left: 14px; right: auto; }
html[dir="ltr"] .footer-col-title::after { left: 0; right: auto; }
html[dir="ltr"] .contact-info-item .svg-icon,
html[dir="ltr"] .project-spec-item .svg-icon { margin-inline-end: 8px; }
@media (min-width: 1141px) and (max-width: 1300px) {
    .header-content { gap: 8px; }
    .desktop-nav ul li a { padding-inline: 6px; font-size: .84rem; }
    .logo-brand { font-size: 1.05rem; }
    .logo-sub { font-size: .68rem; }
    .header-cta-box .btn { padding-inline: 12px; }
    .site-controls { gap: 5px; margin-inline-start: 4px; }
}


/* ===================================================================
   v8.1 — Dark-theme contrast, direction-aware controls, and hero spacing
   =================================================================== */
html[data-theme="dark"] body :is(h1, h2, h3, h4, h5, h6) {
    color: var(--text-main) !important;
}
html[data-theme="dark"] body [style*="color: var(--primary)"],
html[data-theme="dark"] body [style*="color:var(--primary)"] {
    color: var(--text-main) !important;
}
html[data-theme="dark"] .btn-outline,
html[data-theme="dark"] .highlight-item,
html[data-theme="dark"] .price,
html[data-theme="dark"] .form-group label,
html[data-theme="dark"] .section-title h2,
html[data-theme="dark"] .project-info h3,
html[data-theme="dark"] .main-partner-name,
html[data-theme="dark"] .footer-col-title,
html[data-theme="dark"] .logo-brand,
html[data-theme="dark"] .logo-sub,
html[data-theme="dark"] .logo-title,
html[data-theme="dark"] .footer-logo-text,
html[data-theme="dark"] .footer-desc,
html[data-theme="dark"] .footer-links-list a,
html[data-theme="dark"] .footer-card-info,
html[data-theme="dark"] .footer-card-val,
html[data-theme="dark"] .footer-badge-trust .trust-label,
html[data-theme="dark"] .stat-box h3,
html[data-theme="dark"] .stat-box .stat-label,
html[data-theme="dark"] .partner-name,
html[data-theme="dark"] .partner-header-titles,
html[data-theme="dark"] .project-spec-item span,
html[data-theme="dark"] .project-spec-item strong,
html[data-theme="dark"] .gallery-modal .project-details-text p,
html[data-theme="dark"] .gallery-modal .project-details-text span,
html[data-theme="dark"] .gallery-modal .project-details-text strong {
    color: var(--text-main) !important;
}
html[data-theme="dark"] .footer-desc,
html[data-theme="dark"] .footer-card-label,
html[data-theme="dark"] .stat-box p,
html[data-theme="dark"] .main-partner-bio,
html[data-theme="dark"] .project-info p,
html[data-theme="dark"] .about-text p,
html[data-theme="dark"] .section-subtitle {
    color: var(--text-muted) !important;
}
html[data-theme="dark"] .projects-filter .filter-btn:not(.active) {
    background: rgba(255,255,255,.035);
    color: var(--text-main) !important;
    border-color: rgba(226,232,240,.18);
}
html[data-theme="dark"] .projects-filter .filter-btn.active,
html[data-theme="dark"] .projects-filter .filter-btn:hover {
    background: var(--accent-gradient);
    border-color: var(--accent-gold);
    color: #111827 !important;
}
html[data-theme="dark"] .btn-outline:hover {
    background: var(--accent-gradient);
    border-color: var(--accent-gold);
    color: #111827 !important;
}
html[data-theme="dark"] .project-category,
html[data-theme="dark"] .trust-number,
html[data-theme="dark"] .logo-brand strong,
html[data-theme="dark"] .footer-logo-text strong {
    color: var(--accent-gold) !important;
}

/* Keep copy inside the safe area between the hero arrows on wide screens. */
@media (min-width: 769px) {
    .slide-content {
        width: min(100%, 1040px);
        max-width: min(1040px, 100%);
        padding-inline: clamp(78px, 7.6vw, 118px);
    }
    .hero-slider .swiper-button-next { right: 24px; left: auto; }
    .hero-slider .swiper-button-prev { left: 24px; right: auto; }
    html[dir="rtl"] .hero-slider .swiper-button-next { left: 24px; right: auto; }
    html[dir="rtl"] .hero-slider .swiper-button-prev { right: 24px; left: auto; }
}

/* The native SVG chevrons need mirroring when the reading direction changes. */
html[dir="rtl"] .hero-slider .swiper-button-next .svg-icon,
html[dir="rtl"] .hero-slider .swiper-button-prev .svg-icon {
    transform: scaleX(-1);
}
html[dir="ltr"] .hero-slider .swiper-button-next .svg-icon,
html[dir="ltr"] .hero-slider .swiper-button-prev .svg-icon {
    transform: none;
}
html[dir="ltr"] .gallery-modal .gallery-nav-btn .svg-icon {
    transform: rotate(180deg);
}
html[dir="rtl"] .gallery-modal .gallery-nav-btn .svg-icon {
    transform: none;
}
html[dir="ltr"] .gallery-modal .gallery-nav-next { right: 14px; left: auto; }
html[dir="ltr"] .gallery-modal .gallery-nav-prev { left: 14px; right: auto; }
html[dir="rtl"] .gallery-modal .gallery-nav-next { left: 14px; right: auto; }
html[dir="rtl"] .gallery-modal .gallery-nav-prev { right: 14px; left: auto; }

/* Premium, consistent language and theme controls. */
.site-control-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid rgba(223, 177, 91, .42);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(31, 43, 63, .98), rgba(10, 17, 31, .98));
    color: #f4f7fb;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 5px 14px rgba(0,0,0,.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-weight: 800;
    letter-spacing: .02em;
}
.site-control-btn:hover {
    border-color: var(--accent-gold);
    background: linear-gradient(145deg, rgba(223,177,91,.2), rgba(13,22,39,.98));
    color: #ffe2a1;
    box-shadow: 0 7px 20px rgba(0,0,0,.22), 0 0 0 3px rgba(223,177,91,.08);
    transform: translateY(-2px);
}
.site-control-btn:active { transform: translateY(0) scale(.97); }
.language-toggle {
    min-width: 70px;
    padding-inline: 14px;
    border-radius: 999px;
    color: #f5d18a;
    border-color: rgba(223,177,91,.55);
    background: linear-gradient(145deg, rgba(223,177,91,.17), rgba(17,28,47,.96));
    font-size: .88rem;
}
.theme-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    color: #f5d18a;
    font-size: 1.28rem;
    line-height: 1;
}
.theme-toggle:hover { transform: translateY(-2px) rotate(8deg); }
html[data-theme="dark"] .site-control-btn {
    color: #f4f7fb;
    background: linear-gradient(160deg, rgba(31,43,63,.98), rgba(10,17,31,.98));
    border-color: rgba(223,177,91,.42);
}
html[data-theme="dark"] .language-toggle,
html[data-theme="dark"] .theme-toggle { color: #f5d18a; }

@media (max-width: 768px) {
    .site-controls { gap: 6px; }
    .site-control-btn { min-width: 40px; min-height: 40px; padding-inline: 10px; border-radius: 12px; }
    .language-toggle { min-width: 64px; border-radius: 999px; }
    .theme-toggle { width: 40px; min-width: 40px; height: 40px; padding: 0; border-radius: 50%; }
}
@media (max-width: 390px) {
    .site-control-btn { min-width: 36px; min-height: 38px; padding-inline: 8px; }
    .language-toggle { min-width: 58px; }
    .theme-toggle { width: 38px; min-width: 38px; height: 38px; }
}

.site-control-btn .control-icon {
    width: 19px;
    height: 19px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .25s ease;
}
.theme-toggle:hover .control-icon { transform: rotate(12deg); }


/* ===================================================================
   v8.2 — Dark controls, visible icons, and project filter layout
   =================================================================== */
/* The --white design token doubles as a dark surface in dark mode. Keep
   foregrounds explicit on controls that previously inherited that surface. */
html[data-theme="dark"] .hero-slider .swiper-button-next,
html[data-theme="dark"] .hero-slider .swiper-button-prev,
html[data-theme="dark"] .gallery-modal .gallery-nav-btn,
html[data-theme="dark"] .gallery-modal .gallery-action-btn,
html[data-theme="dark"] .gallery-modal .close-gallery,
html[data-theme="dark"] .menu-toggle-btn,
html[data-theme="dark"] .social-icons a {
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .hero-slider .swiper-button-next .svg-icon,
html[data-theme="dark"] .hero-slider .swiper-button-prev .svg-icon,
html[data-theme="dark"] .gallery-modal .gallery-nav-btn .svg-icon,
html[data-theme="dark"] .gallery-modal .gallery-action-btn .svg-icon,
html[data-theme="dark"] .gallery-modal .close-gallery .svg-icon,
html[data-theme="dark"] .menu-toggle-btn .svg-icon,
html[data-theme="dark"] .social-icons a .svg-icon {
    color: inherit !important;
    stroke: currentColor;
}
html[data-theme="dark"] .hero-slider .swiper-button-next:hover,
html[data-theme="dark"] .hero-slider .swiper-button-prev:hover,
html[data-theme="dark"] .gallery-modal .gallery-nav-btn:hover,
html[data-theme="dark"] .gallery-modal .gallery-action-btn:hover {
    color: #111827 !important;
}
html[data-theme="dark"] .gallery-modal .close-gallery:hover {
    color: #ffffff !important;
}

/* Clear, high-contrast labels for the hero actions and other glass buttons. */
html[data-theme="dark"] .slide-actions .btn-frosted,
html[data-theme="dark"] .slide-actions .btn-frosted span,
html[data-theme="dark"] .slide-actions .btn-frosted .svg-icon,
html[data-theme="dark"] .btn-frosted,
html[data-theme="dark"] .btn-frosted .svg-icon,
html[data-theme="dark"] .btn-frosted span {
    color: #f1f5f9 !important;
}
html[data-theme="dark"] .slide-actions .btn:not(.btn-frosted),
html[data-theme="dark"] .header-cta-box .btn,
html[data-theme="dark"] .gallery-cta-actions .gallery-order-btn,
html[data-theme="dark"] .mobile-bottom-bar a.bar-cta,
html[data-theme="dark"] .mobile-bottom-bar a.bar-cta .svg-icon,
html[data-theme="dark"] .btn-download {
    color: #111827 !important;
}
html[data-theme="dark"] .btn-outline {
    color: #e7edf7 !important;
    border-color: rgba(223,177,91,.45);
}
html[data-theme="dark"] .btn-outline:hover {
    color: #111827 !important;
}
html[data-theme="dark"] .service-link,
html[data-theme="dark"] .highlight-item,
html[data-theme="dark"] .about-experience-badge,
html[data-theme="dark"] .about-experience-badge .badge-text,
html[data-theme="dark"] .footer-badge-trust,
html[data-theme="dark"] .footer-badge-trust .trust-label {
    color: #e7edf7 !important;
}
html[data-theme="dark"] .mobile-bottom-bar a:not(.bar-cta),
html[data-theme="dark"] .mobile-bottom-bar a:not(.bar-cta) .svg-icon {
    color: rgba(241,245,249,.82) !important;
}
html[data-theme="dark"] .mobile-bottom-bar a:not(.bar-cta):hover,
html[data-theme="dark"] .mobile-bottom-bar a:not(.bar-cta):active,
html[data-theme="dark"] .mobile-bottom-bar a:not(.bar-cta):hover .svg-icon,
html[data-theme="dark"] .mobile-bottom-bar a:not(.bar-cta):active .svg-icon {
    color: var(--accent-gold) !important;
}
html[data-theme="dark"] .project-overlay .view-gallery,
html[data-theme="dark"] .project-overlay .view-gallery .svg-icon {
    color: #111827 !important;
}
html[data-theme="dark"] .project-overlay .view-gallery:hover {
    color: #111827 !important;
}
html[data-theme="dark"] .projects-grid > .project-item {
    background: #111c2f !important;
    border-color: rgba(223,177,91,.2) !important;
}
html[data-theme="dark"] .projects-grid > .project-item .project-info,
html[data-theme="dark"] .projects-grid > .project-item .project-info h3 {
    color: #e7edf7 !important;
}
html[data-theme="dark"] .projects-grid > .project-item .project-info p {
    color: #a6b4c9 !important;
}

/* Project category filters: each icon and label gets its own flex item/space.
   Desktop uses a centered wrapping row; phones retain a deliberate scroll row. */
.projects-filter-wrapper {
    width: 100% !important;
    overflow: visible !important;
    padding: 6px 0 14px !important;
    margin: 0 0 2rem !important;
    text-align: center !important;
}
.projects-filter {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px 12px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.projects-filter .filter-btn {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 9px !important;
    min-height: 44px;
    width: auto !important;
    min-width: max-content;
    padding: 10px 18px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    text-indent: 0 !important;
    position: relative;
}
.projects-filter .filter-btn .svg-icon {
    display: block !important;
    position: static !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    transform: none !important;
    vertical-align: middle !important;
}
.projects-filter .filter-btn > span {
    display: inline-block !important;
    position: static !important;
    flex: 0 1 auto !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
}
html[data-theme="dark"] .projects-filter .filter-btn:not(.active) {
    background: rgba(17,28,47,.9) !important;
    color: #dbe5f3 !important;
    border-color: rgba(223,177,91,.26) !important;
}
html[data-theme="dark"] .projects-filter .filter-btn:not(.active) .svg-icon {
    color: #dfb15b !important;
    stroke: currentColor;
}
html[data-theme="dark"] .projects-filter .filter-btn.active,
html[data-theme="dark"] .projects-filter .filter-btn:hover {
    background: var(--accent-gradient) !important;
    color: #111827 !important;
    border-color: var(--accent-gold) !important;
}
html[data-theme="dark"] .projects-filter .filter-btn.active .svg-icon,
html[data-theme="dark"] .projects-filter .filter-btn:hover .svg-icon {
    color: #111827 !important;
    stroke: currentColor;
}
@media (max-width: 768px) {
    /* Higher specificity than the legacy critical-mobile rule in index.html. */
    .projects-filter-wrapper .projects-filter {
        justify-content: flex-start !important;
        align-items: center !important;
    }
    .projects-filter-wrapper {
        width: calc(100% + 32px) !important;
        margin: 0 -16px 1.6rem !important;
        padding: 5px 16px 12px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        text-align: start !important;
    }
    .projects-filter {
        display: inline-flex !important;
        width: max-content !important;
        min-width: 100% !important;
        max-width: none !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        gap: 9px !important;
        padding-inline: 2px !important;
    }
    .projects-filter .filter-btn {
        min-height: 42px;
        padding: 9px 14px !important;
        gap: 8px !important;
        font-size: .87rem !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .projects-filter .filter-btn { transition: none !important; }
}


/* Final icon/text contrast corrections for legacy components still using --white. */
html[data-theme="dark"] .slide-content { color: #f1f5f9 !important; }
html[data-theme="dark"] .partner-modal-close,
html[data-theme="dark"] .partner-modal-close .svg-icon {
    color: #f1f5f9 !important;
    stroke: currentColor;
}
html[data-theme="dark"] .partner-modal-close:hover,
html[data-theme="dark"] .partner-modal-close:hover .svg-icon {
    color: #ffffff !important;
}
html[data-theme="dark"] .footer-card-item,
html[data-theme="dark"] .footer-card-info,
html[data-theme="dark"] .footer-card-val {
    color: #e7edf7 !important;
}
html[data-theme="dark"] .footer-card-icon:not(.wa-icon),
html[data-theme="dark"] .pricing-icon,
html[data-theme="dark"] .highlight-icon {
    color: #f2c66d !important;
}


/* ===================================================================
   v8.3 — Mobile first-paint, bilingual header, and iOS safe-area fixes
   =================================================================== */
@media (max-width: 768px) {
    /* Keep the header inside the viewport in Arabic RTL and English LTR. */
    header#main-header .container.header-content {
        width: 100%;
        max-width: none;
        min-width: 0;
        padding-inline: 10px;
        gap: 8px;
        box-sizing: border-box;
    }
    .header-content {
        justify-content: space-between;
        min-width: 0;
        gap: 8px;
    }
    .header-content > .logo {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
        gap: 8px;
        overflow: hidden;
    }
    .header-content > .logo img {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        object-fit: contain;
    }
    .header-content > .logo .logo-text {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }
    .header-content > .logo .logo-brand {
        display: block;
        max-width: 100%;
        font-size: clamp(.84rem, 3.7vw, 1.05rem);
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-content > .logo .logo-sub {
        display: block;
        max-width: 100%;
        font-size: clamp(.54rem, 2.5vw, .68rem);
        line-height: 1.3;
        letter-spacing: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-content .site-controls {
        flex: 0 0 auto;
        gap: 4px;
        margin: 0 !important;
    }
    .header-content .site-control-btn {
        min-width: 36px;
        min-height: 38px;
        padding-inline: 6px;
        flex: 0 0 auto;
    }
    .header-content .language-toggle {
        min-width: 48px;
        padding-inline: 7px;
    }
    .header-content .theme-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
        padding: 0;
    }
    .header-content .menu-toggle-btn {
        display: flex !important;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        padding: 0;
        margin: 0;
    }

    /* The first project card should remain at the RTL/LTR start edge on first paint. */
    .projects-grid {
        direction: inherit;
        overscroll-behavior-x: contain;
        scroll-padding-inline: 24px;
    }
    .projects-grid > .project-item {
        margin: 0 !important;
        scroll-snap-align: start !important;
    }

    /* Use a dark canvas behind the iOS home-indicator safe area to avoid a white strip. */
    html,
    body {
        background-color: #030712;
    }
    body {
        padding-bottom: calc(var(--bottom-bar-height) + 14px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-bottom-bar {
        padding-bottom: max(4px, env(safe-area-inset-bottom, 0px));
        background: linear-gradient(to top, rgba(6, 11, 25, 1), rgba(6, 11, 25, .98));
    }
}

@media (max-width: 390px) {
    .header-content > .logo img {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
    .header-content > .logo .logo-brand {
        font-size: clamp(.78rem, 3.5vw, .9rem);
    }
    .header-content > .logo .logo-sub {
        font-size: .52rem;
    }
    .header-content .site-control-btn {
        min-width: 34px;
        min-height: 36px;
        padding-inline: 5px;
    }
    .header-content .language-toggle {
        min-width: 44px;
    }
    .header-content .theme-toggle,
    .header-content .menu-toggle-btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}


/* ==================== Bilingual copyright + Tamkeen 360 signature ==================== */
.footer-bottom-bar .copyright {
    width: 100%;
    max-width: 100%;
}

.site-credit-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 5px 10px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    line-height: 1.9;
}

.site-credit-line .footer-copy-year {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.site-credit-line .footer-made-by {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 5px;
    white-space: nowrap;
}

.site-credit-line .footer-home-link,
.site-credit-line .tamkeen-credit-link {
    color: var(--accent-gold, #dfb15b);
    text-decoration: none;
    font-weight: 800;
    transition: opacity 0.25s ease;
}

.site-credit-line .tamkeen-credit-link {
    position: relative;
    white-space: nowrap;
    unicode-bidi: isolate;
}

.site-credit-line .tamkeen-credit-link::after {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 1.5px;
    background: currentColor;
    opacity: 0.58;
    transition: opacity 0.25s ease;
}

.site-credit-line a:hover {
    opacity: 0.8;
}

.site-credit-line .tamkeen-credit-link:hover::after {
    opacity: 1;
}

.site-credit-line .footer-separator {
    opacity: 0.45;
    user-select: none;
}

@media (max-width: 600px) {
    .site-credit-line {
        gap: 4px 8px;
        font-size: 0.82rem;
    }

    .site-credit-line .footer-separator {
        display: none;
    }
}


/* ==========================================================================
   Portfolio refinement layer — accessibility, spacing, image states & mobile
   ========================================================================== */
[hidden] { display: none !important; }

/* Hero: image-ready, legible even before image assets are uploaded. */
.hero-slider, .hero-slider .home-slider, .hero-slider .swiper-wrapper { min-width: 0; }
.hero-slider .swiper-slide {
    position: relative; isolation: isolate; background-color: #081326;
    background-position: center; background-size: cover; background-repeat: no-repeat;
    min-height: clamp(560px, 78vh, 860px);
}
.hero-slider .swiper-slide::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(3,8,20,.88) 0%, rgba(3,8,20,.66) 48%, rgba(3,8,20,.28) 100%),
                radial-gradient(circle at 76% 28%, rgba(205,164,83,.18), transparent 38%);
}
html[dir="rtl"] .hero-slider .swiper-slide::before {
    background: linear-gradient(270deg, rgba(3,8,20,.88) 0%, rgba(3,8,20,.66) 48%, rgba(3,8,20,.28) 100%),
                radial-gradient(circle at 24% 28%, rgba(205,164,83,.18), transparent 38%);
}
.hero-slider .slide-content { width: min(100% - 40px, 760px); padding-block: clamp(90px, 13vh, 150px); }
.hero-slider .slide-content h2 { max-width: 16ch; text-wrap: balance; line-height: 1.24; }
.hero-slider .slide-content p { max-width: 62ch; line-height: 1.9; }
.hero-slider .swiper-button-next, .hero-slider .swiper-button-prev {
    display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25);
    cursor: pointer; color: #fff;
}
.hero-slider .swiper-button-next:focus-visible, .hero-slider .swiper-button-prev:focus-visible,
.hero-slider .native-pagination-bullet:focus-visible { outline: 3px solid var(--accent-gold,#dfb15b); outline-offset: 4px; }

/* Project cards: consistent responsive grid and editable, compact status markers. */
.projects-grid {
    display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr));
    gap: clamp(16px,2.2vw,28px); overflow: visible !important;
    width: 100%; margin-inline: 0; padding: 0 0 10px;
}
.project-item { min-width: 0; width: auto; max-width: none; scroll-snap-align: unset; }
.project-img { position: relative; isolation: isolate; overflow: hidden; }
.project-status-badge {
    position: absolute; inset-block-start: 12px; inset-inline-start: 12px; z-index: 5;
    display: inline-flex; align-items: center; gap: 6px; width: max-content; max-width: calc(100% - 24px);
    padding: 7px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
    color: #fff; background: rgba(8,17,31,.82); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); font-size: .76rem; font-weight: 800; line-height: 1.2;
    box-shadow: 0 5px 18px rgba(0,0,0,.16); pointer-events: none;
}
.project-status-badge svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.project-status-badge.completed { background: rgba(15,93,70,.92); }
.project-status-badge.in-progress { background: rgba(141,83,13,.94); }
.project-info h3, .project-info p { overflow-wrap: anywhere; }

/* Partner cards: text-first composition; no logo, letter, or empty image placeholder. */
.main-partner { display: flex; align-items: stretch; gap: clamp(20px,3vw,38px); min-width: 0; }
.main-partner:not(.has-partner-image) .main-partner-info { width: 100%; flex: 1 1 100%; padding-inline: clamp(22px,4vw,54px); }
.main-partner-image[hidden], .partner-image[hidden], #partner-modal-img[hidden] { display: none !important; }
.main-partner.has-partner-image .main-partner-image { flex: 0 0 min(38%,360px); width: min(38%,360px); object-fit: cover; }
.main-partner-info, .partner-card { min-width: 0; }
.partner-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 100%; }
.partner-card:not(.has-partner-image) { padding-block: clamp(20px,2.4vw,30px); }
.partner-card .partner-image:not([hidden]) { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 14px; margin-bottom: 18px; }
.partner-card h3, .partner-card p, .main-partner-name, .main-partner-bio { max-width: 100%; overflow-wrap: anywhere; }
.partner-btn { margin-top: auto; }

/* Partner modal: fixed viewport card, internal content scroll only, photo is optional. */
.partner-modal { overflow: hidden; padding: max(10px,env(safe-area-inset-top)) 10px max(10px,env(safe-area-inset-bottom)); }
.partner-modal-card {
    width: min(100%,640px); max-width: 640px; max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    display: flex; flex-direction: column; overflow: hidden; min-width: 0;
}
.partner-modal-header { flex: 0 0 auto; min-width: 0; }
.partner-modal-header:not(:has(.partner-avatar-wrap:not([hidden]))) { padding-inline-start: clamp(20px,4vw,44px); }
.partner-modal-header .partner-header-titles { min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.partner-modal-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 14px clamp(18px,3vw,28px); }
.partner-modal-footer { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 10px; }
.partner-modal-footer .btn { flex: 1 1 190px; min-width: 0; white-space: normal; justify-content: center; }
.partner-avatar-wrap { flex: 0 0 auto; }

/* Project gallery: no outer/vertical scrollbars; image always contained, never cropped. */
.gallery-modal { overflow: hidden; padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)); }
.gallery-modal-dialog {
    width: min(100%,1080px); height: min(92dvh,900px); max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    min-width: 0; overflow: hidden; display: grid;
    grid-template-rows: auto minmax(180px,1fr) clamp(54px,8vh,76px) auto; gap: 10px;
}
.gallery-header, .project-details, .gallery-container, .thumbnail-slider { min-width: 0; }
.gallery-container { height: auto; min-height: 0; max-height: none; overflow: hidden; position: relative; }
.gallery-modal .main-slider { width: 100%; height: 100%; min-height: 0; overflow: hidden !important; }
.gallery-modal .main-slider .swiper-wrapper, .gallery-modal .main-slider .swiper-slide { height: 100%; min-height: 0; }
.gallery-modal .main-slider .swiper-slide { display: grid; place-items: center; overflow: hidden; }
.gallery-modal .main-slider .swiper-slide img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain !important; object-position: center; }
.gallery-modal .thumbnail-slider { height: clamp(54px,8vh,76px); width: 100%; max-width: 100%; overflow-x: auto !important; overflow-y: hidden !important; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery-modal .thumbnail-slider::-webkit-scrollbar { display: none; }
.gallery-modal .thumbnail-slider .swiper-wrapper { min-width: max-content; height: 100%; align-items: center; }
.gallery-modal .thumbnail-slider .swiper-slide { flex: 0 0 auto; width: clamp(58px,8vw,86px); height: calc(100% - 6px); overflow: hidden; }
.gallery-modal .thumbnail-slider .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-modal .project-details { max-height: min(25vh,190px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.gallery-modal .project-details-text, .gallery-modal .project-details-text p, .gallery-modal .project-specs-grid { min-width: 0; overflow-wrap: anywhere; }
.gallery-modal .gallery-cta-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-modal .gallery-cta-actions .btn { min-width: 0; flex: 1 1 190px; justify-content: center; white-space: normal; }
.gallery-empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: rgba(255,255,255,.86); background: radial-gradient(circle at 50% 35%,rgba(223,177,91,.10),transparent 50%),#0a1424; }
.gallery-empty-state strong { font-size: clamp(1rem,2vw,1.2rem); }
.gallery-empty-state span:last-child { max-width: 48ch; color: rgba(255,255,255,.62); line-height: 1.7; font-size: .88rem; }
.gallery-empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.08); font-size: 1.7rem; }
.gallery-modal.no-gallery-images { grid-template-rows: auto minmax(180px,1fr) 0 auto; }
.gallery-modal.no-gallery-images .thumbnail-slider { display: none; }
.gallery-modal.no-gallery-images .gallery-container .main-slider { visibility: hidden; }

/* Main page mobile safe-area: reserve space above the fixed quick-navigation bar. */
@media (max-width: 768px) {
    .projects-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
    .project-item { width: auto; max-width: none; }
    .project-img { height: clamp(150px,38vw,230px); }
    .main-partner:not(.has-partner-image) .main-partner-info { padding: 24px; }
    .main-partner.has-partner-image { flex-direction: column; }
    .main-partner.has-partner-image .main-partner-image { width: 100%; flex-basis: auto; max-height: 300px; }
    .partner-modal-card { max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
    .partner-modal-footer { padding-bottom: max(12px,env(safe-area-inset-bottom)); }
    .gallery-modal-dialog { height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); grid-template-rows: auto minmax(0,1fr) 58px auto; gap: 8px; }
    .gallery-modal .project-details { max-height: 22vh; padding: 12px 14px; }
    .gallery-modal .gallery-cta-actions .btn { flex: 1 1 100%; padding: 9px 12px; font-size: .85rem; }
    .footer-royal { padding-bottom: calc(2rem + var(--bottom-bar-height,68px) + env(safe-area-inset-bottom)); }
    .mobile-bottom-bar { padding-bottom: env(safe-area-inset-bottom); min-height: calc(var(--bottom-bar-height,68px) + env(safe-area-inset-bottom)); }
}
@media (max-width: 520px) {
    .projects-grid { grid-template-columns: 1fr; gap: 18px; }
    .project-img { height: clamp(190px,58vw,260px); }
    .project-status-badge { inset-block-start: 10px; inset-inline-start: 10px; padding: 6px 9px; font-size: .72rem; }
    .partner-modal-header { padding: 54px 18px 14px; gap: 12px; }
    .partner-modal-header h3 { font-size: 1.15rem; line-height: 1.45; overflow-wrap: anywhere; }
    .partner-modal-footer { padding: 12px 16px; }
    .gallery-modal-dialog { grid-template-rows: auto minmax(0,1fr) 52px auto; }
    .gallery-header { gap: 8px; }
    .gallery-header-meta { flex-wrap: wrap; min-width: 0; }
    .gallery-modal .project-details { max-height: 24vh; }
    .gallery-modal .project-specs-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
    .gallery-modal { padding-inline: 5px; }
    .gallery-modal-dialog { width: 100%; grid-template-rows: auto minmax(0,1fr) 48px auto; }
    .gallery-modal .project-specs-grid { grid-template-columns: 1fr; }
    .project-status-badge { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slider *, .project-item *, .partner-modal *, .gallery-modal * { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Deliberate, image-free media states until the owner uploads local assets. */
.project-img.project-image-missing {
    background: radial-gradient(circle at 72% 24%, rgba(223,177,91,.2), transparent 30%),
                linear-gradient(135deg,#14253c 0%,#0b1424 58%,#1c2b40 100%);
}
.project-img.project-image-missing::before {
    content: ""; position: absolute; inset: 15% 18%; border: 1px solid rgba(223,177,91,.28);
    border-radius: 26px 5px 26px 5px; transform: skewY(-7deg); pointer-events: none;
}
.project-img.project-image-missing::after {
    content: ""; position: absolute; width: 28%; aspect-ratio: 1; inset-inline-end: 17%; inset-block-start: 23%;
    border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 20px rgba(255,255,255,.025),0 0 0 40px rgba(255,255,255,.018);
    pointer-events: none;
}
.service-image-missing .service-icon {
    display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px;
    background: linear-gradient(135deg,rgba(223,177,91,.18),rgba(223,177,91,.05));
    border: 1px solid rgba(223,177,91,.3);
}
.service-image-missing .service-icon::after {
    content: ""; width: 22px; height: 22px; border: 2px solid var(--accent-gold,#dfb15b);
    border-radius: 6px; transform: rotate(45deg); opacity: .75;
}
.client-logo-item[hidden], #clients[hidden] { display: none !important; }

/* =========================================================
   v9 — Mobile-first refinement: hero, modals, project rail,
   progress control and safe-area aware floating controls.
   ========================================================= */
.back-to-top {
    --scroll-progress: 0%;
    position: fixed;
    inset-inline-end: 22px;
    inset-inline-start: auto;
    bottom: 24px;
    z-index: 1400;
    width: 48px;
    height: 48px;
    padding: 2px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: var(--accent-gold);
    background: conic-gradient(var(--accent-gold) var(--scroll-progress), rgba(148,163,184,.28) 0) border-box;
    box-shadow: 0 8px 24px rgba(0,0,0,.24);
    isolation: isolate;
    overflow: hidden;
    transform: translateY(12px) scale(.94);
}
.back-to-top::before {
    content: "";
    position: absolute;
    inset: 2px;
    z-index: -1;
    border-radius: inherit;
    background: #081426;
    border: 1px solid rgba(223,177,91,.2);
}
.back-to-top .svg-icon { width: 21px; height: 21px; margin: 0; }
.back-to-top.visible { transform: translateY(0) scale(1); }
.back-to-top:hover { transform: translateY(-2px) scale(1.03); }
.back-to-top:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 3px; }

/* Keep the hero within the first mobile viewport without reducing its typography. */
@media (max-width: 768px) {
    .hero-slider {
        height: calc(100svh - var(--header-height, 76px));
        min-height: 540px;
        max-height: 820px;
        margin-top: 0;
        overflow: hidden;
    }
    .home-slider, .home-slider .swiper-wrapper, .home-slider .swiper-slide { height: 100%; min-height: 0; }
    .home-slider .swiper-slide { align-items: center; background-position: center center !important; }
    .hero-slider .slide-content {
        width: min(100% - 36px, 720px);
        max-width: 720px;
        margin-inline: auto;
        padding: 24px 0 58px;
    }
    .hero-slider .slide-badge { margin-bottom: clamp(14px,2.5vh,22px); font-size: .9rem; }
    .hero-slider .slide-content h2 {
        font-size: clamp(1.85rem, 6vw, 2.45rem);
        line-height: 1.32;
        margin-bottom: 14px;
        max-width: 18ch;
    }
    .hero-slider .slide-content p {
        font-size: clamp(1.02rem,3.3vw,1.14rem);
        line-height: 1.72;
        margin-bottom: 20px;
        max-width: 58ch;
    }
    .hero-slider .slide-actions { flex-direction: row; flex-wrap: wrap; gap: 10px; }
    .hero-slider .slide-actions .btn { width: auto; min-height: 46px; flex: 1 1 180px; justify-content: center; padding: 10px 14px; font-size: .94rem; }
    .hero-slider .swiper-button-next, .hero-slider .swiper-button-prev { display: none !important; }
    .hero-slider .swiper-pagination { bottom: max(15px, env(safe-area-inset-bottom)) !important; display: flex; justify-content: center; gap: 7px; }
    .hero-slider .swiper-pagination-bullet, .hero-slider .native-pagination-bullet { width: 7px; height: 7px; opacity: .55; margin: 0 !important; transition: width .25s ease, opacity .25s ease; }
    .hero-slider .swiper-pagination-bullet-active, .hero-slider .native-pagination-bullet.is-active { width: 23px; border-radius: 20px; opacity: 1; background: var(--accent-gold); }
    .back-to-top { width: 44px; height: 44px; inset-inline-end: 14px; bottom: calc(var(--bottom-bar-height,68px) + env(safe-area-inset-bottom) + 14px); z-index: 1400; }
    .mobile-bottom-bar { z-index: 1500; }

    /* Projects follow the same swipe-card interaction as services. */
    .projects-grid {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        width: calc(100% + 32px) !important;
        margin-inline: -16px !important;
        padding: 8px 16px 22px !important;
        gap: 14px !important;
        scroll-snap-type: x mandatory !important;
        scroll-padding-inline: 16px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .projects-grid::-webkit-scrollbar { display: none; }
    .projects-grid > .project-item {
        flex: 0 0 min(82%, 340px) !important;
        width: min(82%, 340px) !important;
        min-width: 260px !important;
        max-width: 340px !important;
        margin: 0 !important;
        scroll-snap-align: center !important;
    }
    .projects-grid > .project-item .project-img { height: clamp(170px,48vw,220px) !important; }
}
@media (max-width: 390px) {
    .hero-slider { min-height: 520px; }
    .hero-slider .slide-content { width: calc(100% - 30px); padding-bottom: 54px; }
    .hero-slider .slide-badge { font-size: .82rem; padding: 6px 11px; }
    .hero-slider .slide-content h2 { font-size: clamp(1.72rem,7vw,2rem); line-height: 1.34; }
    .hero-slider .slide-content p { font-size: 1rem; line-height: 1.68; }
    .hero-slider .slide-actions .btn { flex-basis: 100%; }
    .projects-grid > .project-item { flex-basis: 84% !important; width: 84% !important; }
}
@media (max-height: 720px) and (max-width: 768px) {
    .hero-slider { height: calc(100svh - var(--header-height,76px)); min-height: 500px; }
    .hero-slider .slide-content { padding-top: 12px; padding-bottom: 48px; }
    .hero-slider .slide-badge { margin-bottom: 12px; }
    .hero-slider .slide-content h2 { margin-bottom: 10px; }
    .hero-slider .slide-content p { margin-bottom: 14px; }
    .hero-slider .slide-actions .btn { min-height: 42px; }
}

/* A project-specific architectural illustration appears if an original hero photo is missing. */
.hero-slider .swiper-slide.hero-media-missing {
    background-image: var(--hero-fallback-image, none),
                      radial-gradient(ellipse at 72% 32%, rgba(223,177,91,.18), transparent 36%),
                      linear-gradient(128deg,#081426 0%,#14243a 52%,#080f1d 100%) !important;
    background-size: cover, cover, cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}
.hero-slider .swiper-slide.hero-fallback-unavailable {
    background-image: radial-gradient(ellipse at 72% 32%, rgba(223,177,91,.18), transparent 36%),
                      linear-gradient(128deg,#081426 0%,#14243a 52%,#080f1d 100%) !important;
}
.hero-slider .swiper-slide.hero-media-missing::after {
    background: linear-gradient(135deg,transparent 46%,rgba(223,177,91,.07) 46.2%,transparent 46.8%),
                linear-gradient(45deg,transparent 48%,rgba(255,255,255,.035) 48.2%,transparent 48.8%);
    background-size: 110px 110px;
}

/* Project gallery modal: remove thumbnail outline that collides with the Swiper viewport edge. */
.gallery-modal .thumbnail-slider .swiper-slide,
.gallery-modal .thumbnail-slider .swiper-slide.is-current,
.gallery-modal .thumbnail-slider .swiper-slide-thumb-active {
    outline: 0 !important;
    box-shadow: none;
    border: 1px solid transparent;
    border-radius: 9px;
    box-sizing: border-box;
}
.gallery-modal .thumbnail-slider .swiper-slide.is-current,
.gallery-modal .thumbnail-slider .swiper-slide-thumb-active {
    border-color: var(--accent-gold);
    box-shadow: inset 0 0 0 1px rgba(223,177,91,.38);
}
.gallery-modal .thumbnail-slider .swiper-wrapper { align-items: center; padding: 3px 2px; box-sizing: border-box; }
.gallery-modal .thumbnail-slider .swiper-slide img { border-radius: 7px; }
.gallery-modal .main-slider .swiper-slide { padding: 0 !important; }
.gallery-modal .main-slider .swiper-slide img { border-radius: 8px; box-shadow: none; }
.gallery-modal-dialog { overscroll-behavior: contain; }
.gallery-modal .gallery-container { border-radius: 14px; }
.gallery-modal .gallery-header { min-width: 0; flex-wrap: wrap; }
.gallery-modal .gallery-header h2, .gallery-modal .gallery-header-meta { min-width: 0; overflow-wrap: anywhere; }
.gallery-modal .project-details { scrollbar-width: thin; scrollbar-color: rgba(223,177,91,.45) transparent; }
.partner-modal-card { overscroll-behavior: contain; }
.partner-modal-header { min-width: 0; flex-wrap: nowrap; }
.partner-modal-header .partner-avatar-wrap[hidden] { display: none !important; }
.partner-modal-header .partner-header-titles { min-width: 0; overflow-wrap: anywhere; }
.partner-modal-body, .partner-modal-footer { min-width: 0; }
.partner-modal-footer .btn { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 768px) {
    .gallery-modal { padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)); }
    .gallery-modal-dialog {
        width: 100%; height: 100%; max-height: 100%;
        grid-template-rows: auto minmax(0,1fr) 58px minmax(0,auto);
        gap: 8px; padding: 10px; border-radius: 18px;
    }
    .gallery-modal .gallery-container { min-height: 0; height: 100%; overflow: hidden !important; }
    .gallery-modal .main-slider, .gallery-modal .main-slider .swiper-wrapper,
    .gallery-modal .main-slider .swiper-slide { height: 100% !important; min-height: 0 !important; }
    .gallery-modal .main-slider .swiper-slide img { max-width: 100%; max-height: 100%; object-fit: contain !important; }
    .gallery-modal .thumbnail-slider { height: 58px; min-height: 58px; overflow-x: auto !important; overflow-y: hidden !important; }
    .gallery-modal .thumbnail-slider .swiper-wrapper { height: 100%; align-items: center; }
    .gallery-modal .thumbnail-slider .swiper-slide { height: 48px; width: 66px; }
    .gallery-modal .project-details { max-height: min(22dvh,170px); overflow-y: auto; overflow-x: hidden; }
    .gallery-modal .gallery-cta-actions { flex-wrap: nowrap; }
    .gallery-modal .gallery-cta-actions .btn { flex: 1 1 0; min-height: 42px; font-size: .82rem; padding: 8px 9px; }
    .partner-modal { padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)); }
    .partner-modal-card { width: 100%; max-width: 560px; max-height: 100%; padding: 18px; gap: 14px; border-radius: 18px; }
    .partner-modal-header { padding: 48px 0 14px !important; gap: 12px; }
    .partner-modal-header h3 { font-size: clamp(1.05rem,4.6vw,1.25rem); line-height: 1.4; }
    .partner-modal-role, .partner-modal-dept { overflow-wrap: anywhere; }
    .partner-modal-body { padding: 0; gap: 12px; }
    .partner-modal-footer { padding: 12px 0 max(4px,env(safe-area-inset-bottom)); gap: 8px; }
    .partner-modal-footer .btn { flex: 1 1 100%; min-height: 44px; }
}
@media (max-width: 390px) {
    .gallery-modal-dialog { padding: 8px; grid-template-rows: auto minmax(0,1fr) 52px minmax(0,auto); }
    .gallery-modal .thumbnail-slider { height: 52px; min-height: 52px; }
    .gallery-modal .thumbnail-slider .swiper-slide { width: 58px; height: 44px; }
    .gallery-modal .project-specs-grid { grid-template-columns: 1fr 1fr; }
    .partner-modal-card { padding: 14px; }
    .partner-modal-header { gap: 8px; }
    .partner-modal-footer .btn { flex-basis: 100%; }
}

/* Accessibility and stable mobile rendering. */
@media (prefers-reduced-motion: reduce) {
    .back-to-top, .hero-slider *, .gallery-modal *, .partner-modal * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* ======================================================================
   v10.0 — Requested refinements: main navigation, project status,
   mobile project gallery, and reliable back-to-top control.
   ====================================================================== */

/* Main navigation: a calm, balanced capsule instead of separated links. */
@media (min-width: 1141px) {
    header#main-header {
        background: linear-gradient(180deg, rgba(7, 14, 27, .97), rgba(6, 11, 25, .94));
        border-bottom-color: rgba(223, 177, 91, .2);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
    }
    header#main-header.scrolled {
        background: rgba(4, 9, 19, .985);
        box-shadow: 0 8px 28px rgba(0, 0, 0, .38);
    }
    header#main-header .header-content {
        gap: clamp(10px, 1.15vw, 18px);
    }
    header#main-header .desktop-nav {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 0;
    }
    header#main-header .desktop-nav ul {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 2px;
        max-width: 100%;
        padding: 5px;
        border: 1px solid rgba(255, 255, 255, .075);
        border-radius: 999px;
        background: rgba(255, 255, 255, .045);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
    }
    header#main-header .desktop-nav ul li {
        flex: 0 0 auto;
    }
    header#main-header .desktop-nav ul li a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 39px;
        padding: 8px clamp(6px, .72vw, 11px);
        border: 1px solid transparent;
        border-radius: 999px;
        color: #cbd5e1;
        font-size: clamp(.81rem, .78vw, .91rem);
        font-weight: 750;
        line-height: 1.2;
        transition: color .22s ease, background .22s ease, border-color .22s ease, box-shadow .22s ease;
    }
    header#main-header .desktop-nav ul li a::after {
        display: none;
    }
    header#main-header .desktop-nav ul li a:hover {
        color: #ffe1a0;
        background: rgba(223, 177, 91, .09);
        border-color: rgba(223, 177, 91, .16);
    }
    header#main-header .desktop-nav ul li a.active {
        color: #ffe1a0;
        background: linear-gradient(145deg, rgba(223, 177, 91, .2), rgba(223, 177, 91, .085));
        border-color: rgba(223, 177, 91, .3);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 3px 10px rgba(0, 0, 0, .12);
    }
    header#main-header .desktop-nav ul li a:focus-visible {
        outline: 2px solid var(--accent-gold);
        outline-offset: 2px;
    }
    header#main-header .header-cta-box {
        flex: 0 0 auto;
        margin-inline-start: 0;
    }
    header#main-header .btn-header {
        min-height: 42px;
        padding-inline: 15px;
        gap: 8px;
        border: 1px solid rgba(255, 226, 161, .2);
        box-shadow: 0 5px 16px rgba(201, 155, 66, .22);
    }
    header#main-header .site-controls {
        flex: 0 0 auto;
        gap: 6px;
        margin: 0;
    }
}

/* The compact/tablet header stays aligned and preserves large touch targets. */
@media (max-width: 1140px) {
    header#main-header {
        background: linear-gradient(180deg, rgba(7, 14, 27, .98), rgba(6, 11, 25, .96));
        border-bottom-color: rgba(223, 177, 91, .22);
    }
    header#main-header .menu-toggle-btn {
        border: 1px solid rgba(223, 177, 91, .35);
        border-radius: 12px;
        background: linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,.035));
        box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 12px rgba(0,0,0,.18);
    }
    header#main-header .menu-toggle-btn .svg-icon {
        display: block;
        width: 19px;
        height: 19px;
        margin: 0;
    }
}

/* Project status: a restrained glass chip with a clear semantic indicator. */
.project-status-badge {
    min-height: 32px;
    width: auto;
    max-width: calc(100% - 24px);
    padding: 6px 11px;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(7, 15, 28, .88);
    color: #f8fafc;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .01em;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255,255,255,.06);
    backdrop-filter: blur(14px) saturate(1.15);
    -webkit-backdrop-filter: blur(14px) saturate(1.15);
}
.project-status-badge .status-indicator {
    position: relative;
    display: block;
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255,255,255,.07), 0 0 12px currentColor;
}
.project-status-badge.completed {
    color: #effff8;
    border-color: rgba(61, 201, 145, .42);
}
.project-status-badge.completed .status-indicator {
    color: #4ce0a5;
}
.project-status-badge.in-progress {
    color: #fff8e8;
    border-color: rgba(241, 183, 75, .48);
}
.project-status-badge.in-progress .status-indicator {
    color: #f3bd58;
}
.project-status-badge .status-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Project gallery dialog: stable four-zone layout, independent image/detail scrolling. */
.gallery-modal {
    align-items: center;
    padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom));
}
.gallery-modal-dialog {
    width: min(100%, 1080px);
    min-width: 0;
    border: 1px solid rgba(223, 177, 91, .3);
    border-radius: 22px;
    display: grid;
    grid-template-rows: auto minmax(260px, 1fr) 68px minmax(125px, auto);
    height: min(92dvh, 900px);
    max-height: min(92dvh, 900px);
    min-height: 0;
    padding: clamp(12px, 1.8vw, 20px);
    background: linear-gradient(155deg, rgba(17, 28, 47, .99), rgba(5, 11, 22, .995));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .58), 0 0 32px rgba(223, 177, 91, .09);
    overflow: hidden;
}
.gallery-header {
    min-width: 0;
    align-items: center;
    padding-bottom: 10px;
    border-bottom-color: rgba(223, 177, 91, .16);
}
.gallery-header-meta {
    min-width: 0;
    gap: 8px;
}
.gallery-category-badge,
.gallery-counter-badge {
    min-width: 0;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    line-height: 1.25;
}
.gallery-category-badge {
    max-width: min(56vw, 420px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 12px;
}
.gallery-counter-badge {
    flex: 0 0 auto;
    padding: 5px 10px;
}
.gallery-header-actions {
    flex: 0 0 auto;
    gap: 7px;
}
.gallery-action-btn,
.close-gallery {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.065);
}
.gallery-action-btn svg,
.close-gallery svg {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0;
}
.gallery-container {
    border: 1px solid rgba(223, 177, 91, .2);
    border-radius: 16px;
    background: radial-gradient(circle at 50% 42%, rgba(33, 52, 78, .45), rgba(3, 8, 18, .98));
    box-shadow: inset 0 0 28px rgba(0,0,0,.28);
}
.gallery-modal .main-slider .swiper-slide {
    padding: 12px;
}
.gallery-modal .main-slider .swiper-slide img {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 12px 36px rgba(0,0,0,.28);
}
.gallery-modal .gallery-nav-btn {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: rgba(5, 12, 23, .76);
    border-color: rgba(223, 177, 91, .36);
    box-shadow: 0 5px 16px rgba(0,0,0,.2);
}
.gallery-modal .gallery-nav-btn svg {
    display: block;
    width: 18px;
    height: 18px;
    margin: 0;
}
.gallery-modal .thumbnail-slider {
    width: 100%;
    padding: 3px 2px 5px;
}
.gallery-modal .thumbnail-slider .swiper-wrapper {
    justify-content: flex-start;
    gap: 8px;
}
.gallery-modal .thumbnail-slider .swiper-slide {
    margin: 0;
    border-radius: 9px;
    border-width: 1px;
}
.gallery-modal .project-details {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 2px 0;
    overflow: hidden;
}
.gallery-modal .project-details-text {
    min-width: 0;
    width: 100%;
    max-width: 900px;
    overflow-wrap: anywhere;
}
.gallery-modal .project-details-text h3 {
    margin-bottom: 4px;
    line-height: 1.35;
}
.gallery-modal .project-details-text p {
    margin-bottom: 7px;
    line-height: 1.65;
}
.gallery-modal .project-specs-grid {
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.gallery-modal .project-spec-item {
    border-radius: 9px;
    padding: 6px 10px;
    line-height: 1.45;
}
.gallery-modal .gallery-cta-actions {
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
    padding-top: 0;
    gap: 9px;
}
.gallery-modal .gallery-cta-actions .btn {
    min-height: 44px;
    border-radius: 12px;
    line-height: 1.4;
}
.gallery-modal .gallery-cta-actions .gallery-order-btn {
    flex: 1.35 1 260px;
}
.gallery-modal .gallery-cta-actions .gallery-wa-btn {
    flex: .8 1 170px;
    justify-content: center;
}
.gallery-modal .gallery-empty-state {
    border-radius: 15px;
}
.gallery-modal.no-gallery-images .gallery-modal-dialog {
    grid-template-rows: auto minmax(220px, 1fr) 0 minmax(125px, auto);
}
.gallery-modal.no-gallery-images .thumbnail-slider,
.gallery-modal.no-gallery-images .gallery-nav-btn {
    display: none !important;
}

/* Back-to-top: visible progress ring, centered arrow, correct initial state. */
.back-to-top {
    --scroll-progress: 0%;
    position: fixed;
    right: 22px;
    left: auto;
    inset-inline-end: auto;
    inset-inline-start: auto;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    z-index: 1600;
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #f5d18a;
    background: conic-gradient(from -90deg, #dfb15b var(--scroll-progress), rgba(148,163,184,.24) 0);
    box-shadow: 0 8px 22px rgba(0,0,0,.28);
    isolation: isolate;
    overflow: visible;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.94);
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease, filter .22s ease, box-shadow .22s ease;
}
.back-to-top::before {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: 0;
    border: 1px solid rgba(223,177,91,.22);
    border-radius: inherit;
    background: linear-gradient(155deg, #102039, #071222);
    pointer-events: none;
}
.back-to-top .svg-icon {
    position: relative;
    z-index: 1;
    display: block;
    width: 21px;
    height: 21px;
    margin: 0;
    color: inherit;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.back-to-top:hover {
    background: conic-gradient(from -90deg, #f1c66d var(--scroll-progress), rgba(148,163,184,.3) 0);
    filter: brightness(1.08);
    box-shadow: 0 10px 25px rgba(0,0,0,.34), 0 0 0 4px rgba(223,177,91,.08);
    transform: translateY(-3px) scale(1.03);
}
.back-to-top:active {
    transform: translateY(0) scale(.97);
}
.back-to-top:focus-visible {
    outline: 3px solid rgba(223,177,91,.8);
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .project-status-badge {
        inset-block-start: 10px;
        inset-inline-start: 10px;
        min-height: 29px;
        padding: 5px 9px;
        font-size: .7rem;
    }
    .gallery-modal {
        align-items: stretch;
        padding: max(7px, env(safe-area-inset-top)) 7px max(7px, env(safe-area-inset-bottom));
    }
    .gallery-modal-dialog {
        width: 100%;
        height: calc(100dvh - 14px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 14px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        min-height: 0;
        padding: 11px;
        border-radius: 18px;
        grid-template-rows: auto minmax(0, 1fr) 54px minmax(150px, 28dvh);
        gap: 8px;
    }
    .gallery-header {
        gap: 8px;
        padding-bottom: 8px;
    }
    .gallery-category-badge {
        max-width: min(48vw, 250px);
        font-size: .74rem;
        padding-inline: 9px;
    }
    .gallery-counter-badge {
        min-height: 29px;
        font-size: .73rem;
        padding-inline: 8px;
    }
    .gallery-header-actions { gap: 6px; }
    .gallery-action-btn,
    .close-gallery {
        flex-basis: 37px;
        width: 37px;
        height: 37px;
    }
    .gallery-container {
        min-height: 0;
        height: 100%;
        border-radius: 13px;
    }
    .gallery-modal .main-slider .swiper-slide { padding: 8px; }
    .gallery-modal .gallery-nav-btn {
        width: 36px;
        height: 36px;
        top: auto;
        bottom: 12px;
        transform: none;
    }
    .gallery-modal .gallery-nav-next { inset-inline-end: 12px; inset-inline-start: auto; }
    .gallery-modal .gallery-nav-prev { inset-inline-start: 12px; inset-inline-end: auto; }
    .gallery-modal .thumbnail-slider {
        height: 54px;
        min-height: 54px;
        max-height: 54px;
        margin: 0 !important;
        padding: 2px 1px;
    }
    .gallery-modal .thumbnail-slider .swiper-wrapper {
        width: max-content;
        min-width: 100%;
        justify-content: flex-start;
        gap: 7px;
    }
    .gallery-modal .thumbnail-slider .swiper-slide {
        width: 72px !important;
        height: 48px;
        flex-basis: 72px;
    }
    .gallery-modal .project-details {
        max-height: none;
        min-height: max(150px, 28dvh);
        align-self: stretch;
        justify-self: stretch;
        box-sizing: border-box;
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        align-items: stretch;
        gap: 8px;
        padding: 9px 2px 0;
        overflow: hidden;
    }
    .gallery-modal .project-details-text {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        padding: 0 2px 3px;
    }
    .gallery-modal .project-details-text h3 {
        font-size: clamp(1rem, 4vw, 1.18rem);
        line-height: 1.4;
    }
    .gallery-modal .project-details-text p {
        font-size: .82rem;
        line-height: 1.55;
        margin-bottom: 6px;
    }
    .gallery-modal .project-specs-grid {
        justify-content: flex-start;
        gap: 5px;
        margin-top: 6px;
    }
    .gallery-modal .project-spec-item {
        max-width: 100%;
        padding: 4px 7px;
        font-size: .72rem;
        gap: 4px;
    }
    .gallery-modal .gallery-cta-actions {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
        align-items: stretch;
        gap: 7px;
        padding: 0 1px max(2px, env(safe-area-inset-bottom));
    }
    .gallery-modal .gallery-cta-actions .btn,
    .gallery-modal .gallery-cta-actions .gallery-order-btn,
    .gallery-modal .gallery-cta-actions .gallery-wa-btn {
        display: inline-flex;
        min-width: 0;
        width: 100%;
        min-height: 42px;
        padding: 7px 8px;
        flex: none;
        gap: 6px;
        font-size: .76rem;
        line-height: 1.35;
        white-space: normal;
        text-align: center;
    }
    .gallery-modal .gallery-cta-actions .btn .svg-icon {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
    }
    .gallery-modal.no-gallery-images .gallery-modal-dialog {
        grid-template-rows: auto minmax(0, 1fr) 0 minmax(174px, 29dvh);
    }
    .gallery-modal.no-gallery-images .project-details {
        min-height: max(174px, 29dvh);
    }
    .back-to-top {
        width: 46px;
        height: 46px;
        right: 14px;
        left: auto;
        inset-inline-end: auto;
        bottom: calc(var(--bottom-bar-height, 68px) + env(safe-area-inset-bottom, 0px) + 14px);
    }
}

@media (max-width: 430px) {
    .gallery-modal-dialog {
        padding: 9px;
        grid-template-rows: auto minmax(0, 1fr) 50px minmax(146px, 29dvh);
        gap: 7px;
    }
    .gallery-category-badge { max-width: min(42vw, 190px); }
    .gallery-modal .thumbnail-slider {
        height: 50px;
        min-height: 50px;
        max-height: 50px;
    }
    .gallery-modal .thumbnail-slider .swiper-slide {
        width: 66px !important;
        height: 44px;
        flex-basis: 66px;
    }
    .gallery-modal .project-details-text p { font-size: .78rem; }
    .gallery-modal .project-spec-item { font-size: .68rem; }
    .gallery-modal .gallery-cta-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
    .gallery-modal .gallery-cta-actions .btn,
    .gallery-modal .gallery-cta-actions .gallery-order-btn,
    .gallery-modal .gallery-cta-actions .gallery-wa-btn {
        min-height: 38px;
        padding-block: 6px;
        font-size: .75rem;
    }
}

@media (max-height: 620px) {
    .gallery-modal {
        padding: max(7px, env(safe-area-inset-top)) 8px max(7px, env(safe-area-inset-bottom));
    }
    .gallery-modal-dialog {
        height: calc(100dvh - 14px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 14px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        grid-template-rows: auto minmax(0, 1fr) 44px minmax(128px, 30dvh);
        gap: 6px;
        padding: 8px;
    }
    .gallery-modal .thumbnail-slider {
        height: 44px;
        min-height: 44px;
        max-height: 44px;
    }
    .gallery-modal .thumbnail-slider .swiper-slide { height: 38px; }
    .gallery-modal .project-details {
        display: grid;
        grid-template-rows: minmax(0, 1fr) auto;
        min-height: 128px;
        gap: 6px;
        padding-top: 6px;
    }
    .gallery-modal .project-details-text {
        min-height: 0;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .gallery-modal .gallery-cta-actions { gap: 7px; }
    .gallery-modal.no-gallery-images .gallery-modal-dialog {
        grid-template-rows: auto minmax(0, 1fr) 0 minmax(138px, 30dvh);
    }
    .gallery-modal.no-gallery-images .project-details { min-height: 138px; }
    .gallery-modal .project-details-text p { line-height: 1.42; }
}
@media (max-height: 620px) and (max-width: 768px) {
    .gallery-modal .project-details { min-height: 128px; }
    .gallery-modal.no-gallery-images .gallery-modal-dialog {
        grid-template-rows: auto minmax(0, 1fr) 0 minmax(174px, 30dvh);
    }
    .gallery-modal.no-gallery-images .project-details { min-height: 174px; }
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top,
    .project-status-badge,
    .gallery-modal-dialog,
    .gallery-modal .gallery-nav-btn {
        transition-duration: .01ms !important;
    }
}



/* =========================================================
   v11 — Project-card interaction, mobile discoverability,
   uploaded client marks, hero fallback images and SVG progress.
   ========================================================= */
.project-item {
    cursor: pointer;
    border: 1px solid rgba(15, 28, 50, .09);
    border-radius: 20px;
    overflow: hidden;
    background: var(--white, #fff);
    box-shadow: 0 10px 28px rgba(7, 19, 39, .075);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
    -webkit-tap-highlight-color: transparent;
}
.project-item:hover,
.project-item:focus-visible {
    transform: translateY(-5px);
    border-color: rgba(201,155,66,.42);
    box-shadow: 0 18px 40px rgba(7,19,39,.13);
    outline: none;
}
.project-item:focus-visible { box-shadow: 0 0 0 3px rgba(201,155,66,.24), 0 18px 40px rgba(7,19,39,.13); }
.project-img {
    height: auto !important;
    aspect-ratio: 16 / 10;
    min-height: 190px;
    background: linear-gradient(145deg,#15253b,#081426);
}
.project-img > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.project-overlay {
    opacity: 0;
    background: linear-gradient(180deg,rgba(5,13,26,.06) 28%,rgba(5,13,26,.76) 100%);
    transition: opacity .24s ease;
}
.project-item:hover .project-overlay,
.project-item:focus-visible .project-overlay { opacity: 1; }
.project-overlay .view-gallery {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: auto;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 999px;
    background: rgba(8,19,36,.78);
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transform: translateY(7px);
    opacity: 0;
    font-size: .84rem;
    font-weight: 800;
    line-height: 1.2;
    pointer-events: none;
}
.project-overlay .view-gallery .svg-icon { width: 17px; height: 17px; flex: 0 0 auto; }
.project-item:hover .project-overlay .view-gallery,
.project-item:focus-visible .project-overlay .view-gallery { opacity: 1; transform: translateY(0); }
.project-info { padding: clamp(16px,2vw,22px); display: flex; flex-direction: column; align-items: flex-start; }
.project-category { margin-bottom: 8px; padding: 4px 9px; border-radius: 7px; background: rgba(201,155,66,.09); color: #9a7028; font-size: .76rem; line-height: 1.5; }
.project-info h3 { margin: 0 0 9px; font-size: clamp(1.08rem,1.5vw,1.24rem); line-height: 1.45; }
.project-info p { margin: 0; font-size: .91rem; line-height: 1.8; color: var(--text-muted); }
.project-status-badge {
    min-height: 29px;
    padding: 5px 9px;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 9px;
    background: rgba(8,17,31,.76) !important;
    color: #f8fafc !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.16);
    backdrop-filter: blur(13px) saturate(1.1);
    -webkit-backdrop-filter: blur(13px) saturate(1.1);
    font-size: .72rem;
    font-weight: 750;
}
.project-status-badge.completed { border-color: rgba(85,205,155,.34); }
.project-status-badge.in-progress { border-color: rgba(240,190,91,.38); }
.project-status-badge .status-indicator { width: 7px; height: 7px; flex-basis: 7px; box-shadow: 0 0 0 2px rgba(255,255,255,.09); }
.project-status-badge.completed .status-indicator { color: #5bd9a3; }
.project-status-badge.in-progress .status-indicator { color: #f1c56e; }

/* Make the cards unmistakably actionable on touch screens, without hover dependency. */
@media (max-width: 768px) {
    .project-item { border-radius: 18px; }
    .project-img { min-height: 0; aspect-ratio: 16 / 10; }
    .project-overlay {
        opacity: 1 !important;
        align-items: flex-end;
        justify-content: flex-start;
        padding: 12px;
        background: linear-gradient(180deg,transparent 46%,rgba(4,12,24,.62) 100%);
    }
    .project-overlay .view-gallery {
        min-height: 38px;
        padding: 8px 12px;
        gap: 7px;
        transform: none !important;
        opacity: 1 !important;
        font-size: .76rem;
        border-radius: 11px;
        background: rgba(8,19,36,.84);
        box-shadow: 0 6px 18px rgba(0,0,0,.22);
    }
    .project-overlay .view-gallery .svg-icon { width: 15px; height: 15px; }
    .project-info { padding: 15px 15px 17px; }
    .project-info h3 { font-size: 1.04rem; }
    .project-info p { font-size: .87rem; line-height: 1.72; }
    .project-status-badge { inset-block-start: 9px; inset-inline-start: 9px; min-height: 27px; padding: 4px 8px; font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
    .project-item, .project-overlay, .project-overlay .view-gallery { transition: none !important; }
}

/* Client logos use the supplied original images at full colour. */
.clients-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,150px),1fr)); gap: clamp(12px,2vw,20px); }
.client-logo-item {
    min-width: 0;
    min-height: 100px;
    aspect-ratio: 16 / 10;
    padding: 15px;
    border-radius: 15px;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(15,28,50,.075);
    box-shadow: 0 7px 22px rgba(7,19,39,.055);
}
.client-logo-item img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 68px;
    object-fit: contain;
    filter: none;
    opacity: .96;
}
.client-logo-item:hover img { filter: none; opacity: 1; transform: scale(1.035); }

/* The SVG circle is the live scroll-progress indicator around the floating control. */
.back-to-top {
    background: #081426 !important;
    border: 0 !important;
    overflow: visible;
}
.back-to-top::before { inset: 4px; z-index: 0; background: linear-gradient(150deg,#14243a,#071222); border-color: rgba(223,177,91,.24); }
.back-to-top .progress-ring {
    position: absolute;
    inset: -2px;
    display: block;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    z-index: 1;
    transform: rotate(-90deg);
    overflow: visible;
    pointer-events: none;
}
.back-to-top .progress-ring-track,
.back-to-top .progress-ring-circle {
    fill: none;
    stroke-width: 2.2;
}
.back-to-top .progress-ring-track { stroke: rgba(148,163,184,.3); }
.back-to-top .progress-ring-circle {
    stroke: #dfb15b;
    stroke-linecap: round;
    stroke-dasharray: 131.95;
    stroke-dashoffset: 131.95;
    transition: stroke-dashoffset .12s linear;
}
.back-to-top .svg-icon { z-index: 2; }
@media (max-width: 768px) {
    .back-to-top { width: 46px; height: 46px; }
}
