/* =========================================
   CSS Variables & Reset
   ========================================= */
:root {
    --primary: #0A4B78;
    --secondary: #17B794;
    --accent: #F26B5E;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-dark: #1E293B;
    --text-gray: #64748B;
    --border: #E2E8F0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; color: var(--text-dark); line-height: 1.6; background: var(--bg-white); }
h1, h2, h3, h4 { font-weight: 700; color: var(--primary); line-height: 1.3; }
a { text-decoration: none;}
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.2rem; margin-bottom: 15px; }
.section-title p { color: var(--text-gray); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* Buttons */
.btn { display: inline-block; padding: 12px 28px; border-radius: 50px; font-weight: 600; transition: var(--transition); cursor: pointer; border: none; font-size: 0.95rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--secondary); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(23, 183, 148, 0.3); }
.btn-secondary { background: transparent; color: white; border: 2px solid white; }
.btn-secondary:hover { background: white; color: var(--primary); }

/* =========================================
   Logo Image Styles
   ========================================= */
.logo img {
    height: 45px; /* Adjust this height based on your logo's aspect ratio */
    width: auto;
    display: block;
    transition: var(--transition);
}
.header.scrolled .logo img {
    height: 40px; /* Shrinks slightly when scrolled */
}

/* =========================================
   Header Visibility Fix (Inner Pages vs Home)
   ========================================= */

/* 1. DEFAULT HEADER (White background, dark text) - Applied to all inner pages */
.header { 
    background: white; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.08); 
    padding: 12px 0; 
}
.header .logo, 
.header .nav-links a, 
.header .mobile-toggle { 
    color: var(--text-dark); 
}
.header .nav-links a:hover, 
.header .nav-links a.active { 
    color: var(--secondary); 
}
.header .lang-switch {
    border-color: var(--border);
    color: var(--text-gray);
}

/* 2. HOME PAGE HEADER (Transparent background, white text) */
body.home-page .header { 
    background: transparent; 
    box-shadow: none; 
    padding: 20px 0; 
}
body.home-page .header .logo, 
body.home-page .header .nav-links a, 
body.home-page .header .mobile-toggle { 
    color: white; 
}
body.home-page .header .lang-switch {
    border-color: rgba(255,255,255,0.5);
    color: white;
}

/* 3. HOME PAGE HEADER ON SCROLL (Turns white when scrolling down) */
body.home-page .header.scrolled { 
    background: white; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.08); 
    padding: 12px 0; 
}
body.home-page .header.scrolled .logo, 
body.home-page .header.scrolled .nav-links a, 
body.home-page .header.scrolled .mobile-toggle { 
    color: var(--text-dark); 
}
body.home-page .header.scrolled .lang-switch {
    border-color: var(--border);
    color: var(--text-gray);
}
/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: -20px; background: white; min-width: 220px; box-shadow: var(--shadow); border-radius: 10px; opacity: 0; visibility: hidden; transform: translateY(15px); transition: var(--transition); padding: 10px 0; list-style: none; margin-top: 20px; }
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 10px 20px; color: var(--text-dark) !important; font-size: 0.9rem; }
.dropdown-menu a:hover { background: var(--bg-light); color: var(--primary) !important; }

/* Mobile Toggle */
.mobile-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: white; background: none; border: none; }
.header.scrolled .mobile-toggle { color: var(--primary); }

/* =========================================
   Hero Sections
   ========================================= */
.hero-main { height: 100vh; background: linear-gradient(135deg, rgba(10, 75, 120, 0.9), rgba(23, 183, 148, 0.8)), url('../images/hero-bg.jpg') center/cover no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; color: white; }
.hero-main h1 { font-size: 3.2rem; margin-bottom: 20px; color: white; }
.hero-main p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.95; max-width: 700px; margin-left: auto; margin-right: auto; }

/* Inner Pages Hero */
.hero-inner { height: 40vh; min-height: 300px; background: linear-gradient(135deg, rgba(10, 75, 120, 0.95), rgba(23, 183, 148, 0.85)), url('../images/inner-hero-bg.jpg') center/cover no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; color: white; margin-top: 0; }
.hero-inner h1 { font-size: 2.8rem; color: white; margin-bottom: 10px; }
.hero-inner p { font-size: 1.1rem; opacity: 0.9; }

/* =========================================
   Components (Cards, Grids, Lists)
   ========================================= */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background: white; padding: 35px 25px; border-radius: 15px; box-shadow: var(--shadow); transition: var(--transition); text-align: center; border: 1px solid transparent; }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: var(--secondary); }
.card-icon { width: 70px; height: 70px; background: linear-gradient(135deg, var(--bg-light), #e0f2fe); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; font-size: 1.8rem; color: var(--primary); transition: var(--transition); }
.card:hover .card-icon { background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; transform: scale(1.1); }
.card h3 { font-size: 1.2rem; margin-bottom: 12px; }
.card p { color: var(--text-gray); font-size: 0.95rem; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-img { height: 450px; background: url('../images/dr-yaser.jpg') center/cover no-repeat; border-radius: 20px; box-shadow: var(--shadow); }
.about-text h2 { font-size: 2rem; margin-bottom: 20px; }
.about-text p { color: var(--text-gray); margin-bottom: 15px; }

.ivf-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.ivf-item { display: flex; align-items: center; gap: 15px; padding: 20px; background: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); border-left: 4px solid var(--secondary); transition: var(--transition); }
.ivf-item:hover { transform: translateX(10px); box-shadow: var(--shadow); }
.ivf-item i { font-size: 1.5rem; color: var(--secondary); }
.ivf-item h4 { font-size: 1.05rem; margin: 0; color: var(--text-dark); }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { height: 250px; border-radius: 15px; overflow: hidden; position: relative; cursor: pointer; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay { position: absolute; inset: 0; background: rgba(10, 75, 120, 0.7); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s; color: white; font-size: 2rem; }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* Contact */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.contact-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 25px; }
.contact-icon { width: 50px; height: 50px; background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 1.1rem; flex-shrink: 0; }
.contact-item h4 { margin-bottom: 5px; font-size: 1.05rem; }
.contact-item p { color: var(--text-gray); margin: 0; font-size: 0.95rem; }

.contact-form { background: white; padding: 35px; border-radius: 15px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-dark); font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 15px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 0.95rem; transition: var(--transition); background: var(--bg-light); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(10, 75, 120, 0.1); }
.form-group textarea { height: 120px; resize: vertical; }

/* =========================================
   Footer
   ========================================= */
.footer { background: var(--primary); color: white; padding: 60px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer h4 { color: white; margin-bottom: 20px; font-size: 1.1rem; }
.footer-about p { color: rgba(255,255,255,0.7); margin-bottom: 20px; line-height: 1.7; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: rgba(255,255,255,0.7); transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 38px; height: 38px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; transition: var(--transition); }
.social-links a:hover { background: var(--secondary); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; color: rgba(255,255,255,0.5); font-size: 0.85rem; }

/* =========================================
   Responsive Design
   ========================================= */
@media (max-width: 992px) {
    .hero-main h1 { font-size: 2.5rem; }
    .about-grid, .contact-wrapper { grid-template-columns: 1fr; }
    .about-img { height: 350px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .mobile-toggle { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: white; flex-direction: column; padding: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); gap: 0; }
    .nav-links.active { display: flex; }
    .nav-links li { width: 100%; }
    .nav-links a { color: var(--text-dark) !important; display: block; padding: 15px 0; border-bottom: 1px solid var(--border); }
    .dropdown-menu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; background: var(--bg-light); margin-top: 0; border-radius: 0; }
    .dropdown.active .dropdown-menu { display: block; }
    .form-row { grid-template-columns: 1fr; }
    .hero-main h1, .hero-inner h1 { font-size: 2rem; }
    .section { padding: 60px 0; }
    .footer-grid { grid-template-columns: 1fr; }
}
/* =========================================
   Publications & Presentations Styles
   ========================================= */
.publication-list { list-style: none; padding: 0; margin: 0; }
.publication-item { 
    background: white; 
    padding: 25px; 
    border-radius: 12px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
    margin-bottom: 20px; 
    border-left: 4px solid var(--secondary); 
    transition: var(--transition); 
}
.publication-item:hover { transform: translateX(5px); box-shadow: var(--shadow); }
.publication-title { font-size: 1.1rem; font-weight: 600; color: var(--primary); margin-bottom: 8px; line-height: 1.4; }
.publication-title a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
.publication-title a:hover { color: var(--secondary); text-decoration: underline; }
.publication-authors { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 8px; font-style: italic; }
.publication-journal { font-size: 0.95rem; color: var(--text-dark); margin-bottom: 8px; font-weight: 500; }
.publication-meta { font-size: 0.85rem; color: var(--text-gray); line-height: 1.6; }
.publication-meta a { color: var(--secondary); font-weight: 500; text-decoration: none; }
.publication-meta a:hover { text-decoration: underline; }

.presentation-list { list-style: none; padding: 0; }
.presentation-item { 
    background: white; 
    padding: 20px 25px; 
    border-radius: 10px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); 
    margin-bottom: 15px; 
    border-left: 4px solid var(--primary); 
    display: flex; 
    align-items: flex-start; 
    gap: 15px; 
    transition: var(--transition); 
}
.presentation-item:hover { transform: translateX(5px); box-shadow: var(--shadow); }
.presentation-item i { color: var(--primary); font-size: 1.2rem; margin-top: 3px; }
.presentation-item div { flex: 1; }
.presentation-item h4 { font-size: 1rem; color: var(--text-dark); margin-bottom: 5px; }
.presentation-item p { font-size: 0.9rem; color: var(--text-gray); margin: 0; }