* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}


/* تأثير احترافي على أيقونة الخدمة */
.service-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
    display: inline-block;
}

/* لما نلمس الكارت، الأيقونة تعمل "نبضة" */
.service-card:hover .service-icon {
    transform: scale(1.2) rotate(10deg);
    color: var(--secondary-color);
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5));
}

/* خلفية خفيفة للكارت تظهر وقت الـ Hover */
.service-card {
    border: 1px solid transparent;
    transition: 0.3s;
}

.service-card:hover {
    background: linear-gradient(to bottom, #ffffff, #f0f7ff);
    border-color: var(--primary-color);
}

:root {
    --primary-color: #0066cc;
    --primary-dark: #0052a3;
    --secondary-color: #00d4ff;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --white: #fff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== NAVBAR ==================== */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo i {
    font-size: 2rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.btn-login {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--primary-dark);
}

/* ==================== HERO SECTION ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    margin-bottom: 40px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.search-box input {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-search {
    padding: 1rem 2rem;
    background: var(--secondary-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: background 0.3s;
}

.btn-search:hover {
    background: #00b8cc;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==================== SECTION TITLE ==================== */
.section-title {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-color);
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* ==================== SERVICES SECTION ==================== */
.services {
    padding: 60px 20px;
    background: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.service-card p {
    color: #666;
    font-size: 0.95rem;
}

/* ==================== DOCTORS SECTION ==================== */
.doctors {
    padding: 60px 20px;
}

.doctors-search-container {
    position: relative;
    max-width: 400px;
    margin: 0 auto 3rem;
    display: flex;
    align-items: center;
}

.doctors-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s;
}

html[dir="rtl"] .doctors-search-input {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
}

.doctors-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.doctors-search-container i {
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    pointer-events: none;
}

html[dir="rtl"] .doctors-search-container i {
    right: 1rem;
    left: auto;
}

.doctors-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.doctors-nav {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.doctors-nav:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.doctors-nav:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    flex: 1;
    min-height: 400px;
}
.doctor-card {
    background: var(--white);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: all 0.3s;
}

.doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* الدايرة اللي شايلة الصورة */
.doctor-image {
    width: 250px;
    height: 250px;
    border: 3px solid #eee;
    margin: 0 auto 15px;
    overflow: hidden; /* السجان اللي هيحبس السواد بره */
    position: relative;
    background-color: #fff;
}
.btn-book {
background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.2);
}
.nav-menu a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
    font-weight: bold;
}


.btn-book:hover {
letter-spacing: 1px; /* حركة تباعد حروف بسيطة */
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    filter: brightness(1.1);
}
.doctors-grid {
    display: flex; /* أكيد إنت عاملها كدة */
    overflow-x: auto; /* عشان تسمح بالتحرك الأفقي */
    scroll-behavior: smooth; /* السطر ده هو "السحر" اللي بيخلي الحركة ناعمة */
}


.doctor-image img {
    width: 100%;
    height: 100%;
    /* جرب "cover" بدل "contain" لأنها بتمسح الحواف تماماً */
    object-fit: cover; 
    display: block;
    /* التكة دي بتعمل زووم بسيط 15% عشان تطرد أي سواد في الأطراف */
    transform: scale(1.44); 
    object-position: center top; /* عشان نضمن إن الزووم مياكلش الراس */
}
.doctor-info {
    padding: 1.5rem;
}

.doctor-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.specialty {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.rating {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.rating i {
    color: #ffc107;
    margin-right: 0.2rem;
}

.rating span {
    color: #666;
    margin-left: 0.5rem;
}

.experience {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.doctor-info .btn {
    width: 100%;
    margin-top: 1rem;
}

/* ==================== STATS SECTION ==================== */
.stats {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* ==================== REVIEWS SECTION ==================== */
.reviews {
    padding: 60px 20px;
    background: var(--light-gray);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-right: 4px solid var(--primary-color);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.review-author h4 {
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.review-author span {
    font-size: 0.85rem;
    color: #999;
}

.review-rating i {
    color: #ffc107;
    margin-left: 0.2rem;
}

.review-card p {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==================== BOOKING STEPS SECTION ==================== */
.booking-steps {
    padding: 60px 20px;
}

.steps-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.step {
    flex: 1;
    min-width: 250px;
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    position: relative;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.step p {
    color: #666;
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--primary-color);
    display: none;
}

@media (max-width: 768px) {
    .step-arrow {
        display: block;
        transform: rotate(90deg);
    }
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    padding: 60px 20px;
    background: var(--light-gray);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-item h4 {
    margin-bottom: 0.3rem;
    color: var(--text-color);
}

.contact-item p {
    color: #666;
    font-size: 0.95rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.contact-form button {
    align-self: flex-start;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px; /* بما إن الموقع RTL */
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: none; /* هنظهره بالـ JS لما نسكرول */
    z-index: 1000;
    transition: 0.3s;
}
.back-to-top:hover { background-color: var(--primary-dark); }

.footer {
    background: #2c3e50;
    color: var(--white);
    padding: 40px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-section p {
    color: #bbb;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: #999;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .search-box {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .services-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .doctors-grid {
        grid-template-columns: 1fr;
    }

    .doctors-wrapper {
        gap: 0.5rem;
    }

    .doctors-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .steps-container {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .nav-container {
        padding: 1rem;
    }

    .hero {
        padding: 50px 20px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .doctors-grid {
        gap: 1rem;
        min-height: auto;
    }

    .doctors-nav {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .doctors-search-input {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem 0.6rem 2rem;
    }
}

.hero {
    background: linear-gradient(45deg, #0066cc, #00d4ff);
    background-size: 200% 200%;
    animation: gradientMove 10s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.clinics-section {
    padding: 80px 0;
    background-color: #f0f7ff;
}

/* الحاوية الأساسية للشبكة */
.clinics-grid-static {
    display: grid;
    /* ده السطر اللي بيعمل 2 فوق و 2 تحت */
    grid-template-columns: repeat(2, 1fr); 
    gap: 30px; /* المسافة بين الكروت */
    max-width: 1000px; /* صغرنا العرض شوية عشان يكونوا ملمومين في نص الصفحة */
    margin: 0 auto;
    padding: 20px;
}

.clinic-card {
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
    display: flex;
flex-direction: column;
justify-content: space-between; /* دي اللي بتوزع العناصر وتطرد الزرار لتحت */
min-height: 550px; /* أو الرقم اللي يريحك المهم يوحد الطول */
}

.clinic-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 102, 204, 0.15);
}

/* طول الصور الكبير اللي طلبته */
.clinic-image {
    width: 100%;
    height: 350px; 
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
}

.clinic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* للموبايل: نخليهم 1 فوق 1 عشان ميبقوش مزنوقين */
@media (max-width: 768px) {
    .clinics-grid-static {
        grid-template-columns: 1fr;
    }
}
.doctors-search-input {
    border-radius: 50px !important;
    padding: 12px 25px !important;
    border: 2px solid #e0e0e0;
    transition: 0.3s;
}
.doctors-search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0,102,204,0.1);
}
.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
    display: inline-block;
}