/* ============================================================
   GLOBAL SETTINGS & VARIABLES
   ============================================================ */
:root {
    --primary: #8c6e3f;       
    --primary-light: #b59a5d; 
    --dark: #1a1a1a;          
    --light-bg: #f9f9f9;      
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--light-bg);
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
    font-family: 'Montserrat', 'Cairo', sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* ============================================================
   LOGO & ELEMENTS SHARPNESS
   ============================================================ */
.logo img {
    height: 160px; 
    width: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.header-main {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 8px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.company-name {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--primary);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.lang-switch {
    border: 1px solid var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--primary) !important;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(140, 110, 63, 0.2);
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(140, 110, 63, 0.3);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    transform: scale(1.1); 
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8), rgba(0,0,0,0.3));
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    margin: 0 0 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.9;
}

.cta-button {
    background: var(--primary);
    color: white;
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 20px rgba(140, 110, 63, 0.4);
    transition: var(--transition);
}

.cta-button:hover {
    background: var(--primary-light);
    transform: scale(1.05);
}

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
}

.stat-card {
    background: var(--white);
    padding: 40px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--primary);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 2rem;
    margin: 10px 0;
    color: var(--dark);
}

/* ============================================================
   SERVICES GRID
   ============================================================ */
.section-title {
    text-align: center;
    margin: 80px 0 50px;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 35px;
    padding-bottom: 80px;
}

.service-card {
    background: var(--white);
    padding: 50px 35px;
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    text-align: center;
    position: relative;
    z-index: 1;
}

.service-card:hover {
    transform: translateY(-12px);
    background-color: #f1e9db; 
    border: 2px solid var(--primary); 
    box-shadow: 0 20px 40px rgba(140, 110, 63, 0.2);
}

.service-card:hover h3 {
    color: #5c4829; 
}

.service-card:hover .icon-service {
    transform: scale(1.1);
    color: var(--primary-light);
    transition: 0.3s;
}

.price-tag {
    margin-top: auto;
    background: #fdfaf4;
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid var(--primary);
}

.price-tag span {
    display: block;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
}

/* ============================================================
   ADS & LIGHTBOX
   ============================================================ */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 80px;
}

.ad-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.ad-card img:hover {
    transform: scale(1.03);
    filter: brightness(0.9);
}

/* ============================================================
   CONTACT & FOOTER
   ============================================================ */
.contact-section {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: rgb(254, 254, 254);
    padding: 40px;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info i {
    color: var(--primary);
    font-size: 1.2rem;
}

.footer-main {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 60px 0;
    margin-top: 80px;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================================================
   WHATSAPP FLOATING MENU
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;
}

.whatsapp-btn {
    width: 70px;
    height: 70px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 38px;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: rotate(15deg) scale(1.1);
}

.whatsapp-menu {
    position: absolute;
    bottom: 90px;
    right: 0;
    background: white;
    border-radius: 20px;
    width: 240px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    display: none;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.whatsapp-menu.show { display: block; }

.whatsapp-menu a {
    display: flex;
    justify-content: space-between;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    border-bottom: 1px solid #f5f5f5;
}

.whatsapp-menu a:hover {
    background: #f9f9f9;
    color: #25d366;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999; 
}

.lightbox.active {
    display: flex; 
}

.lightbox-img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
}

/* ============================================================
    RESPONSIVE - TABLETS (992px)
   ============================================================ */
@media (max-width: 992px) {
    .container {
        width: 92%; 
    }

    .contact-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
        padding: 30px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr); 
        gap: 20px;
    }
}

/* ============================================================
    RESPONSIVE - MOBILE PHONES (768px) - FINAL STABILITY FIX
   ============================================================ */
   @media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Prevent any element from being wider than the screen */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .container {
        width: 92% !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }

    /* 1. Header & Nav Fix */
    .nav-wrapper {
        flex-direction: column !important;
        padding: 15px 0 !important;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 10px 15px !important;
        margin: 15px 0 !important;
    }

    /* 2. Contact Section Fix (Crucial for your screenshot) */
    .contact-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 20px 15px !important; /* Reduced padding for more space */
        gap: 30px !important;
    }

    .contact-info {
        text-align: center;
        width: 100%;
    }

    .contact-info p {
        font-size: 0.9rem !important;
        word-break: break-all; /* Forces long emails to wrap to the next line */
        display: flex;
        flex-direction: column; /* Puts icon above text on very small screens */
        align-items: center;
        gap: 8px;
    }

    /* 3. Hero Adjustments */
    .hero {
        height: auto !important;
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 1.8rem !important;
    }

    /* 4. Grid Adjustments */
    .services-grid, .ads-grid, .stats-section {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 20px !important;
    }

    .service-card, .stat-card {
        width: 100% !important;
        padding: 30px 20px !important;
    }

    /* 5. Map Fix */
    .contact-grid iframe {
        width: 100% !important;
        height: 250px !important;
        border-radius: 15px;
    }

    /* 6. WhatsApp Button */
    .whatsapp-btn {
        width: 60px !important;
        height: 60px !important;
        bottom: 20px;
        right: 20px;
    }
}