* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #FAF8F1 url("../Photos/WelcomePageBackroundPhoto2.png") center/cover no-repeat fixed;
  font-family: 'Poppins';
}

header {
  background: #8A8F01;
  padding: 10px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 50px;
  margin-right: 100px;
}

header nav a {
  color: white;
  text-decoration: none;
  transition: color 0.3s;
}

header nav a:hover {
  color: #EEBF78;
}

/* ===== TOAST NOTIFICATION ===== */
#toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10000;
  pointer-events: none;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

#toast.success {
  background: #28a745;
}

#toast.error {
  background: #dc3545;
}


/* MAIN CONTAINER */
.main_container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: calc(90vh - 80px);
}

/* OUTER BOX */
.welcomeLogin_container {
  position: relative;
  display: flex;
  width: 1000px;
  height: 550px;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  transition: all 0.8s ease;
}

/* FORM SIDE */
.form_container {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background-color: #EEBF78;
  padding: 60px;
  transition: all 0.8s ease;
}

.login_container {
  left: 0;
}

.register_container {
  right: 0;
  opacity: 0;
  pointer-events: none;
}

/* IMAGE SIDE */
.image_container {
  position: absolute;
  right: 0;
  width: 50%;
  height: 100%;
  transition: all 0.8s ease;
}

.image_container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 20px 20px 0;
}

/* WHEN ACTIVE (SWAP) */
.welcomeLogin_container.active .login_container {
  transform: translateX(-1%);
  opacity: 0;
  pointer-events: none;
}

.welcomeLogin_container.active .register_container {
  transform: translateX(1%);
  opacity: 1;
  pointer-events: all;
}

.welcomeLogin_container.active .image_container {
  transform: translateX(-100%);
}

.welcomeLogin_container.active .image_container img {
  border-radius: 20px 0 0 20px;
}

/* INPUTS */
.input_group {
  margin-bottom: 15px;
}

.input_group input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.input_firstlastname{
    display: flex;
    justify-content: space-between;
}

.input_firstlastname input{
  width: 188px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  margin-bottom: 10px;
}

.input_group input:focus {
  border-color: black;
  box-shadow: 0 0 5px rgba(138, 143, 1, 0.3);
}

.input_firstlastname input:focus {
  border-color: black;
  box-shadow: 0 0 5px rgba(138, 143, 1, 0.3);
}

/* BUTTON */
form button {
  width: 100%;
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  background-color: #8A8F01;
  color: white;
  font-weight: 600;
  cursor: pointer;
}

form button:hover {
  background-color: #6e7201;
}

/* TEXT LINKS */
.donthaveacct {
  text-align: center;
  margin-top: 10px;
}

.donthaveacct a {
  color: #007BFF;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.donthaveacct a:hover {
  text-decoration: underline;
}

.message{
  text-align: center;
  margin-top: 10px;
}

/* ============================= */
/* MOBILE NAVBAR – LOGIN PAGE   */
/* (ADD-ON ONLY, NO CHANGES)    */
/* ============================= */

/* Hamburger icon (hidden desktop) */
.menu-toggle {
  display: none;
  font-size: 26px;
  color: white;
  cursor: pointer;
}

/* Keep header layout correct */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================= */
/* MOBILE VIEW                  */
/* ============================= */
@media (max-width: 768px) {

  /* Show hamburger */
  .menu-toggle {
    display: block;
  }

  /* Hide nav by default */
  header nav {
    display: none;
    width: 100%;
    background: #8A8F01;
    position: absolute;
    top: 80px;
    left: 0;
    z-index: 999;
  }

  /* Show nav when active */
  header nav.active {
    display: block;
    animation: navSlideDown 0.3s ease;
  }

  /* Stack menu links */
  header nav ul {
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
  }

  /* Center main login container */
  .main_container {
    padding: 20px;
  }

  /* Stack login/register vertically */
  .welcomeLogin_container {
    width: 100%;
    height: auto;
    flex-direction: column;
  }

  /* Forms full width */
  .form_container {
    position: relative;
    width: 100%;
    padding: 40px 25px;
  }

  /* Hide image on small screens */
  .image_container {
    display: none;
  }
}

/* ============================= */
/* SMALL PHONES                 */
/* ============================= */
@media (max-width: 480px) {

  header {
    padding: 10px 20px;
  }

  header img {
    height: 40px;
  }

  .form_container h1 {
    font-size: 22px;
  }

  .form_container p {
    font-size: 13px;
  }

  form button {
    font-size: 15px;
    padding: 12px;
  }
}

/* ============================= */
/* SLIDE DOWN ANIMATION         */
/* ============================= */
@keyframes navSlideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================= */
/* MOBILE LOGIN FIX (CLEAN UI)       */
/* ADD-ON ONLY — NO HTML CHANGES     */
/* ================================= */

@media (max-width: 768px) {

  /* Remove big white container effect */
  .welcomeLogin_container {
    width: 100%;
    height: auto;
    min-height: unset;
    background: transparent; /* 👈 remove white box feel */
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  /* Forms become normal blocks */
  .form_container {
    position: relative;      /* 🔥 disable absolute */
    width: 100%;
    height: auto;
    padding: 35px 25px;
    border-radius: 20px;
  }

  /* Login visible by default */
  .login_container {
    opacity: 1;
    pointer-events: all;
    transform: none;
  }

  /* Register hidden by default */
  .register_container {
    display: none;
    opacity: 1;
    pointer-events: all;
    transform: none;
  }

  /* When switching (JS already toggles .active) */
  .welcomeLogin_container.active .login_container {
    display: none;
  }

  .welcomeLogin_container.active .register_container {
    display: block;
  }

  /* Kill image entirely */
  .image_container {
    display: none;
  }

  /* Center the form nicely */
  .main_container {
    height: auto;
    padding: 30px 15px;
    align-items: flex-start;
  }
}

/* ================================= */
/* SMALL PHONES                      */
/* ================================= */
@media (max-width: 480px) {

  .form_container {
    padding: 30px 20px;
  }

  .form_container h1 {
    font-size: 22px;
  }

  .form_container p {
    font-size: 13px;
  }

  form button {
    padding: 14px;
    font-size: 15px;
  }
}

/* ================================= */
/* FIX FIRST & LAST NAME ON MOBILE   */
/* ================================= */

@media (max-width: 768px) {

  .input_firstlastname {
    flex-direction: column;   /* stack vertically */
  }

  .input_firstlastname input {
    width: 100%;              /* full width */
  }
}

/* ================================= */
/* SMOOTH MOBILE NAVBAR ANIMATION    */
/* ================================= */

@media (max-width: 768px) {

  /* Override nav behavior */
  header nav {
    display: block;                 /* keep rendered */
    overflow: hidden;               /* required for height animation */
    max-height: 0;                  /* collapsed */
    opacity: 0;
    transform: translateY(-10px);
    transition: 
      max-height 0.4s ease,
      opacity 0.3s ease,
      transform 0.3s ease;
  }

  /* When menu is opened */
  header nav.active {
    max-height: 300px;              /* enough for menu items */
    opacity: 1;
    transform: translateY(0);
  }
}