:root {
    --primary-color: #2b5b84; /* Soft medical blue */
    --secondary-color: #e6f0fa; /* Very light blue background */
    --accent-color: #d1b87a; /* Warm gold/sand accent */
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --bg-light: #f9fbfe;
    
    --font-en: 'Inter', sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-en);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--white);
    transition: all 0.3s ease;
}

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

* {
    box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 600;
}

.text-center { text-align: center; }
.mt-4 { margin-top: 1.5rem; }

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

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

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

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* Navbar */
#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 15px 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.logo-separator {
    color: var(--text-light);
    font-weight: 300;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

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

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

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

.lang-toggle button {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-toggle button:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.9)), url('../images/hero_bg.png') center/cover no-repeat;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 80px; /* offset navbar */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    animation: fadeInDown 1s ease;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(43, 91, 132, 0.3);
}

.btn-primary:hover {
    background-color: #1f4363;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(43, 91, 132, 0.4);
    color: var(--white);
}

/* Intro Section */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.intro-text p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: var(--text-light);
}

.intro-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.doctor-photo {
    width: auto !important;
    max-width: 100%;
    border-radius: 8px !important;
    display: block;
    margin: 0 auto;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin: 0;
}

/* About / CV */
.cv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

.cv-list {
    list-style: none;
    padding: 0;
}

.cv-subtitle {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 5px;
}

@media (prefers-color-scheme: dark) {
    .cv-subtitle {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}


.cv-list li {
    position: relative;
    padding-inline-start: 25px;
    margin-bottom: 15px;
    color: var(--text-light);
}

.cv-list li::before {
    content: '•';
    color: var(--accent-color);
    font-size: 1.5rem;
    position: absolute;
    inset-inline-start: 0;
    top: -5px;
}

/* Resources */
.books-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.book-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    display: block;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.book-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.book-card h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.book-card p {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: 15px;
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

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

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 0;
}

footer p {
    margin: 0;
    opacity: 0.8;
}

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

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

/* Responsive */
@media (max-width: 992px) {
    .intro-grid, .cv-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .logo a {
        font-size: 1rem;
        flex-wrap: wrap;
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Hide on mobile initially */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        text-align: center;
        padding: 10px 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .section-padding {
        padding: 50px 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #8ab4f8;
        --secondary-color: #171d24;
        --accent-color: #d8c285;
        --text-dark: #e8eaed;
        --text-light: #9aa0a6;
        --white: #0d1117;
        --bg-light: #161b22;
    }

    body {
        background-color: var(--white);
    }

    #navbar {
        background-color: rgba(13, 17, 23, 0.95);
        box-shadow: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .hero {
        background: linear-gradient(rgba(13, 17, 23, 0.6), rgba(13, 17, 23, 0.9)), url('../images/hero_bg_dark.png') center/cover no-repeat;
    }

    .btn {
        background-color: #3b76a8;
        color: #ffffff;
    }

    .btn:hover {
        background-color: #4a8dc7;
    }

    footer {
        background-color: #090c10;
    }

    .book-card, .contact-card {
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        background-color: #161b22;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    @media (max-width: 768px) {
        .nav-links {
            background: #121212;
        }
    }
}
