/* ==========================================================================
   General & Reset
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* يمنع السكرول الأفقي تماماً */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
    background: #f8f9fa;
    color: #333;
    line-height: 1.8;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Top Bar
   ========================================================================== */

.top-bar {
    background: #0d3b66;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
}

.top-bar i {
    margin-left: 6px;
    color: #f39c12;
}

/* ==========================================================================
   Header & Navbar (حل مشكلة اللوجو)
   ========================================================================== */

header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    max-width: 60%;
}

.logo-img {
    max-height: 50px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: #333;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #f39c12;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: #0d3b66;
    color: #fff;
}

.btn-primary:hover {
    background: #082844;
}

.btn-login {
    background: #f39c12;
    color: #fff;
}

.btn-login:hover {
    background: #d68910;
}

.btn-success {
    background: #25d366;
    color: #fff;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
}

.btn-submit {
    width: 100%;
    background: #0d3b66;
    color: #fff;
    font-size: 1.05rem;
}

.btn-submit:hover {
    background: #082844;
}

/* ==========================================================================
   Hero Section & Offsets (حل اختفاء جميع الأقسام تحت الهيدر)
   ========================================================================== */

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
                url('../images/hero.jpg') center/cover no-repeat;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content {
    color: #fff;
}

.hero-content h1 {
    font-size: 46px;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-content p {
    font-size: 19px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #e2e8f0;
}

section {
    padding: 70px 0;
}

/* تطبيق إزاحة الهيدر لجميع العناصر ذات الـ id */
section[id], header[id], div[id] {
    scroll-margin-top: 110px;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
    font-size: 32px;
    color: #0d3b66;
    font-weight: 800;
}

.section-subtitle {
    text-align: center;
    margin-top: -20px;
    margin-bottom: 30px;
    color: #666;
    font-size: 0.95rem;
}

/* ==========================================================================
   Stats Section
   ========================================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.stat-card h3 {
    color: #0d3b66;
    font-size: 38px;
    margin-bottom: 5px;
    font-weight: 800;
}

.stat-card p {
    color: #64748b;
    font-weight: 600;
}

/* ==========================================================================
   Advantages Section
   ========================================================================== */

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.adv-card {
    background: #fff;
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.adv-card i {
    font-size: 40px;
    color: #f39c12;
    margin-bottom: 15px;
}

.adv-card h3 {
    margin-bottom: 10px;
    color: #0d3b66;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card i {
    font-size: 45px;
    color: #0d3b66;
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 12px;
    color: #0d3b66;
}

.card p {
    color: #555;
    font-size: 0.95rem;
}

/* ==========================================================================
   Partners Section
   ========================================================================== */

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: center;
}

.partner-card {
    background: #fff;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    border-right: 4px solid #f39c12;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.partner-brand-img {
    max-height: 55px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-card:hover .partner-brand-img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* ==========================================================================
   Coverage Section
   ========================================================================== */

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.coverage-card {
    background: #fff;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #eef2f5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    text-align: right;
    transition: all 0.3s ease;
    user-select: none;
    cursor: pointer;
}

.coverage-card:hover {
    border-color: #0d3b66;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
}

.coverage-card strong {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #0d3b66;
    font-size: 1.05rem;
}

.coverage-card strong i {
    transition: transform 0.3s ease;
    font-size: 0.85em;
}

.coverage-card.active strong i {
    transform: rotate(180deg);
}

.coverage-details {
    display: none;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
}

.coverage-card.active .coverage-details {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.contact-form-container,
.contact-info {
    background: #fff;
    padding: 35px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-form-container h3,
.contact-info h3 {
    margin-bottom: 15px;
    color: #0d3b66;
    font-size: 1.4rem;
}

.contact-subtitle {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 20px;
}

input,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

input:focus,
textarea:focus {
    border-color: #0d3b66;
}

.contact-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.btn-contact-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 15px;
    border-radius: 8px;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.92rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.06);
}

.btn-contact-action:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-whatsapp-action { background-color: #25D366; }
.btn-facebook-action { background-color: #1877F2; }
.btn-phone1-action { background-color: #0076fe; }
.btn-phone2-action { background-color: #34495E; }

/* ==========================================================================
   Footer & Privacy Link Fix (حل لون سياسة الخصوصية)
   ========================================================================== */

footer {
    background: #0d3b66;
    color: #ffffff;
    padding: 25px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-links a,
.footer-link-item {
    color: #ffffff !important; /* إجبار اللون الأبيض ليكون واضحاً على الخلفية الداكنة */
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-link-item:hover {
    color: #f39c12 !important; /* تغيير اللون إلى الذهبي عند التمرير */
}

/* ==========================================================================
   Modal
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 480px;
    padding: 35px;
    border-radius: 15px;
    text-align: center;
    position: relative;
}

.modal-icon {
    font-size: 48px;
    color: #f39c12;
    margin-bottom: 15px;
}

.close-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 26px;
    cursor: pointer;
    color: #888;
}

.portal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

/* ==========================================================================
   WhatsApp Float
   ========================================================================== */

.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 58px;
    height: 58px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Breakpoints (الموبايل والتابلت)
   ========================================================================== */

@media (max-width: 991px) {
    /* زيادة الإزاحة في الموبايل لتناسب ارتفاع الهيدر المتراكب */
    section[id], header[id], div[id] {
        scroll-margin-top: 210px;
    }

    .navbar {
        flex-direction: column;
        gap: 12px;
        padding: 10px 0;
    }

    .logo {
        max-width: 80%;
        justify-content: center;
    }

    .logo-img {
        max-height: 38px; /* تحجيم أقصى للوجو في الموبايل */
        width: auto;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 15px;
    }

    .nav-links a {
        font-size: 0.88rem;
    }

    .auth-buttons {
        margin-top: 4px;
    }

    .btn-login {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 30px;
    }

    .hero-content p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .top-bar {
        font-size: 11px;
        padding: 8px 5px;
    }

    .logo-img {
        max-height: 32px;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .section-title {
        font-size: 22px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}
