:root {
    --primary-color: #1a4f9c;
    --secondary-color: #0d2a54;
    --accent-color: #4a90e2;
    --text-primary: #333333;
    --text-secondary: #666666;
    --bg-light: #f8fbff;
    --white: #ffffff;
    --border-color: #e1e8f0;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: var(--white);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 0;
    box-sizing: border-box;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary-color);
}

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

.nav-btn {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
}

/* Hero Section */
.hero {
    height: 100vh;
    height: 100dvh; /* للمقاس الدقيق في الجوالات الحديثة */
    min-height: 600px;
    background: linear-gradient(rgba(13, 42, 84, 0.5), rgba(26, 79, 156, 0.5)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
    padding-top: 80px; /* offset for fixed navbar */
    padding-bottom: 0;
    margin-bottom: 0;
    box-sizing: border-box; /* ensures padding is included in the 100vh height */
    overflow: hidden;
}

.hero::before, .hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.hero::before {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
}

.hero::after {
    width: 600px;
    height: 600px;
    bottom: -200px;
    right: -200px;
}

.hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Sections General */
section {
    padding: 80px 0;
}

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

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

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-secondary);
}

/* Intro Section */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.intro-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.intro-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px; /* Fixed height for consistency */
}

.intro-card i, .intro-card img {
    margin-bottom: 15px;
    display: block;
}

.intro-card h4 {
    margin: 0;
    line-height: 1.4;
}

.intro-card:hover {
    background: var(--white);
    box-shadow: var(--shadow);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    padding: 40px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: var(--shadow);
}

.project-img {
    width: 100%;
    height: 200px;
    background: #ddd;
    object-fit: cover;
}

.project-info {
    padding: 20px;
}

/* Stats */
/* Partners Grid */
.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px; /* Tighter gaps */
    margin-top: 50px;
}

.partners-grid .partner-item {
    flex: 0 0 calc(16.66% - 20px); /* Exactly 6 per row */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.partners-grid .partner-item img {
    height: 70px;
    width: auto;
    max-width: 100%;
    transition: var(--transition);
}

.partners-grid .partner-item img:hover {
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .partners-grid .partner-item {
        flex: 0 0 calc(33.33% - 20px);
    }
}

@media (max-width: 600px) {
    .partners-grid .partner-item {
        flex: 0 0 calc(50% - 20px);
    }
}

.stats {
    background: var(--secondary-color);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    left: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    animation: pulse-green 2s infinite;
}

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

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.stat-item h3 {
    font-size: 3rem;
    margin-bottom: 10px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.contact-form button {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    background: white;
}

/* Infinite Slider Styling (Suppliers) */
.infinite-slider-container::-webkit-scrollbar { display: none; }
.infinite-slider-container {
    overflow-x: auto;
    scrollbar-width: none;
    padding: 40px 0;
    position: relative;
    width: 100%;
    background: var(--white);
    direction: ltr; /* Force LTR for easy horizontal scrolling animation */
}

.infinite-slider {
    display: flex;
    white-space: nowrap;
    width: max-content;
}

.supplier-item {
    flex: 0 0 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.supplier-item img {
    height: 70px;
    width: auto;
    max-width: 150px; /* Limit width for very wide logos */
    object-fit: contain;
    transition: var(--transition);
}

.supplier-item img:hover {
    transform: scale(1.15);
}

@keyframes scroll-left-infinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } 
}

/* Slider Arrows */
.slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(220, 220, 220, 0.4); /* Faint grey background */
    color: #888; /* Faint grey arrow icon */
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.slider-arrow:hover {
    background: rgba(180, 180, 180, 0.8);
    color: #333;
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 20px; }
.slider-arrow.next { right: 20px; }

/* Responsive */
@media (max-width: 992px) {
    .intro-grid, .services-grid, .projects-grid, .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .intro-grid, .services-grid, .projects-grid, .stats-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    /* Mobile Menu */
    .menu-toggle {
        display: block !important;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--secondary-color);
        z-index: 1001;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* For RTL */
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        padding: 50px 20px;
        z-index: 1000;
        gap: 20px;
    }
    html[dir="ltr"] .nav-links {
        right: auto;
        left: -100%; /* For LTR */
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
    }
    .nav-links.active {
        right: 0;
    }
    html[dir="ltr"] .nav-links.active {
        left: 0;
    }
    /* Fix logo size on mobile */
    .logo img {
        height: 50px !important;
    }
    /* Hide nav cta if it overlaps */
    .nav-cta {
        display: none;
    }
}
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        padding-top: 60px; /* smaller offset */
    }
}
