@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body {
  font-family: Poppins;
  margin: 0;
  padding: 0;
  background: url('src/sjc_bg3.jpg') no-repeat center center fixed;
  background-size: cover; /* Add blur effect to background image */
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background: inherit;
  filter: blur(8px); /* Adjust blur strength as needed */
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* Header */
header {
  background-color: #550d0b;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  align-items: center;
  width: 100%;
}

.main-Nav {
  display: flex;
  align-items: center;
  width: 100%;
}

.logo img {
  height: 80px;
  width: auto;
}

.header-text h1 {
  font-family: "Old English Text MT", serif; /* Set Old English Text MT for the header title */
  font-size: 2em;
  margin: 0;
}

.header-text p {
  font-size: 12px;
  margin: 0;
}

nav {
  display: flex;
  margin-left: auto;
  gap: 25px;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin: 0 18px;
  font-weight: bold;
  font-size: 1.15rem;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  position: relative;
  outline: none;
}

nav a:hover,
nav a:focus {
  background: #FFD700;
  color: #550d0b;
}

nav a.active {
  background: #FFD700;
  color: #550d0b;
  box-shadow: 0 2px 8px #ffd70033;
}

.mobile-menu-toggle {
    display: none; /* Hidden by default, shown in media queries */
    background: none;
    border: none;
    color: white;
    font-size: 2.2em; /* Slightly larger icon */
    cursor: pointer;
    padding: 5px 10px;
    z-index: 101; /* Ensure it's above everything when active */
}

.container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding: 20px;
}

.login-button {
  background-color: #550d0b;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 20px;
}

.login-button:hover {
  background-color: #ffb902;
}

.form-container {
  max-width: 100%;
  width: 90%; /* keeps it centered and not edge-to-edge */
  margin: -8px auto 0 auto;
  background: #fff;
  border-radius: 18px;
  padding: 32px 60px 28px 60px; /* more breathing space on sides */
  color: #ffb902;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 1.5px 8px #ffb90244;
  position: relative;
  overflow: hidden;
  border: 2px solid #550d0b;
  box-sizing: border-box;
}


.form-container::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 160px;
  height: 160px;
  z-index: 0;
}

.form-container h1 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 22px;
  color: #ffb902;
  letter-spacing: 1px;
  font-family: 'Poppins', 'Segoe UI', Arial, sans-serif;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 1;
}

form input,
form select,
#account_type,
.name-row select,
.name-row input {
  height: 48px;         /* Larger height */
  font-size: 1.15rem;   /* Larger font */
  padding: 12px 16px;   /* More padding */
  background: rgba(255,255,255,0.92);
  border: 2px solid #550d0b;
  border-radius: 8px;
  margin-bottom: 0;
  color: #550d0b;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 1.5px 6px #ffb90222;
}

form input:focus,
#account_type:focus {
  outline: none;
  border-color: #ffb902; /* Gold on focus */
  box-shadow: 0 0 8px #ffb90288;
}

label {
  color: #3d0017;
  font-size: 1rem;
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.register-button {
  background:#ffb902;
  color: #550d0b;
  border: none;
  border-radius: 20px;
  padding: 14px 0;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: -40px; /* Make button much closer to password fields */
  box-shadow: 0 2px 10px #ffb90233;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}

.register-button:hover {
  background: #550d0b; /* Maroon background on hover */
  color: #ffb902;      /* Light text for contrast */
  transform: translateY(-2px) scale(1.03);
}


#errorModal {
  display: none;
  position: absolute;      /* Change from fixed to absolute */
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.18);
  z-index: 99;
  justify-content: center;
  align-items: center;
}

#errorModal > div {
  background: #fff;
  color: #550d0b;
  padding: 64px 80px 54px 80px;   /* Larger padding */
  max-width: 750px;               /* Much bigger width */
  min-width: 420px;
  margin: 80px auto 0 auto;
  border-radius: 32px;            /* More rounded */
  position: relative;
  top: 180px;
  z-index: 10000;
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 1.45em;              /* Bigger text */
  box-shadow: 0 20px 60px rgba(85,13,11,0.18), 0 2px 16px #ffb90222;
  text-align: center;
  animation: modalPop 0.18s cubic-bezier(.4,2,.6,1) both;
}

#errorModal .close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2.1em;         /* Make the X icon bigger */
  color: #550d0b;
  cursor: pointer;
  background: #fffbe7;
  border-radius: 50%;
  width: 44px;               /* Bigger button */
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
#errorModal .close:hover {
  background: #ffb902;
  color: #fff;
  transform: scale(1.12);
}

@keyframes modalPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Grouped row styling for form fields */
.name-row {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
}

.name-row > div {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Make select and input heights consistent */
.name-row select,
.name-row input {
  height: 48px;        /* Match the larger size */
  font-size: 1.15rem;  /* Match font size */
  padding: 12px 16px;  /* Match padding */
  background: rgba(255,255,255,0.92);
  border: 2px solid #550d0b;
  border-radius: 8px;
  color: #550d0b;
  box-sizing: border-box;
  margin-bottom: 0;
  box-shadow: 0 1.5px 6px #ffb90222;
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* Desktop nav visible, burger hidden */
.desktop-nav {
  display: none;
}


@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 20px;
  }

  .header-container {
    flex-direction: column;
    align-items: center;
  }

  nav {
    margin: 10px 0 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  nav a {
    font-size: 0.95rem;
    margin: 6px;
  }

  .form-container {
    max-width: 700px;
    padding: 22px;
  }

  .name-row {
    flex-direction: column;
    gap: 10px;
  }

  nav {
    display: none;
    flex-direction: column;
    background-color: #550d0b;
    position: absolute;
    top: 80px;
    right: 0;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    z-index: 999;
  }

  nav.show {
    display: flex;
  }

  nav a {
    font-size: 1.1rem;
    margin: 12px 0;
    padding: 10px;
  }
  
  nav.desktop-nav {
    display: none;
    flex-direction: column;
    background-color: #550d0b;
    position: absolute;
    top: 80px;
    right: 0;
    width: 100%;
    text-align: center;
    padding: 20px 0;
    z-index: 1000;
  }

  .mobile-menu-toggle {
    display: block;
    position: absolute;
    top: 25px;
    right: 25px;
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    z-index: 1001;
  }

   nav.desktop-nav.show {
    display: flex;
  }

  nav.desktop-nav a {
    font-size: 1.2rem;
    margin: 12px 0;
    color: white;
    text-decoration: none;
    font-weight: bold;
  }

   nav.desktop-nav a:hover {
    background: #FFD700;
    color: #550d0b;
    width: 100%;
    padding: 8px 0;
  }
}

/* Nudge the error modal a little higher on tablet / small desktop (<=768px) */
@media (max-width: 768px) {
  #errorModal > div {
    margin: 40px auto 0 auto; /* reduce top space */
    top: 80px;                /* move modal upward */
  }
}
/* ======== BURGER MENU ======== */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  z-index: 1001;
}

.burger-menu span {
  width: 28px;
  height: 3px;
  background: #FFD700; /* gold */
  margin: 4px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Animate into X when active */
.burger-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}
.burger-menu.active span:nth-child(2) {
  opacity: 0;
}
.burger-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* Slide-in menu */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -250px; /* hidden by default */
  width: 250px;
  height: 100vh;
  background: #550d0b;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 80px;
  transition: right 0.3s ease;
  z-index: 1000;
}

.mobile-nav.active {
  right: 0;
}

/* Menu links */
.mobile-nav a {
  color: #FFD700;
  text-decoration: none;
  padding: 15px 20px;
  font-size: 1.1em;
  width: 100%;
  transition: background 0.3s;
}

.mobile-nav a:hover {
  background: #FFD700;
  color: #550d0b;
}

@media (max-width: 1024px) {
  
}
 
@media  (max-width: 768px) {
  nav.desktop-nav {
    display: none;
  }

  .burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 1100;
  }

  .burger-menu span {
    width: 28px;
    height: 3px;
    background: #FFD700;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* When clicked (X icon) */
  .burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }
  /* Sidebar Menu */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -270px;
    width: 270px;
    height: 100vh;
    background: #550d0b;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px 0 0 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .mobile-nav.active {
    right: 0;
  }

  .mobile-nav a {
    color: #FFD700;
    text-decoration: none;
    padding: 16px 12px;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    margin-left: 20px;
    border-radius: 6px;
  }

  .mobile-nav a:hover {
    background: #FFD700;
    color: #550d0b;
  }

}

/* Hide burger and sidebar on desktop only */
@media (min-width: 1025px) {
  .burger-menu,
  .mobile-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  nav.desktop-nav {
    display: none;
  }

  .burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: absolute;
    top: 15px;
    right: 25px;
    z-index: 1100;
  }

  .burger-menu span {
    width: 28px;
    height: 3px;
    background: #FFD700;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* When clicked (X icon) */
  .burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }
  /* Sidebar Menu */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -270px;
    width: 270px;
    height: 100vh;
    background: #550d0b;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px 0 0 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .mobile-nav.active {
    right: 0;
  }

  .mobile-nav a {
    color: #FFD700;
    text-decoration: none;
    padding: 16px 12px;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    margin-left: 20px;
    border-radius: 6px;
  }

  .mobile-nav a:hover {
    background: #FFD700;
    color: #550d0b;
  }

  .header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 10px; /* space between logo and text */
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
  }

  .logo img {
    width: 60px; /* adjust as needed */
    height: auto;
  }

  .header-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* move to left */
    margin-left: -5px; /* small space from logo */
  }

  .header-text h1 {
    font-size: 1.8em;
  }

  .header-text p {
    font-size: 0.9em;
  }
}

@media (max-width: 425px) {
  nav.desktop-nav {
    display: none;
  }

  .burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: absolute;
    top: 25px;
    right: 15px;
    z-index: 1100;
  }

  .burger-menu span {
    width: 28px;
    height: 3px;
    background: #FFD700;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* When clicked (X icon) */
  .burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }
  /* Sidebar Menu */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -270px;
    width: 270px;
    height: 100vh;
    background: #550d0b;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px 0 0 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .mobile-nav.active {
    right: 0;
  }

  .mobile-nav a {
    color: #FFD700;
    text-decoration: none;
    padding: 16px 12px;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    margin-left: 20px;
    border-radius: 6px;
  }

  .mobile-nav a:hover {
    background: #FFD700;
    color: #550d0b;
  }

  .header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 10px; /* space between logo and text */
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
  }

  .logo img {
    width: 70px; /* adjust as needed */
    height: auto;
  }

  .header-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* move to left */
    margin-left: -5px; /* small space from logo */
  }

  .header-text h1 {
    font-size: 1.4em;
  }

  .header-text p {
    font-size: 0.5em;
  }
}

/* Make error modal responsive on small phones (<=425px) */
@media (max-width: 425px) {
  #errorModal {
    position: fixed; /* ensure overlay covers viewport */
    align-items: center;
    justify-content: center;
    padding: 5px;
    margin-top: 50px; /* small top margin */
  }

  #errorModal > div {
    width: 70%;
    max-width: 400px;      /* cap width so it fits */
    min-width: auto;
    margin: 10vh auto;     /* center vertically with some top space */
    padding: 18px 16px;    /* reduce padding for small screens */
    border-radius: 12px;   /* slightly less rounded */
    top: auto;             /* ignore large top offset */
    font-size: 1.05rem;    /* slightly smaller font */
    box-shadow: 0 12px 36px rgba(85,13,11,0.16), 0 2px 10px #ffb90211;
  }

  /* Make the close button touch-friendly but not overly large */
  #errorModal .close {
    top: 8px;
    right: 10px;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
}


@media (max-width: 375px) {
  nav.desktop-nav {
    display: none;
  }

  .burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: absolute;
    top: 20px;
    right: 15px;
    z-index: 1100;
  }

  .burger-menu span {
    width: 28px;
    height: 3px;
    background: #FFD700;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* When clicked (X icon) */
  .burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }
  /* Sidebar Menu */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -270px;
    width: 270px;
    height: 100vh;
    background: #550d0b;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px 0 0 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .mobile-nav.active {
    right: 0;
  }

  .mobile-nav a {
    color: #FFD700;
    text-decoration: none;
    padding: 16px 12px;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    margin-left: 20px;
    border-radius: 6px;
  }

  .mobile-nav a:hover {
    background: #FFD700;
    color: #550d0b;
  }

  .header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 10px; /* space between logo and text */
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
  }

  .logo img {
    width: 60px; /* adjust as needed */
    height: auto;
  }

  .header-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* move to left */
    margin-left: -5px; /* small space from logo */
  }

  .header-text h1 {
    font-size: 1.5em;
  }

  .header-text p {
    font-size: 0.4em;
  }
}

@media (max-width: 320px) {
  nav.desktop-nav {
    display: none;
  }

  .burger-menu { 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    position: absolute;
    top: 15px;
    right: 5px;
    z-index: 1100;
  }

  .burger-menu span {
    width: 28px;
    height: 3px;
    background: #FFD700;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* When clicked (X icon) */
  .burger-menu.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-6px, 6px);
  }
  .burger-menu.active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.active span:nth-child(3) {
    transform: rotate(45deg) translate(-6px, -6px);
  }
  /* Sidebar Menu */
  .mobile-nav {
    position: fixed;
    top: 0;
    right: -270px;
    width: 270px;
    height: 100vh;
    background: #550d0b;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 100px 0 0 30px;
    transition: right 0.3s ease;
    z-index: 1000;
  }

  .mobile-nav.active {
    right: 0;
  }

  .mobile-nav a {
    color: #FFD700;
    text-decoration: none;
    padding: 16px 12px;
    font-size: 1.2rem;
    font-weight: 500;
    width: 100%;
    transition: background 0.3s, color 0.3s;
    text-align: center;
    margin-left: 20px;
    border-radius: 6px;
  }

  .mobile-nav a:hover {
    background: #FFD700;
    color: #550d0b;
  }

  .header-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 10px; /* space between logo and text */
  }

  .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
  }

  .logo img {
    width: 50px; /* adjust as needed */
    height: auto;
  }

  .header-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* move to left */
    margin-left: -8px; /* small space from logo */
  }

  .header-text h1 {
    font-size: 1.5em;
  }

  .header-text p {
    font-size: 0.3em;
  }
}

/* Hide burger and sidebar on desktop only */
@media (min-width: 1025px) {
  .burger-menu,
  .mobile-nav {
    display: none;
  }
}

/* ===== FIX NAV LINK SPACING FOR LAPTOP (1024px) ===== */
@media (max-width: 1024px) and (min-width: 769px) {
  nav {
    gap: 8px;               /* reduce huge gaps */
    margin-left: auto;      /* keep nav pushed to the right */
  }

  nav a {
    margin: 0 8px;          /* reduce spacing between each link */
    font-size: 1.05rem;     /* slightly smaller to fit neatly */
    padding: 6px 8px;       /* balance inside padding */
  }

  .logo img {
    height: 70px;           /* optional small adjust to prevent overlap */
  }

  .header-text h1 {
    font-size: 1.8em;       /* prevent text wrapping */
  }
}
