html {
    scroll-behavior: smooth;
}

:root {
    --primary: #0ea5e9;
    --accent: #f97316;
    --dark: #020617;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.08);
    --glow: 0 0 20px rgba(14, 165, 233, 0.5);
    --font-main: 'Cairo', sans-serif;
    --brand-red: #7A0D0B;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Changa', sans-serif;
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    background: var(--dark);
    font-family: var(--font-main);
    color: #fff;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--accent));
    border-radius: 5px;
    border: 2px solid var(--dark);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Selection Color */
::selection {
    background: var(--primary);
    color: white;
}

/* Background */
.fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('assets/hero_bg_new.webp');
    background-size: cover;
    background-position: center left;
    z-index: -2;
}

.fixed-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Darker on the right for text readability, clear on the left for the bag */
    background: linear-gradient(to left, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.4) 50%, transparent 100%);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 10px 30px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 10px;
    /* Base gap for small headers */
}

@media (max-width: 480px) {
    .navbar {
        padding: 5px 15px;
        top: 10px;
    }

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

    .lang-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
}

.nav-brand-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    width: 100%;
    top: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.95rem;
    transition: 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
}

.btn-contact {
    background: linear-gradient(90deg, var(--primary), #3b82f6);
    color: white !important;
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
}

.nav-logo {
    height: 45px !important;
    width: auto !important;
    display: block;
}

.logo-container {
    color: var(--brand-red);
    text-decoration: none;
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
    direction: ltr !important;
    unicode-bidi: isolate;
}

#logo-letter-m {
    color: var(--brand-red);
    display: inline-block;
}

.logo-container:hover {
    color: var(--primary);
}

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    background-image: url('assets/factory_bg.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.7) 40%, rgba(2, 6, 23, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 40px;
    gap: 50px;
}

.hero-text {
    flex: 1;
    text-align: right;
    position: relative;
    z-index: 10;
}

.hero-subtitle {
    max-width: 600px;
    color: #ffffff !important;
    font-weight: 700;
    line-height: 1.6;
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #bebebe,
        0 0 15px #ffffff,
        0 0 25px rgba(255, 255, 255, 0.6),
        0 5px 15px rgba(0, 0, 0, 0.3);
    opacity: 1 !important;
}

.hero-slogan {
    color: #ffffff !important;
    font-weight: 800;
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #bebebe,
        0 0 15px #ffffff,
        0 0 30px rgba(255, 255, 255, 0.7),
        0 5px 15px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
    margin-bottom: 20px;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    perspective: 1000px;
}

.hero-image-3d {
    width: 100%;
    max-width: 600px;
    animation: float3D 6s ease-in-out infinite;
    transform-style: preserve-3d;
}

@keyframes float3D {

    0%,
    100% {
        transform: translateY(0) rotateY(-5deg) rotateX(2deg);
    }

    50% {
        transform: translateY(-25px) rotateY(5deg) rotateX(-2deg);
    }
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #c9c9c9,
        0 3px 0 #bbb,
        0 4px 0 #b9b9b9,
        0 0 20px rgba(255, 255, 255, 0.5),
        0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-logo-small {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    background: white;
    /* Contrast for the transparent parts */
}

/* Fallback for oversized logo bug */
.hero-logo-large {
    width: 200px;
    height: auto;
    border-radius: 50%;
}

.btn-glow {
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Grid-3D */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 0 20px;
}

.card-3d {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: neonPulse 4s infinite ease-in-out;
    cursor: pointer;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--primary), transparent 30%);
    animation: rotateGlow 6s linear infinite;
    opacity: 0.2;
    z-index: -1;
}

.card-3d:hover {
    transform: translateY(-15px) rotateX(10deg) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(14, 165, 233, 0.3);
    z-index: 10;
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
        border-color: var(--border);
    }

    50% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
        border-color: var(--primary);
    }
}

.vacuum-anim {
    animation: vacuumPulse 3s infinite ease-in-out !important;
}

@keyframes vacuumPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
    }

    50% {
        transform: scale(0.97) rotateZ(0.5deg);
        box-shadow: 0 0 30px rgba(14, 165, 233, 0.4);
        border-color: var(--accent);
    }
}

.card-image {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    object-fit: cover;
    margin-bottom: 20px;
}

/* About Split */
.about-split {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 100px 20px;
}

.about-text {
    flex: 1;
    text-align: right;
    padding-left: 50px;
    /* Space from visual */
}

/* New About Grid Points */
.about-grid-points {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.point-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #ddd;
}

.about-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modern Straight Image Container */
.about-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    background: #000;
}

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

.about-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.5s ease;
}

.about-image-wrapper:hover img {
    transform: scale(1.05);
}

.image-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(14, 165, 233, 0.1) 100%);
    pointer-events: none;
    z-index: 2;
}

/* Features Container */
.features-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 20px;
}

.feature-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 250px;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.feature-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmerSweep 3s infinite;
}

@keyframes shimmerSweep {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

.feature-pill:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--accent);
    transform: scale(1.05) translateX(-5px);
    box-shadow: -10px 0 20px rgba(249, 115, 22, 0.2);
}

.feature-pill i {
    font-size: 1.8rem;
    color: var(--accent);
    transition: 0.3s;
}

.feature-pill:hover i {
    transform: rotate(15deg) scale(1.2);
    filter: drop-shadow(0 0 10px var(--accent));
}

/* Clients */
/* Clients Marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    -webkit-mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
    mask-image: linear-gradient(to right, transparent, black 20%, black 80%, transparent);
}

.marquee-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: scrollMarquee 20s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 20px));
    }

    /* Scrolls half the track (since duplicated) */
}

/* RTL Support for Marquee */
html[dir="rtl"] .marquee-track {
    animation: scrollMarqueeRTL 20s linear infinite;
}

@keyframes scrollMarqueeRTL {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(50% + 20px));
    }
}

.client-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.5);
    padding: 15px 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    transition: 0.3s;
    -webkit-user-select: none;
    user-select: none;
}

.client-logo:hover {
    color: white;
    border-color: var(--primary);
    background: rgba(14, 165, 233, 0.1);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.client-logo.brand-pizzapop {
    color: #ffcc00;
    /* Yellow */
    border-color: rgba(235, 33, 46, 0.4);
    /* Faded Red */
    background: rgba(235, 33, 46, 0.05);
}

.client-logo.brand-pizzapop:hover {
    color: #fff;
    background: #eb212e;
    /* Pizza Pop Red */
    border-color: #eb212e;
    box-shadow: 0 0 20px rgba(235, 33, 46, 0.4);
}

.client-logo.brand-btech {
    color: #0056b3;
    /* B-tech Blue */
    border-color: rgba(0, 86, 179, 0.4);
}

.client-logo.brand-btech:hover {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
    box-shadow: 0 0 20px rgba(0, 86, 179, 0.4);
}

.client-logo.brand-tembo {
    border-color: rgba(249, 115, 22, 0.4);
    color: #f97316;
    /* Tembo Orange-ish */
}

.client-logo.brand-tembo:hover {
    background: #f97316;
    color: #fff;
    border-color: #f97316;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.client-logo.brand-egyptfood {
    color: #ffffff;
    border-color: rgba(0, 102, 178, 0.4);
    /* Egypt Foods Blue */
}

.client-logo {
    font-size: 1.2rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.6);
    padding: 10px 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
    transition: 0.3s;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 90px;
    overflow: hidden;
    flex-shrink: 0;
}

.hero-slogan {
    color: #ffffff;
    font-weight: 900;
    font-size: 4rem;
    /* Massive Size */
    margin-top: 15px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9);
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
    /* Graphic Design Style Stroke Effect */
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.2);
}

.client-logo.brand-pizzapop {
    background: #004aad;
    /* Pizza Bob Blue background */
}

.client-logo.brand-btech {
    background: #000000;
    /* B-tech Black background */
}

.client-logo.brand-egyptfood {
    background: #0056b3;
    /* Egypt Foods Blue background */
}

.client-logo:has(.client-img) {
    padding: 5px;
    border-color: rgba(255, 255, 255, 0.2);
}

.client-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full logo is visible */
    display: block;
    transition: transform 0.5s ease;
}

.client-logo:hover .client-img {
    transform: scale(1.1);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    /* Switch to left in RTL automatically via layout or specific override if needed */
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: 0.3s;
    text-decoration: none;
    animation: pulseWhatsapp 2s infinite;
}

html[dir="rtl"] .whatsapp-float {
    left: 30px;
    right: auto;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1ebe57;
}

@keyframes pulseWhatsapp {
    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);
    }
}

/* Footer Minimal */
.footer-minimal {
    border-top: 1px solid var(--border);
    padding: 60px 0 20px;
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 30px;
    display: block;
    color: var(--brand-red);
}

.footer-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.footer-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    color: #94a3b8;
}

.footer-item i {
    color: var(--primary);
    margin-top: 5px;
}

.contact-links-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.contact-link:hover {
    color: #fff;
    background: rgba(14, 165, 233, 0.1);
    border-color: var(--primary);
    transform: translateX(-5px);
}

.contact-link i {
    font-size: 0.85rem;
    color: var(--primary);
}

html[dir="ltr"] .contact-link:hover {
    transform: translateX(5px);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--border);
}

.social-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.social-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 0 15px rgba(24, 119, 242, 0.5);
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #cc2366;
    box-shadow: 0 0 15px rgba(220, 39, 67, 0.5);
}

.social-btn.tiktok:hover {
    background: #000000;
    border-color: #00f2ea;
    box-shadow: 3px 3px 0 #ff0050, -3px -3px 0 #00f2ea;
}

.social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.5);
}

.qr-img {
    width: 80px;
    opacity: 0.8;
}

/* Utilities */
.section-padding {
    padding: 100px 0;
}

.menu-icon {
    color: white;
    font-size: 1.5rem;
}

.text-lg {
    font-size: 1.2rem;
}

.text-xl {
    font-size: 2rem;
}

.text-muted-light {
    color: #94a3b8;
}

.text-accent {
    color: var(--accent);
}

.font-bold {
    font-weight: 900;
}

.mt-10 {
    margin-top: 10px;
}

.mt-15 {
    margin-top: 15px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.opacity-50 {
    opacity: 0.5;
}

.text-sm {
    font-size: 0.85rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

/* Responsive */
@media (max-width: 992px) {

    .hero-content,
    .about-split {
        flex-direction: column;
        text-align: center;
    }

    .hero-text,
    .about-text {
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
    }

    .navbar {
        width: 95%;
        padding: 10px 20px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        text-align: center;
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

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

/* Small Screens */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    .hero-slogan {
        font-size: 1.1rem !important;
        margin-top: 15px;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 20px;
    }

    .navbar {
        width: 95% !important;
        padding: 5px 12px !important;
        gap: 5px !important;
    }

    .logo-container {
        font-size: 0.9rem !important;
    }

    .lang-btn {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
    }

    #eagle-mascot,
    .eagle-container {
        display: none !important;
    }

    .grid-3d {
        grid-template-columns: 1fr;
        /* Force single column */
    }

    #eagle-mascot {
        width: 50px;
        /* Resize eagle for mobile */
    }
}

/* Loader Transition Styles */
.loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.loader-bg {
    position: absolute;
    inset: 0;
    background: var(--dark);
    z-index: -1;
    transition: opacity 0.8s ease;
}

.loader-bar-container {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.5s;
}

#intro-logo {
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    /* Bouncy move effect */
    z-index: 10;
}

/* --- UX Improvements --- */

/* 1. Products Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid var(--primary);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    display: flex;
    overflow: hidden;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    /* RTL aware users might need left, but stick to standard for now */
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

html[dir="rtl"] .modal-close {
    right: auto;
    left: 20px;
}

.modal-close:hover {
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-body {
    display: flex;
    width: 100%;
}

.modal-image-wrapper {
    flex: 1;
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-image-wrapper img {
    max-height: 400px;
    object-fit: contain;
}

.modal-text {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

html[dir="ltr"] .modal-text {
    text-align: left;
}

.modal-text h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.modal-btn {
    margin-top: 30px;
    width: fit-content;
}

/* Mobile Modal Responsive */
@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
    }

    .modal-image-wrapper {
        padding: 10px;
        height: 250px;
    }

    .modal-text {
        padding: 20px;
        text-align: center !important;
    }

    .modal-btn {
        margin: 20px auto 0;
    }
}

/* 2. Full Screen Mobile Menu Upgrade */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        inset: 0;
        height: 100vh;
        width: 100vw;
        background: rgba(15, 23, 42, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        padding: 0;
        transform: translateY(-100%);
        transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        border-bottom: none;
        top: 0;
        left: 0;
    }

    .nav-menu.active {
        display: flex;
        transform: translateY(0);
    }

    .nav-link {
        font-size: 2rem;
        opacity: 0;
        transform: translateY(20px);
        transition: 0.4s;
    }

    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.3s;
        /* Stagger handled in loop ideally, but base delay works */
    }

    .menu-toggle {
        z-index: 2000;
        /* Above menu */
        position: relative;
    }
}


.loader-bar {
    width: 240px;
    height: 5px;
    /* Thicker for better visibility */
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50%;
    background: var(--accent);
    animation: loader 1s infinite alternate;
}

@keyframes loader {
    from {
        left: -100%;
    }

    to {
        left: 100%;
    }
}

/* Scatter Animation Utilities */
.scatter-item {
    transition: all 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    /* Ease-out-expo for explosion feel */
    will-change: transform, opacity;
}

#hero-text-content {
    /* JS controls this opacity */
    position: relative;
    z-index: 10;
}

#final-hero-logo {
    opacity: 0;
}



/* --- Contact & Footer Styles Upgrade --- */
.contact-section {
    background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.8) 100%);
    position: relative;
    border-top: 1px solid var(--border);
}

.contact-container {
    display: flex;
    gap: 60px;
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 50px;
    flex-wrap: wrap;
}

/* Form Side */
.contact-form {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-field {
    width: 100%;
    padding: 15px 20px;
    background: rgba(2, 6, 23, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: 0.3s;
    outline: none;
}

.textarea-field {
    min-height: 150px;
    resize: vertical;
}

/* Floating Label Logic */
.input-label {
    position: absolute;
    top: 15px;
    right: 20px;
    /* RTL default */
    color: #94a3b8;
    pointer-events: none;
    transition: 0.3s;
    background: transparent;
    padding: 0 5px;
}

html[dir="ltr"] .input-label {
    right: auto;
    left: 20px;
}

/* Float Up when focused or has value */
.input-field:focus,
.input-field:not(:placeholder-shown) {
    border-color: var(--primary);
    background: rgba(2, 6, 23, 0.9);
}

.input-field:focus~.input-label,
.input-field:not(:placeholder-shown)~.input-label {
    top: -10px;
    font-size: 0.85rem;
    color: var(--primary);
    background: #020617;
    /* Matches bg to hide line */
}

/* Modal Image Limit */
#modal-img {
    max-height: 60vh;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    margin: 0 auto;
    display: block;
}

.w-full {
    width: 100%;
    justify-content: center;
}

/* Info Side */
.contact-info-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border);
    padding-right: 40px;
    text-align: center;
    align-items: center;
}

html[dir="ltr"] .contact-info-panel {
    border-right: none;
    border-left: 1px solid var(--border);
    padding-right: 0;
    padding-left: 40px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 30px 0;
}

/* Status Message */
.form-status {
    width: 100%;
    text-align: center;
    font-weight: bold;
    min-height: 20px;
    transition: 0.3s;
}

.form-status.success {
    color: #22c55e;
}

.form-status.error {
    color: #ef4444;
}

/* Responsive Contact */
@media (max-width: 992px) {
    .contact-container {
        flex-direction: column-reverse;
        padding: 30px;
    }

    .contact-info-panel,
    html[dir="ltr"] .contact-info-panel {
        border-right: none;
        border-left: none;
        border-bottom: 1px solid var(--border);
        padding: 0 0 30px 0;
        margin-bottom: 30px;
    }

    .hero-title {
        font-size: 3rem;
    }
}

/* --- Mobile Responsiveness (Updated) --- */
@media (max-width: 768px) {

    /* Navbar & Menu */
    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: white;
        font-size: 1.8rem;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, 0.98);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transform: translateX(100%);
        transition: 0.4s ease-in-out;
        z-index: 1000;
        padding: 40px;
        height: 100vh;
        width: 100%;
    }

    /* RTL Slide */
    html[dir="rtl"] .nav-menu {
        transform: translateX(-100%);
    }

    html[dir="ltr"] .nav-menu {
        transform: translateX(100%);
    }

    .nav-menu.active {
        transform: translateX(0) !important;
    }

    /* Hero Section */
    .hero {
        padding-top: 120px;
        min-height: 0;
        height: auto;
        padding-bottom: 60px;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 0 20px;
        gap: 40px;
    }

    .hero-text {
        text-align: center;
        width: 100%;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 15px;
    }

    .hero-slogan {
        font-size: 1.2rem;
        margin-top: 20px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin: 0 auto 30px auto;
        text-align: center;
        width: 100%;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        margin-top: 0;
    }

    .hero-image-3d {
        max-width: 250px;
        margin: 0 auto;
    }

    /* Products Grid */
    .grid-3d {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    /* About Section */
    .about-split {
        flex-direction: column;
    }

    .about-text {
        text-align: center;
        padding: 0 20px;
    }

    .about-grid-points {
        justify-content: center;
        width: 100%;
    }

    .point-item {
        width: 100%;
        justify-content: center;
    }

    /* Common Layout Fixes */
    .section-padding {
        padding: 60px 20px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* Fix Inputs Overflow */
    .contact-form {
        width: 100%;
    }

    .input-group,
    .input-field {
        width: 100% !important;
    }

    /* Footer */
    .footer-socials {
        justify-content: center;
    }

    .contact-links-group {
        align-items: center;
    }

    .footer-item {
        text-align: center;
        flex-direction: column;
        gap: 15px;
    }

    .footer-item i {
        margin: 0 auto;
    }
}

/* Modal Gallery */
.modal-gallery-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.modal-nav {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.modal-nav:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.modal-nav.prev {
    left: 10px;
}

.modal-nav.next {
    right: 10px;
}

.modal-nav.show {
    display: flex;
}

.modal-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.modal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: 0.3s;
}

.modal-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.modal-counter {
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 5px;
    font-weight: 600;
}

/* Section Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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