/*
Theme Name: Qimam Al-Ibdaa
Author: Royal Design
Description: القالب الرسمي لوكالة قمم الإبداع متوافق مع كافة الأجهزة.
Version: 1.0.0
*/

:root {
    --primary: #F58634;
    --secondary: #0056b3;
    --dark: #1a1a1a;
    --light: #f4f7f6;
    --white: #ffffff;
    --gray: #444;
    --whatsapp-color: #25d366;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Tajawal', sans-serif;
    outline: none; text-decoration: none; border: none;
}

html { scroll-behavior: smooth; overflow-x: hidden; font-size: 16px; }
body { background: var(--light); color: var(--dark); overflow-x: hidden; line-height: 1.8; }
p { font-size: 1.2rem; color: var(--gray); }
h3 { font-size: 2.2rem; font-weight: 800; }

.whatsapp-float {
    position: fixed; bottom: 25px; right: 25px;
    background-color: var(--whatsapp-color); color: #fff;
    width: 65px; height: 65px; border-radius: 50%;
    text-align: center; font-size: 38px;
    box-shadow: 2px 4px 15px rgba(0,0,0,0.3);
    z-index: 10000; display: flex; align-items: center; justify-content: center;
    transition: 0.3s; animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

header {
    position: fixed; top: 0; left: 0; right: 0;
    background: var(--white); box-shadow: 0 .5rem 1rem rgba(0,0,0,.1);
    z-index: 1000; padding: 1.2rem 5%;
    display: flex; align-items: center;
    justify-content: space-between; 
}

.logo { 
    font-size: 1.9rem; color: var(--primary); font-weight: 900; 
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; 
}
.logo span { color: var(--secondary); }
.logo img { height: 45px; width: auto; }

.navbar {
    flex: 1; 
    text-align: center; 
}

.navbar a { 
    font-size: 1.15rem; color: var(--dark); 
    margin: 0 0.8rem; 
    font-weight: 700; transition: .3s; 
    display: inline-block;
}
.navbar a:hover { color: var(--primary); }

.icons { flex-shrink: 0; } 

.btn-contact {
    padding: .8rem 1.8rem; background: var(--primary); color: var(--white);
    border-radius: 5rem; font-weight: 800; font-size: 1.1rem; transition: .3s;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-contact:hover { background: var(--secondary); transform: scale(1.05); }

#menu-btn { font-size: 2.5rem; color: var(--dark); cursor: pointer; display: none; }

.home {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
    background: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('assets/images/hero-bg.jpg');
    background-size: cover; background-position: center; padding: 0 5% 0 5%; padding-top: 8rem;
}
.home .content { max-width: 65rem; width: 100%; color: var(--white); margin: 0 auto; }
.home .content h3 { font-size: 4rem; font-weight: 900; line-height: 1.2; margin-bottom: 1.5rem; }
.home .content p { font-size: 1.5rem; line-height: 1.8; margin-bottom: 2.5rem; color: #f0f0f0; max-width: 800px; margin-left: auto; margin-right: auto; }

.btn-container {
    display: flex; align-items: center; justify-content: center;
    gap: 20px; flex-wrap: wrap; margin-top: 1rem;
}

.btn { 
    display: inline-flex; align-items: center; justify-content: center; 
    padding: 1rem 3rem; background: var(--primary); color: var(--white); 
    font-size: 1.3rem; border-radius: .8rem; cursor: pointer; 
    transition: .3s; font-weight: 800; min-width: 220px; 
}
.btn:hover { background: var(--secondary); letter-spacing: 1px; }

.btn-outline { 
    background: transparent; border: 2px solid var(--white) !important; 
    margin-right: 0 !important; 
}
.btn-outline:hover { background: var(--white); color: var(--dark); letter-spacing: 0; }

section { padding: 5rem 5%; }
.heading { text-align: center; margin-bottom: 4rem; }
.heading h1 { font-size: 3rem; color: var(--secondary); font-weight: 900; display: inline-block; position: relative; padding-bottom: 1.2rem; }
.heading h1::after { content: ''; position: absolute; bottom: 0; left: 25%; width: 50%; height: 5px; background: var(--primary); border-radius: 5px; }

.about .row { display: flex; align-items: center; flex-wrap: wrap; gap: 3rem; }
.about .row .image { flex: 1 1 40rem; }
.about .row .image img { width: 100%; border-radius: 1.5rem; box-shadow: 0 1rem 2rem rgba(0,0,0,0.15); }
.about .row .content { flex: 1 1 40rem; }
.about .row .content h3 { font-size: 2.4rem; color: var(--secondary); margin-bottom: 1.5rem; }

.stats {
    background: linear-gradient(rgba(0, 86, 179, 0.9), rgba(0, 86, 179, 0.9)), url('https://images.unsplash.com/photo-1557804506-669a67965ba0?auto=format&fit=crop&w=1200&q=80');
    background-size: cover; background-position: center; background-attachment: fixed;
    padding: 6rem 5%; color: var(--white); display: flex; flex-wrap: wrap; gap: 3rem; justify-content: center; text-align: center;
}
.stats .box { flex: 1 1 20rem; padding: 2rem; }
.stats .box i { font-size: 4.5rem; color: var(--primary); margin-bottom: 1.5rem; }
.stats .box .number { font-size: 4.2rem; font-weight: 900; display: block; margin-bottom: 0.5rem; color: var(--white); }
.stats .box p { font-size: 1.5rem; font-weight: 700; color: #eee; }

.services .box-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; }
.services .box-container .box { background: var(--white); padding: 3rem; text-align: center; border-radius: 1.2rem; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.1); transition: .3s; border-top: 6px solid transparent; }
.services .box-container .box:hover { transform: translateY(-10px); border-top: 6px solid var(--primary); }
.services .box-container .box i { font-size: 3.5rem; color: var(--primary); margin-bottom: 2rem; }
.services .box-container .box h3 { font-size: 1.7rem; color: var(--dark); margin-bottom: 1.2rem; }
/* --- تعديلات قسم أعمالنا (الصور واضحة وتغمق عند التمرير) --- */
.portfolio .box-container .box { 
    height: 38rem; 
    overflow: hidden; 
    border-radius: 1.2rem; 
    position: relative; 
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.1); 
}

/* حالة الصورة الافتراضية */
.portfolio .box-container .box img { 
    height: 100%; 
    width: 100%; 
    object-fit: cover; 
    transition: all 0.4s ease; /* حركة سلسة */
}

/* حالة التعتيم والكتابة الافتراضية (مخفية) */
.portfolio .box-container .box .content { 
    position: absolute; top: 0; left: 0; height: 100%; width: 100%; 
    background: rgba(0,0,0,0.8); /* درجة التغميق عند التمرير */
    display: flex; align-items: center; justify-content: center; flex-direction: column; 
    padding: 2.5rem; text-align: center;
    opacity: 0; /* مخفية تماماً حتى نمرر الماوس */
    transition: all 0.4s ease; 
}

.portfolio .box-container .box .content h3 { font-size: 2.4rem; color: var(--white); margin-bottom: 1.2rem; transform: translateY(-20px); transition: 0.4s; }
.portfolio .box-container .box .content p { font-size: 1.3rem; color: #f0f0f0; padding: 1.2rem 0; transform: translateY(20px); transition: 0.4s; }

/* --- ماذا يحدث عند تمرير الماوس؟ --- */
.portfolio .box-container .box:hover .content {
    opacity: 1; /* يظهر اللون الغامق والكتابة */
}
.portfolio .box-container .box:hover .content h3,
.portfolio .box-container .box:hover .content p {
    transform: translateY(0); /* حركة دخول أنيقة للنصوص */
}
.portfolio .box-container .box:hover img {
    transform: scale(1.1); /* الصورة تكبر قليلاً لتعطي طابع الفخامة */
}

.btn-more { padding: 1rem 2.5rem; background: var(--primary); color: var(--white); font-size: 1.2rem; border-radius: .6rem; font-weight: 800; transition: .3s; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.btn-more:hover { background: var(--secondary); transform: scale(1.05); }

.features { background: #f0f3f5; }
.features .box-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.features .box-container .box { background: var(--white); padding: 2.5rem; border-radius: .8rem; text-align: center; box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.05); transition: .3s; }
.features .box-container .box:hover { background: var(--primary); }
.features .box-container .box:hover h3, .features .box-container .box:hover i, .features .box-container .box:hover p { color: var(--white); }
.features .box-container .box i { font-size: 3rem; color: var(--secondary); margin-bottom: 1.5rem; }
.features .box-container .box h3 { font-size: 1.5rem; color: var(--dark); margin-bottom: 0.8rem; }

.contact .row { display: flex; flex-wrap: wrap; gap: 3rem; }
.contact .row .map { flex: 1 1 40rem; width: 100%; border-radius: 1.5rem; overflow: hidden; height: 450px; }
.contact .row form { flex: 1 1 40rem; background: var(--white); padding: 3rem; border-radius: 1.5rem; box-shadow: 0 .5rem 2rem rgba(0,0,0,.1); }
.contact .row form h3 { font-size: 2.2rem; margin-bottom: 1.5rem; color: var(--secondary); }
.contact .row form .inputBox input, .contact .row form textarea { width: 100%; padding: 1.2rem; font-size: 1.1rem; color: var(--dark); background: #f9f9f9; border-radius: .6rem; border: 1px solid #eee; margin-bottom: 1.2rem; }
.contact .row form textarea { height: 180px; resize: none; }

.footer { background: var(--dark); color: var(--white); text-align: center; padding: 4rem 5%; }
.footer .share a { height: 3.5rem; width: 3.5rem; line-height: 3.5rem; font-size: 1.8rem; background: rgba(255,255,255,.1); color: var(--white); border-radius: 50%; margin: 0 .5rem; display: inline-block; transition: .3s; }
.footer .share a:hover { background: var(--primary); transform: translateY(-5px); }
.footer .links a { font-size: 1.3rem; color: var(--white); margin: 0 1.5rem; display: inline-block; padding: 1rem 0; }
.footer .links a:hover { color: var(--primary); }
.footer .credit { font-size: 1.2rem; border-top: .1rem solid rgba(255,255,255,.1); padding-top: 2.5rem; margin-top: 2rem; }
.footer .credit span { color: var(--primary); font-weight: 800; }

@media (max-width: 991px) { 
    html { font-size: 55%; } 
    header { padding: 1.2rem 3%; } 
    .navbar a { margin: 0 0.5rem; }
}
@media (max-width: 768px) {
    #menu-btn { display: inline-block; }
    .header .navbar { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-top: .1rem solid rgba(0,0,0,.1); clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: .3s linear; display: flex; flex-direction: column; }
    .header .navbar.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .header .navbar a { display: block; margin: 2rem; font-size: 1.8rem; text-align: center; border-bottom: 1px solid #eee; padding-bottom: 1.5rem; }
    .header .btn-contact { display: none; }
    .home .content h3 { font-size: 3rem; }
    .btn { width: 100%; max-width: 300px; }
    .btn-container { flex-direction: column; gap: 15px; }
}
/* =========================================
   تأثيرات قسم أعمالنا (Hover Overlay)
   ========================================= */
   
.portfolio .box-container .box {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    height: 38rem; 
}

/* 1. إعداد الصورة الافتراضية */
.portfolio .box-container .box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease; /* حركة ناعمة لتكبير الصورة */
}

/* 2. إعداد الصندوق الأسود الشفاف (مخفي افتراضياً) */
.portfolio .box-container .box .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75); /* درجة التغميق */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0; /* مخفي تماماً */
    visibility: hidden; /* لمنع التفاعل معه وهو مخفي */
    transition: all 0.5s ease;
    padding: 2rem;
    text-align: center;
    z-index: 2;
}

/* 3. إعداد حركة النصوص (تكون نازلة/طالعة قليلاً قبل التمرير) */
.portfolio .box-container .box .content h3 {
    transform: translateY(-20px);
    transition: transform 0.5s ease;
}
.portfolio .box-container .box .content p,
.portfolio .box-container .box .content .btn-more {
    transform: translateY(20px);
    transition: transform 0.5s ease;
}

/* 4. السحر: ماذا يحدث عند تمرير الماوس؟ */
.portfolio .box-container .box:hover img {
    transform: scale(1.1); /* تكبير الصورة */
}
.portfolio .box-container .box:hover .content {
    opacity: 1; /* إظهار اللون الغامق */
    visibility: visible;
}
.portfolio .box-container .box:hover .content h3,
.portfolio .box-container .box:hover .content p,
.portfolio .box-container .box:hover .content .btn-more {
    transform: translateY(0); /* عودة النصوص لأماكنها الطبيعية */
}