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

:root {
    /* Color Palette */
    --primary-color: #4a90a4;
    --secondary-color: #87ceeb;
    --accent-color: #f0b8d6;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-cream: #fef9f3;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-arabic: 'Tajawal', sans-serif;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

html {
    scroll-behavior: smooth;
}

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

body[dir="rtl"] {
    font-family: var(--font-arabic);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   Language Selector
   =========================== */
.language-selector {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: var(--bg-white);
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.lang-btn:hover {
    background: var(--bg-light);
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--bg-white);
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 1rem 0;
}

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

.nav-brand h2 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-menu a:hover {
    color: var(--primary-color);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: linear-gradient(135deg, var(--bg-cream) 0%, #e8f4f8 100%);
    padding: var(--spacing-xl) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

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

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

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

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary-color);
    color: var(--bg-white);
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    background: #3a7a8a;
}

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

.doctor-image {
    width: 100%;
    max-width: 450px;
    animation: float 3s ease-in-out infinite;
}

.doctor-image img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    box-shadow: 0 20px 60px rgba(74, 144, 164, 0.3);
    border: 8px solid var(--bg-white);
}

/* ===========================
   Section Styles
   =========================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
}

.title-underline {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

/* ===========================
   About Section
   =========================== */
.about {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.doctor-profile-image {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.doctor-profile-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--bg-white);
}

.about-text h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.about-highlights {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1rem;
    color: var(--text-dark);
}

.highlight-icon {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* ===========================
   Services Section
   =========================== */
.services {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.service-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

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

/* ===========================
   FAQ Section
   =========================== */
.faq {
    padding: var(--spacing-xl) 0;
    background: var(--bg-light);
}

.faq-category {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.faq-category-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-white) 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-sm);
}

.faq-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    width: 100%;
    padding: var(--spacing-md);
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-sm);
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

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

.faq-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md);
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
    margin: 0;
}

/* RTL Support for FAQ */
body[dir="rtl"] .faq-question {
    text-align: right;
}

body[dir="rtl"] .faq-category-title {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: var(--bg-cream);
    transform: translateX(5px);
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.contact-item p {
    color: var(--text-light);
    font-size: 1rem;
}

/* ===========================
   Contact Form
   =========================== */
.contact-form {
    background: var(--bg-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.form-group {
    position: relative;
    margin-bottom: var(--spacing-md);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-light);
    pointer-events: none;
    transition: all 0.3s ease;
    background: var(--bg-white);
    padding: 0 0.5rem;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.7rem;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--bg-white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background: #3a7a8a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.submit-button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

/* Form Message Styles */
.form-message {
    margin-bottom: var(--spacing-md);
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===========================
   Map Section
   =========================== */
.map-section {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.map-section h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

.map-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-top: var(--spacing-md);
}

.map-container iframe {
    display: block;
    width: 100%;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--text-dark);
    color: var(--bg-white);
    text-align: center;
    padding: var(--spacing-md) 0;
}

.footer p {
    font-size: 0.95rem;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ===========================
   RTL Support
   =========================== */
body[dir="rtl"] .language-selector {
    right: auto;
    left: 20px;
}

body[dir="rtl"] .navbar .container {
    flex-direction: row-reverse;
}

body[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

body[dir="rtl"] .hero-content {
    direction: rtl;
}

body[dir="rtl"] .about-content {
    direction: rtl;
}

body[dir="rtl"] .contact-content {
    direction: rtl;
}

body[dir="rtl"] .contact-item:hover {
    transform: translateX(-5px);
}

body[dir="rtl"] .form-group label {
    left: auto;
    right: 1rem;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--bg-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: var(--spacing-md) 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .language-selector {
        top: 70px;
        right: 10px;
        padding: 0.4rem;
        gap: 0.3rem;
    }
    
    .lang-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }
    
    .language-selector {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: auto;
        padding: 0.3rem;
        gap: 0.25rem;
    }
    
    .lang-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
}
