/* General Styles */
body {
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: -1;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 56px;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden; /* Prevents horizontal scrolling */
    width: 100%; /* Ensures full width coverage */
    font-size: min(1.5vw, 18px); /* Adjusts size based on screen width */
}
html, body {
    height: 100%; /* Ensures full page height */
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}
h2 {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 600;
}
h1 {
    font-size: clamp(28px, 5vw, 40px); /* Scales between 28px and 40px */
}
.main-content {
    flex: 1; /* Pushes the footer down */
}
p {
    width: 80%; /* Makes it take up half of the screen width */
    max-width: 800px; /* Prevents it from getting too large */
    line-height: 1.6rem;
}
.gallery-container p {
    font-size: 18px;
    line-height: 24px;
    margin: 0 10px 0 10px;
    color: rgb(86, 86, 86);
}
.speaker p {
    margin-top:14px;
}
img {
    max-width: 100%; /* Ensures images never exceed their container */
    height: auto; /* Maintains aspect ratio */
}
.top-right-image {
    position: fixed;
    top: 0px;
    right: 5vw;
    width: clamp(80px, 10vw, 150px); /* Adjust size as needed */
    height: auto;
    z-index: 1001; /* Above other elements */
}
a {
    color:#003E6F;
}
form a {
    color:rgb(86, 86, 86);
}
/* Navigation Menu */
nav {
    position: static;
    width: 98%;
    height: 100px;
    text-align: left;
    z-index: 1000;
    display: flex;
}
nav a {
    color: #003E6F;
    margin-right: 24px;
    position: relative;
    left: clamp(15px, 5vw, 150px);
    top: 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: normal;
    padding-bottom: 10px;
}
nav a:hover {
    text-decoration: none;
}

/* Section Styling */
section {
  position: static; 
  left: 250px;
  padding: 60px clamp(15px, 5vw, 150px);
  font-size: 18px;
  font-weight: regular;
  color: rgb(86, 86, 86);
}

/* Registration Form Container */
.registration-wrapper {
    width: 100%; /* Ensures it adapts to different screen sizes */
    max-width: 600px; /* Keeps it well-sized on large screens */
    padding-left: clamp(15px, 10vw, 150px); /* Adjusts left margin dynamically */
    padding: 20px;
    box-sizing: border-box; /* Prevents width issues */
}

/* Form Box */
.registration-form {
    width: 100%;
    padding: 0 30px 0 0;
    border-radius: 8px;
    box-sizing: border-box;
}

/* Form Groups: Align Inputs */
.form-group {
    display: flex;
    gap: 15px;
    padding: 15px;
    justify-content: clamp(15px, 10vw, 150px); /* Prevents extra spacing */
    width: 100%;
}

/* Input Fields */
.form-group input {
    flex: 1; /* Ensures inputs take equal space */
    width: 110%; /* Prevents shrinking */
    min-width: 0; /* Fixes flexbox sizing issue */
    padding: 10px;
    border: 1px solid black;
    font-size: 16px;
    box-sizing: border-box; /* Keeps width correct */
}

/* Full Width Input */
.full-width {
    flex-basis: 100%; /* Makes sure it takes full 60*/
    width: 95%; /* Ensures full row */
    padding: 10px;
    margin-left: 15px;
    border: 1px solid black;
    font-size: 16px;
    display: block;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    margin-top: 15px;
}

/* Submit Button */
.registration-form button {
    width: 100%; /* Full width on all screens */
    padding: 10px;
    background: rgb(0, 63, 108);
    color: white;
    font-size: 18px;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    margin-left: 15px;
}
.registration-form button:hover {
    background: rgb(71, 106, 148);
}
#home img {
  display: block;
  margin: 200px auto;
  max-width: 100%;
}
.speakers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Maximum of 4 images per row */
  gap: clamp(20px, 2vw, 30px); /* Ensures spacing is never less than 20px and never more than 80px */
  justify-items: center;
  align-items: start;
  grid-auto-rows: auto;
}
.speaker {
  text-align: left;
  font-size: 18px; /* Text scales with screen size */
  width: 18vw;
  max-width: 800px; /* Prevents it from getting too big */
  min-width: 120px; /* Prevents it from getting too small */
  /* margin: auto; Centers the text */
  display: flex;
  flex-direction: column;
  align-self: start;
  align-items: center;
  margin-bottom: 20px; /* Adds extra space below each speaker */
}
.speaker img {
  width: 12vw;  /* Scales with screen width */
  height: 12vw; /* Keeps perfect circle */
  /* max-width: 200px;  Prevents getting too big */
  min-width: 120px;  /* Ensures images never get smaller than 120px */
  min-height: 120px;
  border-radius: 50%;  /* Makes them perfectly round */
  object-fit: cover;  /* Ensures the image fills the circle without stretching */
  /* box-shadow: 0px 0px 10px 5px rgb(193, 193, 193); */
  align-self: self-start;
}
.speaker p {
  align-self: self-start;
}
.tab {
  display: inline-block;
  margin-left: 40px;
}
.table-container {
  width: 100%;
  overflow-x: auto; /* Allows scrolling on small screens */
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Ensures columns have a fixed width */
}
th, td {
   /* Adjust based on the number of columns */
  text-align: left;
  line-height: 1.7rem;
  word-wrap: break-word; /* Ensures text wraps inside the column */
  overflow-wrap: break-word; /* Alternative to ensure text wrapping */
  white-space: normal; /* Allows text to wrap instead of staying on one line */
}
.responsive-table th, .responsive-table td {
  padding: 10px; /* Adds spacing inside cells */
  text-align: left; /* Aligns text to the left */
  font-size: min(1.5vw, 18px);
  word-wrap: break-word; /* Ensures text wraps inside the column */
  overflow-wrap: break-word;
}
td p {
  margin-bottom: 0px;
}
/* Ensures 3 columns, with the first one being shorter */
.responsive-table tr {
  display: grid;
  grid-template-columns: 0.12fr 0.35fr; /* First column is shorter */
  gap: 10px; /* Adds spacing between cells */
}
.image-row {
  display: flex; /* Ensures images stay in a row */
  flex-wrap: wrap; /* Allows wrapping if needed */
  justify-content: center; /* Centers images in the row */
  align-items: center; /* Aligns them properly */
  gap: 12px; /* Space between images */
  width: 100%; /* Uses full width of the container */
  /* max-width: 1200px; Prevents row from being too wide */
  margin:  auto; /* Ensures it's centered */
  padding-bottom: 50px 0; /* Adds spacing above and below */
}
.image-row img {
  width: clamp(100px, 9vw, 150px); /* Ensures a good size range */
  height: auto; /* Keeps the aspect ratio */
  max-width: 100%; /* Prevents images from overflowing */
  margin: 1vw;
}
.footer {
  position: absolute;
  background-color: rgb(0,63,108); /* Dark blue background */
  color: white; /* White text */
  text-align: left; /* Centers text */
  display: flex; /* Makes items sit next to each other */
  justify-content: left; /* Centers the links horizontally */
  width: 100%; /* Ensures it spans the full width */
  position: relative; /* Keeps it in normal page flow */
}
.footer a {
  color: white; /* White link text */
  text-decoration: none; /* Removes underlines */
  font-size: 14px; /* Adjusts text size */
  margin-right: 14px;
}
.hidden {
  display: none; /* Ensures the thank-you message is hidden until needed */
}

/* Responsive: Stack Inputs on Smaller Screens */
@media (max-width: 1024px) {
    .form-group {
        flex-direction: column; /* Stack fields vertically */
        gap: 10px;
        padding: 15px 15px 15px 0;
    }
    .full-width {
        flex-basis: 100%; /* Makes sure it takes full 60*/
        width: 100%;
    }
    .registration-wrapper {
        max-width: 100%; /* Ensures it fits on smaller screens */
        padding-left: clamp(10px, 5vw, 50px); /* Adjusts left margin dynamically */
        padding: 15px 15px 15px 0;
    }
    nav {
        justify-content: left; /* Moves items closer to edges */
        padding: 15px 20px; /* Reduces padding */
        gap: 10px; /* Less space between items */
    }
    .speakers-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 images per row */
        gap: 50px; /* Increase spacing between rows */
        align-items: start;
        grid-auto-rows: auto;
  }
    .responsive-table tr {
        grid-template-columns: 0.12fr 0.8fr; /* First column is shorter */
  }

}

@media (max-width: 768px) {
    #home img {
        margin: 100px auto 120px;
  }
    section {
        padding: 30px clamp(15px, 5vw, 150px);
  }
    p {
        width: 100%; /* Makes it take up half of the screen width */
        font-size: 0.9rem;
        line-height: 1.3rem;
  }
    ul {
        list-style-type: disc;
        padding-left: 20px; /* Adds space on the left */
        width: 80%; /* Makes it take up half of the screen width */
        max-width: 800px;
   }
    li {
        margin-bottom: 10px; /* Adds space between items */
        color: rgb(86, 86, 86) ;/* Change text color */
        font-size: 18px;
        width: 80%; /* Makes it take up half of the screen width */
        max-width: 800px;
  }
    nav {
        justify-content: left; /* Ensures links stay closer to edges */
        padding: 10px 0; /* Further reduces padding */
        gap: 10px; /* Keeps items readable */
  }
    nav a {
        font-size: 14px; /* Slightly smaller font for better fit */
        padding-left: 0;
        margin-right: 2px;
        position: relative;
        left: 15px;
  }
    .speakers-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 images per row on mobile */
        gap: 10px;
        align-items: start;
        grid-auto-rows: auto;
  }
    .speaker {
        font-size: 16px; /* Ensures readability on tablets */
        width: auto;
  }
    .responsive-table th, .responsive-table td {
        font-size: 14px; /* Adjust text size for smaller screens */
        padding: 8px;
        word-wrap: break-word; /* Ensures text wraps inside the column */
        overflow-wrap: break-word;
  }
    .responsive-table tr {
        grid-template-columns: 0.2fr 1fr; /* Adjusts first column width for smaller screens */
  }
    .responsive-table th{
        padding: 5px;
  }
    form label {
        font-size: 0.9rem;
  }
    .image-row {
        justify-content: left;
        column-gap: 40px;
  }
        .footer {
        flex-direction: column; /* Stack links vertically on small screens */
        gap: 15px; /* Reduce space between links */
        padding: 15px 0; /* Adjust padding */
  }
}
@media (max-width: 480px) {
    .speaker {
        font-size: 14px; /* Minimum size for mobile */
  }
}