/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    --navy-deep: #0A1E26;
    --navy-primary: #0D2840;
    --slate-gray: #475459;
    --silver: #92A0A6;
    --off-white: #F2F2F2;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--navy-deep);
    overflow-x: hidden;
}

/* RTL: Arabic font */
[dir="rtl"] body,
[dir="rtl"] .font-sans {
    font-family: 'Cairo', sans-serif !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--navy-deep);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--silver);
}

/* ========================================
   PRELOADER
   ======================================== */
#preloader {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.preloader-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-logo {
    animation: preloaderPulse 1.5s ease-in-out infinite;
}

.preloader-bar {
    width: 120px;
    height: 2px;
    background: rgba(146, 160, 166, 0.2);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.preloader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--off-white), transparent);
    animation: preloaderSlide 1.5s ease-in-out infinite;
}

@keyframes preloaderPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.95);
    }
}

@keyframes preloaderSlide {
    0% {
        left: -40%;
    }

    100% {
        left: 100%;
    }
}

/* ========================================
   NAVBAR
   ======================================== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(10, 30, 38, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(146, 160, 166, 0.1);
}

.logo-placeholder {
    transition: all 0.3s ease;
}

/* Nav Links */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    color: rgba(242, 242, 242, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--silver);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--off-white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 50%;
}

[dir="rtl"] .nav-link {
    font-size: 0.95rem;
}

/* Language Toggle */
.lang-btn {
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(242, 242, 242, 0.5);
    border-radius: 9999px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    border: none;
}

.lang-btn.active {
    background: var(--silver);
    color: var(--navy-deep);
}

.lang-btn:hover:not(.active) {
    color: var(--off-white);
}

/* Mobile Menu */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

#mobile-menu.mobile-menu-open {
    max-height: 400px;
}

.mobile-nav-link {
    display: block;
    padding: 0.85rem 0;
    color: rgba(242, 242, 242, 0.7);
    font-weight: 500;
    border-bottom: 1px solid rgba(146, 160, 166, 0.08);
    transition: color 0.3s ease, padding 0.3s ease;
    text-decoration: none;
}

.mobile-nav-link:hover {
    color: var(--off-white);
    padding-inline-start: 0.5rem;
}

/* ========================================
   HERO SECTION
   ======================================== */
/* Animated Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    pointer-events: none;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--navy-primary);
    top: -100px;
    left: -100px;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--slate-gray);
    bottom: -50px;
    right: -50px;
    animation: floatOrb 25s ease-in-out infinite reverse;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--silver);
    top: 50%;
    left: 60%;
    opacity: 0.15;
    animation: floatOrb 30s ease-in-out infinite;
}

.orb-small {
    width: 300px !important;
    height: 300px !important;
    opacity: 0.15 !important;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-30px, 50px) scale(0.95);
    }
}

/* Grid Pattern */
.grid-pattern {
    background-image:
        linear-gradient(rgba(146, 160, 166, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(146, 160, 166, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #F2F2F2 0%, #92A0A6 50%, #F2F2F2 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 6s linear infinite;
}

@keyframes shimmerText {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* Scroll Indicator */
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--silver), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {

    0%,
    100% {
        transform: scaleY(0.5);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 2rem;
    background: var(--off-white);
    color: var(--navy-deep);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--silver);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(146, 160, 166, 0.2);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.875rem 2rem;
    background: transparent;
    color: var(--off-white);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(146, 160, 166, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: var(--silver);
    background: rgba(146, 160, 166, 0.1);
    transform: translateY(-2px);
}

/* ========================================
   REVEAL ANIMATIONS
   ======================================== */
.reveal {
    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);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.feature-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 0.875rem;
    border: 1px solid rgba(71, 84, 89, 0.1);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(146, 160, 166, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(13, 40, 64, 0.08);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.625rem;
    background: var(--navy-primary);
    color: var(--off-white);
    flex-shrink: 0;
}

/* ========================================
   BRANDS SECTION
   ======================================== */
.brand-card {
    background: rgba(10, 30, 38, 0.5);
    border: 1px solid rgba(146, 160, 166, 0.12);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.brand-card:hover {
    border-color: rgba(146, 160, 166, 0.4);
    transform: translateY(-6px);
    background: rgba(13, 40, 64, 0.8);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.brand-logo-placeholder {
    aspect-ratio: 16 / 10;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.brand-card:hover .brand-logo-placeholder {
    border-color: rgba(146, 160, 166, 0.4);
    background: rgba(242, 242, 242, 0.08);
}

.brand-name {
    text-align: center;
    color: var(--silver);
    /* Shrinks to 0.9rem on mobile, scales dynamically, maxes out at 1.5rem on desktop */
    font-size: clamp(0.9rem, 4vw, 1.5rem);
    font-weight: 500;
    letter-spacing: 0.05em;
    /* This forces unbreakable words to wrap to the next line instead of spilling out */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* ========================================
   GALLERY SECTION
   ======================================== */
.gallery-masonry {
    column-count: 1;
    column-gap: 1.25rem;
}

@media (min-width: 640px) {
    .gallery-masonry {
        column-count: 2;
    }
}

@media (min-width: 1024px) {
    .gallery-masonry {
        column-count: 3;
    }
}

.gallery-item {
    position: relative;
    break-inside: avoid;
    margin-bottom: 1.25rem;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(13, 40, 64, 0.1);
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(13, 40, 64, 0.2);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 30, 38, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--off-white);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-info-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(13, 40, 64, 0.5);
    border: 1px solid rgba(146, 160, 166, 0.12);
    border-radius: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-info-card:hover {
    border-color: rgba(146, 160, 166, 0.3);
    background: rgba(13, 40, 64, 0.8);
    transform: translateX(4px);
}

[dir="rtl"] .contact-info-card:hover {
    transform: translateX(-4px);
}

.contact-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: rgba(146, 160, 166, 0.15);
    color: var(--off-white);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-info-card:hover .contact-info-icon {
    background: var(--silver);
    color: var(--navy-deep);
}

/* Social Buttons */
.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    background: rgba(146, 160, 166, 0.1);
    color: var(--off-white);
    border: 1px solid rgba(146, 160, 166, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--silver);
    color: var(--navy-deep);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(146, 160, 166, 0.2);
}

.social-btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    background: rgba(146, 160, 166, 0.1);
    color: var(--silver);
    border: 1px solid rgba(146, 160, 166, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-btn-sm:hover {
    background: var(--silver);
    color: var(--navy-deep);
}

/* Contact Form */
.contact-form {
    background: rgba(13, 40, 64, 0.6);
    border: 1px solid rgba(146, 160, 166, 0.12);
    backdrop-filter: blur(10px);
}

.form-label {
    display: block;
    color: var(--silver);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(10, 30, 38, 0.5);
    border: 1px solid rgba(146, 160, 166, 0.15);
    border-radius: 0.625rem;
    color: var(--off-white);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input::placeholder {
    color: rgba(146, 160, 166, 0.5);
}

.form-input:focus {
    border-color: var(--silver);
    background: rgba(10, 30, 38, 0.8);
    box-shadow: 0 0 0 3px rgba(146, 160, 166, 0.1);
}

.form-input:focus::placeholder {
    color: rgba(146, 160, 166, 0.3);
}

.form-success {
    padding: 1rem;
    background: rgba(146, 160, 166, 0.1);
    border: 1px solid rgba(146, 160, 166, 0.3);
    border-radius: 0.625rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer-link {
    color: var(--silver);
    font-size: 0.875rem;
    transition: color 0.3s ease, padding 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.footer-link:hover {
    color: var(--off-white);
    padding-inline-start: 4px;
}

/* ========================================
   BACK TO TOP
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: var(--navy-primary);
    color: var(--off-white);
    border: 1px solid rgba(146, 160, 166, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--silver);
    color: var(--navy-deep);
    transform: translateY(-3px);
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 2rem;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(10, 30, 38, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightboxZoom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(146, 160, 166, 0.15);
    color: var(--off-white);
    border: 1px solid rgba(146, 160, 166, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--silver);
    color: var(--navy-deep);
    transform: rotate(90deg);
}

[dir="rtl"] .lightbox-close {
    right: auto;
    left: 1.5rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(146, 160, 166, 0.15);
    color: var(--off-white);
    border: 1px solid rgba(146, 160, 166, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: var(--silver);
    color: var(--navy-deep);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

[dir="rtl"] .lightbox-prev {
    left: auto;
    right: 1.5rem;
}

[dir="rtl"] .lightbox-next {
    right: auto;
    left: 1.5rem;
}

/* ========================================
   RTL SPECIFIC STYLES
   ======================================== */
[dir="rtl"] .rtl\:rotate-0 {
    transform: rotate(0deg);
}

[dir="rtl"] .rtl\:group-hover\:-translate-x-1 {
    transform: translateX(0.25rem);
}

/* ========================================
   RESPONSIVE TWEAKS
   ======================================== */
@media (max-width: 640px) {
    .orb {
        filter: blur(60px);
    }

    .orb-1 {
        width: 300px;
        height: 300px;
    }

    .orb-2 {
        width: 250px;
        height: 250px;
    }

    .orb-3 {
        width: 200px;
        height: 200px;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .brand-card {
        padding: 1rem 0.5rem;
        /* Reduces padding from 1.5rem to free up horizontal space */
    }
}