/* CSS Variables */
:root {
    --primary-color: #0F172A;
    /* Deep Navy Blue */
    --secondary-color: #C0A062;
    /* Gold/Bronze */
    --accent-color: #1E293B;
    /* Lighter Navy */
    --text-color: #334155;
    --light-bg: #F8FAFC;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
    --font-heading: 'Cairo', sans-serif;
    --font-body: 'Tajawal', sans-serif;
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 2px solid var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* Header */
header {
    background-color: rgba(15, 23, 42, 0.95);
    color: var(--white);
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 10px 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    color: var(--white);
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--white);
}

/* Hero Section */
#hero {
    height: 100vh;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.7)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 300;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-text {
    flex: 1;
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #475569;
}

.features-list li {
    margin-bottom: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li i {
    color: var(--secondary-color);
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-placeholder {
    width: 100%;
    height: 350px;
    background-color: #E2E8F0;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 5rem;
    color: #94A3B8;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Products Section */
.bg-light {
    background-color: var(--light-bg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
}

.product-card:hover {
    transform: translateY(-10px);
    border-bottom-color: var(--secondary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(192, 160, 98, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.product-card:hover .card-icon {
    background-color: var(--secondary-color);
    color: var(--white);
}

.product-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.product-card p {
    color: #64748B;
    font-size: 0.95rem;
}

/* Stats Section */
#stats {
    background: linear-gradient(var(--secondary-color), var(--secondary-color));
    padding: 60px 0;
    color: var(--white);
    text-align: center;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item .count {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 1.2rem;
    font-weight: 500;
}

/* Contact Section */
.contact-wrapper {
    display: block;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.info-item {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #E2E8F0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.info-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.info-item i {
    width: 70px;
    height: 70px;
    background-color: rgba(192, 160, 98, 0.1);
    color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.info-item h4 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.info-item p {
    color: #64748B;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-bottom: 30px;
    gap: 20px;
}

.footer-logo {
    display: flex;
    justify-content: center;
    width: 100%;
}

.footer-logo h2,
.footer-logo p {
    display: none;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--white);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #94A3B8;
}

/* Services Section */
.services-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
}

.service-item {
    flex: 1;
    min-width: 250px;
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #E2E8F0;
    transition: var(--transition);
}

.service-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.service-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-item h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}


/* Gallery Section */
.gallery-inner {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
}

.gallery-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex: 0 0 auto;
    width: 300px;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    scroll-snap-align: center;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    color: var(--primary-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-control:hover {
    background-color: var(--secondary-color);
    color: white;
}

.gallery-control.prev {
    left: 10px;
}

.gallery-control.next {
    right: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 100;
    }

    .nav-links.active {
        right: 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content {
        flex-direction: column;
    }

    .stats-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-wrapper {
        flex-direction: column;
    }
}

/* Phone Number Direction */
.phone-dir {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
    text-align: left;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

/* Logo Styles */
.header-logo {
    max-height: 40px;
    /* Reduced from 50px */
    width: auto;
}

.footer-logo-img {
    max-height: 60px;
    /* Reduced from 70px */
    width: auto;
    margin-bottom: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 5px;
    border-radius: 5px;
}

/* Ensure navbar items align correctly with image logo */
.logo a {
    display: flex;
    align-items: center;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preloader-logo {
    width: 120px;
    height: auto;
    animation: pulse 2s infinite ease-in-out;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 90, 156, 0.1);
    border-left-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Language Switcher Button */
.lang-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

/* LTR Specific Overrides */
html[dir='ltr'] body {
    text-align: left;
}

html[dir='ltr'] .nav-links li a::after {
    left: 0;
    right: auto;
}

html[dir='ltr'] .features-list li i {
    margin-right: 10px;
    margin-left: 0;
}

html[dir='ltr'] .contact-info {
    text-align: left;
}