/* تكميل صفحة الرئيسية — تصميم Stitch (بدون تعارض مع بقية الموقع) */

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.material-symbols-outlined.ms-fill {
    font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

body.page-stitch-home {
    font-family: "Cairo", "Inter", system-ui, sans-serif;
}

body.page-stitch-home,
body.page-stitch-inner {
    overflow-x: hidden;
}

#stitch-nav-toggle {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* شريط علوي: شفاف في أعلى الصفحة، أبيض مع blur خفيف بعد التمرير + حواف آمنة للهاتف */
.stitch-site-nav {
    padding-top: env(safe-area-inset-top, 0px);
    padding-inline-start: env(safe-area-inset-left, 0px);
    padding-inline-end: env(safe-area-inset-right, 0px);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-bottom: 1px solid transparent;
    transition:
        background-color 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        backdrop-filter 0.35s ease;
}

.stitch-site-nav.is-scrolled {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(27, 25, 47, 0.08);
    border-bottom-color: rgba(27, 25, 47, 0.06);
}

/* فوق الـ Hero: نصوص فاتحة لأن الخلفية شفافة */
.stitch-site-nav:not(.is-scrolled) .stitch-nav-inner a[href]:not(.stitch-nav-logo):not(.stitch-nav-cta) {
    color: rgba(255, 255, 255, 0.95) !important;
}

.stitch-site-nav:not(.is-scrolled) .stitch-nav-inner a[href]:not(.stitch-nav-logo):not(.stitch-nav-cta):hover {
    color: #fff !important;
}

.stitch-site-nav:not(.is-scrolled) .stitch-nav-inner a.border-primary {
    color: #fff !important;
    border-bottom-color: rgba(255, 255, 255, 0.9) !important;
}

.stitch-site-nav:not(.is-scrolled) .stitch-nav-logo:hover {
    opacity: 0.92;
}

.stitch-nav-logo:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 3px;
}

.stitch-site-nav.is-scrolled .stitch-nav-logo:focus-visible {
    outline-color: rgba(11, 79, 121, 0.55);
}

/* شعار الشريط: ملون فوق الـ Hero، وشكل بلون الداشبورد عند التمرير (ناف أبيض) — باستخدام قناع ألفا */
/* تكبير بصري بـ scale دون تغيير h-20 للشريط */
.stitch-nav-logo__img {
    transition: opacity 0.32s ease, transform 0.32s ease;
    transform: scale(1.14);
    transform-origin: center;
}

@media (min-width: 768px) {
    .stitch-nav-logo__img {
        transform: scale(1.32);
    }
}

.stitch-nav-logo::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.32s ease, transform 0.32s ease;
    pointer-events: none;
    background-color: #0b4f79;
    transform: scale(1.14);
    transform-origin: center;
    -webkit-mask-image: url("../images/logo.png");
    mask-image: url("../images/logo.png");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

@media (min-width: 768px) {
    .stitch-nav-logo::after {
        transform: scale(1.32);
    }
}

.stitch-site-nav.is-scrolled .stitch-nav-logo::after {
    opacity: 1;
}

.stitch-site-nav.is-scrolled .stitch-nav-logo__img {
    opacity: 0;
}

.stitch-site-nav.is-scrolled .stitch-nav-logo:hover::after {
    filter: brightness(1.08);
}

.stitch-site-nav:not(.is-scrolled) #stitch-nav-toggle {
    color: #fff;
}

.stitch-site-nav:not(.is-scrolled) #stitch-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.stitch-mobile-drawer {
    border-color: rgba(27, 25, 47, 0.08);
    background: #fcf8ff;
}

.stitch-site-nav.is-scrolled .stitch-mobile-drawer {
    border-top-color: rgba(27, 25, 47, 0.08);
    background: #fcf8ff;
}

.stitch-site-nav.is-scrolled #stitch-nav-toggle {
    color: #1b192f;
}

.stitch-site-nav.is-scrolled #stitch-nav-toggle:hover {
    background: rgba(27, 25, 47, 0.06);
}

/* صفحات داخلية: خلفية فاتحة — الشريط دائماً بأسلوب «بعد التمرير» (بدون نص أبيض) */
body.page-stitch-inner .stitch-site-nav {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(27, 25, 47, 0.08);
    border-bottom: 1px solid rgba(27, 25, 47, 0.06);
}

body.page-stitch-inner .stitch-site-nav .stitch-nav-inner a[href]:not(.stitch-nav-logo):not(.stitch-nav-cta) {
    color: rgba(27, 25, 47, 0.8) !important;
}

body.page-stitch-inner .stitch-site-nav .stitch-nav-inner a[href]:not(.stitch-nav-logo):not(.stitch-nav-cta):hover {
    color: #005f9e !important;
}

body.page-stitch-inner .stitch-site-nav .stitch-nav-inner a.border-primary {
    color: #005f9e !important;
    border-bottom-color: #005f9e !important;
}

body.page-stitch-inner .stitch-site-nav .stitch-nav-logo::after {
    opacity: 1;
}

body.page-stitch-inner .stitch-site-nav .stitch-nav-logo__img {
    opacity: 0;
}

body.page-stitch-inner .stitch-site-nav .stitch-nav-logo:focus-visible {
    outline-color: rgba(11, 79, 121, 0.55);
}

body.page-stitch-inner .stitch-site-nav #stitch-nav-toggle {
    color: #1b192f;
}

body.page-stitch-inner .stitch-site-nav #stitch-nav-toggle:hover {
    background: rgba(27, 25, 47, 0.06);
}

/* أزرار الصفحات القديمة: نفس لون الداشبورد واستدارة xl */
body.page-stitch-inner .btn-primary {
    background: #0b4f79;
    box-shadow: none;
    border-radius: 0.75rem;
}

body.page-stitch-inner .btn-primary:hover {
    background: #094866;
    transform: none;
    box-shadow: none;
}

/* زر «طلب عرض» في الشريط — لون مسطح، بلا تدرج أو ظل أو حركة */
.stitch-nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    background-color: #0b4f79;
    border: none;
    box-shadow: none;
    transition: background-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.stitch-nav-cta:hover {
    background-color: #094866;
}

.stitch-nav-cta:active {
    background-color: #083d5c;
}

.stitch-nav-cta:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

.stitch-site-nav.is-scrolled .stitch-nav-cta:focus-visible {
    outline-color: #0b4f79;
}

#features,
#ai,
#why-clinix,
#cta {
    scroll-margin-top: 5.5rem;
}

@media (max-width: 1023px) {
    #features,
    #ai,
    #why-clinix,
    #cta {
        scroll-margin-top: calc(5.25rem + env(safe-area-inset-top, 0px));
    }
}

/* قائمة الجوال: تمرير عند الحاجة وحافة سفلية آمنة */
.stitch-mobile-drawer--sheet {
    max-height: min(72vh, calc(100dvh - 5.25rem - env(safe-area-inset-bottom, 0px)));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.stitch-mobile-drawer--sheet a.block {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.stitch-mobile-drawer__footer {
    margin-top: 0.25rem;
    padding-top: 0.75rem;
}

.stitch-mobile-wa-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.45;
    text-align: center;
    color: #fff;
    text-decoration: none;
    background: #25d366;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.32);
    transition: background-color 0.2s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.stitch-mobile-wa-cta:hover {
    background: #20bd5a;
}

.stitch-mobile-wa-cta:active {
    transform: scale(0.99);
}

.stitch-mobile-wa-cta__icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

/* شرائح ميزات متناوبة: أزرق النظام (#0b4f79) بشكل شبه أبيض بدل البنفسجي */
.feature-band-system-soft {
    background-color: #f3f7fb;
}

@supports (background: color-mix(in srgb, white, black)) {
    .feature-band-system-soft {
        background: color-mix(in srgb, #0b4f79 4.5%, #ffffff);
    }
}

/* ألوان مطابقة لتطبيق الداشبورد (nav-shell / primary #0b4f79) — بدون أزرق سماوي فاتح */
.hero-gradient {
    --hero-shell-deep: #0a1f2f;
    --hero-shell-mid: #0b4f79;
    --hero-shell-accent: #0c5a8a;
    background: linear-gradient(148deg, var(--hero-shell-deep) 0%, var(--hero-shell-mid) 42%, var(--hero-shell-accent) 100%);
}

/* دوائر وزخارف خفيفة في خلفية الـ Hero (جزء ظاهر، جزء خارج الإطار) */
.hero-bg-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(
        circle at 35% 35%,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.06) 42%,
        rgba(255, 255, 255, 0) 72%
    );
    box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.08);
}

.hero-blob--1 {
    width: min(52vw, 520px);
    height: min(52vw, 520px);
    top: -18%;
    inset-inline-end: -12%;
    opacity: 0.85;
}

.hero-blob--2 {
    width: min(38vw, 380px);
    height: min(38vw, 380px);
    bottom: 8%;
    inset-inline-start: -14%;
    opacity: 0.55;
    background: radial-gradient(
        circle at 60% 40%,
        rgba(255, 255, 255, 0.14) 0%,
        rgba(255, 255, 255, 0.04) 50%,
        rgba(255, 255, 255, 0) 75%
    );
}

.hero-blob--3 {
    width: min(28vw, 280px);
    height: min(28vw, 280px);
    top: 42%;
    inset-inline-start: 6%;
    opacity: 0.35;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.18) 0%, transparent 65%);
}

.hero-blob--4 {
    width: min(22vw, 240px);
    height: min(22vw, 240px);
    bottom: -6%;
    inset-inline-end: 18%;
    opacity: 0.4;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.hero-blob--5 {
    width: min(65vw, 900px);
    height: min(65vw, 900px);
    top: 55%;
    left: 50%;
    transform: translate(-50%, 0);
    opacity: 0.25;
    background: radial-gradient(
        ellipse 55% 45% at 50% 40%,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.03) 45%,
        transparent 70%
    );
}

@media (max-width: 1023px) {
    .hero-blob--3,
    .hero-blob--4 {
        opacity: 0.22;
    }
}

/* ظهور تدريجي للأقسام (صفحات داخلية — يُفعّلها js/animations.js) */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}

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

/* تذييل موحّد: نفس تدرج الـ Hero (.hero-gradient) */
.site-footer {
    background: linear-gradient(148deg, #0a1f2f 0%, #0b4f79 42%, #0c5a8a 100%);
}

.site-footer .material-symbols-outlined {
    color: #fff;
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.site-footer a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
    border-radius: 6px;
}

/* صفحة اتصل بنا — أيقونات وبطاقة موحّدة */
.page-contact .contact-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    background: rgba(11, 79, 121, 0.09);
    color: #0b4f79;
}

.page-contact .contact-page-wa-btn {
    -webkit-tap-highlight-color: transparent;
}

