/* =========================================
   1. الإعدادات العامة والمتغيرات
   ========================================= */
:root { 
    --gold: #c5a059; 
    --gold-hover: #e0b973;
    --dark: #121212; 
    --white: #ffffff; 
    --gray: #f9f9f9; 
    --text-muted: #666;
    --whatsapp: #25d366; 
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Cairo', sans-serif; 
    scroll-behavior: smooth; 
}

body { 
    overflow-x: hidden; 
    line-height: 1.8; 
    background-color: var(--white); 
    color: var(--dark); 
}

.container { padding: 0 8%; }
.text-center { text-align: center; }
.gold-text { color: var(--gold) !important; }

/* =========================================
   2. الهيدر (Header)
   ========================================= */
header { 
    background: rgba(18, 18, 18, 0.98); 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px 8%; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    border-bottom: 1px solid var(--gold); 
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    gap: 15px;
}

.logo { 
    color: white; 
    font-size: 1.8rem; 
    font-weight: 700; 
    letter-spacing: 1px; 
    flex-shrink: 0;
    order: 1;
}
.logo span { color: var(--gold); }

nav { flex: 1; display: flex; justify-content: center; order: 2; }

.nav-links { display: flex; list-style: none; }
.nav-links li a { 
    color: white; 
    text-decoration: none; 
    margin: 0 12px; 
    transition: var(--transition); 
    font-weight: 500; 
    font-size: 1rem;
    white-space: nowrap;
}
.nav-links li a:hover { color: var(--gold); }

.header-btns { flex-shrink: 0; order: 3; }

.whatsapp-nav { 
    background: var(--whatsapp); 
    color: white; 
    text-decoration: none; 
    padding: 10px 22px; 
    border-radius: 8px; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    transition: var(--transition);
    white-space: nowrap;
    font-size: 0.95rem;
}
.whatsapp-nav:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4); }

.menu-toggle { 
    display: none; 
    color: white; 
    font-size: 1.6rem; 
    cursor: pointer; 
    flex-shrink: 0;
    order: 3;
}

/* =========================================
   زر واتساب العائم
   ========================================= */
.whatsapp-float {
    position: fixed;
    left: 25px;
    bottom: 35px;
    z-index: 9999;
    background: var(--whatsapp);
    color: white;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
    text-decoration: none;
    transition: var(--transition);
    animation: pulse-wa 2.5s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.15) translateY(-5px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-wa {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70%  { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* =========================================
   3. القسم الرئيسي (Hero Section)
   ========================================= */
.hero { 
    height: 100vh; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    overflow: hidden;
}

.hero-content { z-index: 10; width: 100%; padding: 0 20px; }

.hero-box { 
    background: rgba(0, 0, 0, 0.55); 
    padding: 70px 50px; 
    border-radius: 25px; 
    backdrop-filter: blur(12px); 
    border: 1px solid rgba(197, 160, 89, 0.3); 
    max-width: 950px; 
    margin: 0 auto; 
    color: white;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.hero h1 { 
    font-size: clamp(2rem, 5vw, 3.8rem); 
    margin-bottom: 25px; 
    font-weight: 800; 
    line-height: 1.2;
}

.hero p { 
    font-size: clamp(1rem, 2vw, 1.4rem); 
    margin-bottom: 40px; 
    opacity: 0.95; 
    max-width: 800px; 
    margin-left: auto; 
    margin-right: auto;
}

.hero-btns-wrapper { display: flex; justify-content: center; }

.btn-gold-distinct { 
    background: #c5a059; 
    color: #121212; 
    padding: 15px 45px; 
    text-decoration: none; 
    border-radius: 8px; 
    font-weight: 700; 
    font-size: 1.2rem;
    transition: var(--transition); 
    display: inline-block;
    border: 2px solid var(--gold);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
    cursor: pointer;
}

.btn-gold-distinct:hover { 
    background: transparent; 
    color: var(--gold); 
    transform: translateY(-5px); 
    box-shadow: 0 15px 30px rgba(197, 160, 89, 0.2);
}

/* سلايدر الصور الخلفي */
.slider .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; z-index: -1; 
}
.slide.active { opacity: 1; }
.hero::after { 
    content: ''; position: absolute; inset: 0; 
    background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.7)); 
    z-index: -1; 
}

/* =========================================
   4. العناوين والأقسام (Sections)
   ========================================= */
.section-title { 
    font-size: 3rem; 
    margin-bottom: 50px; 
    font-weight: 800; 
    position: relative; 
    padding-bottom: 20px; 
}

.section-title::after { 
    content: ''; position: absolute; bottom: 0; right: 0; 
    width: 100px; height: 5px; background: var(--gold); 
    border-radius: 10px;
}

.section-title.text-center::after { right: 50%; transform: translateX(50%); }

/* قسم من نحن */
.about { padding: 120px 8%; background: white; }
.about-wrapper { display: flex; align-items: center; gap: 70px; flex-wrap: wrap; }
.about-text { flex: 1.2; min-width: 280px; }
.about-text h3 { font-size: 1.8rem; margin-bottom: 20px; }

.about-img { flex: 1; min-width: 280px; position: relative; }
.about-img img { 
    width: 100%; border-radius: 25px; 
    box-shadow: -25px 25px 0 var(--gold); 
    transition: var(--transition);
}
.about-img:hover img { transform: translate(10px, -10px); }

.about-features { list-style: none; margin-top: 35px; }
.about-features li { 
    margin-bottom: 20px; display: flex; align-items: center; 
    font-weight: 700; font-size: 1.15rem; 
}
.about-features i { margin-left: 15px; font-size: 1.5rem; }

/* قسم الخدمات */
.services { background: var(--gray); padding: 120px 8%; }
.services-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px; margin-top: 60px; 
}

.service-card { 
    background: white; padding: 50px 40px; border-radius: 25px; 
    transition: var(--transition); text-align: center; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid transparent;
}

.service-card:hover { 
    transform: translateY(-15px); 
    box-shadow: 0 25px 50px rgba(0,0,0,0.1); 
    border-color: var(--gold);
}

.service-card i { font-size: 4.5rem; margin-bottom: 30px; display: block; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; font-weight: 700; }

/* =========================================
   5. معرض الأعمال (Portfolio)
   ========================================= */
.portfolio { padding: 120px 8%; }
.portfolio-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 25px; 
}

.portfolio-item { 
    position: relative; height: 350px; border-radius: 20px; 
    overflow: hidden; cursor: pointer; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease; }

.overlay { 
    position: absolute; inset: 0; 
    background: rgba(18, 18, 18, 0.88); 
    display: flex; align-items: center; justify-content: center; 
    color: white; opacity: 0; transition: var(--transition); 
}

.portfolio-item:hover .overlay { opacity: 1; }
.portfolio-item:hover img { transform: scale(1.15); }
.overlay h3 { 
    font-size: 1.8rem; border: 2px solid var(--gold); 
    padding: 10px 30px; border-radius: 50px; 
}

/* =========================================
   6. التواصل والخريطة (Contact)
   ========================================= */
.contact { padding: 120px 8%; background: var(--gray); }
.contact-wrapper { display: flex; gap: 50px; flex-wrap: wrap; }

.contact-form { 
    flex: 1; background: white; padding: 60px; border-radius: 30px; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.08); border-right: 8px solid var(--gold);
    min-width: 280px;
}

.contact-form input, .contact-form select, .contact-form textarea { 
    width: 100%; padding: 18px; margin-bottom: 25px; 
    border: 1px solid #e0e0e0; border-radius: 12px; 
    background: #fdfdfd; font-size: 1rem; transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { 
    border-color: var(--gold); outline: none; background: white; 
}

.contact-form textarea { min-height: 120px; resize: vertical; }

.wider-btn { width: 100%; cursor: pointer; border: none; font-family: 'Cairo', sans-serif; }

.social-links-contact { 
    display: flex; justify-content: center; gap: 30px; 
    margin-top: 40px; padding-top: 30px; border-top: 1px solid #eee; 
}

.social-links-contact a { color: var(--gold); font-size: 2.2rem; transition: var(--transition); }
.social-links-contact a:hover { transform: translateY(-8px) scale(1.1); color: var(--dark); }

.map { 
    flex: 1.3; min-height: 550px; border-radius: 30px; 
    overflow: hidden; border: 3px solid white; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    min-width: 280px;
}

.map iframe { width: 100%; height: 100%; min-height: 550px; display: block; }

/* =========================================
   7. الفوتر المطور (Footer)
   ========================================= */
footer { 
    background: var(--dark); color: white; 
    padding: 100px 8% 40px; border-top: 5px solid var(--gold); 
}

.footer-content { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
    gap: 60px; margin-bottom: 60px; 
}

.footer-box h4 { 
    font-size: 1.6rem; margin-bottom: 35px; color: var(--gold); 
    font-weight: 700; position: relative; padding-right: 15px;
}

.footer-box h4::before {
    content: ''; position: absolute; right: 0; top: 0; height: 100%; width: 5px; background: var(--gold);
}

.footer-box p { opacity: 0.8; font-size: 1.1rem; }

.footer-box ul { list-style: none; }
.footer-box ul li { margin-bottom: 18px; }
.footer-box a { 
    color: rgba(255,255,255,0.7); text-decoration: none; 
    transition: var(--transition); font-size: 1.05rem; 
}
.footer-box a:hover { color: var(--gold); padding-right: 12px; }

.contact-link { color: rgba(255,255,255,0.7); }
.contact-link:hover { color: var(--gold); }

.footer-social { display: flex; gap: 20px; margin-top: 30px; }
.footer-social a { 
    background: rgba(197, 160, 89, 0.1); width: 50px; height: 50px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 50%; color: var(--gold); font-size: 1.4rem; 
}
.footer-social a:hover { background: var(--gold); color: var(--dark); transform: rotate(360deg); }

.copyright { 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 40px; font-size: 1rem; opacity: 0.5; 
}

/* =========================================
   8. المودال والنوافذ المنبثقة (Modal)
   ========================================= */
.modal { 
    display: none; position: fixed; z-index: 2000; inset: 0; 
    background: rgba(0,0,0,0.98); padding: 40px; overflow-y: auto; 
}

.modal-content { 
    background: white; padding: 50px; border-radius: 35px; 
    max-width: 1250px; margin: 40px auto; position: relative;
}

.modal-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 25px; margin-top: 40px; 
}

.modal-grid img { width: 100%; border-radius: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.close { 
    color: white; position: fixed; top: 30px; left: 50px; 
    font-size: 70px; cursor: pointer; transition: 0.3s; z-index: 2100;
}
.close:hover { color: var(--gold); transform: scale(1.2); }

/* =========================================
   لايت بوكس (Lightbox)
   ========================================= */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0, 0, 0, 0.96);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 60px rgba(197, 160, 89, 0.2);
    user-select: none;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    left: 30px;
    color: white;
    font-size: 60px;
    line-height: 1;
    cursor: pointer;
    z-index: 9100;
    transition: color 0.3s, transform 0.3s;
}
.lightbox-close:hover { color: var(--gold); transform: scale(1.2); }

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(197, 160, 89, 0.15);
    border: 2px solid var(--gold);
    color: var(--gold);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9100;
}
.lightbox-nav:hover { background: var(--gold); color: var(--dark); }
.lightbox-prev { right: 20px; }
.lightbox-next { left: 20px; }

.lightbox-counter {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    background: rgba(0,0,0,0.5);
    padding: 6px 20px;
    border-radius: 20px;
}

/* صور المودال قابلة للنقر */
.modal-img-wrapper img {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.modal-img-wrapper img:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(197, 160, 89, 0.25);
}

@media (max-width: 600px) {
    .lightbox-prev { right: 8px; }
    .lightbox-next { left: 8px; }
    .lightbox-nav { width: 42px; height: 42px; font-size: 1rem; }
    .lightbox-close { font-size: 45px; top: 12px; left: 15px; }
}
   ========================================= */
@media (max-width: 1100px) {
    .container { padding: 0 5%; }
    header { padding: 15px 5%; }
    .nav-links li a { margin: 0 8px; font-size: 0.95rem; }
}

@media (max-width: 992px) {
    /* إخفاء القائمة في الجوال وإظهار زر الهامبرغر */
    .menu-toggle { display: block; }

    nav {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: var(--dark);
        border-bottom: 3px solid var(--gold);
        display: none;
    }

    nav.active { display: block; }

    .nav-links { 
        display: flex;
        flex-direction: column;
        padding: 20px 0;
        width: 100%;
    }

    .nav-links li { 
        margin: 0;
        text-align: center; 
    }

    .nav-links li a {
        display: block;
        padding: 14px 0;
        margin: 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(197,160,89,0.15);
    }

    /* ترتيب العناصر في الهيدر على الجوال */
    header {
        padding: 12px 5%;
        flex-wrap: nowrap;
    }

    .logo { font-size: 1.4rem; }

    .header-btns {
        order: 3;
        margin-left: 0;
        margin-right: 0;
    }

    .whatsapp-nav {
        padding: 8px 14px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .menu-toggle {
        order: 2;
        margin-left: 10px;
        margin-right: auto;
    }

    /* خدمات */
    .services-grid { grid-template-columns: 1fr 1fr; }

    /* من نحن */
    .about-wrapper { flex-direction: column; text-align: center; }
    .section-title::after { right: 50%; transform: translateX(50%); }
    .about-img img { box-shadow: 0 20px 0 var(--gold); }
    .about-features li { justify-content: center; }

    /* التواصل */
    .contact-wrapper { flex-direction: column; }
    .contact-form { padding: 40px 30px; }
    .map { min-height: 350px; }
    .map iframe { min-height: 350px; }
}

@media (max-width: 768px) {
    .services-grid { grid-template-columns: 1fr; }
    
    .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
    
    .modal-content { padding: 30px 20px; }
    .modal-grid { grid-template-columns: 1fr; }
    
    .footer-content { gap: 40px; }

    .about { padding: 100px 5%; }
    .services { padding: 100px 5%; }
    .portfolio { padding: 100px 5%; }
    .contact { padding: 100px 5%; }
    footer { padding: 80px 5% 40px; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 1.9rem; }
    .hero p { font-size: 0.95rem; }
    .hero-box { padding: 40px 20px; }
    .btn-gold-distinct { padding: 14px 30px; font-size: 1rem; }
    .section-title { font-size: 2rem; }

    .whatsapp-float {
        width: 54px;
        height: 54px;
        font-size: 1.7rem;
        left: 15px;
        bottom: 25px;
    }

    .close { font-size: 50px; left: 20px; top: 15px; }
}
