body, html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
}

/* Overall gallery section styling */
.gallery-section {
  padding: 20px;
  background-color: #807ccc; /* Background color for gallery */
  margin-top: 80px; /* Adjust this value to match the navbar's height */
  width: 100%;
  position: relative;
}

/* Row heading styling */
.row-heading {
  font-size: 24px;
  font-weight: bold;
  color: #090644;
  margin-bottom: 25px;
  text-align: center;
}

/* Make the gallery scrollable horizontally */
.gallery {
  display: flex;
  overflow-x: auto; /* Allow horizontal scrolling */
  gap: 15px; /* Space between images */
  margin-bottom: 30px; /* Space between rows */
  padding-bottom: 10px; /* Space at the bottom to show scrollbar if needed */
  scroll-behavior: smooth; /* Smooth scrolling */
  width: 100%;
}

/* Individual gallery items */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: #090644;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0; /* Prevent items from shrinking when overflowing */
  width: 18%; /* 5 items fit in a row (5 * 18% = 90%, space for gap) */
  height: 250px; /* Increase height of the images */
}

/* Hover effect for gallery item */
.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* Image styling */
.gallery-item img {
  width: 100%; /* Full width for grid cell */
  height: 100%; /* Fill the height of the container */
  object-fit: cover; /* Maintain aspect ratio */
  display: block;
  transition: transform 0.3s ease;
}

/* Hover effect for image zoom */
.gallery-item:hover img {
  transform: scale(1.1); /* Hover effect for zoom */
}

/* form_css */
/* Positioning the popup container */
#popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Dimmed background */
  display: flex; /* Use flexbox */
  justify-content: center; /* Center horizontally */
  align-items: center; /* Center vertically */
  z-index: 1000; /* Above all other elements */
  display: none; /* Hidden by default */
}

#open-popup {
  width: 100px;
  text-align: center; /* Center align the icon and text */
  display: inline-block; /* Keep the icon and text together */
  padding: 5px 15px;
  margin-left: auto;
  flex-direction: column; /* Stack the icon and text vertically */ 
  background-color: #09131f; /* Button background color */
  border: none; /* Remove default button border */
  cursor: pointer; /* Pointer cursor on hover */
  transition: background-color 0.3s, transform 0.2s; /* Add hover effects */
}

#open-popup:hover {
  background-color: #778DA9; /* Darker color on hover */
color: black;
  transform: scale(1.05); /* Slight enlargement */
}

#open-popup:active {
  transform: scale(0.95); /* Slightly smaller on click */
}

#open-popup:hover {
  background-color: #778DA9;
  cursor: pointer;
}

/* Popup content styling */
.popup-content {
  position: relative; /* Needed for positioning the close button */
  background: transparent;
  padding: 20px;
  border-radius: 10px;
  width: 500px; /* Adjust size as needed */
  height: 500px;
  text-align: center;
}

.icon {
  font-size: 30px; /* Size of the icon */
  color: white; /* Icon color */
  padding-left: 5px;
  margin-right: 8px; /* Space between icon and text */
font-weight: bold; /* Text styling */
margin-top: 10px;
}

#login-button p {
  margin-top: 0px; /* Space between the icon and the text */
  font-size: 16px; /* Size of the text */
  color: white; /* Text color */
  font-weight: bold;
  margin-left: -5px;
}

#open-popup:hover .icon {
color: black;
}

#open-popup:hover #login-button p {
color: black;
}


/* Close button styling */
/* Close button default position */
#close-popup {
  position: absolute;
  top: 10px; /* Default spacing from the top */
  right: 10px;
  width: 30px;
  height: 30px;
  background: #333;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: top 0.3s ease-in-out, transform 0.2s ease-in-out;
}

/* When the recovery form is active, move the close button up */
.recovery-active #close-popup {
  top: 40px; /* Move the button up */
}

/* Add hover and active states for the close button */
#close-popup:hover {
  background: #d32f2f; /* Red on hover */
  transform: scale(1.1); /* Slight enlargement */
}

#close-popup:active {
  transform: scale(0.9); /* Shrinks on click */
}

/* Login form */
.login-form h2 {
  font-size: 24px;
  margin-bottom: 50px;
  color: #333; /* Dark text color */
}

.login-form input {
  width: 100%;
  padding: 10px 15px;
  margin-top: 30px;
  border: 1px solid #414141;
  border-radius: 5px;
  font-size: 14px;
}

.login-form input:focus {
  border-color: #979999; /* Yellow border on focus */
  outline: none; /* Remove default outline */
}

.error { 
  color: red; 
  font-size: 0.9em; 
  margin-top: 5px;
}

.login-form button[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #252257; /* Grey background */
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 120px;
}
.login-form button[type="submit"]:hover {
  background: #979999; /* Yellow on hover */
  color: #000000;
}

/* Sign up link */
.login-form a {
  display: block;
  margin-top: 15px;
  font-size: 14px;
  color: #007BFF;
  text-decoration: none;
}

.login-form a:hover {
  text-decoration: underline;
}

/* recovery form */

.recovery-form h2 {
  font-size: 24px;
  margin-bottom: 50px;
  color: #333; /* Dark text color */
}

.recovery-form input {
  width: 100%;
  padding: 10px 15px;
  margin-top: 30px;
  border: 1px solid #414141;
  border-radius: 5px;
  font-size: 14px;
  color: #0c0c0c;
}

.recovery-form input:focus {
  border-color: #979999; /* Yellow border on focus */
  outline: none; /* Remove default outline */
}

.recovery-form button[type="submit"] {
  width: 100%;
  padding: 10px;
  background: #252257; /* Grey background */
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 120px;
}
.recovery-form button[type="submit"]:hover {
  background: #979999; /* Yellow on hover */
  color: #000000;
}

/* Sign up link */
.recovery-form a {
  display: block;
  margin-top: 15px;
  font-size: 14px;
  color: #007BFF;
  text-decoration: none;
}

.recovery-form a:hover {
  text-decoration: underline;
}

/* Base styling for both forms */
.login-form, .recovery-form {
  position: absolute;
  top: 50%; /* Center vertically */
  left: 50%; /* Start at the center */
  transform: translate(-50%, -50%); /* Adjust for exact centering */
  width: 80%; /* Adjust width as needed */
  max-width: 400px;
  height: auto;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

/* Hide the recovery form by default */
.recovery-form {
  transform: translate(150%, -50%); /* Offscreen to the right */
  opacity: 0; /* Hidden by default */
}

/* When active, bring recovery form to the center */
.recovery-active .recovery-form {
  transform: translate(-50%, -50%);
  opacity: 1; /* Make it visible */
}

/* When active, move login form offscreen */
.recovery-active .login-form {
  transform: translate(-150%, -50%); /* Offscreen to the left */
  opacity: 0; /* Hide it */
}