/* المتغيرات والألوان الأساسية */
:root {
    --primary-color: #1f618d; /* أزرق بحري هادئ ومريح للعين يبعث على الثقة */
    --secondary-color: #e6b325; /* لون ذهبي ناعم للأزرار يجذب الانتباه بدون إزعاج */
    --bg-light: #f4f8fa; /* خلفية بيضاء مائلة لزرقة فاتحة جداً لتعطي إحساساً بالنظافة والتعقيم */
    --text-dark: #2c3e50; /* رمادي داكن بدلاً من الأسود الحاد لراحة القراءة */
    --white: #ffffff;
    --transition: all 0.3s ease;
}

/* الإعدادات العامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* لضمان عدم تغطية الهيدر للأقسام عند التحديث أو النقر */
}

/* --- Scroll Reveal Animations (الحركات التفاعلية عند النزول) --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تنسيق فئات الأقسام لتغيير الخلفيات */
.bg-light-section { background-color: var(--bg-light); }
.bg-white-section { background-color: var(--white); }

/* --- Header & Navbar --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 55px; 
    object-fit: contain;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
    transition: var(--transition);
}

nav ul li a:hover {
    color: var(--secondary-color);
}

/* زر القائمة في الجوال (الثلاث شرطات) */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary-color);
    cursor: pointer;
    margin-right: auto;
}

/* --- Hero Section (الخلفية والفيديو) --- */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--primary-color);
    overflow: hidden;
}

.hero video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 97, 141, 0.6); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 800px;
    padding: 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 15px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 179, 37, 0.4); 
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(230, 179, 37, 0.6);
}

/* --- Sections Shared Styles --- */
section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* --- About & Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: var(--white);
    padding: 40px 20px;
    text-align: center;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary-color);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.2rem;
    color: var(--text-dark);
}

/* --- Swiper (Sliders) Custom Styles --- */
.swiper {
    width: 100%;
    padding-bottom: 50px !important;
    padding-top: 20px !important;
    min-height: 400px; 
}

.custom-swiper {
    max-width: 500px; 
    margin: 0 auto;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--primary-color) !important;
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color) !important;
}

/* --- Services & Doctors Cards --- */
.card-container {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    padding-bottom: 20px;
}

.card-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.doctor-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    object-position: top;
    border-bottom: 5px solid var(--secondary-color);
}

.service-img-box {
    width: 120px;
    height: 120px;
    margin: 30px auto 10px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.service-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-info {
    padding: 25px 20px;
}

.card-info h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.card-info h4 {
    color: var(--text-dark);
    font-size: 1rem;
    margin-bottom: 15px;
    background: #e8f0f6; 
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
}

.card-info p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.8;
}

/* --- Gallery Cards --- */
.gallery-swiper {
    max-width: 800px; 
    margin: 0 auto;
}

.gallery-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: transparent;
}

.gallery-item img {
    max-width: 100%;
    height: auto; 
    max-height: 500px; 
    object-fit: contain; 
    border-radius: 15px;
    display: block;
}

/* --- Reviews Section --- */
.reviews-swiper {
    max-width: 600px;
    margin: 0 auto;
    min-height: 250px;
}

.review-card {
    background: var(--white);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    text-align: center;
    height: 100%;
    transition: var(--transition);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.review-card .stars {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.review-card .review-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 25px;
    font-style: italic;
}

.review-card .google-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #f4f8fa;
    color: var(--primary-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid #e0eaf1;
}

.review-card .google-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* --- Booking & Contact Form --- */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
}

.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.input-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-right: 5px;
}

.booking-form input, .booking-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
    background-color: #fdfdfd;
}

.booking-form input:focus, .booking-form textarea:focus {
    border-color: var(--primary-color);
    background-color: var(--white);
}

.booking-form textarea {
    height: 120px;
    resize: none;
}

/* تنسيق حقل رقم الهاتف المخصص */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background-color: #fdfdfd;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: var(--transition);
}

.phone-input-wrapper:focus-within {
    border-color: var(--primary-color);
    background-color: var(--white);
}

.flag-icon {
    padding: 15px;
    background-color: #e8f0f6;
    border-left: 1px solid #ddd;
    font-size: 1.2rem;
}

.phone-input-wrapper input {
    border: none;
    background: transparent;
    padding-right: 15px;
}

.phone-input-wrapper input:focus {
    border: none;
}

.error-msg {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none; /* مخفية افتراضياً */
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    justify-content: center;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-card i {
    font-size: 2rem;
    color: var(--primary-color);
    background: #e8f0f6; 
    padding: 15px;
    border-radius: 50%;
}

.email-link {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.email-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--white);
    font-weight: bold;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.btn-whatsapp { background-color: #25D366; color: white !important;}
.btn-whatsapp:hover { background-color: #1ebe5d; }
.btn-call { background-color: var(--primary-color); color: white !important;}
.btn-call:hover { background-color: #154666; }

/* --- Installments (Tabby & Tamara) --- */
.installments-section {
    text-align: center;
    padding: 60px 5%;
}

.installments-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 5px;
}

.installments-subtitle {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tabby-badge {
    background-color: #32F0A4;
    color: #000;
    font-size: 2.2rem;
    font-weight: 800;
    padding: 10px 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    letter-spacing: -1px;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.tabby-badge span { font-size: 1rem; margin-bottom: 15px; }

.tamara-badge {
    background: linear-gradient(to right, #F9D4A1, #F4A28B, #E288AE);
    color: #000;
    font-size: 2rem;
    font-weight: 800;
    padding: 15px 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.terms-text {
    font-size: 0.85rem;
    color: #777;
    margin-top: 10px;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 40px 5%;
}

.footer-socials {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-socials a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.footer-socials a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.privacy-link {
    color: #d1d8e0;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.95rem;
    transition: var(--transition);
}

.privacy-link:hover {
    color: var(--white);
}

/* --- Privacy Modal --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.7); 
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-light);
    margin: 5% auto; 
    padding: 40px; 
    border-radius: 15px;
    width: 90%; 
    max-width: 800px; 
    text-align: right; 
    line-height: 1.8;
    color: var(--text-dark);
    position: relative;
    max-height: 80vh;
    overflow-y: auto; 
}

.modal-content h2 { color: var(--primary-color); margin-bottom: 20px; border-bottom: 2px solid var(--secondary-color); padding-bottom: 10px; }
.modal-content h3 { color: var(--primary-color); margin-top: 25px; margin-bottom: 10px; font-size: 1.2rem; }
.modal-content p { margin-bottom: 15px; font-size: 0.95rem; }

.close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 991px) {
    .contact-container { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .menu-toggle { 
        display: block; 
        margin-right: auto;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 85px; 
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        text-align: center;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    
    nav ul.active { display: flex; }

    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.2rem; }
    .social-buttons { flex-direction: column; }
    .custom-swiper, .gallery-swiper, .reviews-swiper { max-width: 100%; }
}