:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-light: #f4f7f6;
    --text-dark: #333;
}

/* Enable smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #2c3e50 0%, #000000 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.8;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 10px;
    transition: 0.3s;
}

.btn:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 1px solid white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* --- Supplementary Materials Styles --- */
.btn-supplementary {
    background: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-supplementary:hover {
    background: #1a252f; /* slightly darker shade for hover effect */
    border-color: #1a252f;
}

.supplementary {
    margin-top: 40px;
}

.repo-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-top: 15px;
}

.repo-box a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

.repo-box a:hover {
    text-decoration: underline;
}

/* --- Main Workflow Card --- */
.main-workflow-card {
    margin-bottom: 30px;
}

/* --- Horizontal Image Galleries --- */
.gallery-section {
    margin-top: 40px;
}

.h-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 0 20px 0; /* Extra bottom padding for the scrollbar */
    scroll-behavior: smooth;
}

/* Standard scrolling images (Sankeys, Bar Charts) */
.h-img {
    height: 450px; 
    width: auto;   
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 0 0 auto; 
    transition: transform 0.3s;
    background-color: white; 
    padding: 5px; 
}

.h-img:hover {
    transform: scale(1.02); 
}

/* NEW: Large scrolling images for the 5 Pathways (shows ~2 at a time) */
.h-img-large {
    width: 48%; /* Takes up just under half the container width */
    height: auto; /* Scales height automatically to maintain aspect ratio */
    max-height: 500px; /* Safety limit so they don't get massive on big monitors */
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex: 0 0 auto; 
    transition: transform 0.3s;
    background-color: white; 
    padding: 5px; 
}

.h-img-large:hover {
    transform: scale(1.02);
}

/* Custom Scrollbar for Webkit (Chrome, Safari, Edge) */
.h-scroll-container::-webkit-scrollbar {
    height: 10px;
}

.h-scroll-container::-webkit-scrollbar-track {
    background: #e1e1e1; 
    border-radius: 5px;
}

.h-scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary-color); 
    border-radius: 5px;
}

.h-scroll-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color); 
}
/* -------------------------------------- */

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.img-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.img-card img {
    width: 100%;
    border-radius: 4px;
}

.paper-item {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Added slight shadow to match repo-box */
}

.tag {
    background: #e1f0fa;
    color: #3498db;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

footer {
    text-align: center;
    padding: 40px;
    background: #222;
    color: white;
}

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--accent-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: 0.3s ease-in-out;
    font-size: 1.2rem;
    z-index: 1000; /* Ensures it stays on top of other elements */
}

.back-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px); /* Creates a slight "lift" effect when hovered */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .h-img {
        height: 280px; 
    }
    .h-img-large {
        width: 85%; /* Shows 1 full pathway image and a peek of the next on phones */
    }
}