/* Research Page - Clinical Style */

/* Hero Section */
.research-hero {
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-lg) 0;
}

.research-hero .container {
    max-width: 700px;
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.05em;
}

.hero-description {
    margin-top: var(--space-sm);
    font-size: 1rem;
    color: var(--color-text-secondary);
}

/* Research Content */
.research-content {
    padding: var(--space-lg) 0;
    background-color: var(--color-surface);
}

html.dark-mode .research-content {
    background-color: var(--color-bg);
}

.research-content .container {
    max-width: 900px;
}

/* Research Sections */
.research-section {
    margin-bottom: var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-bg);
    transition: all 0.3s var(--ease-smooth);
}

html.dark-mode .research-section {
    background-color: var(--color-surface);
}

/* Section Toggle Button */
.section-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s var(--ease-smooth);
}

.section-toggle:hover {
    background-color: var(--color-surface);
}

html.dark-mode .section-toggle:hover {
    background-color: var(--color-bg);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.toggle-icon {
    font-size: 1.5rem;
    color: var(--color-text-tertiary);
    font-weight: 300;
    transition: transform 0.3s var(--ease-smooth);
}

.section-toggle.active .toggle-icon {
    transform: rotate(45deg);
}

/* Section Content */
.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s var(--ease-smooth);
    padding: 0 var(--space-md);
}

.section-content.active {
    max-height: 3000px;
    padding: 0 var(--space-md) var(--space-md);
}

.section-content h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-top: var(--space-md);
    margin-bottom: var(--space-sm);
}

.section-content p {
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.section-content ul {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
}

.section-content li {
    margin-bottom: var(--space-xs);
    line-height: 1.6;
}

/* Featured Section (Always Visible) */
.featured-section {
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-bg);
}

html.dark-mode .featured-section {
    background-color: var(--color-surface);
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.section-content-visible {
    margin-top: var(--space-md);
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.info-card {
    padding: var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

html.dark-mode .info-card {
    background-color: var(--color-bg);
}

.info-card h3 {
    margin-top: 0;
    margin-bottom: var(--space-xs);
}

.info-card .mono {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
}

.info-card ul {
    margin: 0;
    padding-left: var(--space-md);
}

/* Note */
.note {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--color-surface);
    border-left: 3px solid var(--color-text-primary);
    margin: var(--space-md) 0;
    font-size: 0.9375rem;
}

html.dark-mode .note {
    background-color: var(--color-bg);
}

/* Transport Diagram */
.transport-diagram {
    margin: var(--space-lg) 0;
    padding: var(--space-lg);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

html.dark-mode .transport-diagram {
    background-color: var(--color-bg);
}

.transport-diagram svg {
    width: 100%;
    height: auto;
    max-width: 800px;
    margin: 0 auto;
    display: block;
}

/* SVG Diagram Elements */
.diagram-label {
    font-family: var(--font-mono);
    font-size: 14px;
    fill: var(--color-text-primary);
    font-weight: 500;
}

.diagram-label-small {
    font-family: var(--font-mono);
    font-size: 12px;
    fill: var(--color-text-tertiary);
}

.vessel-line {
    stroke: var(--color-text-primary);
    stroke-width: 3;
    fill: none;
}

.arrow-head {
    fill: var(--color-text-primary);
}

.enterocyte {
    fill: var(--color-surface);
    stroke: var(--color-border);
    stroke-width: 2;
}

html.dark-mode .enterocyte {
    fill: var(--color-bg);
}

.cell-label {
    font-family: var(--font-mono);
    font-size: 13px;
    fill: var(--color-text-secondary);
}

.transporter-sglt1 {
    fill: #E09090;
    stroke: #C07070;
    stroke-width: 2;
}

.transporter-glut2 {
    fill: #90B0E0;
    stroke: #7090C0;
    stroke-width: 2;
}

.transporter-glut5 {
    fill: #90E0B0;
    stroke: #70C090;
    stroke-width: 2;
}

.transporter-label {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: var(--color-text-primary);
    font-weight: 600;
}

.microvilli {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 1.5;
}

.molecule-glucose {
    fill: #7EC8E3;
    stroke: #4AA8C7;
    stroke-width: 1;
}

.molecule-fructose {
    fill: #FFB0C0;
    stroke: #E08090;
    stroke-width: 1;
}

.legend-label {
    font-family: var(--font-mono);
    font-size: 13px;
    fill: #87CEEB;
    font-weight: 500;
}

.legend-label.fructose-label {
    fill: #FFB6C1;
}

/* Sodium ions */
.sodium-ion {
    fill: #FFFF00;
    stroke: #CCCC00;
    stroke-width: 1;
    opacity: 0.9;
}

.ion-label {
    font-family: var(--font-mono);
    font-size: 9px;
    fill: var(--color-text-primary);
    font-weight: 600;
}

.ion-label-static {
    font-family: var(--font-mono);
    font-size: 11px;
    fill: #CCCC00;
    font-weight: 600;
}

html.dark-mode .ion-label {
    fill: var(--color-text-primary);
}

html.dark-mode .ion-label-static {
    fill: #FFD700;
}

/* Capillary Structure - Blood vessel styling */
.capillary-outer {
    fill: #DC143C;
    stroke: #B22222;
    stroke-width: 1;
}

.capillary-inner {
    fill: #F5D7D7;
    stroke: none;
}

/* Capillary tube (actual classes used in HTML) */
.capillary-tube {
    fill: #DC143C;
    stroke: #B22222;
    stroke-width: 1;
}

.capillary-inner-tube {
    fill: #F5D7D7;
    stroke: none;
}

html.dark-mode .capillary-outer {
    fill: #E63946;
    stroke: #C1121F;
}

html.dark-mode .capillary-inner {
    fill: #E8C4C4;
}

html.dark-mode .capillary-tube {
    fill: #E63946;
    stroke: #C1121F;
}

html.dark-mode .capillary-inner-tube {
    fill: #E8C4C4;
}

.vessel-arrow {
    stroke: #FFFFFF;
    stroke-width: 2;
    fill: none;
}


/* Flow Arrows */
.flow-arrow {
    fill: none;
    stroke-width: 2;
    opacity: 0.4;
}

.glucose-flow {
    stroke: #87CEEB;
}

.fructose-flow {
    stroke: #FFB6C1;
}

.arrowhead-glucose-fill {
    fill: #87CEEB;
    opacity: 0.6;
}

.arrowhead-fructose-fill {
    fill: #FFB6C1;
    opacity: 0.6;
}

/* Animated Molecules */
.animated-molecule {
    opacity: 0.8;
}

.glucose-anim {
    fill: #7EC8E3;
    stroke: #4AA8C7;
    stroke-width: 1;
}

.fructose-anim {
    fill: #FFB0C0;
    stroke: #E08090;
    stroke-width: 1;
}

/* Complete Animated Molecules */
.animated-molecule-complete {
    opacity: 0.8;
}

.animated-molecule-complete.glucose-anim {
    fill: #7EC8E3;
    stroke: #4AA8C7;
    stroke-width: 1;
}

.animated-molecule-complete.fructose-anim {
    fill: #FFB0C0;
    stroke: #E08090;
    stroke-width: 1;
}



/* Simple Diagram */
.diagram-simple {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-lg) 0;
    margin: var(--space-md) 0;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

html.dark-mode .diagram-simple {
    background-color: var(--color-bg);
}

.diagram-label {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    padding: var(--space-xs) var(--space-sm);
}

.transport-arrow {
    font-size: 2rem;
    color: var(--color-text-tertiary);
    margin: var(--space-xs) 0;
}

.transporter-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: 2px solid var(--color-text-primary);
    border-radius: 4px;
    background-color: var(--color-bg);
    min-width: 200px;
}

html.dark-mode .transporter-box {
    background-color: var(--color-surface);
}

.transporter-box .mono {
    font-size: 0.875rem;
    font-weight: 600;
}

.transport-items {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.item {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.glucose-item {
    background-color: rgba(135, 206, 235, 0.2);
    color: #5FAFD7;
}

.fructose-item {
    background-color: rgba(255, 182, 193, 0.2);
    color: #E8909C;
}

.sodium-item {
    background-color: rgba(255, 255, 0, 0.2);
    color: #CCCC00;
}

/* Data Table */
.data-table {
    width: 100%;
    margin: var(--space-md) 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.data-table th,
.data-table td {
    padding: var(--space-sm);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.data-table tbody tr:hover {
    background-color: var(--color-surface);
}

html.dark-mode .data-table tbody tr:hover {
    background-color: var(--color-bg);
}

/* Citations */
.citation {
    padding: var(--space-md);
    margin: var(--space-md) 0;
    background-color: var(--color-surface);
    border-left: 2px solid var(--color-border);
}

html.dark-mode .citation {
    background-color: var(--color-bg);
}

.citation h4 {
    font-size: 1rem;
    font-weight: 500;
    margin: 0 0 var(--space-xs) 0;
}

.citation .mono {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
}

.citation p {
    margin: var(--space-xs) 0 0 0;
    font-size: 0.9375rem;
}


/* Responsive */
@media (max-width: 768px) {
    .research-hero {
        min-height: auto;
        padding: calc(80px + var(--space-lg)) 0 var(--space-lg);
    }

    .featured-section {
        padding: var(--space-md);
    }

    .section-toggle {
        padding: var(--space-sm);
    }

    .section-title {
        font-size: 1rem;
    }

    .section-content.active {
        padding: 0 var(--space-sm) var(--space-sm);
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .transport-diagram {
        padding: var(--space-sm);
        margin: var(--space-md) 0;
        overflow-x: auto;
    }

    .transport-diagram svg {
        min-width: 500px;
    }

    .transporter-box {
        min-width: 150px;
    }

    .data-table {
        font-size: 0.875rem;
    }

    .data-table th,
    .data-table td {
        padding: var(--space-xs);
    }

    .citation {
        padding: var(--space-sm);
    }
}