* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    direction: rtl;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* شريط التنقل */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

html[dir="ltr"] .navbar .container {
    flex-direction: row;
}


.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    color: #3498db;
    margin-left: 10px;
    font-size: 1.8rem;
}

html[dir="LTR"] .logo i {
    margin-left: 0;
    margin-right: 10px;
}


.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #2c3e50;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    position: relative;
    transition: all 0.5s;
    color: #555;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    /* display: flex; */
    align-items: center;
    gap: 8px;

}

.nav-links a::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #A6A6A6;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) scaleY(0);
    transition: all 0.4s;
}

.nav-links a:hover {
    color: #0D7CFF;
    text-shadow: 0 0 10px #0D7CFF, 0 0 20px #0D7CFF, 0 0 30px #0D7CFF, 0 0 40px #0D7CFF;
}

.nav-links a.active {
    color: #3498db;
    background-color: #e8f4fc;
}

.nav-links a.active::before {
    transform: translateX(-50%) scaleY(1);
    width: 0;
    height: 0;
}

/* ================= ACTIVE LINK – CSS ONLY ================= */

/* HOME */
body.page-home .nav-links a[href="index.html"],
body.page-about .nav-links a[href="about.html"],
body.page-services .nav-links a[href="services.html"],
body.page-contact .nav-links a[href="contact.html"],
body.page-login .nav-links a[href="login.html"] {
    color: #0D7CFF;
    text-shadow:
        0 0 10px #0269806c,
        0 0 20px #ffffff,
        0 0 30px #e8e9ea,
        0 0 40px #e5e7e9;
}

/* السهم */
body.page-home .nav-links a[href="index.html"]::before,
body.page-about .nav-links a[href="about.html"]::before,
body.page-services .nav-links a[href="services.html"]::before,
body.page-contact .nav-links a[href="contact.html"]::before,
body.page-login .nav-links a[href="login.html"]::before {
    transform: translateX(-50%) scaleY(1);
}


.btn-login {
    background-color: #3498db;
    color: white !important;
}

.btn-login:hover {
    background-color: #2980b9 !important;
}

.lang-switcher button {
    background: none;
    border: 1px solid #ddd;
    padding: 4px 8px;
    margin: 0 2px;
    cursor: pointer;
    font-weight: bold;
}


/* الأزرار */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* قسم البطل */
.hero {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, #e8f4fc 0%, #f8f9fa 100%);
    margin-top: 00px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
}

.hero h1 {
    font-size: 2.8rem;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* قسم المميزات */
.features {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: #3498db;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 32px;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.feature-card p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* قسم الأقسام الطبية */
.departments {
    padding: 80px 0;
    background: #f8f9fa;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.department-card {
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.department-card:hover {
    transform: translateY(-5px);
}

.department-header {
    padding: 25px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.department-icon {
    width: 60px;
    height: 60px;
    background: #e8f4fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.department-icon i {
    font-size: 28px;
    color: #3498db;
}

.department-header h3 {
    font-size: 1.3rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.department-header p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.department-body {
    padding: 20px;
}

.department-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.doctors-count {
    background: #f8f9fa;
    color: #3498db;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.department-action {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* قسم الإحصائيات */
.stats {
    padding: 80px 0;
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.stat-item i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* قسم الاتصال السريع */
.quick-contact {
    padding: 60px 0;
    background: #2ecc71;
    color: white;
    text-align: center;
}

.quick-contact h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.quick-contact p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.quick-contact .btn {
    background: white;
    color: #2ecc71;
    font-size: 1.1rem;
    padding: 15px 40px;
}

.quick-contact .btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* الفوتر */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: #3498db;
}

.footer-col p {
    color: #bdc3c7;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: #3498db;
    padding-right: 5px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

html[dir="rtl"] .contact-info {
    direction: rtl;
    text-align: right;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

html[dir="rtl"] .contact-info li {
    flex-direction: row-reverse;
}

.contact-info a {
    color: #bdc3c7;
    text-decoration: none;
}

.contact-info a:hover {
    color: #3498db;
}

.contact-info i {
    color: #3498db;
    margin-top: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
    color: #bdc3c7;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

html[dir="rtl"] .footer-bottom {
    text-align: center;
    flex-direction: row-reverse;
}

.hr-1 {
    margin-top: 15px;
    margin-bottom: 15px;
}

/* المودال */
.modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 40px;
    width: 90%;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
}

.modal-content h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
}

/* تصميم متجاوب */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .features-grid,
    .departments-grid,
    .stats-grid,
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    html[dir="rtl"] .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    html[dir="rtl"] .nav-links .login-btn {
        align-self: flex-end;
    }


    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background: white;
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        padding: 30px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 15px;
        width: 100%;
        justify-content: flex-start;
    }

    .features-grid,
    .departments-grid,
    .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}