:root {
    --primary: #0088cc; 
    --primary-dark: #005a87; /* Slightly darker for better contrast */
    --secondary: #e6f7ff; 
    --accent: #b38f00; /* Darkened from #ffcc00 for contrast on white */
    --text: #222; /* Darkened for readability */
    --text-light: #575757; /* Changed from #777 to meet 4.5:1 ratio */
    --white: #ffffff;
}

/* Accessible Focus States */
a:focus, button:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Visible Focus for all interactive elements */
:focus-visible {
    outline: 3px solid var(--accent) !important;
    outline-offset: 4px;
}

/* Mobile Menu Toggle Styling */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Skip Link CSS */
.skip-link {
    position: absolute;
    top: -100px; /* Moves it way off-camera */
    left: 0;
    background: #000000; /* Pure Black background */
    color: #ffffff;      /* Pure White text */
    padding: 12px;
    z-index: 1000;
    text-decoration: underline;
    font-weight: bold;
}

.skip-link:focus {
    top: 0; /* Brings it into view at the very top */
    outline: 3px solid #ffffff; /* Adds a visible border */
    /* Ensure no other styles are overriding the colors */
    background-color: #000000 !important;
    color: #ffffff !important;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; line-height: 1.6; color: var(--text); scroll-behavior: smooth; }
h1, h2, h3, .logo { font-family: 'Poppins', sans-serif; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; }
.bg-light { background: var(--light); }

/* Pediatric Accents */
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.8rem; color: var(--primary); margin-bottom: 10px; }
.pediatric-accent { color: var(--text-light); font-size: 1.2rem; }

/* Navigation Container */
.navbar { 
    background: var(--white); 
    padding: 5px 0;
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); 
}

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

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.nav-logo:hover {
    transform: scale(1.02);
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 25px; 
    align-items: center;
    margin: 0 20px;
}

.nav-links a { 
    text-decoration: none; 
    color: var(--text); 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: color 0.3s;
}

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

.nav-buttons {
    display: flex;
    align-items: center;
}

.btn { 
    padding: 10px 25px; 
    border-radius: 25px; 
    text-decoration: none; 
    font-weight: 600; 
    cursor: pointer; 
    display: inline-block; 
    transition: 0.3s; 
}

.btn-nowrap {
    white-space: nowrap;
}

.btn-primary { 
    background: var(--primary); 
    color: white; 
    border: 2px solid var(--primary); 
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--secondary); }
.btn-large { background: var(--primary); color: white; padding: 15px 35px; font-size: 1.1rem; }

/* Hero */
.hero { padding: 120px 0; background: var(--secondary); border-bottom: 50px solid var(--white); border-bottom-left-radius: 100px; border-bottom-right-radius: 100px; }
.hero-content { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; text-align: left; }
.hero h1 { font-size: 3.2rem; color: var(--primary); margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; color: var(--text); opacity: 0.9; }
.hero-image img { width: 100%; border-radius: 50%; box-shadow: 0 10px 25px rgba(0,136,204,0.15); }

/* About */
.about-flex { display: grid; grid-template-columns: max-content 1fr; gap: 30px; align-items: start; }
.about-image {
    max-width: 200px; /* Adjust this value to make the image container smaller or larger */
    margin: 0; /* Align to the left of its grid cell */
}
.about-image img { width: 100%; border-radius: 20px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); display: block;}
.lead-text { font-size: 1.3rem; color: var(--primary-dark); font-weight: 600; margin-bottom: 20px; }
.about-details p { margin-bottom: 15px; color: var(--text-light); }

/* Ensure the columns stack on mobile devices for readability */
@media (max-width: 900px) {
    .about-flex { 
        grid-template-columns: 1fr; 
    }
    .about-image {
        margin: 0 auto 20px auto;
    }
}

.publications-wrapper { margin-top: 30px; }
.pub-intro { margin-bottom: 25px; line-height: 1.8; }
.pub-list { list-style: none; padding: 0; }
.pub-list li { margin-bottom: 20px; padding-left: 20px; border-left: 4px solid var(--primary); }
.pub-title { display: block; color: var(--text); font-size: 1.05rem; line-height: 1.4; }
.pub-journal { display: block; color: var(--primary-dark); font-size: 0.9rem; font-style: italic; margin-top: 4px; }

/* Conditions */
.endocrine-intro { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: center; margin-bottom: 60px; background: var(--white); padding: 40px; border-radius: 20px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); }
.endocrine-image img { width: 100%; height: auto; border-radius: 15px; display: block; }
.endocrine-text p { font-size: 1.1rem; color: var(--text-light); }
.conditions-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.card { background: white; padding: 30px; border-radius: 15px; border: 1px solid #eee; text-align: center; transition: 0.3s; position: relative; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,136,204,0.1); border-color: var(--secondary); }
.card .icon { font-size: 2.5rem; color: var(--accent); margin-bottom: 20px; opacity: 0.8; display: block; }
.card h3 { color: var(--primary); margin-bottom: 10px; font-size: 1.2rem; }
.card p { font-size: 0.95rem; color: var(--text-light); }

/* Insurance */
.insurance-content { max-width: 900px; margin: 0 auto; text-align: center; }
.superbill-box { background: var(--secondary); padding: 30px; border-radius: 15px; margin-bottom: 50px; display: flex; align-items: center; gap: 20px; text-align: left; }
.superbill-icon { font-size: 3rem; color: var(--primary); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; text-align: left; }
.info-item { background: var(--white); padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.info-icon { font-size: 2rem; color: var(--accent); margin-bottom: 15px; }
.info-item h3 { color: var(--primary); margin-bottom: 5px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 50px; }
.contact-card { background: var(--white); padding: 30px; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.contact-card h3 { color: var(--primary); margin-bottom: 15px; }
.contact-card p { margin-bottom: 10px; color: var(--text-light); display: flex; align-items: center; gap: 10px;}
.hours li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f1f1; color: var(--text-light); }
.hours span { font-weight: 600; color: var(--text); }
.map-wrapper { overflow: hidden; border-radius: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Footer */
footer { background: var(--primary-dark); color: white; padding: 40px 0; text-align: center; border-top-left-radius: 50px; border-top-right-radius: 50px; }

/* Specific fix for footer link visibility */
footer .footer-links a {
    color: var(--white);
    text-decoration: underline; /* Underlines help identify links for colorblind users */
    font-weight: 400;
    transition: opacity 0.3s ease;
margin-top: 15px;
}

footer .footer-links a:hover, 
footer .footer-links a:focus {
    color: var(--secondary); /* Light blue highlight on hover */
    text-decoration: none;
    outline: 1px solid var(--white);
    outline-offset: 4px;
}

/* Ensure the sub-footer text is also legible */
.sub-footer {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9); 
    margin-top: 3px;
}

@media (max-width: 900px) {
    .hero-content, .about-flex, .endocrine-intro { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-image { order: -1; max-width: 300px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show on mobile */
    }

    /* Fix: Prevent nav from disappearing; toggle it with a class instead */
    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        display: flex; /* Script will toggle this class */
    }
    
    .nav-buttons {
        display: none; /* Hide portal button on small mobile if space is tight, or move into nav-links */
    }
}

/* Respect User Preference for Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .card {
        transform: none !important;
        opacity: 1 !important;
    }
}