* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: Georgia, 'Times New Roman', Times, serif;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: white;
  background-image: url(bacground_image.webp);
}

/* ================= Header ================= */
header {
  text-align: center;
  padding: 20px;
  color: #fff;
  border-bottom: 2px solid #8B0000;
  min-height: 150px; /* ensure enough height; allow marquee to be visible */
  position: relative; /* create stacking context for marquee */
  z-index: 1000;
}

header h1,
header h2,
header h3 {
  word-wrap: break-word;
}

header h1 {
  font-size: clamp(1.3rem, 4vw, 2.5rem); /* ✅ responsive */
  font-weight: bold;
  white-space: nowrap;
}

header h2 {
  font-size: 1.5rem;
  text-decoration: underline;
  font-weight: bold;
}

header h3 {
  font-size: 1.2rem;
  color: rgb(250, 6, 6);
  font-weight: bold;
}

/* ================= Marquee (Home page) ================= */
/* Make the scrolling notice visible above images with a white strip */
header marquee {
  display: block;
  width: 100%;
  background: #ffffff;              /* white background strip */
  color: #d00000;                   /* base text color if not overridden */
  padding: 6px 0;                   /* strip height */
  margin-top: 8px;
  border-top: 2px solid #8B0000;
  border-bottom: 2px solid #8B0000;
  position: relative;               /* enable z-index */
  z-index: 2000;                    /* sit above any images/content */
  white-space: nowrap;              /* keep text on one line */
  overflow: hidden;                 /* hide overflow during scroll */
}

/* Ensure marquee text is readable and not overridden by ancestor color */
header marquee h3 {
  color: #d00000;
  font-size: 1rem;
  font-weight: bold;
  margin: 0;
}

/* ================= Main ================= */
main {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 60vh;
  flex-direction: column;
}

form {
  width: 95%;
  max-width: 600px;
  background-color: whitesmoke;
  padding: 20px;
  border: 5px solid #303225;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  font-size: 1rem;
  color: black;
}

form h2 {
  text-align: center;
  color: #2c3763;
  margin-bottom: 20px;
  font-weight: bold;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #111;
  font-size: 1.2rem;
  transition: font-size 0.3s ease;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 2px solid #231d1d;
  font-size: 1rem;
}

.button-group {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.login-btn,
.reset-btn {
  padding: 10px;
  font-size: 1rem;
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  min-width: 120px;
  transition: all 0.3s ease;
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: bold;
  text-align: center;
}

.login-btn {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  border: none;
  height: 44px;
  line-height: 24px;
}

.reset-btn {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  border: none;
  height: 44px;
  line-height: 24px;
}

.login-btn:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
}

.reset-btn:hover {
  background: linear-gradient(135deg, #c82333 0%, #a91e2c 100%);
}

.error-message {
  color: red;
  text-align: center;
  margin-top: 10px;
  font-weight: bold;
  font-size: 0.9rem;
}

.forgot-password-link {
  color: #667eea !important;
  text-decoration: none;
  font-size: 1em;
  font-weight: 500;
  padding: 8px 15px;
  border: 1px solid #667eea;
  border-radius: 5px;
  transition: all 0.3s ease;
  display: inline-block;
}

.forgot-password-link:hover {
  background: #667eea !important;
  color: white !important;
}

/* Standard button styling to match Login/Reset buttons */
.standard-button {
  padding: 10px !important;
  font-size: 1rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  min-width: 120px !important;
  transition: all 0.3s ease !important;
  font-family: Georgia, 'Times New Roman', Times, serif !important;
  text-align: center !important;
  display: block !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

footer {
  padding: 18px 10px 14px 10px;
  background-color: #100e2c;
  font-weight: bold;
  border-top: 2px solid #8B0000;
  text-align: center;
  color: #cbf72d;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

footer p {
  color: #abf518;
  text-align: center;
  padding: 5px 0;
  margin: 2px 0;
  font-size: 1rem;
}

footer address {
  display: block;
  font-style: normal;
  color: #f9f9f9;
  background: none;
  margin: 6px 0 8px 0;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ================= Logos + Heading ================= */
.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: nowrap;
}

.logo-left,
.logo-right {
  width: 80px;
  height: auto;
}

.login-heading {
  flex: 1;
  text-align: center;
  font-size: 1.4rem;  /* ✅ Base desktop size */
  color: black;
  font-weight: bold;
}

/* ================= Media Queries ================= */

/* Mobile (up to 600px) */
@media (max-width: 600px) {
  header {
    padding: 15px 8px;
  }
  
  header h1 {
    font-size: 1.1rem !important;
    line-height: 1.2;
  }

  header h2 {
    font-size: 0.9rem;
  }
  
  header h3 {
    font-size: 0.8rem;
  }

  .login-heading {
    font-size: 1rem !important;
    line-height: 1.2;
  }
  
  label {
    font-size: 1rem !important;
    margin-bottom: 6px;
  }

  .logo-container {
    gap: 6px;
    margin-bottom: 15px;
  }

  .logo-left,
  .logo-right {
    width: 45px;
  }

  form {
    padding: 15px;
    font-size: 0.9rem;
    width: 98%;
    margin: 0 auto;
  }

  input[type="text"],
  input[type="password"] {
    font-size: 0.95rem;
    padding: 10px;
    margin-bottom: 15px;
  }

  .button-group {
    gap: 10px;
    margin: 15px 0;
  }

  .login-btn, .reset-btn {
    font-size: 0.9rem;
    min-width: 90px;
    padding: 10px 8px;
  }
  
  /* Standard button mobile styling */
  .standard-button {
    font-size: 0.9rem !important;
    min-width: 90px !important;
    padding: 10px 8px !important;
  }
  
  /* Forgot password link mobile styling */
  .forgot-password-link {
    font-size: 0.85rem !important;
    padding: 6px 12px !important;
  }
  
  /* Visitor counter mobile adjustments for 600px */
  footer .visitor-counter {
    margin: 12px 0 !important;
    padding: 12px !important;
  }
  
  footer .visitor-counter h3 {
    font-size: 1.1rem !important;
  }
  
  footer .visitor-counter > div > div {
    min-width: 90px !important;
    padding: 8px !important;
  }
  
  footer .visitor-counter > div > div > div:first-child {
    font-size: 1.4em !important;
  }
  
  footer .visitor-counter > div > div > div:last-child {
    font-size: 0.8em !important;
  }
}

/* Tablets (601px to 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  header h1 {
    font-size: 2rem;
  }

  header h2 {
    font-size: 1.3rem;
  }

  .login-heading {
    font-size: 1.2rem;
  }

  .logo-left,
  .logo-right {
    width: 70px;
  }

  form {
    max-width: 500px;
    font-size: 1rem;
  }
}

/* Laptops (901px to 1200px) */
@media (min-width: 901px) and (max-width: 1200px) {
  header h1 {
    font-size: 2.2rem;
  }

  header h2 {
    font-size: 1.4rem;
  }

  .login-heading {
    font-size: 1.3rem;
  }

  form {
    max-width: 550px;
  }
}

/* Very small mobile (up to 480px) */
@media (max-width: 480px) {
  header {
    padding: 10px 5px;
  }
  
  header h1 {
    font-size: 1rem !important;
    line-height: 1.1;
  }

  header h2 {
    font-size: 0.8rem;
  }
  
  header h3 {
    font-size: 0.7rem;
  }

  .login-heading {
    font-size: 0.9rem !important;
    line-height: 1.1;
  }
  
  label {
    font-size: 0.9rem !important;
    margin-bottom: 5px;
  }

  .logo-container {
    gap: 4px;
    margin-bottom: 12px;
  }

  .logo-left,
  .logo-right {
    width: 35px;
  }

  form {
    padding: 12px;
    width: 99%;
  }

  input[type="text"],
  input[type="password"] {
    font-size: 0.9rem;
    padding: 8px;
    margin-bottom: 12px;
  }

  .button-group {
    gap: 8px;
    flex-direction: column;
  }

  .login-btn, .reset-btn {
    font-size: 0.85rem;
    min-width: auto;
    width: 100%;
    padding: 12px;
  }
  
  /* Standard button very small mobile styling */
  .standard-button {
    font-size: 0.85rem !important;
    min-width: auto !important;
    padding: 10px !important;
  }
  
  .forgot-password-link {
    font-size: 0.8rem !important;
    padding: 5px 10px !important;
    margin-top: 10px;
  }
  
  /* Visitor counter mobile adjustments */
  footer .visitor-counter {
    margin: 10px 0 !important;
    padding: 10px !important;
  }
  
  footer .visitor-counter h3 {
    font-size: 1rem !important;
  }
  
  footer .visitor-counter > div {
    gap: 8px !important;
    flex-wrap: wrap !important;
  }
  
  footer .visitor-counter > div > div {
    min-width: 70px !important;
    padding: 6px !important;
    flex: 1 1 45% !important;
  }
  
  footer .visitor-counter > div > div > div:first-child {
    font-size: 1.1em !important;
  }
  
  footer .visitor-counter > div > div > div:last-child {
    font-size: 0.7em !important;
  }
  
  footer {
    padding: 10px 5px 8px 5px;
    font-size: 0.8rem;
  }
  
  footer address {
    font-size: 0.7rem;
    line-height: 1.3;
  }
}

/* Desktops (1201px and above) */
@media (min-width: 1201px) {
  header h1 {
    font-size: 2.5rem;
  }

  header h2 {
    font-size: 1.5rem;
  }

  .login-heading {
    font-size: 1.4rem;
  }
  
  label {
    font-size: 1.2rem;
  }

  form {
    max-width: 600px;
  }
}
