/* ========================================
   ENDOCRINOLOGY MEDICAL WEBSITE
   Corporate Professional Design System
   ======================================== */

/* CSS Variables - Color Palette */
:root {
    --primary-blue: #003366;
    --secondary-blue: #004080;
    --accent-blue: #0066cc;
    --light-blue: #e6f2ff;
    --clinical-white: #ffffff;
    --off-white: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-medium: #4a4a4a;
    --text-light: #6b6b6b;
    --border-color: #d1d5db;
    --success-green: #059669;
    --warning-amber: #d97706;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--off-white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', 'Georgia', serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-blue);
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--clinical-white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    font-size: 1.75rem;
    color: var(--clinical-white);
    margin: 0;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--clinical-white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background-color: var(--clinical-white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    margin-left: 0.5rem;
    color: var(--text-light);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--clinical-white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: var(--clinical-white);
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    color: var(--light-blue);
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* Main Content */
main {
    background-color: var(--clinical-white);
    min-height: calc(100vh - 400px);
}

.content-wrapper {
    padding: 3rem 0;
}

/* Section Cards */
.section-card {
    background-color: var(--clinical-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--light-blue);
}

.section-title {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin: 0;
}

.toggle-icon {
    font-size: 1.5rem;
    color: var(--accent-blue);
    transition: transform 0.3s ease;
}

.section-card.expanded .toggle-icon {
    transform: rotate(180deg);
}

.topic-list {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.topic-item {
    padding: 0.75rem 1rem;
    background-color: var(--off-white);
    border-left: 3px solid var(--accent-blue);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background-color: var(--light-blue);
    border-left-color: var(--primary-blue);
    transform: translateX(5px);
}

.topic-item a {
    color: var(--text-dark);
    font-weight: 500;
    display: block;
}

.topic-item a:hover {
    text-decoration: none;
}

/* Topic Content Page */
.topic-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.topic-header {
    border-bottom: 3px solid var(--accent-blue);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.topic-body h3,
.topic-body h4,
.topic-body h5 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.topic-body ul,
.topic-body ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.topic-body li {
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

.topic-body strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Resources Box */
.resources-box {
    background-color: var(--light-blue);
    border-left: 4px solid var(--accent-blue);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.resources-box h4 {
    color: var(--primary-blue);
    margin-top: 0;
}

.resources-box ul {
    list-style: none;
    margin-left: 0;
}

.resources-box li {
    padding: 0.5rem 0;
}

.resources-box a {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.resources-box a::before {
    content: "🔗";
    margin-right: 0.5rem;
}

/* Navigation Buttons */
.topic-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.nav-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent-blue);
    color: var(--clinical-white);
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: var(--primary-blue);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background-color: var(--primary-blue);
    color: var(--clinical-white);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-disclaimer {
    background-color: var(--secondary-blue);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--light-blue);
    margin: 0 1rem;
}

/* Search Bar */
.search-container {
    margin: 2rem 0;
    text-align: center;
}

.search-box {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

.search-box:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .topic-list {
        grid-template-columns: 1fr;
    }

    .topic-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .section-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    header, footer, .breadcrumb, .topic-navigation {
        display: none;
    }

    body {
        background-color: white;
    }

    .topic-content {
        max-width: 100%;
    }
}
