:root {
    --primary: #0a5c36;
    --secondary: #d4af37;
    --accent: #25d366;
    --light: #f8f9fa;
    --dark: #1a2e35;
    --gray: #6c757d;
    --success: #28a745;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-3d: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --radius: 50px;
    --card-radius: 30px;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.2);
    --font-ar: 'Noto Sans Arabic', sans-serif;
}

[lang="ar"] {
    direction: rtl;
    font-family: var(--font-ar);
}

[lang="ar"] .service-content, 
[lang="ar"] .project-content,
[lang="ar"] .footer-info p,
[lang="ar"] .footer-links ul {
    text-align: right;
}

[lang="ar"] .reviewer-info img {
    margin-right: 0;
    margin-left: 15px;
}

[lang="ar"] nav ul li {
    margin-left: 0;
    margin-right: 20px;
}

[lang="ar"] .footer-info p i {
    margin-right: 0;
    margin-left: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    background-color: #f4f7f6;
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Header Styles - Floating Pill Navbar */
header {
    position: fixed;
    width: 100%;
    top: 20px;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    transition: var(--transition);
    pointer-events: none; /* Allow clicking through the header container */
}

.header-container {
    background: var(--glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 900px;
    max-width: 95%;
    padding: 12px 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-3d);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--glass-border);
    pointer-events: auto; /* Re-enable clicks for the navbar itself */
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.1) rotate(-3deg);
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: var(--radius);
    transition: var(--transition);
}

nav ul li a:hover, nav ul li a.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 8px 20px rgba(10, 92, 54, 0.3);
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: var(--light);
    border: none;
    color: var(--primary);
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

/* Hero Section - 3D Look */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding-top: 80px;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.slide.active {
    opacity: 1;
    animation: panEffect 15s linear infinite alternate;
}

@keyframes panEffect {
    0% { transform: scale(1.1) translateX(-20px); }
    100% { transform: scale(1.2) translateX(20px); }
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 92, 54, 0.8), rgba(26, 46, 53, 0.9));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 0 20px;
    transform: perspective(1000px) translateZ(50px);
}

.hero h2 {
    font-size: 3.8rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.4rem;
    max-width: 850px;
    margin: 0 auto 40px;
    opacity: 0.95;
    line-height: 1.8;
}

/* Buttons - Pill Shaped */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 45px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--primary);
    border-color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
    border-color: #25d366;
}

.btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-3d);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

@media (max-width: 480px) {
    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
}

/* Sections & Alignment */
.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
}

.section-title p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Grids */
.services-grid, .projects-grid, .contact-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1100px) {
    .services-grid, .projects-grid, .contact-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .services-grid, .projects-grid, .contact-cards {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    padding: 40px !important;
    text-align: center;
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: #f0f4f2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--primary);
    margin: 0 auto 25px;
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    background: var(--primary);
    color: white;
    transform: rotateY(360deg);
}

/* Cards - 3D and Rounded */
.service-card, .project-card, .review-card, .contact-card {
    background: white;
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.03);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover, .project-card:hover, .review-card:hover, .contact-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-3d);
}

.service-img, .project-img {
    height: 240px;
    width: 100%;
    overflow: hidden;
}

.service-img img, .project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.service-card:hover .service-img img, .project-card:hover .project-img img {
    transform: scale(1.15);
}

.service-content, .project-content {
    padding: 30px;
    text-align: left;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.service-content h3, .project-content h3 {
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 800;
}

.service-content p, .project-content p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Stats Section 3D */
.stats-section {
    border-radius: var(--card-radius);
    margin: 0 20px;
    padding: 60px !important;
}

.stat-item h3 {
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* FAQ Accordion */
.faq-item {
    border-radius: 18px !important;
    border: none !important;
    margin-bottom: 20px !important;
    transition: var(--transition);
}

.faq-question {
    padding: 25px !important;
    border-radius: 18px !important;
    border-bottom: none !important;
}

/* Floating Action Buttons - Refined */
.whatsapp-btn, .call-btn {
    width: 65px;
    height: 65px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3) !important;
    text-decoration: none;
    transition: var(--transition);
    position: fixed;
    bottom: 30px;
    z-index: 2000;
    border: 2px solid white;
}

.whatsapp-btn {
    background-color: #25d366;
    color: white;
    right: 30px;
}

.call-btn {
    background-color: var(--primary);
    color: white;
    left: 30px;
}

.whatsapp-btn:hover, .call-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4) !important;
    filter: brightness(1.1);
}

.btn-text {
    display: none;
}

/* Floating Translate Button */
.translate-btn {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 2000;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: var(--shadow-3d);
    font-weight: 700;
    transition: var(--transition);
    border: 2px solid white;
}

[lang="ar"] .translate-btn {
    right: auto;
    left: 20px;
}

.translate-btn:hover {
    transform: scale(1.05);
    background: var(--dark);
}

.translate-btn i {
    font-size: 1.2rem;
}

/* CTA Section - Premium Look */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    text-align: center;
    border-radius: var(--card-radius);
    margin: 50px 20px 80px;
    box-shadow: var(--shadow-3d);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 800;
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cta-section p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.95;
    line-height: 1.8;
}

.cta-btns {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.cta-btn {
    padding: 18px 45px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-btn-call {
    background: var(--secondary);
    color: var(--dark);
}

.cta-btn-whatsapp {
    background: #25d366;
    color: white;
}

.cta-btn:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    filter: brightness(1.1);
}

@media (max-width: 768px) {
    .cta-section {
        margin: 40px 15px 60px;
        padding: 60px 25px;
        border-radius: 40px;
    }
    
    .cta-section h2 {
        font-size: 2.2rem;
    }
    
    .cta-btns {
        flex-direction: column;
        gap: 15px;
    }
    
    .cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Footer - Modern & Clean */
footer {
    background: var(--dark);
    color: white;
    padding: 80px 0 40px;
    margin-top: 50px;
    border-top-left-radius: 60px;
    border-top-right-radius: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo h3 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-links h4, .footer-info h4 {
    margin-bottom: 25px;
    font-size: 1.3rem;
    color: var(--secondary);
}

.footer-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.copyright {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    opacity: 0.6;
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .header-container { max-width: 90%; }
    .hero h2 { font-size: 2.8rem; }
    .footer-content { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .header-container { padding: 10px 20px; width: 95%; }
    
    [lang="ar"] .header-container {
        flex-direction: row-reverse;
    }

    [lang="ar"] .logo {
        margin-left: 0;
    }

    [lang="ar"] .mobile-menu-btn {
        margin-right: 0;
    }
    
    nav { 
        position: absolute;
        top: 80px;
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        width: 90%;
        background: var(--glass);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-radius: 25px;
        padding: 20px;
        box-shadow: var(--shadow-3d);
        border: 1px solid var(--glass-border);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        display: block !important;
    }

    nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    nav ul li {
        margin: 0;
        width: 100%;
    }

    nav ul li a {
        display: block;
        text-align: center;
        padding: 15px;
    }

    [lang="ar"] nav ul li a {
        text-align: right;
        padding-right: 20px;
    }

    .translate-btn {
        top: 85px;
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .mobile-menu-btn { 
        display: flex !important; 
    }

    .hero h2 { font-size: 2.2rem; }
    .section { padding: 60px 0; }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 1.1rem; }
    .btn { width: 100%; }
}