/* style/login.css */
:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #1a1a1a; /* Inherited from shared.css body */
}

.page-login {
  color: var(--text-light); /* Light text on dark body background */
  background-color: var(--background-dark);
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  width: 100%;
  min-height: 450px; /* Minimum height for hero */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  box-sizing: border-box;
}

.page-login__hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
  z-index: 1;
}

.page-login__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.page-login__main-title {
  font-size: 3.2em;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-login__description {
  font-size: 1.3em;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 40px;
}

/* Form Section */
.page-login__form-section {
  padding: 60px 20px;
  background-color: var(--background-dark);
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-login__form-container {
  background-color: #2a2a2a; /* Slightly lighter dark background for the form card */
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  max-width: 500px;
  width: 100%;
  box-sizing: border-box;
  color: var(--text-light);
}

.page-login__form-title {
  font-size: 2em;
  color: var(--secondary-color);
  text-align: center;
  margin-bottom: 30px;
}

.page-login__form-group {
  margin-bottom: 20px;
}

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 1.1em;
  color: var(--text-light);
}

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #444;
  border-radius: 8px;
  background-color: #333;
  color: var(--text-light);
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.page-login__form-input::placeholder {
  color: #888;
}

.page-login__form-input:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
  outline: none;
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 0.95em;
}

.page-login__remember-me {
  display: flex;
  align-items: center;
}

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--secondary-color); /* Highlight checkbox with secondary color */
}

.page-login__checkbox-label {
  color: var(--text-light);
}

.page-login__forgot-password {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: #fff;
  text-decoration: underline;
}

.page-login__submit-button {
  display: block;
  width: 100%;
  padding: 15px 25px;
  background-color: var(--secondary-color);
  color: var(--primary-color); /* Dark text on gold button for contrast */
  font-size: 1.2em;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  text-align: center;
  text-decoration: none; /* For <a> tag styled as button */
  box-sizing: border-box;
}

.page-login__submit-button:hover {
  background-color: #e0b800; /* Slightly darker gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 215, 0, 0.3);
}

.page-login__submit-button:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(255, 215, 0, 0.2);
}

.page-login__register-prompt {
  text-align: center;
  margin-top: 25px;
  font-size: 1em;
  color: var(--text-light);
}

.page-login__register-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: #fff;
  text-decoration: underline;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 20px;
  background-color: var(--primary-color); /* Dark blue background for this section */
  color: var(--text-light);
  text-align: center;
}

.page-login__benefits-container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-login__benefits-title {
  font-size: 2.5em;
  color: var(--secondary-color);
  margin-bottom: 50px;
  font-weight: bold;
}

.page-login__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-login__benefit-item {
  background-color: #004488; /* Slightly lighter blue for benefit cards */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.page-login__benefit-icon {
  width: 100%;
  max-width: 150px; /* Constrain icon size */
  height: auto;
  margin-bottom: 25px;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__benefit-heading {
  font-size: 1.5em;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__benefit-description {
  font-size: 1em;
  line-height: 1.6;
  color: var(--text-light);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 2.8em;
  }
  .page-login__description {
    font-size: 1.2em;
  }
  .page-login__benefits-title {
    font-size: 2.2em;
  }
}

@media (max-width: 768px) {
  .page-login {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
  }

  .page-login__hero-section {
    min-height: 350px;
    padding: 60px 15px;
  }

  .page-login__main-title {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .page-login__description {
    font-size: 1em;
    margin-bottom: 30px;
  }

  .page-login__form-section {
    padding: 40px 15px;
  }

  .page-login__form-container {
    padding: 30px 20px;
  }

  .page-login__form-title {
    font-size: 1.8em;
    margin-bottom: 25px;
  }

  .page-login__form-input {
    padding: 12px 15px;
  }

  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .page-login__submit-button {
    font-size: 1.1em;
    padding: 12px 20px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-login__register-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__benefits-section {
    padding: 50px 15px;
  }

  .page-login__benefits-title {
    font-size: 2em;
    margin-bottom: 40px;
  }

  .page-login__benefits-grid {
    grid-template-columns: 1fr;
  }

  .page-login__benefit-item {
    padding: 25px;
  }
  
  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__hero-section,
  .page-login__form-section,
  .page-login__benefits-section,
  .page-login__form-container,
  .page-login__benefits-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-login__benefit-icon {
    max-width: 120px;
    width: 100% !important; /* Ensure it respects max-width and scales */
    height: auto !important;
  }
}

@media (max-width: 480px) {
  .page-login__main-title {
    font-size: 1.8em;
  }
  .page-login__description {
    font-size: 0.9em;
  }
  .page-login__form-title {
    font-size: 1.5em;
  }
  .page-login__benefits-title {
    font-size: 1.8em;
  }
}