/* Background team image */
.bg-hero { 
    background-image: url('https://static.igem.wiki/teams/5253/header/experiments.png');
    background-size: 35% auto; /* Ensure the whole image is visible */
    background-position: right bottom -10px; /* Position image to the right */
    background-repeat: no-repeat;
    height: 300px; /* Height of the container */
    width: 100%; /* Full width */
  }

/* Adjustments for smaller screens */
@media (max-width: 768px) {
    .bg-hero {
        background-size: 50% 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 */
  
  }


.main-content {
    padding-right: 45px;
}



/* -------------------- Overview ---------------- */

.container1 {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%; /* Ensure the content takes up the full width */
}



.overview-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 */
}

.overview-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;
}

/* -------------------- Makes images clickable ---------------- */

/* The Modal (background) */
.image-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 */
.image-modal-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

/* Modal Content Container */
.image-modal-content-container {
    position: relative;
    max-width: 120%;
    max-height: 120%;
    top: 30px;
}

/* Modal Content (Image) */
.image-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 */
.image-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;
    font-family: 'Avenir', 'Century Gothic', sans-serif;
}

/* Close Button */
.close-image {
    position: absolute;
    top: 100px;
    right: 25px;
    color: #FFDE5A;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.close-image:hover,
.close-image:focus {
    color: #25336b;
}

/* General Image Styling */
.overview-image img {
    transition: transform 0.3s ease; /* Smooth transition for scaling */
}

/* Hover Effect */
.overview-image img:hover {
    transform: scale(1.05); /* Slightly enlarge the image on hover */
    cursor: pointer; /* Change cursor to indicate clickable */
}


/* -------------------- Dropdown ---------------- */
 /* Specifically target the dropdown with ID "dropdown-1" */
 #dropdown-1 {
    margin-top: 20px; /* Add space above this specific dropdown */
    margin-bottom: 20px; /* Add space below this specific dropdown */
    position: relative;
    display: inline-block;
    width: 100%; /* Full width */
    max-width: 1100px; /* Set a max width */
  }
  
  /* Styles for the button within this specific dropdown */
  #dropdown-1 .dropbtn {
    background-color: #25336b;
    border-radius: 10px; /* Rounded corners */
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #FAD8d8;
    box-sizing: border-box; /* Ensure padding is included in the width */
    font-family: 'Avenir', 'Century Gothic', sans-serif;
  }
  
  /* Dropdown content styles */
  #dropdown-1 .dropdown-content {
    display: none;
    margin-left: 0;  /* Center it by removing excessive left margin */
    background-color: white;
    width: 100%;
    border: 5px solid #FFDE5A; /* Yellow border */
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    padding: 10px;
    box-sizing: border-box; /* Ensure padding is included in the width */
  }
  
  /* Show the dropdown content when the button is clicked */
  #dropdown-1.show .dropdown-content {
    display: block;
  }
  
  /* Rotate the arrow to point up when the dropdown is open */
  #dropdown-1.show .fas.fa-chevron-down {
    transform: rotate(180deg);
  }

/* PDF container styles */
object[type="application/pdf"] {
    width: calc(100% - 165px); /* Adjusted to prevent clashing with sidenav */
    margin-left: 165px; /* Align with the main content */
    height: 500px;
    margin-right: 50px;
}

/* PDF wrapper styling */
.pdf-wrapper {
    text-align: center; /* Center the title and the PDF container */
    font-family: 'Montserrat';
    margin: 0; /* Remove margin around the wrapper */
    padding: 20px; /* Add padding inside the wrapper if needed */
}

/* Title styling */
.pdf-title {
    font-family: 'Montserrat';
    color: #25336b;
    margin-bottom: 0px; /* Space between the title and the PDF container */
    padding: 0; /* Remove padding if any */
    font-weight: 700; /* Make the text bold */
}

/* Text styling for the placeholder text */
.pdf-text {
    font-family: Geneva, sans-serif;
    color: #25336B;
    margin-bottom: 16px; /* Add some spacing between the text and the next element */
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
}

/* PDF container styling */
.pdf-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px; /* Adjusted height to fit the PDF */
    padding: 0; /* Remove padding inside the container */
    margin: 0; /* Remove margin if any */
}

.pdf-container iframe {
    border-radius: 10px;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    width: 100%; /* Ensure the iframe takes the full width of the container */
    height: 100%; /* Make the iframe fill the height of the container */
}

.sidenav {
    padding-left: 26px;
}

/* ----------------------------- Tree ---------------------------- */
.tree ul {
	padding-top: 2vh !important;
	position: relative;
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
    width: 100%;
}

.tree li {
	float: left; text-align: center;
	list-style-type: none;
	position: relative;
    padding: 1vh 5px 0 5px !important; /* Reduce padding */
	transition: all 0.5s;
	-webkit-transition: all 0.5s;
	-moz-transition: all 0.5s;
}

.tree li a {
    font-size: 12px; /* Slightly reduce font size */
    padding: 3px 8px !important; /* Reduce padding inside each node */
    border-radius: 5px;
    transition: all 0.5s;
}

.tree li::before, .tree li::after {
    height: 1.0vh; /* Increase the height of connectors between nodes */
}

/*We will use ::before and ::after to draw the connectors*/

.tree li::before, .tree li::after{
	content: '';
	position: absolute; 
    top: 0; 
    right: 50%;
	border-top: 1px solid #25336B;
	width: 50%; 
    height: 3vh;
}
.tree li::after{
	right: auto; left: 50%;
	border-left: 1px solid #25336B;
}

/*We need to remove left-right connectors from elements without 
any siblings*/
.tree li:only-child::after, .tree li:only-child::before {
	display: none;
}

/*Remove space from the top of single children*/
.tree li:only-child{ padding-top: 0 !important;}

/*Remove left connector from first child and 
right connector from last child*/
.tree li:first-child::before, .tree li:last-child::after{
	border: 0 none;
}
/*Adding back the vertical connector to the last nodes*/
.tree li:last-child::before{
	border-right: 2px solid #25336B;
	border-radius: 0 5px 0 0;
	-webkit-border-radius: 0 5px 0 0;
	-moz-border-radius: 0 5px 0 0;
}
.tree li:first-child::after{
	border-radius: 5px 0 0 0;
	-webkit-border-radius: 5px 0 0 0;
	-moz-border-radius: 5px 0 0 0;
}

/*Time to add downward connectors from parents*/
.tree ul ul::before{
	content: '';
	position: absolute; top: 0; left: 50%;
	border-left: 1px solid #FFA101;
	width: 0; height: 2vh;
}

.tree li a{
	border: 1px solid #FFA101;
	padding: 5px 10px !important; /* Padding between text and box */
	text-decoration: none;
	color: #31525B;
	display: inline-block;
	
	border-radius: 5px;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	
	transition: all 0.5s;
	-moz-transition: all 0.5s;
}

.tree li a:hover {
    background: #34568b;
    color: white;
    border: 2px solid #25336B;
}


/*-------------Modals-----------*/
/* The modal container */

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
}

  /* Modal content */
.modal-content {
    background-color: #25336B !important;
    padding: 5%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 80vw;
    max-height: 80vh;
    overflow-y: scroll; /* Enable vertical scrolling */
    transition: all 1s ease;
    color: #FAD8d8;
}

.modal-content::-webkit-scrollbar {
    display: none;
}

/* Ensure the tree container takes up more space */
.tree-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Full width */
    overflow-x: auto; /* Allow horizontal scrolling if content overflows */
    padding-bottom: 20px;
}

/* Make the tree wider to prevent stacking */
.tree {
    width: 100%; /* Stretch the tree to full container width */
    max-width: 1200px; /* Optional: You can set a max width for the tree if needed */
    margin: 0 auto; /* Center the tree inside its container */
    position: relative;
}

/* Ensure the tree structure holds for small screens */
.tree ul {
    padding-top: 2vh;
    padding-left: 0;
    margin: 0;
    position: relative;
}

.tree li {
    display: inline-block;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 2vh 5px 0 5px;
    white-space: nowrap; /* Prevent stacking on small screens */
}

.tree li a {
    border: 2px solid #25336B;
    padding: 5px 10px;
    text-decoration: none;
    color: #FAD8d8;
    display: inline-block;
    border-radius: 5px;
    background-color: #25336B;
}

/* Tree connector styles */
.tree li::before, .tree li::after {
    content: '';
    position: absolute;
    top: 0;
    border-top: 2px solid #25336B;
    width: 50%;
    height: 2vh;
}

.tree li::after {
    left: 50%;
    border-left: 2px solid #25336B;
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid #25336B;
    height: 2vh;
}

.tree li:first-child::before, .tree li:last-child::after {
    border: none;
}

/* Media queries to control layout behavior for different screen sizes */
@media screen and (max-width: 1200px) {
    .tree-wrapper {
        overflow-x: scroll;
        display: block; /* Allow scrolling for smaller screens */
    }

    .tree {
        width: 1000px; /* Set a fixed width for the tree on small screens */
    }

    .tree li {
        display: inline-block;
    }
}

@media screen and (min-width: 1200px) {
    .tree-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .tree {
        width: 100%; /* Full width for larger screens */
    }

    .tree li {
        display: inline-block;
        white-space: nowrap;
    }
}
