/* Prevent horizontal scrolling */
html, body {
  overflow-x: hidden; /* This disables horizontal scrolling */
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

/* Set up the backdrop image */
.backdrop {
  width: 100%;
  background-image: url('../instem_images/IMG_7896.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  padding: 0;
}

.overlay {
 background-color: rgba(78, 153, 55, 0.5); /* hazy green */
  backdrop-filter: blur(6px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px;
  padding-bottom: 0px; /* ensures green box ends 0px after contact line */
  box-sizing: border-box;
}

/* To add some space before the content begins */
main {
  padding-top: 50px; /* Adjust this value to control the white space above the content */
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s, color 0.3s;
}

/* Modify the header section */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
}

/* Dark Mode Toggle */
#dark-mode-toggle {
  position: fixed;
  cursor: pointer;
  top: 10px;
  right: 10px;
}

/* Modify the dark mode toggle switch */
#dark-mode-toggle img {
  width: 50px; /* Set the size of the icon */
  height: 50px;
  object-fit: contain; /* Ensures the image scales without distortion */
  transition: transform 0.3s ease; /* Optional smooth animation for clicks */
}

/* Modify hovering over the dark mode toggle switch */
#dark-mode-toggle img:hover {
  transform: scale(1.1); /* Slight zoom effect on hover */
}

/* Modify the logo container */
.logo-container {
  display: flex;
  justify-content: space-between; /* Separate logos into two groups */
  align-items: center;
  width: 80%; /* Adjust the width of the container as needed */
  margin: 20px auto; /* Center the container horizontally */
}

/* Specify the left and right logo containers */
.logo-container .left-group,
.logo-container .right-group {
  display: flex; /* Ensure logos in each group are aligned horizontally */
  gap: 10px; /* Add some space between the logos */
}

/* Mention the logo dimensions */
.logo {
  width: auto;
  height: 150px;
  margin: 0 10px;
}

/* To create a slightly transparent text box to get contrast over the backdrop */
.text-box {
  max-width: 1200px;
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  color: white;
}

/* Text Section */
.text-section {
  width: 100%;
  padding: 40px 20px;
  margin: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.text-section p {
  font-size: 1.2rem;
}

/* To modify the click here icon */
.click-icon img{
  width: 15px;
  height: 15px;
}

/* Turn visited links blue */
.click-icon a:visited {
  color: blue !important;
}

/* Photo Scroller */
.photo-scroller {
  display: flex;
  align-items: center;
  margin: 20px;
}

.scroller {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: calc(6 * 200px + 5 * 20px); /* 8 images + 20px gap between each */
  margin: 0 auto; /* Center the scroller on the page */
  padding: 10px 0;
}

.image-box {
  flex: 0 0 auto; /* Prevent shrinking or growing */
  height: 300px; /* Match the image height */
  margin: 0 10px; /* Space between images */
  text-align: center;
}

.image-box img {
  width: 190px; /* Fixed width for all images */
  height: 190px; /* Maintain square images */
  display: block;
  border-radius: 15px; /* Add rounded corners */
  overflow: hidden; /* Ensures the image content stays within the rounded shape */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Add a soft shadow for better aesthetics */
}

.arrow {
  background-color: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: inherit;
}

/* Light Mode */
body.light-mode {
  background-color: #ffffff; /* white */
  color: #000;
}

body.light-mode .arrow {
  color: #000;
}

/* Dark Mode */
body.dark-mode {
  background-color: #000;
  color: #ccc;
}

body.dark-mode .arrow {
  color: #ccc;
}

/* Event Location Section */
.event-location-section {
  display: flex;
  justify-content: right; /* Aligns the section from the start of the container */
  align-items: center;
  margin-top: 50px; /* 300px spacing from the scroller */
  gap: 50px; /* Space between the two elements (address and map) */
}

/* Section containing the links */
.links-section {
  width: 20%;
}

.links-section ul {
  list-style-type: none;
  padding: 0;
}

.links-section ul li {
  margin: 10px 0;
  font-size: 30px;
}

.links-section ul li a {
  color: yellow;  /* Ensure links are yellow*/
  text-decoration: none;
  font-weight: normal;
}

/* Prevent any changes to color on hover or visited states */
.links-section ul li a:hover,
.links-section ul li a:visited,
.links-section ul li a:focus {
  color: yellow;
  text-decoration: none;  /* Optional, to ensure no underline */
}

/* Section containing the map */
.map-section {
  width: 50%;
  padding: 20px;
}

/* Section containing the address */
.address-section {
  width: 25%;
  padding: 20px;
}

.google-map {
  display: flex;
  justify-content: right; /* Center the map in its container */
}

.google-map iframe {
  width: 400px;
  height: 400px;
  padding-bottom: 10px;
}

.event-location {
  text-align: left; /* Keep text left-aligned */
  flex: 0 0 auto; /* Prevent it from stretching */
  margin-right: 20px; /* Shift the text to the right of the map */
}

/* Footer Styling */
footer {
  background-color: #333; /* Dark background for the footer */
  color: white; /* Default text color */
  padding: 0 0;
  font-size: 1em;
  width: 100%;
}

footer h2 {
  font-size: 1.5em;
  margin-bottom: 15px;
}

footer p {
  margin: 5px 0;
  color: #ddd; /* Default text color for paragraphs */
}

footer .footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0 20px;
}

footer .footer-section {
  width: 30%;
  padding: 10px;
}

footer .footer-section h2 {
  margin-bottom: 10px;
}

footer .footer-section ul {
  list-style-type: none;
  padding: 0;
}

footer .footer-section ul li {
  margin-bottom: 10px;
  font-size: 30px;
}

/* Ensure links are in yellow */
footer .footer-section ul li a {
  color: yellow !important; /* Make links appear yellow */
  text-decoration: none; /* Remove underline by default */
  transition: color 0.3s;
}

/* Turn the link to yellow upon hovering */
footer .footer-section ul li a:hover {
  color: yellow !important; /* Yellow color on hover */
}

/* Turn visited links yellow */
footer .footer-section ul li a:visited {
  color: yellow !important;
}

footer .footer-bottom {
  background-color: #eee;
  text-align: left;
  padding: 31px;
  margin-top: 20px;
  font-size: 0.9em;
  color:ddd;
}

footer .footer-bottom p {
  margin: 0;
  color: #ddd; /* Default color for footer text */
}

/* Light Mode Styles */
body.light-mode footer {
  background-color: #eee; /* Light background in light mode */
  color: black; /* Text color in light mode */
}

body.light-mode footer p {
  color: black; /* Black text in light mode */
}

body.light-mode footer .footer-section ul li a {
  color: #333; /* Darker links in light mode */
}

body.light-mode footer .footer-section ul li a:hover {
  color: #000; /* Darker hover effect for links */
}

/* Dark Mode Styles */
body.dark-mode footer {
  background-color: #333; /* Dark background in dark mode */
  color: white; /* Text color in dark mode */
}

body.dark-mode footer p {
  color: lightgray; /* Light gray text in dark mode */
}

body.dark-mode footer .footer-section ul li a {
  color: #ddd; /* Lighter links in dark mode */
}

body.dark-mode footer .footer-section ul li a:hover {
  color: #fff; /* White hover effect for links in dark mode */
}

body.dark-mode footer .footer-bottom {
  background-color: #333;
}

/* For the speakers' page */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.photo-text-item {
  display: flex;
  align-items: flex-start;  /* Align items to the top */
  gap: 20px;
  margin-bottom: 30px;
}

.photo-text-item img {
  width: 200px;
  height: 200px;
  object-fit: cover;  /* Ensure the image fits perfectly */
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

}

.photo-text-item .text {
  display: flex;
  flex-direction: column;  /* Stack the text vertically */
  justify-content: flex-start;
}

.photo-text-item {
  display: flex;
  align-items: flex-start;  /* Align items to the top */
  gap: 20px;
  margin-bottom: 30px;
  justify-content: flex-start;  /* Align content to the left */
}

.text h2 {
  text-align: left;
  margin: 0;
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
}

body.dark-mode .text h2 {
  text-align: left;
  margin: 0;
  font-size: 1.5em;
  font-weight: bold;
  color: #ddd;
}

.photo-text-item .text p {
  margin-top: 10px;
  font-size: 1em;
  color: #555;
}

/* For the photos page */
/* Gallery Container */
.gallery {
  display: flex;
  flex-wrap: wrap; /* Allows rows to form */
  gap: 20px; /* Space between items */
  justify-content: center; /* Centers the gallery */
  padding: 20px; /* Optional padding around the gallery */
}

/* Gallery Item */
.gallery-item {
  flex: 1 1 calc(50% - 20px); /* Two items per row with gap space */
  max-width: calc(50% - 20px); /* Ensures it doesn't exceed half the width */
  box-sizing: border-box; /* Includes padding/borders in width calculation */
}

/* Images */
.gallery-item img {
  width: 100%; /* Make the image fill its container */
  height: auto; /* Maintain aspect ratio */
  border-radius: 15px; /* Rounded edges */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional shadow for depth */
  object-fit: cover; /* Ensures neat fitting within the container */
}
