/* Background team image */
.bg-hero { 
    background-image: url('https://static.igem.wiki/teams/5253/header/description.png');
    background-size: 85% auto; /* Ensure the whole image is visible */
    background-position: right bottom -100px; 
    background-repeat: no-repeat;
    height: 300px;
  }

  /* Adjustments for smaller screens */
@media (max-width: 768px) {
    .bg-hero {
        background-size: 80% auto; /* Make the image cover the full width */
        background-position: right bottom -10px; /* Align to the bottom */
        height: 250px; /* Reduce height for smaller screens */
    }
  }
  
  @media (max-width: 480px) {
    .bg-hero {
        background-size: 40% auto; /* Ensure the image fully covers smaller devices */
        background-position: right bottom; /* Keep it centered and aligned at the bottom */
        height: 200px; /* Further reduce the height */
    }
  }
  
/* CSS for the title block */
.title-block h1 {
    color: #25336b; /* Replace with your desired color */
    font-size: 60px; /* Adjust as needed */
    font-weight: bold; /* Adjust as needed */

  }

/* Container for entire page */
.description {
    display: flex;
    flex-direction: column; /* Stack the header on top of the content */
    align-items: center; /* Center the header horizontally */
    padding-right: 35px; /* Space for back to top button */
    font-size: 18px;
}

/* Design of all headers */
.header {
    margin-bottom: 10px;
    width: 100%; /* Make the header as wide as the container */
}

/* Design of headers 2-4 */
#headers {
    padding-top: 20px;
}

/* -------------------- What is endometriosis? ---------------- */

.container1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure the content takes up the full width */
}

.endometriosis-text {
    flex: 1;
    margin-right: 20px; /* Space between text and image container */
}

.endometriosis-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px; /* Ensure the container's width matches the image */
    background-color: #FFDE5A;
    border-radius: 10px; /* Round corners */
}

.endometriosis-image img {
    max-width: 100%; /* Ensure the image takes up the full width of the container */
    border-radius: 10px; /* Round corners */
    border: 5px solid #FFDE5A; /* Border around image */
    cursor: pointer;
}

.figure-text {
    text-align: center;
    font-size: 15px;
    padding: 10px 0;
    color: #25336b;
    background-color: #fff;
    border-radius: 10px; /* Rounded corners on all sides */
    width: 100%; /* Make figure text as wide as the image */
    box-sizing: border-box;
    border-left: 5px solid #FFDE5A; /* Border around image */
    border-right: 5px solid #FFDE5A; /* Border around image */
    border-bottom: 5px solid #FFDE5A; /* Border around image */
    margin-top: 0px;
    height: 100%;
}


/* -------------------- Our project ---------------- */

.container2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure the content takes up the full width */
}

.our-project-text {
    flex: 1;
    margin-right: 20px; /* Space between text and image container */
}

.our-project-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px; /* Ensure the container's width matches the image */
    background-color: #FFDE5A;
    border-radius: 10px; /* Round corners */
}

.our-project-image img {
    max-width: 100%; /* Ensure the image takes up the full width of the container */
    border-radius: 10px; /* Round corners */
    border: 5px solid #FFDE5A; /* Border around image */
    cursor: pointer;
}

/* Overlay styles */
.overlay {
    position: fixed; /* Positioned relative to the viewport */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Make sure it covers other content */
}

/* Enlarged container styles */
.enlarged-container {
    display: flex; /* Use flexbox for layout */
    align-items: flex-start; /* Align items to the start */
    padding: 20px;
    background-color: #fff; /* Background for the enlarged view */
    border: 5px solid #FFDE5A; /* Border around the enlarged view */
    border-radius: 10px;
    max-width: 900px; /* Set a larger max width for the container */
    width: 100%; /* Use a percentage width for responsiveness */
}

/* Close button styles */
.close {
    position: absolute; /* Position absolute to place it anywhere within the overlay */
    top: 10px; /* Adjust as needed */
    right: 15%; /* Adjust as needed */
    font-size: 30px;
    color: #25336b;
    cursor: pointer;
    z-index: 101; /* Ensure the close button is on top of other elements */
}

/* Enlarged image styles */
.enlarged-image {
    max-width: 60%; /* Limit the width of the image */
    height: auto; /* Maintain aspect ratio */
    border-right: 5px solid #FFDE5A; /* Add right border to the image */
    background-color: #FFDE5A;
}

/* Enlarged figure text styles */
.enlarged-figure-text {
    margin-left: 20px; /* Space between the image and text */
    text-align: center; /* Align text to the left */
    font-size: 20px; /* Same size as the original figure text */
    color: #25336b; /* Same text color */
    max-width: 40%; /* Set a max width for the text box */
    flex-shrink: 0; /* Prevent text box from shrinking */
    overflow-wrap: break-word; /* Allow long words to break to the next line */
    margin: 0 auto;
    padding: 5px;
}

/* -------------------- Experimental design ---------------- */

.container3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%; /* Ensure the content takes up the full width */
}

.experimental-design-text {
    flex: 1;
    margin-right: 20px; /* Space between text and image container */
}

.experimental-design-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 500px; /* Ensure the container's width matches the image */
    background-color: #FFDE5A;
    border-radius: 10px; /* Round corners */
}

.experimental-design-image img {
    max-width: 100%; /* Ensure the image takes up the full width of the container */
    border-radius: 10px; /* Round corners */
    border: 5px solid #FFDE5A; /* Border around image */
    cursor: pointer;
}

.container4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%; /* Ensure the container takes up the full width */
}

.goal-text {
    margin-bottom: 20px; /* Space between text and images */
}

.images-wrapper {
    display: flex;
    flex-direction: row; /* Align images in a row */
    justify-content: center;
    gap: 30px; /* Space between images */
    padding-bottom: 35px;
}

.goal-image-1, .goal-image-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    background-color: #FFDE5A;
    border-radius: 10px;
}

.goal-image-1 img, .goal-image-2 img {
    max-width: 100%;
    border-radius: 10px;
    border: 5px solid #FFDE5A;
    cursor: pointer;
}



/* -------------------- Makes images clickable ---------------- */

/* The Modal (background) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.modal-content-container {
    position: relative;
    max-width: 120%;
    max-height: 120%;
    top: 30px;
}

.modal-content {
    width: auto; /* Width of 70% of viewport width */
    max-width: 600px; /* Max width of 550px */
    max-height: 70vh; /* Max height of 70% of viewport height */
    height: auto; /* Maintain aspect ratio */
    border-radius: 5px 5px 0 0; /* Rounded corners */
    overflow: hidden; /* Hide overflow */
    border: 10px solid #FFDE5A;
}

.modal-figure-text {
    color: #fff;
    text-align: center;
    margin-top: 10px;
    font-size: 17px;
    color: #25336b;
    background-color: white; /* Background color for contrast */
    border-radius: 0 0 5px 5px; /* Rounded corners for bottom */
    border-left: 10px solid #FFDE5A;
    border-right: 10px solid #FFDE5A;
    border-bottom: 10px solid #FFDE5A;
    margin-top: 0%;
    padding: 10px;
}

.close {
    position: absolute;
    top: 100px;
    right: 25px;
    color: #FFDE5A;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #25336b;
}

/* General Image Styling */
.endometriosis-image img,
.our-project-image img,
.experimental-design-image img,
.goal-image-1 img,
.goal-image-2 img {
    transition: transform 0.3s ease; /* Smooth transition for scaling */
}

/* Hover Effect */
.endometriosis-image img:hover,
.our-project-image img:hover,
.experimental-design-image img:hover,
.goal-image-1 img:hover,
.goal-image-2 img:hover {
    transform: scale(1.05); /* Slightly enlarge the image on hover */
    cursor: pointer; /* Change cursor to indicate clickable */
}