/* Global Styles & Variables */
:root {
    --primary: #94122c;
    --primary-glow: rgba(148, 18, 44, 0.7);
    --secondary: #100b07;
    --accent: #dbdfe0;
    --bg-dark: #100b07;
    --bg-light: #f5f7f8;
    --text-main: #dbdfe0;
    --text-muted: rgba(219, 223, 224, 0.7);
    --text-dark: #100b07;
    --white: #ffffff;
    --glass: rgba(16, 11, 7, 0.7);
    --glass-border: rgba(219, 223, 224, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    --bg-main: #000000;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-hover-bg: rgba(255, 255, 255, 0.05);
    --input-bg: rgba(255, 255, 255, 0.05);
    --logo-filter: brightness(0) invert(1);
}

[data-theme="light"] {
    --bg-main: #f5f7f8;
    --text-main: #100b07;
    --text-muted: rgba(16, 11, 7, 0.7);
    --white: #100b07;
    --glass: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(16, 11, 7, 0.1);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-hover-bg: rgba(255, 255, 255, 1);
    --input-bg: rgba(0, 0, 0, 0.03);
    /* الشعار بلون سنيم #94122c في الثيم الأبيض */
    --logo-filter: brightness(0) saturate(100%) invert(13%) sepia(96%) saturate(2000%) hue-rotate(330deg) brightness(85%) contrast(115%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: transparent;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    text-align: right;
}

/* Header & Navigation */
header {
    background: var(--glass);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    position: fixed;
    width: 88%;
    max-width: 1100px;
    top: 45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    transition: var(--transition);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

nav {
    width: 100%;
    padding: 0.8rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition);
    margin-right: 15px;
}

.logo img {
    height: 38px;
    width: auto;
    object-fit: contain;
    filter: var(--logo-filter);
    transition: filter 0.4s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ========================
   Luxurious Navigation Toggle
   ======================== */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.hamburger-bars {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 20px;
}

.bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--white);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 4px;
    margin: 0;
    padding: 0;
    transform-origin: center;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
    background-color: var(--primary);
}

.menu-toggle.active .bar:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
    background-color: var(--primary);
}

.menu-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.menu-toggle:hover .bar {
    background-color: #fff;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ========================
   Inline Header Menu
   ======================== */
.nav-links {
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    
    /* Toggle mechanic for desktop */
    opacity: 0;
    visibility: hidden;
    max-width: 0;
    overflow: hidden;
    transition: max-width 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease 0.1s;
    background: transparent;
    height: auto;
    pointer-events: none;
}

.nav-links.active {
    opacity: 1;
    visibility: visible;
    max-width: 900px;
    pointer-events: all;
    margin-left: 20px;
}

.nav-links li {
    margin: 0;
    opacity: 1 !important;
    transform: none !important;
    white-space: nowrap;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 0;
}

.nav-links a:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.nav-links .active-page {
    color: var(--primary);
}

.nav-links .cta-btn-nav {
    display: inline-block;
    width: auto;
    text-align: center;
    margin-top: 0;
    font-size: 0.95rem;
    font-weight: 700 !important;
    padding: 0.7rem 1.8rem;
    background: var(--primary);
    color: #fff !important;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-links .cta-btn-nav:hover {
    background-color: #b11634;
    transform: translateY(-3px);
}

/* Light Theme Overrides */
[data-theme="light"] .nav-links {
    background: rgba(245, 247, 248, 0.98);
}

[data-theme="light"] .menu-toggle {
    background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .bar {
    background-color: #100b07;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    right: 0;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Removed old menu toggle styles */

.cta-btn-nav {
    background-color: var(--primary);
    color: var(--white) !important;
    padding: 0.7rem 1.8rem;
    border-radius: 12px;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.cta-btn-nav:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow);
    background-color: #b11634;
}

.cta-btn-nav::after {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background-color: transparent;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
}

.mouse-glow {
    position: fixed;
    width: 90vmax;
    height: 90vmax;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 65%);
    pointer-events: none;
    z-index: -1;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    filter: blur(80px);
    transition: transform 0.15s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0.8;
}

.mesh-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.mesh-ball {
    position: absolute;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(120px);
    border-radius: 50%;
    opacity: 0.35;
}

.ball-1 {
    top: -20%;
    left: -10%;
    animation: floatMesh 20s infinite alternate;
}

.ball-2 {
    bottom: -20%;
    right: -10%;
    animation: floatMesh 25s infinite alternate-reverse;
    background: radial-gradient(circle, rgba(148, 18, 44, 0.6) 0%, transparent 70%);
}

.ball-3 {
    top: 40%;
    left: 30%;
    width: 500px;
    height: 500px;
    animation: floatMesh 30s infinite alternate;
    background: radial-gradient(circle, rgba(148, 18, 44, 0.4) 0%, transparent 70%);
}

@keyframes floatMesh {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(150px, 150px) scale(1.3);
    }
}

.dynamic-text {
    color: #94122c !important;
    -webkit-text-fill-color: #94122c !important;
    /* Ensure it's not transparent from parent h1 */
    position: relative;
    display: inline-block;
    min-width: 250px;
    text-align: right;
    font-weight: 800;
    z-index: 10;
}

.dynamic-text::after {
    content: '|';
    margin-right: 5px;
    color: #94122c;
    animation: blink 0.7s infinite;
    display: inline-block;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}





.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 3;
    margin-top: 10vh;
}

.hero h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 2rem;
    line-height: 1.1;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 30%, var(--accent) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    margin-bottom: 3.5rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-inline: auto;
}

.main-cta {
    display: inline-block;
    padding: 1.2rem 4rem;
    background-color: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-weight: 800;
    border-radius: 12px;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 10px 30px var(--primary-glow);
    position: relative;
    overflow: hidden;
}

.main-cta:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px var(--primary-glow);
    background-color: #b11634;
}

/* Sanim Interactive Line */
.sanim-line-container {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 100%;
    height: 100px;
    pointer-events: none;
    z-index: 5;
}

#sanimSVG {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: all;
    /* Line area should catch mouse events */
}

#sanimPath {
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    fill: none;
    filter: drop-shadow(0 0 8px var(--primary-glow));
    transition: stroke 0.3s ease;
}

.sanim-line-container:hover #sanimPath {
    stroke: #ff3366;
    stroke-width: 3;
}

/* Sections Global */
section {
    padding: 8rem 2rem;
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
    z-index: 3;
}

.section-title h2 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
    font-weight: 800;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    width: 40px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3.5rem 2.5rem;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-card:hover {
    transform: translateY(-12px);
    background: var(--card-hover-bg);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.about-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, #b11634 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 20px var(--primary-glow);
    color: var(--white);
}

.about-icon svg {
    width: 40px;
    height: 40px;
}

.about-card h3 {
    margin-bottom: 1.2rem;
    color: var(--white);
    font-size: 1.6rem;
    font-weight: 700;
}

.about-card p {
    color: var(--text-muted);
}

/* Services Section */
.services {
    background-color: transparent;
    padding-bottom: 12rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    padding: 3.5rem 2.5rem;
    border-radius: 30px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    z-index: -1;
    pointer-events: none;
}

.service-card:hover {
    transform: translateY(-15px);
    background: var(--card-hover-bg);
    border-color: rgba(148, 18, 44, 0.4);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.service-card:hover::before {
    width: 400px;
    height: 400px;
    opacity: 0.15;
}

.service-icon {
    width: 75px;
    height: 75px;
    background: var(--card-bg);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.service-card:hover .service-icon {
    background-color: var(--primary);
    color: var(--white);
    transform: scale(1.1) rotate(8deg);
    box-shadow: 0 15px 30px var(--primary-glow);
    border-color: transparent;
}

.service-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.7rem;
    color: var(--white);
    font-weight: 800;
    letter-spacing: -0.5px;
    transition: var(--transition);
}

.service-card:hover h3 {
    color: var(--primary);
}

.service-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
    transition: var(--transition);
}

.service-card:hover p {
    color: var(--white);
}

/* Add a subtle index number to cards */
.service-card::after {
    display: none;
    /* Removed for cleaner look, but can be added if needed */
}


/* Contact Section */
.contact {
    background-color: transparent;
}

.contact-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 4rem;
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--white);
    font-size: 1rem;
}

.form-control {
    width: 100%;
    padding: 1.2rem;
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--white);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--card-bg);
    box-shadow: 0 0 15px var(--primary-glow);
}

.btn-submit {
    width: 100%;
    padding: 1.2rem;
    background-color: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px var(--primary-glow);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-3px);
    background-color: #b11634;
    box-shadow: 0 15px 30px var(--primary-glow);
}

.message-box {
    margin-top: 1.5rem;
    padding: 1.2rem;
    border-radius: 12px;
    display: none;
    text-align: center;
    font-weight: 700;
}

.success-message {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    display: block;
    animation: slideDown 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: block;
    animation: slideDown 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Base state for animations */
.animate-on-scroll {
    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);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Floating Animation */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 4s ease-in-out infinite;
}

/* Works Section */
.works {
    background-color: transparent;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 5rem;
    margin-bottom: 5rem;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 500;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1.8rem;
    max-width: 1300px;
    margin: 0 auto;
}

.work-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    height: 360px;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.work-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(148,18,44,0.2);
    border-color: rgba(148,18,44,0.3);
}

/* زر عرض جميع الأعمال */
.works-cta {
    text-align: center;
    margin-top: 4rem;
}

.btn-works-more {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem 3rem;
    border: 2px solid var(--primary);
    border-radius: 100px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.btn-works-more:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--primary-glow);
}

.btn-works-more svg {
    transition: transform 0.3s ease;
}

.btn-works-more:hover svg {
    transform: translateX(-4px);
}

.work-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    transition: var(--transition);
}

.work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 3rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    transform: translateY(20px);
    opacity: 0;
    transition: var(--transition);
}

.work-card:hover .work-overlay {
    transform: translateY(0);
    opacity: 1;
}

.work-card:hover .work-image-placeholder {
    transform: scale(1.05);
}

.work-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.work-overlay p {
    color: rgba(255, 255, 255, 0.75);
}

/* Clients Section */
.clients {
    padding-bottom: 10rem;
    overflow: hidden;
}

.clients-slider {
    position: relative;
    width: 100%;
    padding: 2rem 0;
}

.clients-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: scrollClients 30s linear infinite;
}

.client-logo {
    width: 200px;
    height: 100px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    overflow: hidden;
}

.client-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.6;
    transition: var(--transition);
    /* For SVGs to mix well with dark mode, adjust if needed */
    filter: grayscale(100%) brightness(2);
}

.client-logo:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.client-logo:hover img {
    opacity: 1;
    filter: grayscale(0) brightness(1);
    transform: scale(1.1);
}

@keyframes scrollClients {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

[dir="rtl"] .clients-track {
    animation: scrollClientsRTL 30s linear infinite;
}

@keyframes scrollClientsRTL {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(50%);
    }
}

/* Footer */
.main-footer {
    background-color: #080504;
    padding: 8rem 4rem 3rem;
    position: relative;
    overflow: hidden;
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 4rem;
    max-width: 1300px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.footer-heading {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
}

.footer-links-col {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.link-group h4 {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.link-group ul {
    list-style: none;
}

.link-group li {
    margin-bottom: 1rem;
}

.link-group a {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
    opacity: 0.7;
}

.link-group a:hover {
    opacity: 1;
    color: var(--primary);
    transform: translateX(-5px);
    display: inline-block;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1300px;
    margin: 4rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

.pill-btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pill-btn:hover {
    background: var(--white);
    color: var(--bg-dark);
}

.footer-bg-text {
    position: absolute;
    bottom: -10%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    pointer-events: none;
    line-height: 0.8;
    text-transform: uppercase;
}

.sanim-path {
    stroke: var(--primary);
    stroke-width: 1.5;
    stroke-linecap: round;
    fill: none;
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

/* Floating WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        width: 88%;
        top: 35px;
        border-radius: 100px;
    }

    nav {
        padding: 0.8rem 1.5rem;
    }

    .logo img {
        height: 32px;
    }

    .logo {
        margin-right: 8px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        max-width: 100% !important;
        background: var(--glass);
        backdrop-filter: blur(25px) saturate(180%);
        -webkit-backdrop-filter: blur(25px) saturate(180%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2.5rem 0;
        border-radius: 0 0 24px 24px;
        box-shadow: 0 20px 50px rgba(0,0,0,0.5);
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-top: none;
        
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.4s ease;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        margin-left: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 2rem;
    }

    .works-grid {
        grid-template-columns: 1fr;
    }

    .work-card {
        height: 300px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    /* Mobile Menu Button - Moved to global */
    
    /* Mobile Nav - Moved to global */

    /* Footer Responsive */
    .main-footer {
        padding: 5rem 1.5rem 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-heading {
        font-size: 2.2rem;
    }

    .footer-links-col {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-bg-text {
        font-size: 40vw;
        bottom: 5%;
    }

    .link-group h4 {
        margin-bottom: 1.2rem;
    }
}

/* Base state for animations */
.animate-on-scroll {
    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);
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (min-width: 769px) {
    .menu-toggle {
        display: flex;
        cursor: pointer;
        z-index: 1001;
    }
}

/* ========================
   Theme Toggle Button
   ======================== */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    padding: 0;
    margin: 0;
}

[data-theme="light"] .nav-links::before {
    background: rgba(0,0,0,0.1);
}

.nav-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.nav-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 901px) {
    .nav-menu-overlay {
        display: none !important;
    }
}

.theme-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--card-hover-bg);
    transform: rotate(20deg) scale(1.08);
}

/* Show sun in dark mode, moon in light mode */
html:not([data-theme="light"]) .theme-toggle .moon-icon { display: none; }
html:not([data-theme="light"]) .theme-toggle .sun-icon  { display: block; }
[data-theme="light"] .theme-toggle .sun-icon  { display: none; }
[data-theme="light"] .theme-toggle .moon-icon { display: block; }

/* ========================
   Light Mode Overrides
   ======================== */
[data-theme="light"] body {
    background-color: transparent;
    color: var(--text-main);
}

[data-theme="light"] .hero {
    color: var(--text-main);
}

[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, #100b07 30%, #3d2b1f 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .hero p {
    color: var(--text-muted);
}

[data-theme="light"] .mesh-ball {
    opacity: 1;
    mix-blend-mode: normal;
    background: radial-gradient(circle, rgba(148, 18, 44, 0.25) 0%, rgba(148, 18, 44, 0) 70%);
}

[data-theme="light"] .ball-2 {
    background: radial-gradient(circle, rgba(148, 18, 44, 0.35) 0%, rgba(148, 18, 44, 0) 70%);
}

[data-theme="light"] .ball-3 {
    background: radial-gradient(circle, rgba(148, 18, 44, 0.2) 0%, rgba(148, 18, 44, 0) 70%);
}

[data-theme="light"] .mouse-glow {
    opacity: 1;
    mix-blend-mode: normal;
    background: radial-gradient(circle, rgba(148, 18, 44, 0.3) 0%, rgba(148, 18, 44, 0) 65%);
}

[data-theme="light"] .dynamic-text {
    color: var(--primary) !important;
    -webkit-text-fill-color: var(--primary) !important;
}

[data-theme="light"] .main-footer {
    background-color: #e8eaeb;
    border-top: 1px solid rgba(0,0,0,0.08);
    color: var(--text-main);
}

[data-theme="light"] .footer-heading,
[data-theme="light"] .link-group a,
[data-theme="light"] .footer-bottom p {
    color: #100b07;
}

[data-theme="light"] .footer-bg-text {
    color: rgba(0,0,0,0.04);
}

[data-theme="light"] .footer-bottom {
    border-top-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .pill-btn {
    border-color: rgba(0,0,0,0.2);
    color: #100b07;
}

[data-theme="light"] .pill-btn:hover {
    background: #100b07;
    color: #fff;
}

[data-theme="light"] .section-title h2 {
    color: #100b07;
}

[data-theme="light"] .work-image-placeholder {
    background: linear-gradient(135deg, #d8dde0 0%, #c4cdd2 100%);
    color: #999;
}

[data-theme="light"] .client-logo:hover {
    background: rgba(148, 18, 44, 0.05);
}

[data-theme="light"] .client-logo img {
    filter: grayscale(100%) brightness(0.4);
}

[data-theme="light"] .client-logo:hover img {
    filter: grayscale(0) brightness(1);
}

[data-theme="light"] .about-card h3,
[data-theme="light"] .service-card h3 {
    color: #100b07;
}

[data-theme="light"] .form-group label {
    color: #100b07;
}

[data-theme="light"] .form-control {
    color: #100b07;
}

[data-theme="light"] .form-control::placeholder {
    color: rgba(16, 11, 7, 0.4);
}

[data-theme="light"] .nav-links a {
    color: rgba(16, 11, 7, 0.7);
}

[data-theme="light"] .nav-links a:hover {
    color: var(--primary);
}

/* Mobile nav light mode */
[data-theme="light"] .nav-links {
    background-color: #f5f7f8;
}

/* ظل الهيدر أخف في الثيم الأبيض */
[data-theme="light"] header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* النص فوق الأزرار العنابية يكون أبيض في الثيم الأبيض */
[data-theme="light"] .cta-btn-nav {
    color: #ffffff !important;
}

[data-theme="light"] .main-cta {
    color: #ffffff;
}

[data-theme="light"] .btn-submit {
    color: #ffffff;
}

[data-theme="light"] .about-icon {
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(148, 18, 44, 0.15);
}

/* Make service icon white on hover and soften its shadow */
[data-theme="light"] .service-card:hover .service-icon {
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(148, 18, 44, 0.2);
}

/* Soften main card shadows on hover */
[data-theme="light"] .service-card:hover,
[data-theme="light"] .about-card:hover,
[data-theme="light"] .work-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.06);
}

/* Soften button shadows */
[data-theme="light"] .main-cta,
[data-theme="light"] .btn-submit,
[data-theme="light"] .cta-btn-nav {
    box-shadow: 0 4px 12px rgba(148, 18, 44, 0.15);
}

[data-theme="light"] .main-cta:hover,
[data-theme="light"] .btn-submit:hover,
[data-theme="light"] .cta-btn-nav:hover,
[data-theme="light"] .btn-works-more:hover {
    box-shadow: 0 8px 20px rgba(148, 18, 44, 0.2);
}

/* Soften container shadows */
[data-theme="light"] .contact-container {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* ========================
   Work Card as Link fix
   ======================== */
a.work-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

a.work-card:hover .work-image-placeholder {
    transform: scale(1.05);
}

a.work-card:hover .work-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* ========================
   Project Detail Page
   ======================== */
.project-hero {
    min-height: 60vh;
    display: flex;
    align-items: flex-end;
    padding: 160px 2rem 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
}

.project-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #1a0a10 0%, #0a0608 100%);
    z-index: -1;
}

[data-theme="light"] .project-hero-bg {
    background: linear-gradient(135deg, #e8d0d5 0%, #ccc3c5 100%);
}

.project-hero-content {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}

.project-tag {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.4rem 1.2rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.project-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
    line-height: 1.15;
}

[data-theme="light"] .project-hero-title {
    color: #100b07;
}

.project-hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
}

[data-theme="light"] .project-hero-sub {
    color: rgba(16,11,7,0.7);
}

.project-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 2rem;
}

.project-meta-bar {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 4rem;
}

.project-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.meta-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 600;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
}

[data-theme="light"] .meta-value {
    color: #100b07;
}

.project-images-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.project-images-grid .img-main {
    grid-column: 1 / -1;
}

.project-img-placeholder {
    width: 100%;
    height: 380px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.project-img-placeholder:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(148,18,44,0.15);
}

.project-img-placeholder.small {
    height: 250px;
}

.project-description {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-bottom: 5rem;
}

.desc-heading {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

[data-theme="light"] .desc-heading {
    color: #100b07;
}

.desc-text {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.project-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
}

.sidebar-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card ul {
    list-style: none;
    padding: 0;
}

.sidebar-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-card ul li:last-child {
    border-bottom: none;
}

.sidebar-card ul li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 800;
    font-size: 0.8rem;
}

.project-results {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: var(--transition);
}

.result-card:hover {
    border-color: var(--primary);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(148,18,44,0.15);
}

.result-number {
    display: block;
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.result-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.project-nav-btns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 3rem;
    border-top: 1px solid var(--glass-border);
    gap: 1rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateX(-4px);
}

@media (max-width: 768px) {
    .project-images-grid {
        grid-template-columns: 1fr;
    }
    .project-description {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .project-results {
        grid-template-columns: 1fr;
    }
    .project-meta-bar {
        gap: 1.5rem;
    }
    .project-nav-btns {
        flex-direction: column;
    }
}