* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #b8956a;
    --primary-dark: #9a7d56;
    --primary-light: #d4b88a;
    --dark: #1a1a1a;
    --light: #f8f8f8;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--dark);
    color: var(--white);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

@font-face {
    font-family: 'Noto Kufi Arabic';
    src: url('../fonts/NotoKufiArabic-VariableFont_wght.ttf') format('truetype');
}

/* Arabic Font */
[dir="rtl"] {
    font-family: 'Noto Kufi Arabic' !important;
}

[dir="ltr"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader-container {
    text-align: center;
    position: relative;
}

.logo-loader {
    width: 180px;
    height: 180px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 2;
    animation: pulse 2s ease-in-out infinite;
}

.logo-loader img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(184, 149, 106, 0.6));
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(184, 149, 106, 0.6));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 50px rgba(184, 149, 106, 0.9));
    }
}

.spinner-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
}

.spinner-ring div {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1.5s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring div:nth-child(1) {
    animation-delay: -0.45s;
    border-top-color: var(--primary);
}

.spinner-ring div:nth-child(2) {
    animation-delay: -0.3s;
    border-top-color: var(--primary-light);
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
}

.spinner-ring div:nth-child(3) {
    animation-delay: -0.15s;
    border-top-color: var(--primary-dark);
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(184, 149, 106, 0.95) 0%, rgba(154, 125, 86, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 12px 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

[dir="rtl"] .language-switcher {
    right: auto;
    left: 30px;
}

.language-switcher:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(184, 149, 106, 0.5);
}

.lang-btn {
    background: transparent;
    border: 2px solid transparent;
    color: var(--white);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(184, 149, 106, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(26, 26, 26, 0.98);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

nav .logo {
    display: flex;
}

[dir="rtl"] nav {
    flex-direction: row-reverse;
}

.logo {
    font-weight: 700;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.logo img {
    width: 170px;
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    align-items: center;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

[dir="rtl"] .nav-links a::after {
    left: auto;
    right: 0;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -250px;
    right: -250px;
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
}

[dir="rtl"] .hero::before {
    right: auto;
    left: -250px;
}

.hero::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    bottom: -200px;
    left: -200px;
    opacity: 0.2;
    animation: float 10s ease-in-out infinite reverse;
}

[dir="rtl"] .hero::after {
    left: auto;
    right: -200px;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, 30px) rotate(5deg); }
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 2rem;
    max-width: 1200px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.company-logos {
    display: flex;
    gap: 3rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.logo-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 20px;
    padding: 2rem;
    width: 280px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.logo-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(184, 149, 106, 0.3);
}

.logo-card:hover::before {
    opacity: 0.1;
}

.logo-card-content {
    position: relative;
    z-index: 1;
}

.logo-icon {
    font-size: 3rem;
    color: var(--primary);
    transition: transform 0.4s ease;
}

.logo-icon img {
    width: 80%;
}

.logo-card:hover .logo-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Section Base */
section {
    padding: 8rem 2rem;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-title span {
    color: var(--primary);
}

.section-title p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 1rem auto 0;
    line-height: 1.6;
}

.section-divider {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 1rem auto;
}

/* About Section */
.about {
    background: linear-gradient(180deg, var(--dark) 0%, #252525 100%);
}

/* Services Section */
.services {
    background: var(--dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 149, 106, 0.1);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 149, 106, 0.1), transparent);
    transition: left 0.6s ease;
}

[dir="rtl"] .service-card::before {
    left: auto;
    right: -100%;
    transition: right 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

[dir="rtl"] .service-card:hover::before {
    right: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(184, 149, 106, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 10px 30px rgba(184, 149, 106, 0.4);
}

.service-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Company Section */
.company {
    background: linear-gradient(180deg, var(--dark) 0%, #1a1a1a 100%);
}

.company-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    max-width: 1200px;
    margin: 0 auto;
}

[dir="rtl"] .company-carousel {
    direction: ltr;
}

.company-carousel::-webkit-scrollbar {
    height: 8px;
}

.company-carousel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.company-carousel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.company-slide {
    min-width: 300px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    scroll-snap-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

.company-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-slide:hover {
    transform: scale(1.05);
}

/* Contact Section */
.contact {
    background: var(--dark);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 20px;
    padding: 2rem;
}

.contact-item {
    margin-bottom: 2rem;
    padding-left: 3rem;
    position: relative;
}

[dir="rtl"] .contact-item {
    padding-left: 0;
    padding-right: 3rem;
}

.contact-item i {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

[dir="rtl"] .contact-item i {
    left: auto;
    right: 0;
}

.contact-item h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-item p {
    color: rgba(255, 255, 255, 0.7);
}

.contact-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 20px;
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

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

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    border-radius: 10px;
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-submit:hover::before {
    width: 300px;
    height: 300px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(184, 149, 106, 0.4);
}

.btn-submit span {
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: linear-gradient(180deg, var(--dark) 0%, #0a0a0a 100%);
    border-top: 1px solid rgba(184, 149, 106, 0.1);
    padding: 4rem 2rem 2rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(184, 149, 106, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 968px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .logo img {
        width: 120px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        flex-direction: column;
        background: linear-gradient(135deg, rgba(26, 26, 26, 0.98) 0%, rgba(15, 15, 15, 0.98) 100%);
        backdrop-filter: blur(30px);
        width: 100%;
        height: 100vh;
        padding: 0;
        gap: 0;
        transition: right 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 999;
        justify-content: center;
        align-items: center;
    }

    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .nav-links.active {
        right: 0;
    }

    [dir="rtl"] .nav-links.active {
        left: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateX(50px);
        animation: slideInMenu 0.5s forwards;
    }

    [dir="rtl"] .nav-links li {
        transform: translateX(-50px);
    }

    .nav-links.active li:nth-child(1) { animation-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { animation-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { animation-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { animation-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { animation-delay: 0.5s; }

    @keyframes slideInMenu {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .nav-links a {
        font-size: 1.8rem;
        font-weight: 600;
        padding: 1.5rem;
        display: block;
        background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        position: relative;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-links a::before {
        content: '';
        position: absolute;
        left: 50%;
        bottom: 10px;
        transform: translateX(-50%);
        width: 0;
        height: 3px;
        background: var(--primary);
        transition: width 0.3s ease;
        border-radius: 2px;
    }

    .nav-links a:hover::before {
        width: 60px;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .language-switcher {
        bottom: 20px;
        right: 20px;
        padding: 10px 16px;
    }

    [dir="rtl"] .language-switcher {
        right: auto;
        left: 20px;
    }

    .lang-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: 100px;
        min-height: 100vh;
    }

    .hero h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .company-logos {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
        padding: 0 1rem;
    }

    .logo-card {
        width: 100%;
        max-width: 320px;
        padding: 2.5rem 2rem;
    }

    section {
        padding: 5rem 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .company-carousel {
        padding-left: 1rem;
    }

    .company-slide {
        min-width: 280px;
    }
}

@media (max-width: 480px) {
    .logo img {
        width: 100px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .language-switcher {
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        gap: 6px;
    }

    [dir="rtl"] .language-switcher {
        right: auto;
        left: 15px;
    }

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.force-arabic {
        font-family: 'Noto Kufi Arabic';
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

@media (max-width: 968px) {
    [dir="rtl"] .nav-links {
        flex-direction: column;
    }
}

[dir="rtl"] nav {
    direction: ltr;
}