/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: #2c3e50;
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Hero Banner */
.hero-banner {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding: 0;
    height: 400px;
    overflow: hidden;
    position: relative;
    border-radius: 8px 8px 0 0;
}

.hero-banner img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.2);
}

.hero-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 90%;
}

.hero-title h1 {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8);
    letter-spacing: 2px;
    margin: 0;
}

/* Main Content */
main {
    background-color: #fff;
    padding: 3rem 40px;
    margin: 0 auto 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    border-radius: 0 0 8px 8px;
}

.content-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid #e8eef3;
}

.content-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Typography */
h2 {
    font-size: 1.6rem;
    color: #000000;
    margin-bottom: 1.5rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 1rem;
    color: #000000;
    margin: 2rem 0 0.75rem 0;
    font-weight: 600;
    letter-spacing: -0.1px;
}

h3:first-of-type {
    margin-top: 0;
}

h4 {
    font-size: 0.95rem;
    color: #000000;
    margin-bottom: 0.75rem;
    font-weight: 600;
    letter-spacing: -0.1px;
}

p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #495057;
}

a {
    color: #337ab7;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: #23527c;
    text-decoration: none;
}

strong {
    font-weight: 600;
    color: #2c3e50;
}

/* Data Overview */
.data-overview {
    margin: 1.5rem 0;
}

.overview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fc 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 2px solid #e8eef3;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Plasma colormap colors for icons */
.stat-item:nth-child(1) .stat-icon {
    color: #0d0887;
}

.stat-item:nth-child(2) .stat-icon {
    color: #7e03a8;
}

.stat-item:nth-child(3) .stat-icon {
    color: #cc4778;
}

.stat-item:nth-child(4) .stat-icon {
    color: #f89540;
}

.stat-label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.3rem;
    color: #000000;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Marker Panels */
.marker-panels {
    margin: 1.5rem 0;
}

.panel-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eef3;
}

.panel-content {
    display: flex;
    flex-direction: column;
}

.marker-list {
    list-style: none;
    margin-top: 0.5rem;
}

.marker-list li {
    padding: 0.35rem 0 0.35rem 1.5rem;
    position: relative;
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.5;
}

.marker-list li:before {
    content: "●";
    position: absolute;
    left: 0;
    color: #000000;
    font-weight: normal;
    font-size: 0.6rem;
    top: 0.55rem;
}

/* mIF Panel marker colors (placeholder fluorescent stain colors) */
/* Only apply colors to mIF panels (using .mif-panels class) */
.mif-panels .panel-group:nth-child(1) .marker-list li:nth-child(1):before {
    color: #000000;
}

.mif-panels .panel-group:nth-child(1) .marker-list li:nth-child(2):before {
    color: #ff0000;
}

.mif-panels .panel-group:nth-child(1) .marker-list li:nth-child(3):before {
    color: #ff7e00; 
}

.mif-panels .panel-group:nth-child(1) .marker-list li:nth-child(4):before {
    color: #00a1ff;
}

.mif-panels .panel-group:nth-child(1) .marker-list li:nth-child(5):before {
    color: #ff00ff; 
}

.mif-panels .panel-group:nth-child(2) .marker-list li:nth-child(1):before {
    color: #000000; /* Yellow - e.g., Alexa555 */
}

.mif-panels .panel-group:nth-child(2) .marker-list li:nth-child(2):before {
    color: #ff7e00; /* Cyan - e.g., Alexa405 */
}

.mif-panels .panel-group:nth-child(2) .marker-list li:nth-child(3):before {
    color: #00ff33; /* Deep Pink - e.g., Texas Red */
}

.mif-panels .panel-group:nth-child(2) .marker-list li:nth-child(4):before {
    color: #00a1ff; /* Lime Green - e.g., Alexa488 */
}

.mif-panels .panel-group:nth-child(2) .marker-list li:nth-child(5):before {
    color: #ff00ff; /* Blue - e.g., DAPI */
}


.panel-image img {
    width: 100%;
    height: 200px;              /* fixed height so object-fit works */
    object-fit: cover;          /* zoom/crop instead of stretch */
    
    border-radius: 6px;
    border: 2px solid #e8eef3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Institution Logos */
.logos-section {
    text-align: center;
    padding-bottom: 2rem !important;
}

.institution-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eef3;
}

.logo-item {
    flex: 0 1 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.logo-item img {
    max-width: 100%;
    max-height: 90px;
    height: auto;
    object-fit: contain;
}

/* Data Access Table */
.table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.data-access-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.data-access-table thead {
    background: linear-gradient(135deg, #2c5282 0%, #337ab7 100%);
    color: #fff;
}

.data-access-table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-access-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e8eef3;
    color: #495057;
    font-size: 0.95rem;
}

.data-access-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-access-table tbody tr:hover {
    background-color: #f8f9fc;
}

.data-access-table tbody tr:last-child td {
    border-bottom: none;
}

.download-link {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #337ab7 0%, #2c5282 100%);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(51, 122, 183, 0.3);
}

.download-link:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 122, 183, 0.4);
}

/* Citation Boxes */
.citation-box {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border: 1px solid #e8eef3;
    border-left: 5px solid #337ab7;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.citation-box p {
    margin-bottom: 0;
    line-height: 1.9;
    color: #495057;
}

/* Policy Content */
.policy-content {
    margin: 1.5rem 0;
}

.policy-content p {
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border: 1px solid #e8eef3;
    border-left: 5px solid #337ab7;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Acknowledgments Toggle */
.acknowledgment-toggle {
    margin-top: 1.5rem;
}

.toggle-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #337ab7 0%, #2c5282 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(51, 122, 183, 0.3);
    width: 100%;
    text-align: left;
}

.toggle-button:hover {
    background: linear-gradient(135deg, #2c5282 0%, #1e3a5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 122, 183, 0.4);
}

.toggle-icon {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.acknowledgment-content {
    display: none;
    margin-top: 1.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fc 0%, #ffffff 100%);
    border: 1px solid #e8eef3;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.acknowledgment-list {
    list-style: none;
    margin: 1.5rem 0;
}

.acknowledgment-list li {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
    position: relative;
    line-height: 1.8;
    color: #495057;
}

.acknowledgment-list li:before {
    content: "●";
    position: absolute;
    left: 0;
    color: #000000;
    font-weight: normal;
    font-size: 0.6rem;
    top: 0.55rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #b8bec4;
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 4rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .panel-group {
        grid-template-columns: 1fr;
    }

    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    main {
        padding: 2.5rem 30px;
    }

    .hero-banner {
        height: 350px;
    }

    .hero-title h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 1.4rem;
    }

    h3 {
        font-size: 0.95rem;
    }

    h4 {
        font-size: 0.9rem;
    }

    main {
        padding: 2rem 20px;
    }

    .content-section {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
    }

    .overview-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .institution-logos {
        gap: 2.5rem;
        padding: 2rem 1.5rem;
    }

    .logo-item {
        flex: 0 1 160px;
    }

    .data-access-table {
        font-size: 0.85rem;
    }

    .data-access-table th,
    .data-access-table td {
        padding: 0.85rem 0.75rem;
    }

    .hero-banner {
        margin: 1.5rem auto 0;
        height: 300px;
    }

    .hero-title h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 20px;
    }

    p {
        font-size: 1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .panel-group {
        padding: 1rem;
        gap: 1.25rem;
    }

    .panel-image img {
        max-height: 160px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 0.9rem;
    }

    main {
        padding: 1.5rem 15px;
    }

    .hero-banner {
        margin: 1rem auto 0;
        height: 250px;
    }

    .content-section {
        margin-bottom: 2.5rem;
        padding-bottom: 1.5rem;
    }

    .overview-stats {
        grid-template-columns: 1fr;
    }

    .institution-logos {
        flex-direction: column;
        gap: 2rem;
        padding: 1.5rem;
    }

    .logo-item {
        flex: 0 1 auto;
        width: 100%;
        max-width: 200px;
    }

    .panel-group {
        padding: 1rem;
        gap: 1rem;
    }

    .data-access-table {
        font-size: 0.8rem;
    }

    .data-access-table th,
    .data-access-table td {
        padding: 0.75rem 0.5rem;
    }

    .download-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero-title h1 {
        font-size: 1.8rem;
    }

    .stat-item {
        padding: 0.75rem;
    }

    .panel-image img {
        max-height: 140px;
    }

    .marker-list li {
        font-size: 0.85rem;
    }
}
