:root {
    --bg-canvas: #020617;
    --surface-elevated: #0f172a;
    --cta-primary: #3b82f6;
    --cta-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-subtle: rgba(255, 255, 255, 0.08);
}
@keyframes bg-pan {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-canvas);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(37, 99, 235, 0.15), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(217, 119, 6, 0.1), transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(37, 99, 235, 0.1), transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(217, 119, 6, 0.1), transparent 50%);
    background-size: 200% 200%;
    animation: bg-pan 20s ease-in-out infinite;
    background-attachment: fixed;
    color: var(--text-secondary);
    overflow-x: hidden;
    scroll-behavior: smooth;
}
h1, h2, h3, h4 {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-primary);
}
.brand-script {
    font-family: 'Great Vibes', cursive;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    white-space: nowrap;
    padding: 0.1em 0.2em;
    line-height: 1.3;
    overflow: visible;
    margin-left: -0.1em;
}
.glass-surface,
.glass-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 2px 10px rgba(255, 255, 255, 0.02);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.glass-surface::before,
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    transition: all 1.2s ease;
    z-index: 1;
    pointer-events: none;
}
.glass-surface:hover::before,
.glass-card:hover::before {
    left: 150%;
    transition: all 1.4s ease-in-out;
}
.glass-surface:hover,
.glass-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(37, 99, 235, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 2px 10px rgba(255, 255, 255, 0.05);
    border-color: rgba(37, 99, 235, 0.4);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
}
@keyframes icon-float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}
.glass-surface:hover .icon-float,
.glass-card:hover .icon-float {
    animation: icon-float 2s ease-in-out infinite;
}
.hero-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
}
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cta-primary);
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}
.social-float-stack {
    position: fixed;
    bottom: 32px;
    right: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
}
.social-float-item {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}
.social-float-item:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}
.whatsapp-item {
    background: #25D366;
    animation: pulse-green 2s infinite;
}
.facebook-item { background: #1877F2; }
.linkedin-item { background: #0077B5; }
.instagram-item {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
@keyframes title-reveal {
    0% { opacity: 0; transform: translateY(30px) scale(0.95); letter-spacing: -0.05em; filter: blur(12px); }
    100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: normal; filter: blur(0); }
}
.animate-title {
    animation: title-reveal 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite;
}
.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 280px;
    border-radius: 24px;
    padding: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.dropdown-item:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    transform: translateX(5px);
}
.dropdown-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}
.dropdown-item:hover svg {
    transform: scale(1.2);
    opacity: 1;
}
.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: all 0.3s ease;
}
.mobile-nav-link:hover {
    padding-left: 10px;
    color: #2563eb;
}

#mobile-menu {
    background: #020617 !important;
    opacity: 1 !important;
    z-index: 100000 !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

#mobile-menu > .flex.flex-col {
    width: min(100%, 420px);
    background: #020617 !important;
}

#mobile-menu .space-y-4 > .grid {
    background: #0f172a !important;
    border: 1px solid rgba(148, 163, 184, 0.24) !important;
    border-radius: 18px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45) !important;
    padding: 12px !important;
}

#mobile-menu .space-y-4 > .grid > a {
    background: #111827 !important;
}

#mobile-menu .social-float-stack,
#mobile-menu + .social-float-stack {
    display: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    transition: all 0.3s ease;
}
.text-text-tertiary {
    color: var(--text-secondary);
}

.service-video-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.service-video-switcher {
    display: none !important;
}

/* Modern Video Carousel Styling */
.video-carousel-container {
    position: relative;
    width: 100%;
}

.video-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.video-carousel-arrow:hover {
    background: #2563eb;
    border-color: rgba(37, 99, 235, 0.5);
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.5);
    color: #ffffff;
}

.video-carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.video-carousel-arrow.prev {
    left: -26px;
}

.video-carousel-arrow.next {
    right: -26px;
}

@media (max-width: 640px) {
    .video-carousel-arrow.prev {
        left: 10px;
    }
    .video-carousel-arrow.next {
        right: 10px;
    }
    .video-carousel-arrow {
        width: 44px;
        height: 44px;
        background: rgba(15, 23, 42, 0.8);
    }
}

/* Instagram-style Top Indicators */
.video-carousel-indicators {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 30;
    pointer-events: none;
}

.video-carousel-indicator-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.video-carousel-indicator-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: #3b82f6;
    border-radius: 99px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-carousel-indicator-bar.active .video-carousel-indicator-bar-fill {
    width: 100%;
}


.service-video-tab {
    flex: 1 1 auto;
    min-width: 80px;
    max-width: 130px;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.78);
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.15;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.service-video-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.5);
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
}

.service-video-tab.is-active {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.75);
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

/* Video frame fade transition */
[data-service-video-frame] {
    position: relative;
    width: 100%;
}
[data-service-video-frame].fading {
    opacity: 0;
    transition: opacity 0.2s ease;
}
[data-service-video-frame].visible {
    opacity: 1;
    transition: opacity 0.3s ease;
}
/* Loading shimmer inside the video frame */
[data-service-video-frame]:empty::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: inherit;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modern Date Input Styling */
input[type="date"] {
    color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}
@media (max-width: 1023px) {
    .service-top-section {
        gap: 2rem;
        margin-top: 1.5rem;
    }

    .service-top-section .service-video {
        order: -1;
    }

    .service-top-section .service-copy {
        order: 1;
    }

    .service-video-switcher {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .service-video-tab {
        min-width: 72px;
        max-width: none;
        flex: 1 1 72px;
    }
}
