/* ... (نفس المتغيرات وأكواد الهيدر والبحث السابقة تبقى كما هي) ... */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root {
    --primary: #003366; --primary-light: #004d99; --accent: #f1c40f;
    --text-dark: #1a1a1a; --glass-bg: rgba(255, 255, 255, 0.95);
    --grid-color: rgba(0, 51, 102, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif; color: var(--text-dark);
    background-color: #f0f2f5;
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px), 
                      linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 30px 30px; background-attachment: fixed;
    direction: rtl; text-align: right; overflow-x: hidden;
}

a { text-decoration: none; transition: 0.3s; color: inherit; }
ul { list-style: none; }

/* Header & Nav (كما هي، تأكد من وجود كود البحث المدمج) */
header { position: fixed; top: 0; right: 0; width: 100%; z-index: 1000; padding: 8px 0; background: rgba(255, 255, 255, 0.98); box-shadow: 0 4px 20px rgba(0,0,0,0.05); }
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 90%; max-width: 1300px; margin: 0 auto; padding: 0 15px; }
.logo { display: flex; align-items: center; gap: 10px; z-index: 1002; }
.logo img { height: 50px !important; width: auto !important; object-fit: contain; }
.logo-txt h1 { font-size: 1rem; color: var(--primary); font-weight: 800; margin: 0; line-height: 1.3; }
.nav-wrapper { display: flex; align-items: center; gap: 20px; }
.nav-links { display: flex; gap: 5px; }
.nav-links li a { color: var(--primary); font-weight: 700; padding: 8px 12px; font-size: 0.9rem; border-radius: 6px; display: block; }
.nav-links li a:hover { background: rgba(0, 51, 102, 0.08); color: var(--primary-light); }

/* البحث (المدمج) */
.search-form { display: flex; align-items: center; background-color: #fff; border: 1px solid #e1e4e8; border-radius: 50px; padding: 3px 12px; width: 180px; height: 38px; transition: all 0.3s ease; }
.search-form:focus-within { width: 220px; border-color: var(--primary); }
.search-form input { border: none; background: transparent; width: 100%; font-size: 0.85rem; height: 100%; padding: 0 5px; }
.search-form button { border: none; background: transparent; cursor: pointer; color: var(--primary); font-size: 1rem; padding: 0; }

/* الموبايل */
.mobile-toggle { display: none; font-size: 1.6rem; color: var(--primary); cursor: pointer; z-index: 1002; }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 998; opacity: 0; visibility: hidden; transition: 0.3s; }
.overlay.active { opacity: 1; visibility: visible; }
@media (max-width: 992px) {
    .mobile-toggle { display: block; }
    .nav-wrapper { position: fixed; top: 0; right: -300px; width: 280px; height: 100vh; background: #fff; flex-direction: column-reverse; justify-content: flex-end; padding: 80px 20px; gap: 15px; box-shadow: -5px 0 20px rgba(0,0,0,0.1); transition: 0.4s; z-index: 999; overflow-y: auto; }
    .nav-wrapper.active { right: 0; }
    .nav-links { flex-direction: column; width: 100%; }
    .search-form { width: 100%; margin-bottom: 10px; background-color: #f9f9f9; }
}

/* باقي التنسيقات (الهيرو، الكروت...) */
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding-bottom: 50px; }
.hero { height: 85vh; margin-top: 75px; background: linear-gradient(135deg, rgba(0,51,102,0.9), rgba(0,51,102,0.7)), url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?q=80&w=1600'); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; color: white; clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%); }
.hero h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; }
.hero-mini { height: 350px; margin-top: 75px; background: linear-gradient(135deg, rgba(0,51,102,0.95), rgba(0,51,102,0.8)), url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1600'); background-size: cover; background-position: center; display: flex; align-items: center; justify-content: center; text-align: center; color: white; clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); }
.hero-mini h2 { font-size: 2.2rem; margin-top: 15px; }
.btn-main { background: var(--accent); color: var(--primary); padding: 12px 40px; border-radius: 50px; font-weight: bold; display: inline-block; }

/* الاختصارات */
.shortcuts-panel { width: 90%; max-width: 1200px; margin: -60px auto 50px; background: white; border-radius: 15px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); display: flex; justify-content: center; align-items: center; padding: 25px; position: relative; z-index: 5; flex-wrap: wrap; gap: 15px; }
.shortcut-item { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--primary); transition: 0.3s; width: 110px; padding: 10px; border-radius: 10px; }
.shortcut-item:hover { transform: translateY(-5px); background: #f9f9f9; color: var(--accent); }
.shortcut-icon { width: 50px; height: 50px; background: #eef4fb; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; font-size: 1.4rem; transition: 0.3s; color: var(--primary); }
.shortcut-item:hover .shortcut-icon { background: var(--primary); color: white; }
.shortcut-label { font-weight: 700; font-size: 0.85rem; }

/* الكروت الموحدة */
.grid-system { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.universal-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border: 1px solid #eee; transition: 0.3s; display: flex; flex-direction: column; height: 100%; }
.universal-card:hover { transform: translateY(-7px); box-shadow: 0 15px 30px rgba(0,0,0,0.12); border-color: var(--accent); }
.card-img-box { width: 100%; height: 200px; overflow: hidden; background: #f0f0f0; display: flex; align-items: center; justify-content: center; }
.card-img-box img { width: 100% !important; height: 100% !important; object-fit: cover !important; transition: transform 0.5s; }
.universal-card:hover .card-img-box img { transform: scale(1.1); }
.card-icon-placeholder { font-size: 4rem; color: #ddd; }
.card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.card-badge { align-self: flex-start; background: var(--accent); color: var(--primary); padding: 3px 10px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; margin-bottom: 10px; }
.card-title { font-size: 1.1rem; color: var(--primary); font-weight: 700; margin-bottom: 10px; line-height: 1.4; }
.card-desc { font-size: 0.9rem; color: #666; margin-bottom: 15px; line-height: 1.6; }
.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f5f5f5; padding-top: 15px; }
.card-btn { color: var(--primary); font-weight: bold; font-size: 0.9rem; }

/* خدمات */
.services-wrapper { margin-top: -80px; position: relative; z-index: 2; padding-bottom: 50px; }
.section-header { text-align: center; margin: 50px 0 30px; font-size: 2rem; color: var(--primary); font-weight: 800; position: relative; }
.section-header::after { content:''; display:block; width:60px; height:4px; background:var(--accent); margin:10px auto; border-radius:2px; }

/* --- تفاصيل المنشور (إصلاح الصور الكبيرة) --- */
.details-container { width: 90%; max-width: 900px; margin: 100px auto 50px; }
.content-card { background: white; border-radius: 15px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.08); }

/* تقليل ارتفاع صورة الغلاف في التفاصيل */
.cover-img-wrapper { 
    width: 100%; 
    height: 350px; /* تم تقليل الارتفاع ليكون أجمل */
    overflow: hidden; background: #eee; border-bottom: 5px solid var(--accent); 
}
.cover-img { width: 100% !important; height: 100% !important; object-fit: cover !important; }

.body-pad { padding: 40px; }

/* إصلاح الصور داخل النص */
.text-content { 
    line-height: 2; font-size: 1.15rem; color: #444; margin-bottom: 30px; 
    white-space: pre-wrap; 
}
.text-content img { 
    max-width: 100% !important; height: auto !important; 
    border-radius: 10px; margin: 20px 0; 
}

/* روابط ومرفقات */
.external-link-box { background: #f0f8ff; border: 1px solid #cce5ff; padding: 15px 20px; border-radius: 50px; margin: 30px 0; display: flex; align-items: center; justify-content: space-between; }
.btn-link-pro { background: var(--accent); color: var(--primary); padding: 8px 25px; border-radius: 50px; font-weight: bold; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 25px; }
.media-item { height: 180px; border-radius: 10px; overflow: hidden; border: 1px solid #ddd; position: relative; cursor: pointer; transition: 0.3s; }
.media-item:hover { transform: scale(1.02); }
.media-item img, .media-item video { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; }

/* اتصل بنا */
.contact-hero { height: 300px; margin-top: 66px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; flex-direction: column; clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%); }
.contact-box { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.1); flex: 1; min-width: 300px; }
.container-contact { display: flex; gap: 30px; flex-wrap: wrap; margin-top: -50px; position: relative; z-index: 2; width: 90%; max-width: 1000px; margin-left: auto; margin-right: auto; }
.info-item { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.info-item i { width: 40px; height: 40px; background: #f0f2f5; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
button.btn-submit { width: 100%; background: var(--primary); color: white; border: none; padding: 12px; border-radius: 5px; font-weight: bold; cursor: pointer; }

/* الفوتر */
footer { background: var(--primary); color: white; padding: 50px 0 20px; margin-top: 50px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }

@media (max-width: 768px) { .hero { height: 60vh; } .cover-img-wrapper { height: 200px; } .external-link-box { flex-direction: column; text-align: center; gap: 15px; } }

/* --- زر اقرأ المزيد الاحترافي (Premium Button) --- */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 25px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(45deg, var(--primary), var(--primary-light)); /* تدرج لوني كحلي */
    border: none;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
    text-decoration: none;
    margin-top: auto; /* لضمان بقائه في الأسفل */
}

/* تأثير الحركة عند المرور */
.btn-premium::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0%;
    height: 100%;
    background: var(--accent); /* يمتلئ باللون الذهبي */
    transition: all 0.4s ease;
    z-index: 0;
}

.btn-premium:hover::before {
    width: 100%;
}

.btn-premium span, .btn-premium i {
    position: relative;
    z-index: 1; /* ليبقى النص فوق اللون */
}

.btn-premium:hover {
    color: var(--primary); /* يتغير لون النص للكحلي */
    box-shadow: 0 6px 20px rgba(241, 196, 15, 0.4);
    transform: translateY(-3px);
}