/* ========== CSS Variables ========== */
:root {
    --primary-red: #e53935;
    --primary-red-hover: #c62828;
    --primary-dark: #b71c1c;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --whatsapp-green: #25d366;
    --whatsapp-green-hover: #128c7e;
    
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.1);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 50px;
    
    --transition-fast: 0.2s ease;
    --transition-norm: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========== Reset & Base ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: var(--transition-norm); }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ========== Typography ========== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { color: var(--text-muted); margin-bottom: 1rem; }

/* ========== Utilities ========== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.bg-red { background-color: var(--primary-red); color: white; }
.bg-red p { color: rgba(255,255,255,0.8); }
.bg-red h2 { color: white; }

.text-start { text-align: right; }
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.w-100 { width: 100% !important; }
.ms-0 { margin-inline-start: 0 !important; }

/* ========== Grid Layouts ========== */
.grid {
    display: grid;
    gap: 30px;
}
.services-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1.1rem;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: var(--transition-norm);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 57, 53, 0.3);
}
.btn-primary:hover {
    background-color: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 57, 53, 0.4);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-red);
}
.btn-secondary:hover {
    background-color: #f1f2f6;
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: var(--whatsapp-green);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
    background-color: var(--whatsapp-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
}
.btn-outline:hover {
    background: var(--primary-red);
    color: white;
}

/* ========== Preloader ========== */
#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity var(--transition-slow);
}

.loader-content {
    text-align: center;
    color: var(--primary-red);
}
.loader-content i {
    font-size: 4rem;
    margin-bottom: 20px;
}
.loader-content h3 {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

/* ========== Floating WhatsApp ========== */
.floating-wa {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--whatsapp-green);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 35px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition-norm);
    animation: bounceEffect 3s infinite;
}
.floating-wa:hover {
    background-color: var(--whatsapp-green-hover);
    transform: scale(1.1);
}

/* ========== Floating Phone ========== */
.floating-phone {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-red);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 25px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition-norm);
    animation: bounceEffect 3s infinite 1.5s;
}
.floating-phone:hover {
    background-color: var(--primary-red-hover);
    transform: scale(1.1);
}

@keyframes bounceEffect {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* ========== Header & Nav ========== */
#header {
    position: fixed;
    top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-norm);
    padding: 15px 0;
}
#header.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-red);
    display: flex;
    align-items: center;
    gap: 8px;
}
.logo span { color: var(--text-dark); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}
.nav-links a {
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
}
.nav-links a:not(.btn-nav)::after {
    content: '';
    position: absolute;
    bottom: -5px; right: 0;
    width: 0; height: 2px;
    background-color: var(--primary-red);
    transition: var(--transition-norm);
}
.nav-links a:hover:not(.btn-nav)::after,
.nav-links a.active:not(.btn-nav)::after {
    width: 100%;
}
.btn-nav {
    background-color: var(--primary-red);
    color: white !important;
    padding: 8px 20px;
    border-radius: var(--radius-full);
}
.btn-nav:hover {
    background-color: var(--primary-dark);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* ========== Hero Section ========== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    background: url('https://images.unsplash.com/photo-1538108149393-ceb66fae9441?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    display: flex;
    align-items: center;
}
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 100%);
}
.hero-content {
    position: relative;
    z-index: 10;
    color: white;
    max-width: 700px;
    margin: 0; /* Override center auto */
}
.hero-content h1 {
    color: white;
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-content p {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin-bottom: 2rem;
}
.hero-buttons {
    display: flex;
    gap: 15px;
}

/* ========== Section Common ========== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}
.section-title h2 {
    font-size: 2.2rem;
    position: relative;
}
.divider {
    height: 4px;
    width: 60px;
    background-color: var(--primary-red);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ========== Services Grid ========== */
.service-card {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition-norm);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(229, 57, 53, 0.1);
}
.card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
}
.card-icon {
    width: 70px;
    height: 70px;
    background-color: var(--bg-white);
    color: var(--primary-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    margin: -35px auto 15px;
    transition: var(--transition-norm);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}
.service-card:hover .card-icon {
    background-color: var(--primary-red);
    color: white;
}
.service-card h3 { 
    font-size: 1.4rem; 
    padding: 0 20px;
}
.service-card p { 
    font-size: 0.95rem; 
    margin-bottom: 25px; 
    padding: 0 20px;
    flex-grow: 1;
}
.service-card .btn {
    margin: 0 20px 10px;
    align-self: stretch;
    width: auto;
}
.service-card .btn:last-child {
    margin-bottom: 25px;
}
.btn-small {
    padding: 10px 20px;
    font-size: 1rem;
}

.patient-def {
    background-color: rgba(229, 57, 53, 0.05);
    color: var(--text-muted);
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin: 0 20px 20px;
    text-align: right;
    border-right: 3px solid var(--primary-red);
    line-height: 1.5;
}
.patient-def strong {
    color: var(--primary-dark);
}
.patient-def i {
    color: var(--primary-red);
    margin-left: 5px;
}


/* ========== Detail Sections ========== */
.details-wrapper {
    display: flex;
    align-items: center;
    gap: 50px;
}
.details-wrapper.reverse {
    flex-direction: row-reverse;
}
.details-text { flex: 1; }
.details-image {
    flex: 1.2;
    background-color: #f1f2f6;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}
.section-photo {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
}

.feature-list {
    margin-top: 20px;
    margin-bottom: 30px;
}
.feature-list li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.feature-list li i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

/* ========== Consultation ========== */
.consultation-card {
    background: white;
    padding: 50px;
    border-radius: var(--radius-md);
    max-width: 800px;
    margin: 0 auto;
}

/* ========== Booking Section ========== */
.booking-wrapper {
    display: flex;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    flex-wrap: wrap; /* for mobile */
}
.booking-info {
    flex: 1;
    min-width: 300px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-red) 100%);
    padding: 50px;
    color: white;
}
.bg-booking-image {
    background: linear-gradient(135deg, rgba(183,28,28,0.92) 0%, rgba(229,57,53,0.92) 100%), url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?w=800&q=80') center/cover no-repeat !important;
}
.booking-info h2 { color: white; margin-bottom: 15px; }
.booking-info p { color: rgba(255,255,255,0.9); }
.contact-info .info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}
.info-item i {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.booking-form-container {
    flex: 1.5;
    min-width: 300px;
    padding: 50px;
    background: white;
}

.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}
.required { color: var(--primary-red); }

.input-with-icon {
    position: relative;
}
.input-with-icon i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.form-control {
    width: 100%;
    padding: 12px 15px 12px 45px;
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    transition: var(--transition-norm);
    background-color: #f9f9f9;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.1);
    background-color: white;
}
.input-with-icon .form-control {
    padding-right: 45px;
    padding-left: 15px;
}
select.form-control {
    appearance: none;
    cursor: pointer;
}
.select-wrapper::after {
    content: '\f107'; /* FontAwesome angle down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-muted);
}

.error-msg {
    color: var(--primary-red);
    font-size: 0.85rem;
    display: none;
    margin-top: 5px;
}
.has-error .form-control {
    border-color: var(--primary-red);
}
.has-error .error-msg {
    display: block;
}

/* ========== Form Modal ========== */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-norm);
}
.modal.show {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius-md);
    text-align: center;
    max-width: 400px;
    width: 90%;
    transform: scale(0.8);
    transition: var(--transition-norm);
}
.modal.show .modal-content {
    transform: scale(1);
}
.success-icon {
    font-size: 5rem;
    color: #2ecc71;
    margin-bottom: 20px;
}

/* ========== Reviews Slide ========== */
.reviews-slider-container {
    overflow: hidden;
    padding-bottom: 30px;
    position: relative;
}
.reviews-track {
    display: flex;
    transition: transform 0.5s ease;
}
.review-card {
    min-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}
@media (min-width: 768px) {
    .review-card { min-width: 50%; }
}
@media (min-width: 992px) {
    .review-card { min-width: 33.333%; }
}

.review-inner {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    margin: 10px;
}
.stars {
    color: #f1c40f;
    margin-bottom: 15px;
    font-size: 1.2rem;
}
.review-text {
    font-style: italic;
    margin-bottom: 20px;
}
.review-author {
    font-weight: 700;
    color: var(--text-dark);
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}
.dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: var(--transition-fast);
}
.dot.active {
    background: var(--primary-red);
    width: 24px;
    border-radius: 10px;
}

/* ========== Footer ========== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding-top: 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
.footer-logo {
    font-size: 1.5rem;
    color: var(--primary-red);
    margin-bottom: 15px;
}
.footer-desc {
    color: #a0a0a0;
    margin-bottom: 20px;
}
.social-links {
    display: flex;
    gap: 15px;
}
.social-links a {
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.social-links a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}
.footer h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}
.footer-links li, .footer-contact li {
    margin-bottom: 12px;
}
.footer-links a {
    color: #a0a0a0;
    display: inline-block;
}
.footer-links a:hover {
    color: var(--primary-red);
    transform: translateX(-5px);
}
.footer-contact li {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #a0a0a0;
}
.footer-contact i {
    color: var(--primary-red);
}
.footer-bottom {
    background-color: #1e2426;
    padding: 20px 0;
    text-align: center;
    margin-top: 50px;
}
.footer-bottom p {
    color: #888;
    margin-bottom: 0;
}

/* ========== Animations ========== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 70px; right: -100%;
        width: 100%; height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: center;
        transition: var(--transition-norm);
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        right: 0;
    }
    .menu-toggle {
        display: block;
    }
    .hero-content h1 { font-size: 2.5rem; }
    .details-wrapper, .details-wrapper.reverse {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .details-text .section-title {
        text-align: center;
    }
    .details-text .divider {
        margin: 15px auto 0 !important;
    }
    .feature-list li {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1.1rem; }
    .hero-buttons { flex-direction: column; }
    
    .booking-wrapper { flex-direction: column; }
    .booking-info, .booking-form-container {
        padding: 30px 20px;
        min-width: 100%;
    }
    
    .consultation-card { padding: 30px 20px; }
}
