/* CSS Variables */
:root {
    /* Colors */
    --primary-color: #d4a574;
    --secondary-color: #8b4513;
    --accent-color: #f4e4d1;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --light-grey: #f8f9fa;
    --dark-grey: #2c3e50;
    --light-rose: #fdf8f5;

    /* Typography */
    --font-primary: 'Playfair Display', serif;
    --font-secondary: 'Lato', 'Open Sans', sans-serif;
    --font-arabic: 'Noto Sans Arabic', sans-serif;

    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 0 20px;

    /* Transitions */
    --transition: all 0.3s ease;

    /* Shadows */
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* Prevent font scaling in landscape */
    touch-action: manipulation;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* RTL Support for Arabic */
body.lang-ar {
    font-family: var(--font-arabic), var(--font-secondary);
    direction: rtl;
}

body.lang-ar .hero-content {
    grid-template-columns: 1fr 1fr;
}

body.lang-ar .hero-text {
    order: 1;
}

body.lang-ar .hero-image {
    order: 0;
}

body.lang-ar .about-content {
    grid-template-columns: 2fr 1fr;
}

body.lang-ar .contact-content {
    grid-template-columns: 1fr 1fr;
}

body.lang-ar .role-item:hover {
    transform: translateX(-10px);
}

body.lang-ar .language-switcher {
    margin-left: 0;
    margin-right: 20px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    color: var(--secondary-color);
}

h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

h3 {
    font-size: 2rem;
    color: var(--text-color);
}

h4 {
    font-size: 1.5rem;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
/* ========== Navigation Bar ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

/* ========== Navigation Container ========== */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* ========== Logo Area ========== */
.nav-logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    margin-right: 10px;
}

body.lang-ar .logo-img {
    margin-right: 0;
    margin-left: 10px;
}

.logo-text {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

/* ========== Navigation Menu ========== */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    position: relative;
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========== Mobile Toggle ========== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    transition: var(--transition);
}


/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 165, 116, 0.2);
}

.lang-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-color);
    font-weight: 600;
    border-radius: 16px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    min-width: 36px;
    position: relative;
    overflow: hidden;
}

.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: left 0.3s ease;
    z-index: -1;
}

.lang-btn:hover::before,
.lang-btn.active::before {
    left: 0;
}

.lang-btn:hover,
.lang-btn.active {
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.lang-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.lang-btn:active {
    transform: translateY(0);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--light-rose) 0%, var(--accent-color) 100%);
    padding-top: 70px;
    position: relative;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--container-padding);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    animation: fadeInLeft 1s ease-out;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    animation: fadeInRight 1s ease-out;
}

.doctor-photo {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
    position: relative;
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    -webkit-tap-highlight-color: transparent;
}

/* About Section */
.about {
    padding: var(--section-padding);
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.about-roles {
    margin: 30px 0;
}

.role-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: var(--light-rose);
    border-radius: 10px;
    transition: var(--transition);
}

.role-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-light);
}

.role-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 20px;
    flex-shrink: 0;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px;
    background: var(--light-rose);
    border-radius: 15px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Services Section */
.services {
    padding: var(--section-padding);
    background: var(--light-grey);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.service-icon i {
    font-size: 2rem;
    color: var(--white);
}

.service-card h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.6;

}



/* Why Us Section */
/* Enhanced Why Us Section */
.why-us {
    padding: var(--section-padding);
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.why-us::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
}

/* Enhanced text content */
.why-us-text {
    position: relative;
    z-index: 2;
}

.lead-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 600px;
    margin-bottom: 32px;
    text-align: justify;
}

.why-us-cta {
    margin-top: 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

/* Enhanced quotes carousel */
.quotes-carousel {
    position: relative;
    height: 280px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--light-rose), #f1f5f9);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-light);
}

/* Improved quote cards */
.quote-card {
    position: absolute;
    top: 24px;
    left: 24px;
    right: 24px;
    bottom: 24px;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    background: var(--white);
    padding: 32px 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(102, 126, 234, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quote-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    z-index: 2;
}

/* Enhanced testimonial elements */
.testimonial-rating {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
}

.testimonial-rating .fas {
    color: #fbbf24;
    font-size: 1.1rem;
    transition: var(--transition);
}

.quote-card:hover .testimonial-rating .fas {
    transform: scale(1.1);
}

.testimonial-text {
    font-style: italic;
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: center;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    position: relative;
}

.testimonial-author::before {
    content: '— ';
    color: var(--text-secondary);
}

/* Carousel navigation */
.carousel-navigation {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.nav-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

.nav-dot:hover {
    background: var(--secondary-color);
}

/* Progress indicator */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.1s linear;
    border-radius: 0 0 0 var(--border-radius);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .container {
        padding: 0 16px;
    }

    .section-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Stack layout on mobile */
    .why-us-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .lead-text {
        font-size: 1.05rem;
        text-align: left;
        max-width: none;
    }

    .btn {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
        justify-content: center;
        max-width: 300px;
        margin: 0 auto;
    }

    /* Mobile carousel adjustments */
    .quotes-carousel {
        height: 320px;
        margin-bottom: 50px;
    }

    .quote-card {
        padding: 24px 20px;
    }

    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .carousel-navigation {
        bottom: -40px;
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .why-us-content {
        gap: 40px;
    }

    .lead-text {
        font-size: 1.08rem;
    }

    .quotes-carousel {
        height: 300px;
    }
}

/* Large screen enhancements */
@media (min-width: 1200px) {
    .why-us-content {
        gap: 80px;
    }

    .quotes-carousel {
        height: 320px;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .quote-card {
        transition: opacity 0.3s ease;
    }

    .btn::before {
        display: none;
    }
}

/* Focus states for accessibility */
.btn:focus,
.nav-dot:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hover effects for desktop */
@media (hover: hover) {
    .quote-card {
        cursor: pointer;
    }

    .quote-card:hover {
        transform: translateY(-2px) scale(1.02);
        box-shadow: var(--shadow-medium);
    }
}

/* Gallery Section */
.gallery {
    padding: var(--section-padding);
    background: var(--light-grey);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: var(--white);
    padding: 20px;
    transform: translateY(100%);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h4 {
    margin: 0;
    font-size: 1.1rem;
}


/* Education / FAQ Section */
.education {
    padding: var(--section-padding);
    background-color: var(--white);

}


.faq-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

/* FAQ Item */
.faq-item {
    background: var(--light-grey);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

/* Question Header */
.faq-question {



    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--white);
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #fdf8f4;
}

.faq-question h3 {
    font-size: 1.1rem;
    margin: 0;
    flex: 1;
    transition: color 0.3s ease;
}

.faq-question i {
    font-size: 1rem;
    color: var(--primary-color);
    transition: transform var(--transition), color 0.3s ease;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
    color: var(--secondary-color);
}

/* Answer Section */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease;
    background-color: var(--white);
    padding: 0 25px;
    opacity: 0;
}

.faq-answer.open {
    padding: 20px 25px;
    max-height: 500px;
    opacity: 1;
}

.faq-answer p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1rem;
    animation: fadeIn 0.4s ease-in;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RTL Support */
body.lang-ar .faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

body.lang-ar .faq-answer {
    text-align: right;
}

/* Rotate chevron when open */
.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

/* RTL support */
body.lang-ar .faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

body.lang-ar .faq-answer {
    text-align: right;
}

/* ================= Contact Section ================= */
.contact {
    padding: var(--section-padding);
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two columns */
    gap: 60px; /* more breathing room */
    align-items: start;
    max-width: 1200px; /* prevent being too wide */
    margin: 0 auto; /* center in screen */
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-top: 4px;
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
}

.contact-item p {
    margin: 0;
    color: var(--text-light);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    word-break: break-word;
}

.contact-item a:hover {
    color: var(--secondary-color);
}


/* Contact Form */
.contact-form-container {
    background: var(--white);
    padding: 40px 32px;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    width: 100%;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    font-size: clamp(0.875rem, 2vw, 1rem);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 14px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background-color: #fff;
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Checkbox group */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    appearance: none;
    background-color: white;
    transition: border-color 0.3s, background-color 0.3s;
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 4px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-group label {
    font-size: clamp(0.875rem, 2vw, 1rem);
    color: var(--text-color);
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-medium);
    border: none;
    cursor: pointer;
    min-height: 52px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

.btn:active {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */

@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Footer */
.footer {
    background: var(--dark-grey);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
    flex-wrap: nowrap; /* no wrapping */
    width: 100%;
    box-sizing: border-box;
}
.footer .social-links {
    margin-top: 0.5rem;
}

.footer .social-links a {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.footer .social-links a:hover {
    color: var(--secondary-color);
}
.footer-copy {
    margin: 0;
    white-space: nowrap;
}

.footer-legal {
    display: flex;
    gap: 15px;
}

.footer-legal a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.footer-legal a:hover {
    text-decoration: underline;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    z-index: 9999;

}

.back-to-top-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* Base Responsive Design */

@media (min-width: 1024px) {
    .contact-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 48px;
    }

    .contact-info,
    .contact-form-container {
        flex: 1;
    }

    .contact-info {
        max-width: 500px;
    }

    .contact-form-container {
        max-width: 600px;
    }
}


@media (max-width: 768px) {
    /* Mobile landscape and small tablets */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-medium);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .nav-toggle {
        display: flex;
        padding: 12px; /* Better touch area */
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-title {
        font-size: clamp(1.8rem, 6vw, 2rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 3vw, 1.1rem);
    }

    .section-title {
        font-size: clamp(1.8rem, 6vw, 2rem);
    }

    .doctor-photo {
        width: min(100%, 300px); /* Prevent overflow */
        height: auto;
        aspect-ratio: 1/1; /* Maintain square ratio */
    }

    .hero-buttons {
        justify-content: center;
        gap: 15px; /* Space between buttons */
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .contact-form-container {
        padding: 30px 20px;
        width: 100%;
        box-sizing: border-box;
    }

    /* Prevent horizontal scrolling */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* Mobile portrait adjustments */
    :root {
        --section-padding: 60px 20px; /* Adjusted for small screens */
    }

    .container {
        padding: 0 15px;
        width: 100%;
        box-sizing: border-box;
    }

    .hero-title {
        font-size: clamp(1.5rem, 7vw, 1.8rem);
        line-height: 1.3;
    }

    .section-title {
        font-size: clamp(1.5rem, 7vw, 1.8rem);
    }

    .doctor-photo {
        width: min(100%, 250px);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 20px;
    }

    .service-card,
    .testimonial-card {
        padding: 25px 15px;
    }

    .contact-form-container {
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .contact-form {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    /* Form elements more mobile-friendly */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        width: 100%;
        font-size: 16px; /* Prevent iOS zoom */
        min-height: 44px; /* Minimum touch target size */
        padding: 12px 15px;
        box-sizing: border-box;
    }

    /* Allow horizontal scrolling if needed */
    html {
        overflow-x: auto;
    }

    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    /* Hide non-essential elements on smallest screens */
    .secondary-cta {
        display: none;
    }
}

/* Special considerations for very small devices */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 15px;
    }
}

/* Device orientation considerations */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }

    .nav-menu {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* High-density displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure sharp visuals for retina displays */
    .logo img, .doctor-photo {
        /* Use higher resolution versions if available */
    }
}
/* Print Styles */
@media print {
    .navbar,
    .hero-scroll,
    .back-to-top-btn,
    .language-switcher {
        display: none;
    }

    .hero {
        padding-top: 0;
    }

    * {
        box-shadow: none !important;
    }
}



/* Modal Background */
.legal-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Content Box */
.legal-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-family: var(--font-secondary);
    color: #333;
    max-height: 80vh;
    overflow-y: auto;
}

/* Close Button */
.legal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: #999;

    margin-top: -10px;
}
.legal-close:hover {
    color: #000;
}


/* ================= Branches Section - Professional UX ================= */
.branches {
    padding: var(--section-padding);
    background: var(--light-grey);
}

.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.branch-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.branch-card:hover,
.branch-card:focus-within {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.branch-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.branch-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.branch-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.branch-info {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.branch-column {
    flex: 1 1 45%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.branch-detail {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.branch-detail i {
    font-size: 1.1rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.branch-detail h4 {
    font-size: 0.95rem;
    margin: 0 0 3px 0;
    font-weight: 500;
}

.branch-detail p {
    font-size: 0.88rem;
    margin: 0;
    line-height: 1.5;
    color: var(--text-light);
}

.branch-detail-content p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 0.9rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Map styling */
.branch-map {
    margin-top: 20px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.branch-map iframe {
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: 14px;
    transition: transform 0.3s ease;
}

.branch-map iframe:hover {
    transform: scale(1.02);
}

/* ================= Mobile Responsive ================= */
@media (max-width: 768px) {
    .branches-grid {
        display: flex;
        flex-direction: column;
        gap: 25px;
    }

    .branch-info {
        flex-direction: column;
        gap: 20px;
    }

    .branch-column {
        flex: 1 1 100%;
    }

    .branch-detail {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    @media (max-width: 480px) {
        .branch-detail {
            flex-direction: column;
            align-items: flex-start;
            gap: 6px;
        }
    }

    .branch-map iframe {
        height: 220px;
    }
}





.footer-title-with-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.footer-logo {
    height: 30px;
    width: auto;
    max-width: 100%;
}


.footer-title-with-logo h4 {
    margin: 0;
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    padding-bottom: 2px;
}
/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: none; /* hidden by default */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}
