/* css/styles.css */

/* General styles for the scroll container */
body {
	margin: 0;
	overflow: hidden;
    font-family: "Ysabeau Infant", sans-serif;
    text-color: "white";
}
.scroll-container {
    display: flex;
    gap: 150px; /* Space between nodes */
    overflow: hidden;
    width: max-content;
    height: 100vh;
    white-space: nowrap;
    position: relative;
    padding-right: 50vw; /* for better scrolling?*/
}

/* Nodes inside the scrolling panel */
.node {
    display: inline-block;
    width: 200px;
    height: 150px;
    background-color: rgba(100, 100, 255, 0.5);
    margin: 20px;
    transition: opacity 0.3s ease-in-out;
    word-wrap: break-word; /* Ensures long words break properly */
    overflow-wrap: break-word;
    white-space: normal; /* Allows multi-line wrapping */
    line-height: 1.2; /* Improves readability */
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index:10
}

.node.low {
    transform: translateY(200px);
}

.node.mid {
    transform: translateY(100px);
}

.node.high {
    transform: translateY(0px);
}

/* Styling for animated elements */
.animate-on-scroll {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

/* Ensure threshold visibility */
.threshold-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: red;
    left: 75%; /* Matches threshold ratio */
    pointer-events: none;
}

.node.image-node {
    width: 300px; /* or set a fixed width */
    height: 200px; /* or set a fixed height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0px;
    border: none;
    background-color: transparent; /* Remove background */
    position:relative;
    justify-content: flex-start;
}

.image-node img {
    max-width: 100%; /* Ensure the image fits within the node */
    max-height: 100%;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    position: relative;
}


/* Hover effect for zoom */
.image-node img:hover {
    transform: scale(1.5);
}
/* Fullscreen mode */
.image-node img.fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 999;
    background: rgba(0,0,0,0.8);
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
}

/* Captions below images */
.image-node .caption {
    font-size: 16px;
    color: #eeeeee;
    margin-top: 5px;
    text-align: center;
    display: block; /* Ensure it's visible */
    width: 100%; /* Ensure it spans the width of the node */
}

/* Overlay box that covers multiple nodes */
.overlay {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.0);
    border: 3px solid rgba(0, 0, 255, 0.6);
    border-radius: 15px; /* Rounded corners */
    z-index: 5; /* Ensure it appears above nodes */
    padding-top: 55px; /* Space for caption */
    z-index:3
}

/* Overlay caption */
.overlay-caption {
    position: absolute;
    bottom: -20px; /* Slightly below the overlay */
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 5px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.spacer {
	width: 400vw; /* use this to add extra blank space at the end and enable scrolling to the end */
	height: 150px;
}

/* The fixed image container */
        #fixed-image {
          position: fixed;
          bottom: 20px; 
          right: 20px;
          width: 200px;
          height: auto;
          cursor: pointer;
          z-index: 20;
          transition: transform 0.3s ease-in-out;
        }
        #fixed-image img {
          width: 100%;
          height: auto;
          display: block;
        }
    
        /* Fullscreen mode */
        #fixed-image.fullscreen {
          top: 0; left: 0;
          right: 0; bottom: 0;
          width: 100vw;
          height: 100vh;
          margin: 0;
          padding: 0;
          display: flex;
          align-items: center;
          justify-content: center;
          background: rgba(0,0,0,0.8);
        }
        #fixed-image.fullscreen img {
          width: auto;
          height: 80vh; /* or 100% if you prefer covering the whole screen */
        }
    
        /* Navigation buttons */
        .nav-buttons {
          position: fixed;
          bottom: 20px;
          left: 20px;
          z-index: 20;
        }
        .nav-buttons button {
          margin-right: 10px;
          padding: 10px 20px;
          font-size: 16px;
          cursor: pointer;
        }
        
        .node {
            width: 200px; /* Fixed size */
            height: 150px; /* Fixed size */
            background-color: rgba(100, 100, 255, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: bold;
            color: white;
            position: relative;
        }
