/*
 * Ultimate Professional Deep Shadow & Vibrant Glassmorphism
 */

:root {
    --sd-bg: #0f172a;
    --sd-glass-bg: rgba(30, 41, 59, 0.94);
    --sd-glass-border: rgba(168, 85, 247, 0.25);
    --sd-shadow-deep: 0 25px 60px rgba(0, 0, 0, 0.5);
    --sd-shadow-hover: 0 35px 80px rgba(168, 85, 247, 0.35);
    --sd-blur: blur(25px);

    --sd-primary: #7b1fa2; /* Vibrant Purple */
    --sd-primary-dark: #4a148c; /* Dark Purple */
    --sd-accent: #ff6b00; /* Vibrant Orange */
    --sd-text: #ffffff;
    --sd-text-light: #cbd5e1;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; }

body {
    margin: 0;
    font-family: 'Tajawal', sans-serif;
    background-color: var(--sd-bg);
    color: var(--sd-text);
    line-height: 1.8;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Vibrant background element */
.sd-vibrant-bg {
    position: fixed;
    top: -20%; left: -10%; right: -10%; bottom: -20%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(74, 20, 140, 0.15), transparent 45%),
                radial-gradient(circle at 85% 30%, rgba(255, 107, 0, 0.12), transparent 45%);
    filter: blur(80px);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Typography & Utilities
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 { color: var(--sd-primary); margin-top: 0; font-weight: 800; }
a { color: var(--sd-accent); text-decoration: none; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }

.sd-container { width: 90%; max-width: 1400px; margin: 0 auto; }
.sd-section { padding: 120px 0; position: relative; }
.sd-section-title { text-align: center; margin-bottom: 80px; max-width: 800px; margin-left: auto; margin-right: auto; }
.sd-section-title h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 20px; }
.sd-section-title p { font-size: 1.2rem; color: var(--sd-text-light); }

/* --------------------------------------------------------------------------
   Glass Components
   -------------------------------------------------------------------------- */
.sd-glass-card {
    background: var(--sd-glass-bg);
    backdrop-filter: var(--sd-blur);
    -webkit-backdrop-filter: var(--sd-blur);
    border: 1px solid var(--sd-glass-border);
    border-radius: 24px;
    box-shadow: var(--sd-shadow-deep);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.sd-glass-card:hover { transform: translateY(-10px); box-shadow: var(--sd-shadow-hover); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.sd-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 18px 45px; border-radius: 12px; font-weight: 700; font-size: 1.1rem;
    cursor: pointer; transition: all 0.3s ease; border: none;
}
.sd-btn-primary { background: var(--sd-primary); color: #fff !important; box-shadow: 0 15px 30px rgba(74, 20, 140, 0.25); }
.sd-btn-primary:hover { background: #370e6b; transform: translateY(-3px); box-shadow: 0 20px 40px rgba(74, 20, 140, 0.35); }
.sd-btn-accent { background: var(--sd-accent); color: #fff !important; box-shadow: 0 15px 30px rgba(255, 107, 0, 0.25); }
.sd-btn-accent:hover { background: #e65c00; transform: translateY(-3px); box-shadow: 0 20px 40px rgba(255, 107, 0, 0.35); }
.sd-btn-secondary { background: transparent; color: var(--sd-primary) !important; box-shadow: none; padding: 18px 20px; }
.sd-btn-secondary:hover { color: var(--sd-accent) !important; }

/* --------------------------------------------------------------------------
   Accessibility: Screen-reader-only text & Skip Link
   (Previously undefined, so this link rendered as a stray, always-visible
   element floating outside the header layout on every page.)
   -------------------------------------------------------------------------- */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    word-wrap: normal !important;
}
.skip-link.screen-reader-text:focus {
    position: fixed;
    top: 10px; right: 10px; left: auto;
    width: auto; height: auto;
    clip: auto;
    z-index: 100000;
    padding: 14px 24px;
    background: var(--sd-primary);
    color: #fff;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: var(--sd-shadow-deep);
}

/* --------------------------------------------------------------------------
   Header (Floating Glass Bar)
   -------------------------------------------------------------------------- */
.sd-site-header { 
    position: fixed; 
    top: 16px; 
    left: 20px; 
    right: 20px; 
    z-index: 1000; 
    padding: 0;
    max-width: 1300px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(56, 189, 248, 0.15);
    transition: all 0.3s ease;
}
.sd-header-inner { display: flex; justify-content: space-between; align-items: center; padding: 12px 28px; }

/* Logo Styling */
.sd-logo {
    display: flex;
    align-items: center;
    max-height: 55px;
}
.sd-logo a, 
.sd-logo .custom-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.sd-logo h2 { 
    color: #fff; 
    font-size: 1.6rem; 
    font-weight: 800; 
    margin: 0; 
    line-height: 1;
}
.sd-logo img, 
.sd-logo .custom-logo {
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Primary Navigation & Multi-level Dropdown Submenus */
.sd-primary-nav { 
    display: flex; 
    align-items: center; 
}
.sd-primary-nav > ul,
.sd-primary-nav > div > ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
    gap: 32px; 
    align-items: center; 
}
.sd-primary-nav li {
    position: relative;
    list-style: none;
}
.sd-primary-nav a { 
    color: rgba(255, 255, 255, 0.88); 
    font-weight: 700; 
    font-size: 1.02rem; 
    text-decoration: none; 
    transition: all 0.3s ease; 
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
}
.sd-primary-nav a:hover { 
    color: #38bdf8; 
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5); 
}

/* Dropdown Arrow Indicator */
.sd-primary-nav li.menu-item-has-children > a::after,
.sd-primary-nav li.page_item_has_children > a::after {
    content: '▾';
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease, color 0.3s ease;
}
.sd-primary-nav li.menu-item-has-children:hover > a::after,
.sd-primary-nav li.page_item_has_children:hover > a::after {
    transform: rotate(180deg);
    color: #38bdf8;
}

/* Dropdown Submenu Container */
.sd-primary-nav ul.sub-menu,
.sd-primary-nav ul.children {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 230px;
    display: block !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1.5px solid rgba(56, 189, 248, 0.3);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(56, 189, 248, 0.25);
    z-index: 10000;
    list-style: none;
    margin: 0;
}

/* Hover Reveal Trigger */
.sd-primary-nav li.menu-item-has-children:hover > ul.sub-menu,
.sd-primary-nav li.page_item_has_children:hover > ul.children {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(6px);
}

/* Submenu Items & Links */
.sd-primary-nav ul.sub-menu li,
.sd-primary-nav ul.children li {
    margin: 3px 0;
    width: 100%;
}

.sd-primary-nav ul.sub-menu li a,
.sd-primary-nav ul.children li a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.94rem;
    font-weight: 600;
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
}

.sd-primary-nav ul.sub-menu li a:hover,
.sd-primary-nav ul.children li a:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(168, 85, 247, 0.2));
    color: #38bdf8;
    transform: translateX(-4px);
}

/* Second-level Nested Submenus */
.sd-primary-nav ul.sub-menu ul.sub-menu,
.sd-primary-nav ul.children ul.children {
    top: 0;
    right: 100%;
    transform: translateX(15px);
}
.sd-primary-nav ul.sub-menu li:hover > ul.sub-menu,
.sd-primary-nav ul.children li:hover > ul.children {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-6px);
}

/* Light Mode Overrides for Dropdown Submenus */
body.sd-light-mode .sd-primary-nav ul.sub-menu,
body.sd-light-mode .sd-primary-nav ul.children {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
    box-shadow: 0 20px 45px rgba(14, 165, 233, 0.2) !important;
}
body.sd-light-mode .sd-primary-nav ul.sub-menu li a,
body.sd-light-mode .sd-primary-nav ul.children li a {
    color: #1e293b !important;
}
body.sd-light-mode .sd-primary-nav ul.sub-menu li a:hover,
body.sd-light-mode .sd-primary-nav ul.children li a:hover {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0ea5e9 !important;
}

/* --------------------------------------------------------------------------
   1. Hero Section (Clean separation from Floating Header)
   -------------------------------------------------------------------------- */
.sd-hero { min-height: 100vh; display: flex; align-items: center; padding-top: 140px; padding-bottom: 60px; }
.sd-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.sd-hero-grid > * { min-width: 0; }
.sd-hero-text h1 { font-size: clamp(3.5rem, 6vw, 5.5rem); line-height: 1.1; margin-bottom: 30px; letter-spacing: -1px; }
.sd-hero-text p { font-size: 1.3rem; color: var(--sd-text-light); margin-bottom: 40px; max-width: 90%; }
.sd-hero-actions { display: flex; gap: 20px; flex-wrap: wrap; }
.sd-hero-visual { height: 600px; padding: 0; overflow: hidden; border-radius: 24px; }
.sd-hero-swiper { width: 100%; height: 100%; position: relative; }
.sd-hero-swiper .swiper-slide { height: 100%; display: flex; align-items: center; justify-content: center; }
.sd-hero-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.sd-hero-swiper .swiper-pagination { bottom: 20px; }
.sd-hero-swiper .swiper-pagination-bullet { background: var(--sd-accent); opacity: 0.7; }
.sd-hero-swiper .swiper-pagination-bullet-active { background: #fff; transform: scale(1.5); opacity: 1; }

/* --------------------------------------------------------------------------
   2. Marquee
   -------------------------------------------------------------------------- */
.sd-marquee-section { padding: 40px 0; background: rgba(74, 20, 140, 0.03); overflow: hidden; white-space: nowrap; }
.sd-marquee-content { display: inline-flex; gap: 80px; animation: marquee 30s linear infinite; align-items: center; }
.sd-marquee-item { font-size: 1.5rem; font-weight: 800; color: #a4b0be; text-transform: uppercase; letter-spacing: 2px; }
/* The content is duplicated once in the markup, so a -50% shift loops seamlessly
   instead of sliding the whole strip fully out of view (previous 100% value). */
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   3. Features
   -------------------------------------------------------------------------- */
.sd-features-grid { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 40px !important; 
}
@media (max-width: 1024px) {
    .sd-features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
@media (max-width: 640px) {
    .sd-features-grid {
        grid-template-columns: 1fr !important;
    }
}
.sd-feature-card { padding: 50px 40px; text-align: center; }
.sd-icon-wrapper { width: 80px; height: 80px; margin: 0 auto 30px; background: rgba(74, 20, 140, 0.05); border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.sd-icon-wrapper svg { width: 35px; height: 35px; fill: var(--sd-primary); }
.sd-feature-card h3 { font-size: 1.5rem; margin-bottom: 15px; }

/* --------------------------------------------------------------------------
   4. Services (Real Images)
   -------------------------------------------------------------------------- */
.sd-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.sd-service-box { display: flex; flex-direction: column; padding: 0; }
.sd-service-img { width: 100%; height: 250px; object-fit: cover; }
.sd-service-content { padding: 40px; flex-grow: 1; display: flex; flex-direction: column; }
.sd-service-content h3 { font-size: 1.6rem; margin-bottom: 15px; }
.sd-service-content p { color: var(--sd-text-light); margin-bottom: 25px; flex-grow: 1; }
.sd-service-link { font-weight: 800; color: var(--sd-accent); display: inline-flex; align-items: center; gap: 10px; }

/* --------------------------------------------------------------------------
   5. Interactive 3D Process
   -------------------------------------------------------------------------- */
.sd-process-section { position: relative; }
.sd-process-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; align-items: center; }
.sd-process-grid > * { min-width: 0; }
.sd-process-text h3 { font-size: 2.5rem; margin-bottom: 10px; }
.sd-process-list { list-style: none; padding: 0; margin: 0; }
.sd-process-step { position: relative; padding: 25px 30px; margin-bottom: 15px; border-right: 4px solid transparent; border-radius: 16px; cursor: pointer; transition: 0.3s; background: rgba(255,255,255,0.3); }
.sd-process-step:hover { background: rgba(255,255,255,0.7); }
.sd-process-step.active { border-right-color: var(--sd-accent); background: var(--sd-glass-bg); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.sd-process-step h4 { margin: 0 0 5px 0; font-size: 1.3rem; transition: color 0.3s; }
.sd-process-step.active h4 { color: var(--sd-accent); }
.sd-process-step p { margin: 0; color: var(--sd-text-light); }

/* Mobile accordion gallery: hidden entirely on desktop, shown per-step on mobile */
.sd-mobile-gallery { display: none; }
.sd-hint-mobile { display: none; }

.sd-interactive-3d { perspective: 1200px; height: 500px; }
.sd-3d-scene { width: 100%; height: 100%; position: relative; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1); transform-style: preserve-3d; padding: 10px; }
/* Ensure the inner swiper matches the scene exactly */
.sd-step-swiper { width: 100%; height: 100%; border-radius: 14px; overflow: hidden; }
/* The hover effect on the right triggers this via JS or CSS, we will use JS for precise control */
.sd-3d-scene.flipping { transform: rotateY(180deg) scale(0.9); opacity: 0; }
.sd-3d-image { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; }
.sd-3d-overlay { position: absolute; z-index: 2; bottom: 30px; right: 30px; left: 30px; background: rgba(255,255,255,0.85); backdrop-filter: blur(10px); padding: 20px; border-radius: 12px; transform: translateZ(50px); /* 3D pop */ }
.sd-3d-title { margin: 0; color: var(--sd-primary); font-size: 1.4rem; text-align: center; }

.sd-process-reverse .sd-process-grid { grid-template-columns: 0.8fr 1.2fr; }
.sd-process-reverse .sd-process-text { order: 2; }
.sd-process-reverse .sd-process-3d-visual { order: 1; }

/* --------------------------------------------------------------------------
   6. Stats, Testimonials, CTA, Footer
   -------------------------------------------------------------------------- */
.sd-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding: 60px; text-align: center; }
.sd-stats-grid h3 { font-size: 3.5rem; margin: 0; color: var(--sd-primary); }
.sd-stats-grid p { margin: 5px 0 0; font-weight: 700; color: var(--sd-text-light); }

.sd-testimonials-swiper { padding: 40px 20px 80px; }
.sd-testimonials-swiper .swiper-slide { padding: 50px; }
.sd-testimonials-swiper p { font-size: 1.2rem; font-style: italic; margin-bottom: 30px; }
.sd-testimonials-swiper h5 { margin: 0; font-size: 1.2rem; }

.sd-cta-banner { padding: 80px; text-align: center; background: linear-gradient(135deg, var(--sd-primary), #6f21c9); color: #fff; }
.sd-cta-banner h2 { color: #fff; font-size: 3rem; margin-bottom: 20px; }
.sd-cta-banner p { color: rgba(255,255,255,0.8); font-size: 1.2rem; margin-bottom: 40px; }

.sd-footer { background: #fff; padding: 60px 0 20px; }
.sd-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.sd-footer-widget h4 { font-size: 1.2rem; margin-bottom: 20px; }
.sd-footer-widget p { color: var(--sd-text-light); }
.sd-footer-widget ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sd-footer-widget a { display: block; color: var(--sd-text-light); font-weight: 600; margin-bottom: 8px; }
.sd-footer-widget a:hover { color: var(--sd-accent); }
.sd-footer-address { color: var(--sd-text-light); margin-bottom: 12px; line-height: 1.6; }
.sd-footer-map { margin-top: 10px; border-radius: 16px; overflow: hidden; }
.sd-footer-map iframe { width: 100%; min-height: 260px; border: 0; display: block; }
.sd-copyright { text-align: center; padding-top: 30px; border-top: 1px solid rgba(0,0,0,0.06); color: var(--sd-text-light); font-size: 0.95rem; }
@media (max-width: 768px) {
    .sd-footer-grid { grid-template-columns: 1fr; text-align: center; }
    .sd-footer-widget ul { align-items: center; }
}

/* ==========================================================================
   Custom Glassmorphic Scrollbar (Vertical & Horizontal Viewport Scrollbar)
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #38bdf8, #a855f7);
    border-radius: 10px;
    border: 2px solid rgba(15, 23, 42, 0.6);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0ea5e9, #9333ea);
}

body.sd-light-mode ::-webkit-scrollbar-track,
html.sd-light-mode ::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.8) !important;
}
body.sd-light-mode ::-webkit-scrollbar-thumb,
html.sd-light-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffffff, #e2e8f0) !important;
    border: 2px solid rgba(14, 165, 233, 0.35) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25) !important;
}
body.sd-light-mode ::-webkit-scrollbar-thumb:hover,
html.sd-light-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffffff, #0ea5e9) !important;
}

/* --------------------------------------------------------------------------
   Floating Social / Contact Buttons & Side Bar (Glassmorphism)
   -------------------------------------------------------------------------- */
.sd-floating-actions {
    position: fixed;
    bottom: 30px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}
.sd-float-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.96));
    backdrop-filter: var(--sd-blur);
    -webkit-backdrop-filter: var(--sd-blur);
    border: 1.5px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.28), 0 0 15px rgba(56, 189, 248, 0.2);
    color: var(--sd-icon-color, #38bdf8) !important;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Colored glass tint that matches each platform's brand color */
.sd-float-icon-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 30% 20%, var(--sd-icon-glow, rgba(74,20,140,0.14)), transparent 65%);
    transition: opacity 0.4s ease;
}
/* Subtle glass "shine" highlight across the top edge */
.sd-float-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.55), rgba(255,255,255,0) 45%);
    pointer-events: none;
    z-index: 1;
}
.sd-float-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(160deg, var(--sd-icon-color, var(--sd-primary)) 0%, transparent 60%);
    opacity: 0.35;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
.sd-float-btn svg { width: 20px; height: 20px; fill: currentColor; position: relative; z-index: 2; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.12)); }
.sd-float-btn:hover {
    transform: translateY(-6px) scale(1.08);
    box-shadow: var(--sd-shadow-hover), inset 0 1px 1px rgba(255,255,255,0.7);
    background: rgba(255, 255, 255, 0.85);
}
.sd-float-btn:hover .sd-float-icon-bg { opacity: 1; }

/* Gentle attention pulse ring for the primary contact actions */
.sd-float-pulse {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--sd-icon-color);
    opacity: 0.35;
    z-index: -2;
    animation: sd-pulse-ring 2.6s cubic-bezier(0.2, 0.7, 0.4, 1) infinite;
}
@keyframes sd-pulse-ring {
    0% { transform: scale(1); opacity: 0.35; }
    75% { transform: scale(1.55); opacity: 0; }
    100% { transform: scale(1.55); opacity: 0; }
}

.sd-float-whatsapp { --sd-icon-color: #25D366; --sd-icon-glow: rgba(37, 211, 102, 0.22); }
.sd-float-whatsapp:hover { box-shadow: 0 25px 50px -10px rgba(37, 211, 102, 0.45), var(--sd-shadow-hover); }
.sd-float-phone { --sd-icon-color: var(--sd-accent); --sd-icon-glow: rgba(255, 107, 0, 0.22); }
.sd-float-phone:hover { box-shadow: 0 25px 50px -10px rgba(255, 107, 0, 0.45), var(--sd-shadow-hover); }
.sd-float-email { --sd-icon-color: #EA4335; --sd-icon-glow: rgba(234, 67, 53, 0.25); }
.sd-float-email:hover { box-shadow: 0 25px 50px -10px rgba(234, 67, 53, 0.45), var(--sd-shadow-hover); }
.sd-float-map { --sd-icon-color: #4285F4; --sd-icon-glow: rgba(66, 133, 244, 0.25); }
.sd-float-map:hover { box-shadow: 0 25px 50px -10px rgba(66, 133, 244, 0.45), var(--sd-shadow-hover); }
.sd-float-twitter { --sd-icon-color: #14171a; --sd-icon-glow: rgba(20, 23, 26, 0.14); }
.sd-float-instagram { --sd-icon-color: #d6249f; --sd-icon-glow: rgba(214, 36, 159, 0.2); }
.sd-float-instagram:hover { box-shadow: 0 25px 50px -10px rgba(214, 36, 159, 0.4), var(--sd-shadow-hover); }
.sd-float-facebook { --sd-icon-color: #1877f2; --sd-icon-glow: rgba(24, 119, 242, 0.2); }
.sd-float-facebook:hover { box-shadow: 0 25px 50px -10px rgba(24, 119, 242, 0.4), var(--sd-shadow-hover); }
.sd-float-tiktok { --sd-icon-color: #010101; --sd-icon-glow: rgba(1, 1, 1, 0.14); }
.sd-float-snapchat { --sd-icon-color: #FFFC00; --sd-icon-glow: rgba(255, 252, 0, 0.25); background: rgba(255,255,255,0.75); }

/* Glassmorphism Floating Tooltips on the Left */
.sd-float-tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    z-index: 10;
}
.sd-float-btn:hover .sd-float-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 480px) {
    .sd-floating-actions { bottom: 20px; left: 16px; gap: 12px; }
    .sd-float-btn { width: 50px; height: 50px; border-radius: 16px; }
    .sd-float-btn svg { width: 22px; height: 22px; }
}

@media (max-width: 1024px) {
    .sd-hero-grid, .sd-process-grid { grid-template-columns: 1fr; text-align: center; }
    .sd-process-reverse .sd-process-grid { grid-template-columns: 1fr; }
    .sd-hero-actions { justify-content: center; }
    .sd-process-reverse .sd-process-text { order: 1; }
    .sd-process-reverse .sd-process-3d-visual { order: 2; }
    .sd-stats-grid { grid-template-columns: 1fr 1fr; }
    .sd-header-inner { flex-direction: column; gap: 20px; }
}

/* Below this point (true phones only) the shared hover visual is replaced
   by a per-step tap-to-open gallery. Laptop/tablet widths (769px-1024px)
   keep the original hover-driven 3D visual untouched. */
/* True touch devices only (phones AND tablets, any width) — never triggered
   on a mouse/trackpad-driven desktop or laptop, even if its window is narrow. */
@media (hover: none), (pointer: coarse) {
    .sd-process-3d-visual { display: none; }
    .sd-hint-desktop { display: none; }
    .sd-hint-mobile { display: inline; }

    .sd-process-list { text-align: right; }
    .sd-process-step { padding-right: 30px; padding-left: 44px; }

    /* All steps start neutral/closed on mobile — only a tap (adds
       .mobile-active) reveals the highlighted state and its gallery. */
    .sd-process-step.active {
        border-right-color: transparent;
        background: rgba(255,255,255,0.3);
        box-shadow: none;
    }
    .sd-process-step.active h4 { color: inherit; }
    .sd-process-step.mobile-active {
        border-right-color: var(--sd-accent);
        background: var(--sd-glass-bg);
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    }
    .sd-process-step.mobile-active h4 { color: var(--sd-accent); }

    /* Expand/collapse chevron indicator */
    .sd-process-step::after {
        content: '';
        position: absolute;
        left: 22px;
        top: 30px;
        width: 11px;
        height: 11px;
        border-right: 2px solid var(--sd-text-light);
        border-bottom: 2px solid var(--sd-text-light);
        transform: rotate(45deg);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease;
    }
    .sd-process-step.mobile-active::after {
        transform: rotate(225deg);
        border-color: var(--sd-accent);
    }

    .sd-mobile-gallery {
        display: block;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        margin-top: 0;
        transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, margin-top 0.4s ease;
    }
    .sd-mobile-gallery.open {
        max-height: 260px;
        opacity: 1;
        margin-top: 18px;
    }
    .sd-mobile-gallery-inner {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 6px;
        scroll-snap-type: x proximity;
    }
    .sd-mobile-gallery-inner img {
        scroll-snap-align: start;
        flex: 0 0 auto;
        width: 150px;
        height: 190px;
        object-fit: cover;
        border-radius: 14px;
        box-shadow: var(--sd-shadow-deep);
    }
}
@media (max-width: 768px) {
    .sd-stats-grid { grid-template-columns: 1fr; }
    .sd-process-3d-visual { height: 350px; }
    .sd-cta-banner { padding: 40px 20px; }
    .sd-cta-banner h2 { font-size: 2rem; }
}

/* --------------------------------------------------------------------------
   Mobile Menu (Hamburger)
   -------------------------------------------------------------------------- */
.sd-mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 35px; height: 35px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}
.sd-mobile-menu-toggle .sd-bar {
    width: 100%; height: 3px;
    background: var(--sd-primary);
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}
.sd-mobile-menu-toggle.sd-toggle-active .sd-bar:nth-child(1) { transform: rotate(45deg); }
.sd-mobile-menu-toggle.sd-toggle-active .sd-bar:nth-child(2) { opacity: 0; }
.sd-mobile-menu-toggle.sd-toggle-active .sd-bar:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 1024px) {
    .sd-mobile-menu-toggle { display: none !important; }
    .sd-primary-nav { display: none !important; }
}

@media (max-width: 768px) {
    .sd-header-actions { display: none !important; }
    .sd-header-inner { justify-content: center !important; text-align: center; }
}

/* ==========================================================================
   Glassmorphic Floating Mobile Navigation Bar & Main Menu Popup Modal
   ========================================================================== */
.sd-mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 99995;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    border-radius: 28px;
    padding: 6px 10px;
    box-shadow: 0 20px 50px rgba(14, 165, 233, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    align-items: flex-end;
    justify-content: space-around;
    direction: rtl;
}

@media (max-width: 768px) {
    .sd-mobile-nav-bar {
        display: flex;
    }
}

.sd-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none !important;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Tajawal', sans-serif;
    transition: all 0.3s ease;
    flex: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px 0;
}

.sd-mobile-nav-item svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.3s ease, fill 0.3s ease;
}

.sd-mobile-nav-item:hover, .sd-mobile-nav-item.active {
    color: #38bdf8;
}

.sd-mobile-nav-item:hover svg {
    transform: translateY(-2px);
}

/* Center Prominent Order Service Button */
.sd-mobile-nav-item.sd-nav-center {
    position: relative;
    top: -16px;
    margin-bottom: -16px;
    color: #fff !important;
}

.sd-mobile-nav-center-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #a855f7);
    border: 4px solid #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
}

.sd-mobile-nav-center-btn svg {
    width: 26px !important;
    height: 26px !important;
    fill: #fff !important;
}

.sd-mobile-nav-center-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #a855f7);
    z-index: -1;
    opacity: 0.6;
    animation: sdNavPulse 2.5s infinite;
}

@keyframes sdNavPulse {
    0% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.sd-mobile-nav-item.sd-nav-center:hover .sd-mobile-nav-center-btn {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.6);
}

.sd-mobile-nav-item.sd-nav-center span {
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    margin-top: 2px;
}

/* Glassmorphism Main Menu Popup Modal */
.sd-mobile-menu-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.94));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 24px 100px;
    direction: rtl;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.sd-mobile-menu-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sd-menu-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.sd-menu-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sd-menu-modal-close:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: #ef4444;
}

.sd-menu-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px 0;
}

.sd-menu-modal-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sd-menu-modal-nav a {
    display: flex;
    align-items: center;
    color: #f8fafc;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.sd-mini-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 12px;
    font-size: 1.25rem;
    font-style: normal;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sd-menu-modal-nav a:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(168, 85, 247, 0.25));
    border-color: #38bdf8;
    color: #38bdf8;
    transform: translateX(-6px);
}
.sd-menu-modal-nav a:hover .sd-mini-icon {
    background: rgba(56, 189, 248, 0.25);
    border-color: #38bdf8;
    transform: scale(1.1);
}

.sd-menu-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --------------------------------------------------------------------------
   Hero Overlay Effects
   -------------------------------------------------------------------------- */
/* Glow */
.sd-effect-glow .sd-hero-visual { box-shadow: 0 0 100px 20px rgba(255, 107, 0, 0.4); }

/* Pulse */
@keyframes sdPulse { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }
.sd-effect-pulse .sd-hero-visual { animation: sdPulse 3s infinite ease-in-out; }

/* Lightning */
@keyframes sdLightning {
    0% { opacity: 0; }
    5% { opacity: 0.8; background: #fff; }
    10% { opacity: 0; }
    12% { opacity: 0.5; background: #fff; }
    15% { opacity: 0; }
    100% { opacity: 0; }
}
.sd-lightning-effect { position: absolute; inset: 0; z-index: 5; pointer-events: none; animation: sdLightning 10s infinite; border-radius: 24px;}

/* Rain */
@keyframes sdRain { 0% { background-position: 0 0; } 100% { background-position: 20px 100vh; } }
.sd-rain-effect {
    position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0.3;
    background-image: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,0.8));
    background-size: 2px 50px; animation: sdRain 0.5s linear infinite; border-radius: 24px;
}

/* Bubbles */
@keyframes sdBubbles { 0% { transform: translateY(100vh) scale(0.5); opacity: 0; } 50% { opacity: 1; } 100% { transform: translateY(-10vh) scale(1.5); opacity: 0; } }
.sd-bubbles-effect { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; border-radius: 24px; }
.sd-bubbles-effect::before, .sd-bubbles-effect::after {
    content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.1);
    animation: sdBubbles 5s infinite ease-in; left: 20%;
}
.sd-bubbles-effect::after { width: 40px; height: 40px; left: 80%; animation-duration: 7s; animation-delay: 2s; }

/* ==========================================================================
   Service Page (template-service.php)
   ========================================================================== */
.sd-breadcrumb { display: flex; align-items: center; gap: 10px; padding: 150px 0 0; font-size: 0.95rem; color: var(--sd-text-light); flex-wrap: wrap; }
.sd-breadcrumb a { color: var(--sd-text-light); transition: color 0.2s; }
.sd-breadcrumb a:hover { color: var(--sd-accent); }
.sd-breadcrumb-current { color: var(--sd-primary); font-weight: 700; }

.sd-service-hero { padding-top: 40px; }
.sd-service-hero h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }

.sd-service-article { max-width: 880px; margin: 0 auto; }
.sd-service-article .sd-service-intro { font-size: 1.2rem; color: var(--sd-text); margin-bottom: 30px; line-height: 1.9; }
.sd-service-article h2 { font-size: 1.9rem; margin: 45px 0 18px; color: var(--sd-primary); }
.sd-service-article p { line-height: 1.95; color: var(--sd-text-light); margin-bottom: 16px; font-size: 1.05rem; }

.sd-service-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.sd-service-gallery-item { padding: 10px; overflow: hidden; }
.sd-service-gallery-item img { width: 100%; height: 260px; object-fit: cover; border-radius: 12px; display: block; transition: transform 0.5s ease; }
.sd-service-gallery-item:hover img { transform: scale(1.05); }

.sd-process-list-simple { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sd-process-list-simple .sd-process-step { display: flex; align-items: flex-start; gap: 18px; cursor: default; }
.sd-process-list-simple .sd-process-num {
    flex-shrink: 0;
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-accent));
    color: #fff; font-weight: 800; font-size: 1.1rem;
}

.sd-service-closing { padding: 45px; text-align: center; }
.sd-service-closing h3 { font-size: 1.6rem; margin-bottom: 15px; color: var(--sd-primary); }
.sd-service-closing p { color: var(--sd-text-light); line-height: 1.9; max-width: 760px; margin: 0 auto; }

.sd-reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.sd-review-card { padding: 35px; }
.sd-review-stars { display: flex; gap: 4px; margin-bottom: 15px; }
.sd-review-stars svg { width: 18px; height: 18px; }
.sd-star-filled { fill: var(--sd-accent); }
.sd-star-empty { fill: rgba(0,0,0,0.15); }
.sd-review-card p { color: var(--sd-text); line-height: 1.8; margin-bottom: 15px; font-style: italic; }
.sd-review-card h5 { color: var(--sd-text-light); font-size: 0.95rem; font-weight: 600; }

.sd-faq-list { display: grid; gap: 18px; max-width: 880px; margin: 0 auto; }
.sd-faq-item { padding: 28px 32px; }
.sd-faq-item h4 { font-size: 1.15rem; margin-bottom: 10px; color: var(--sd-primary); }
.sd-faq-item p { color: var(--sd-text-light); line-height: 1.8; margin: 0; }

@media (max-width: 900px) {
    .sd-service-gallery { grid-template-columns: 1fr 1fr; }
    .sd-process-list-simple { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .sd-service-gallery { grid-template-columns: 1fr; }
    .sd-breadcrumb { padding: 110px 15px 0; }
}

/* ==========================================================================
   Blog: Archive Grid, Single Post, Comments, Page (home.php, archive.php,
   single.php, page.php, comments.php)
   ========================================================================== */
.sd-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    background: var(--sd-glass-bg);
    border: 1px solid var(--sd-glass-border);
    color: var(--sd-accent);
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.sd-section-title h1 { font-size: clamp(2.5rem, 4vw, 3.5rem); margin-bottom: 20px; }
.sd-blog-hero { padding-top: 40px; padding-bottom: 20px; }

/* Post card grid */
.sd-posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.sd-post-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.4s ease, box-shadow 0.4s ease; }
.sd-post-card:hover { transform: translateY(-8px); }
.sd-post-card-img-link { display: block; }
.sd-post-card-img { position: relative; height: 220px; overflow: hidden; }
.sd-post-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.sd-post-card:hover .sd-post-card-img img { transform: scale(1.08); }
.sd-post-card-badge {
    position: absolute; top: 16px; right: 16px;
    background: var(--sd-accent); color: #fff;
    font-size: 0.8rem; font-weight: 800;
    padding: 6px 14px; border-radius: 20px;
}
.sd-post-card-body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.sd-post-meta { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--sd-text-light); margin-bottom: 12px; flex-wrap: wrap; }
.sd-post-card-title { font-size: 1.3rem; margin-bottom: 12px; line-height: 1.5; }
.sd-post-card-title a { color: var(--sd-primary); transition: color 0.2s; }
.sd-post-card-title a:hover { color: var(--sd-accent); }
.sd-post-card-excerpt { color: var(--sd-text-light); line-height: 1.8; margin-bottom: 18px; flex: 1; }

/* Pagination */
.sd-pagination { display: flex; justify-content: center; margin-top: 60px; }
.sd-pagination .nav-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-pagination .page-numbers {
    display: flex; align-items: center; justify-content: center;
    min-width: 46px; height: 46px; padding: 0 14px;
    border-radius: 12px;
    background: var(--sd-glass-bg); border: 1px solid var(--sd-glass-border);
    color: var(--sd-primary); font-weight: 700;
    transition: 0.3s;
}
.sd-pagination .page-numbers:hover,
.sd-pagination .page-numbers.current {
    background: linear-gradient(135deg, var(--sd-primary), var(--sd-accent));
    color: #fff !important;
}

/* Single post hero */
.sd-single-hero h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); margin: 10px 0 18px; }
.sd-single-post-meta { justify-content: flex-start; margin-bottom: 30px; }
.sd-single-featured-img { max-width: 880px; margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: var(--sd-shadow-deep); }
.sd-single-featured-img img { width: 100%; height: auto; display: block; max-height: 480px; object-fit: cover; }

/* Article content (single.php / page.php reuse .sd-service-article typography) */
.sd-service-article img { max-width: 100%; height: auto; border-radius: 14px; }
.sd-service-article iframe,
.sd-footer-map iframe,
iframe[src*="google.com/maps"],
iframe[src*="maps.google"] {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 380px;
    border: 0;
    border-radius: 16px;
    margin: 25px 0;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

@media (max-width: 768px) {
    .sd-service-article iframe,
    .sd-footer-map iframe,
    iframe[src*="google.com/maps"],
    iframe[src*="maps.google"] {
        min-height: 240px !important;
        height: 280px !important;
        border-radius: 12px !important;
        margin: 16px 0 !important;
    }
}
.sd-service-article ul, .sd-service-article ol { color: var(--sd-text-light); line-height: 1.9; margin-bottom: 16px; padding-inline-start: 24px; }
.sd-service-article blockquote {
    border-right: 4px solid var(--sd-accent);
    background: var(--sd-glass-bg);
    padding: 20px 25px;
    border-radius: 12px;
    margin: 25px 0;
    color: var(--sd-primary);
    font-style: italic;
}

.sd-post-tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 35px 0; }
.sd-post-tag {
    padding: 8px 16px; border-radius: 20px;
    background: var(--sd-glass-bg); border: 1px solid var(--sd-glass-border);
    color: var(--sd-text-light); font-size: 0.9rem; transition: 0.3s;
}
.sd-post-tag:hover { color: var(--sd-accent); border-color: var(--sd-accent); }

.sd-author-box { display: flex; align-items: center; gap: 20px; padding: 30px; margin: 30px 0; }
.sd-author-box img { border-radius: 50%; flex-shrink: 0; }
.sd-author-box h4 { margin-bottom: 6px; color: var(--sd-primary); }
.sd-author-box p { color: var(--sd-text-light); margin: 0; line-height: 1.7; }

.sd-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 40px 0; }
.sd-post-nav-item a {
    display: block; padding: 22px 26px;
    background: var(--sd-glass-bg); border: 1px solid var(--sd-glass-border);
    border-radius: 16px; transition: 0.3s;
}
.sd-post-nav-item a:hover { background: rgba(255,255,255,0.9); transform: translateY(-3px); }
.sd-post-nav-item span { display: block; font-size: 0.85rem; color: var(--sd-text-light); margin-bottom: 6px; }
.sd-post-nav-item h5 { color: var(--sd-primary); font-size: 1.05rem; margin: 0; }
.sd-post-nav-next { text-align: left; }

/* Comments */
.sd-comments-area { margin-top: 50px; }
.sd-comments-title { font-size: 1.6rem; margin-bottom: 25px; }
.sd-comments-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 18px; }
.sd-comment { display: flex; gap: 18px; padding: 26px; }
.sd-comment-avatar img { border-radius: 50%; }
.sd-comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.sd-comment-author { font-weight: 800; color: var(--sd-primary); }
.sd-comment-date { font-size: 0.85rem; color: var(--sd-text-light); }
.sd-comment-content { color: var(--sd-text-light); line-height: 1.8; }
.sd-comment-awaiting { font-size: 0.85rem; color: var(--sd-accent); margin-bottom: 8px; }
.sd-comments-closed { color: var(--sd-text-light); }
.comment-reply-link { display: inline-block; margin-top: 10px; font-weight: 700; color: var(--sd-accent); font-size: 0.9rem; }
.children { list-style: none; padding-inline-start: 40px; margin-top: 18px; }

#respond { padding: 30px; border-radius: 20px; background: var(--sd-glass-bg); border: 1px solid var(--sd-glass-border); }
#respond .comment-reply-title { font-size: 1.4rem; margin-bottom: 20px; color: var(--sd-primary); }
#respond p { margin-bottom: 18px; }
#respond label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--sd-primary); }
#respond input[type="text"], #respond input[type="email"], #respond input[type="url"], #respond textarea {
    width: 100%; padding: 14px 16px; border-radius: 12px;
    border: 1px solid var(--sd-glass-border); background: #fff;
    font-family: inherit; font-size: 1rem; color: var(--sd-text);
}
#respond textarea { resize: vertical; }

/* Desktop vs Mobile Toggle Visibility */
.sd-desktop-only-toggle {
    display: inline-flex !important;
}
.sd-mobile-only-toggle {
    display: none !important;
}

@media (max-width: 768px) {
    .sd-desktop-only-toggle {
        display: none !important;
    }
    .sd-mobile-only-toggle {
        display: inline-flex !important;
    }
}

.sd-theme-toggle-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 30px;
    padding: 3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    width: 60px;
    height: 32px;
    position: relative;
}

.sd-toggle-track {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.sd-toggle-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    position: absolute;
    right: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.4);
}

.sd-icon-sun { display: none; }
.sd-icon-moon { display: inline-block; }

/* Light Mode State */
body.sd-light-mode .sd-toggle-thumb {
    transform: translateX(-28px);
    background: linear-gradient(135deg, #f59e0b, #ec4899);
}

body.sd-light-mode .sd-icon-sun { display: inline-block; }
body.sd-light-mode .sd-icon-moon { display: none; }

/* Light Mode Aesthetic Overrides */
body.sd-light-mode {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

body.sd-light-mode .sd-site-header {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.15) !important;
}

body.sd-light-mode .sd-logo h2 { color: #0f172a !important; }
body.sd-light-mode .sd-primary-nav a { color: #334155 !important; }
body.sd-light-mode .sd-primary-nav a:hover { color: #0ea5e9 !important; }

body.sd-light-mode .sd-glass-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(14, 165, 233, 0.2) !important;
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.12) !important;
    color: #1e293b !important;
}

body.sd-light-mode h1, 
body.sd-light-mode h2, 
body.sd-light-mode h3, 
body.sd-light-mode h4, 
body.sd-light-mode h5 {
    color: #0f172a !important;
}

body.sd-light-mode p {
    color: #475569 !important;
}

body.sd-light-mode .sd-mobile-nav-bar {
    background: rgba(255, 255, 255, 0.92) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.2) !important;
}

body.sd-light-mode .sd-mobile-nav-item {
    color: #64748b !important;
}

body.sd-light-mode .sd-mobile-nav-item.active {
    color: #0ea5e9 !important;
}

body.sd-light-mode .sd-mobile-menu-modal {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.97), rgba(241, 245, 249, 0.96)) !important;
    color: #0f172a !important;
}
body.sd-light-mode .sd-mobile-menu-modal .sd-menu-modal-nav a {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(14, 165, 233, 0.25) !important;
    color: #0f172a !important;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.1) !important;
}
body.sd-light-mode .sd-mobile-menu-modal .sd-menu-modal-nav a:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(168, 85, 247, 0.15)) !important;
    border-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
}
body.sd-light-mode .sd-mobile-menu-modal .sd-logo h2 {
    color: #0f172a !important;
}
body.sd-light-mode .sd-mobile-menu-modal .sd-menu-modal-close {
    color: #0f172a !important;
    background: rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}
body.sd-light-mode .sd-mini-icon {
    background: rgba(14, 165, 233, 0.12) !important;
    border-color: rgba(14, 165, 233, 0.25) !important;
}

body.sd-light-mode .sd-float-btn,
html.sd-light-mode .sd-float-btn {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.98)) !important;
    border: 1.5px solid rgba(14, 165, 233, 0.4) !important;
    box-shadow: 0 12px 35px rgba(14, 165, 233, 0.2), 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}
body.sd-light-mode .sd-float-btn:hover,
html.sd-light-mode .sd-float-btn:hover {
    background: #ffffff !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 15px 40px rgba(14, 165, 233, 0.35) !important;
}
body.sd-light-mode .sd-float-tooltip,
html.sd-light-mode .sd-float-tooltip {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #0f172a !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.2) !important;
}

/* ==========================================================================
   Mobile Floating Contact & Social Actions Positioning Offset & Scaling
   ========================================================================== */
@media (max-width: 768px) {
    .sd-floating-actions {
        position: fixed !important;
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
        left: 10px !important;
        gap: 8px !important;
        z-index: 99990 !important;
    }
    .sd-float-btn {
        width: 38px !important;
        height: 38px !important;
    }
    .sd-float-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    .sd-post-nav { grid-template-columns: 1fr; }
    .sd-post-nav-next { text-align: right; }
    .sd-author-box { flex-direction: column; text-align: center; }
    .sd-comment { flex-direction: column; }
}

/* ==========================================================================
   Smart Immersive Reading Mode (Auto-hide Header, Mobile Bar, & Actions)
   ========================================================================== */
.sd-site-header, 
.sd-mobile-nav-bar {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.35s ease !important;
}

body.sd-reading-mode .sd-site-header {
    transform: translateY(-140%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

body.sd-reading-mode .sd-mobile-nav-bar {
    transform: translateY(150%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Note: the floating action bar (WhatsApp/phone/email/map/social buttons)
   is intentionally NOT hidden in reading mode anymore — it used to fade out
   on every scroll-down, which made newly-enabled social icons look like
   they "appear then disappear". They now stay visible at all times. */

/* ==========================================================================
   Master Cinema-Grade Input Design System (Ultra-Large & High-Contrast)
   ========================================================================== */
.sd-input-group {
    margin-bottom: 22px;
    position: relative;
}

.sd-input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 800;
    font-size: 1rem;
    color: #f8fafc;
    letter-spacing: 0.2px;
}

.sd-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.sd-input-wrapper svg {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    fill: #a855f7;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 5;
}

/* Master Input Fields Style */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    min-height: 58px;
    padding: 16px 54px 16px 20px !important;
    border-radius: 16px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    color: #ffffff !important;
    border: 2px solid rgba(168, 85, 247, 0.4) !important;
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.5;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    -webkit-appearance: none;
    appearance: none;
}

textarea {
    min-height: 130px;
    padding-top: 18px !important;
}

/* Focus and Active States */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
    border-color: #c084fc !important;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.55), inset 0 0 10px rgba(168, 85, 247, 0.15) !important;
    background: rgba(15, 23, 42, 0.98) !important;
    transform: translateY(-2px);
}

.sd-input-wrapper:focus-within svg {
    fill: #c084fc !important;
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, 0.8));
    transform: translateY(-50%) scale(1.1);
}

/* Placeholder Style */
input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    font-weight: 500;
}

/* Light Mode Overrides */
body.sd-light-mode .sd-input-group label,
html.sd-light-mode .sd-input-group label {
    color: #0f172a !important;
}

body.sd-light-mode input[type="text"],
body.sd-light-mode input[type="email"],
body.sd-light-mode input[type="tel"],
body.sd-light-mode input[type="password"],
body.sd-light-mode input[type="number"],
body.sd-light-mode input[type="url"],
body.sd-light-mode select,
body.sd-light-mode textarea,
html.sd-light-mode input[type="text"],
html.sd-light-mode input[type="email"],
html.sd-light-mode input[type="tel"],
html.sd-light-mode input[type="password"],
html.sd-light-mode input[type="number"],
html.sd-light-mode input[type="url"],
html.sd-light-mode select,
html.sd-light-mode textarea {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 2px solid #0284c7 !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.1) !important;
}

body.sd-light-mode input:focus,
body.sd-light-mode select:focus,
body.sd-light-mode textarea:focus,
html.sd-light-mode input:focus,
html.sd-light-mode select:focus,
html.sd-light-mode textarea:focus {
    border-color: #0284c7 !important;
    box-shadow: 0 0 25px rgba(2, 132, 199, 0.4) !important;
    background: #ffffff !important;
}

body.sd-light-mode .sd-input-wrapper svg,
html.sd-light-mode .sd-input-wrapper svg {
    fill: #0284c7 !important;
}

body.sd-light-mode input::placeholder,
body.sd-light-mode textarea::placeholder,
html.sd-light-mode input::placeholder,
html.sd-light-mode textarea::placeholder {
    color: #64748b !important;
}
