/* Background team image */
.bg-hero { 
    background-image: url('https://static.igem.wiki/teams/5253/header/engineering2.png');
    background-size: 75% auto;
    background-position: right bottom -80px;
    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 -20px; /* 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 */
.engineering {
    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 */
}

/* 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;
}

/* -------------------- Engineering cycle ---------------- */

.container1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%; /* Ensure the content takes up the full width */
}

.engineering-cycle-text {
    flex: 1;
    margin-right: 20px; /* Space between text and image container */
}

.engineering-cycle-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 300px; /* Ensure the container's width matches the image */
    background-color: #FFDE5A;
    border-radius: 10px; /* Round corners */
}

.engineering-cycle-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;
    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 */
    height: 100%;
    margin: 0 auto; /* Center horizontally */
    font-family: 'Avenir', 'Century Gothic', sans-serif;
}

/* -------------------- Design ---------------- */

.container2 {
    display: flex;
    flex-direction: column;
    justify-content: column;
    align-items: center;
    width: 100%; /* Ensure the content takes up the full width */
    padding-bottom: 20px;
}

.design-1-treatment-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 399px;
    background-color: #FFDE5A;
    border-radius: 10px;
}

.design-1-treatment-image img {
    max-width: 100%;
    border-radius: 10px;
    border: 5px solid #FFDE5A;
    cursor: pointer;
}

/* ----- Enlarged image styling ----- */

/* 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: 1000px; /* 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: 14px; /* 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;
}

/* --- End of enlarged image styling--- */


.design-text {
    left: 10%; /* Adjust based on your layout */
    font-size: 15px;
    padding-top: 20px;
}

.design-1-images-wrapper {
    display: flex;
    flex-direction: row; /* Align images in a row */
    justify-content: center;
    gap: 30px; /* Space between images */
    padding-bottom: 20px;
}

.design-1-image-1, .design-1-image-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    background-color: #FFDE5A;
    border-radius: 10px;
}

.design-1-image-1 img, .design-1-image-2 img {
    max-width: 100%;
    border-radius: 10px;
    border: 5px solid #FFDE5A;
    cursor: pointer;
}

.design-1-control-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 400px;
    background-color: #FFDE5A;
    border-radius: 10px;
}

.design-1-control-image img {
    max-width: 100%;
    border-radius: 10px;
    border: 5px solid #FFDE5A;
    cursor: pointer;
}

.centered {
    text-align: center;
}

/* -------------------- Build ---------------- */

.container3 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%; /* Ensure the content takes up the full width */
}

/* -------------------- Test ---------------- */

.container4 {
    display: flex;
    flex-direction: column;
    justify-content: column;
    align-items: center;
    width: 100%; /* Ensure the content takes up the full width */
    padding-bottom: 20px;
}

.test-text {
    flex: 1;
    margin-right: 20px; /* Space between text and image container */
}

.test-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px; /* Ensure the container's width matches the image */
    background-color: #FFDE5A;
    border-radius: 10px; /* Round corners */
}

.test-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;
}

/* -------------------- Learn ---------------- */

.container5 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%; /* Ensure the content takes up the full width */
}

/* ----------------- Cycle B ----------------------- */

/*table*/
/* -------------------- Table ------------------- */
.custom-table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
    border: 5px solid #FFDE5A; /* Outer yellow border */
    border-radius: 10px;
  }
  
  .custom-table th,
  .custom-table td {
    padding: 15px;
    border: 1px solid #dddddd;
    text-align: left;
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  .custom-table th {
    font-size: 18px;
    background-color: #EDCDCD; /* Header background color */
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  .custom-table td {
    font-size: 16px;
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  /* Links in the table */
  .custom-table a {
    text-decoration: none;
    color: #000; /* Set a default link color */
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  .custom-table a:hover {
    text-decoration: underline;
    color: #FF5A00; /* Optional: change color on hover for better visibility */
  }
  
  /* Style for every even row */
  .custom-table tr:nth-child(even) {
    background-color: #EDCDCD; /* Even row background color */
  }
  
  /* Style for every odd row */
  .custom-table tr:nth-child(odd) {
    background-color: #fad8d8; /* Odd row background color */
  }

  /*table 2*/
/* -------------------- Table ------------------- */
.custom-table {
    width: 80%;
    margin: 20px auto;
    border-collapse: collapse;
    border: 5px solid #FFDE5A; /* Outer yellow border */
    border-radius: 10px;
  }
  
  .custom-table th,
  .custom-table td {
    padding: 15px;
    border: 1px solid #dddddd;
    text-align: left;
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  .custom-table th {
    font-size: 18px;
    background-color: #EDCDCD; /* Header background color */
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  .custom-table td {
    font-size: 16px;
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  /* Links in the table */
  .custom-table a {
    text-decoration: none;
    color: #000; /* Set a default link color */
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  .custom-table a:hover {
    text-decoration: underline;
    color: #FF5A00; /* Optional: change color on hover for better visibility */
  }
  
  /* Style for every even row */
  .custom-table tr:nth-child(even) {
    background-color: #EDCDCD; /* Even row background color */
  }
  
  /* Style for every odd row */
  .custom-table tr:nth-child(odd) {
    background-color: #fad8d8; /* Odd row background color */
  }

/*Test*/
  
.test-2-container {
    display: flex;
    flex-direction: column;
    justify-content: column;
    align-items: center;
    width: 100%; /* Ensure the content takes up the full width */
    padding-bottom: 20px;
}

.test-2-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 600px; /* Ensure the container's width matches the image */
    background-color: #FFDE5A;
    border-radius: 10px; /* Round corners */
}

.test-2-image img {
    max-width: 100%; /* Ensure the image takes up the full width of the container */
    width: 100%;
    border-radius: 10px; /* Round corners */
    border: 5px solid #FFDE5A; /* Border around image */
    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: 18px;
    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;
    width: 100%; /* Make figure text as wide as the image */
}

.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 */
.engineering-cycle-image img,
.design-1-treatment-image img,
.design-1-image-1 img,
.design-1-image-2 img, 
.design-1-control-image img,
.test-image img,
.design-1-image-1 img,
.design-1-image-1 img,
.test-2-image img {
    transition: transform 0.3s ease; /* Smooth transition for scaling */
}

/* Hover Effect */
.engineering-cycle-image img:hover,
.design-1-treatment-image img:hover,
.design-1-image-1 img:hover,
.design-1-image-2 img:hover, 
.design-1-control-image img:hover,
.test-image img:hover,
.design-1-image-1 img:hover,
.design-1-image-1 img:hover,
.test-2-image img:hover {
    transform: scale(1.05); /* Slightly enlarge the image on hover */
    cursor: pointer; /* Change cursor to indicate clickable */
}