/* style/login.css */

/* Base styles for the login page */
.page-login {
  font-family: Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  padding-bottom: 60px;
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  box-sizing: border-box;
  overflow: hidden;
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  filter: brightness(0.6);
  min-height: 400px; /* Ensure image is visible */
}

.page-login__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  text-align: center;
  color: var(--text-main);
}

.page-login__main-title {
  font-size: clamp(2em, 3.5vw, 3em);
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-main);
  line-height: 1.2;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.page-login__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0.5px 0.5px 2px rgba(0,0,0,0.3);
}

/* Login Card */
.page-login__login-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 40px;
  margin-top: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.page-login__card-title {
  font-size: 1.8em;
  color: var(--text-main);
  margin-bottom: 30px;
  font-weight: bold;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-weight: bold;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: #0A2015; /* Slightly lighter than card bg */
  color: var(--text-main);
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

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

.page-login__checkbox-container {
  display: block;
  position: relative;
  padding-left: 28px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: var(--text-secondary);
}

.page-login__checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.page-login__checkbox-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #0A2015;
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

.page-login__checkbox-container input:checked ~ .page-login__checkbox-checkmark {
  background-color: var(--main-color);
  border-color: var(--main-color);
}

.page-login__checkbox-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.page-login__checkbox-container input:checked ~ .page-login__checkbox-checkmark:after {
  display: block;
}

.page-login__checkbox-container .page-login__checkbox-checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

.page-login__forgot-password {
  color: var(--gold-color);
  text-decoration: none;
}

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

.page-login__btn-primary {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: none;
  border-radius: 5px;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.3s ease;
  box-sizing: border-box;
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
}

.page-login__register-text {
  margin-top: 25px;
  color: var(--text-secondary);
  font-size: 0.95em;
}

.page-login__register-link {
  color: var(--gold-color);
  text-decoration: none;
  font-weight: bold;
}

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

/* Features Section */
.page-login__features-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: 2.5em;
  color: var(--text-main);
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-login__feature-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.page-login__feature-item:hover {
  transform: translateY(-5px);
}

.page-login__feature-icon {
  width: 100%;
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  object-fit: contain;
}

.page-login__feature-title {
  font-size: 1.5em;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: bold;
}

.page-login__feature-description {
  color: var(--text-secondary);
  font-size: 0.95em;
}

/* CTA Section */
.page-login__cta-section {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
  box-sizing: border-box;
}

.page-login__cta-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__cta-title {
  font-size: 2em;
  color: var(--text-main);
  margin-bottom: 20px;
  font-weight: bold;
}

.page-login__cta-description {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__cta-button {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

/* FAQ Section */
.page-login__faq-section {
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-login__faq-list {
  margin-top: 30px;
}

.page-login__faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-login__faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-main);
  font-weight: bold;
  font-size: 1.1em;
  background-color: #11271B; /* Match card bg */
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none;
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.page-login__faq-qtext {
  flex-grow: 1;
}

.page-login__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: var(--gold-color);
  transition: transform 0.3s ease;
}

.page-login__faq-item[open] .page-login__faq-toggle {
  transform: rotate(45deg);
}

.page-login__faq-answer {
  padding: 0 20px 20px 20px;
  color: var(--text-secondary);
  font-size: 0.95em;
  line-height: 1.6;
}

.page-login__faq-answer p {
  margin-bottom: 0;
}

/* Custom color variables */
:root {
  --main-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --bg-color: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Ensure contrast for all text elements */
.page-login p, .page-login li, .page-login label {
  color: var(--text-secondary);
}

.page-login h1, .page-login h2, .page-login h3, .page-login h4, .page-login h5, .page-login h6 {
  color: var(--text-main);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-login__hero-content {
    max-width: 700px;
  }
  .page-login__main-title {
    font-size: clamp(2em, 4.5vw, 2.5em);
  }
  .page-login__description {
    font-size: 1em;
  }
  .page-login__login-card {
    padding: 30px;
  }
  .page-login__section-title {
    font-size: 2em;
  }
  .page-login__cta-title {
    font-size: 1.8em;
  }
}

@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }
  .page-login__hero-section {
    padding: 40px 15px;
    padding-top: 10px !important;
  }
  .page-login__hero-image {
    min-height: 300px;
  }
  .page-login__main-title {
    font-size: clamp(1.8em, 6vw, 2.2em);
    margin-bottom: 15px;
  }
  .page-login__description {
    font-size: 0.95em;
    margin-bottom: 20px;
  }
  .page-login__login-card {
    padding: 25px;
    margin-top: 20px;
  }
  .page-login__card-title {
    font-size: 1.5em;
    margin-bottom: 20px;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
  }
  .page-login__forgot-password {
    margin-top: 10px;
  }
  .page-login__btn-primary {
    padding: 12px 15px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-login__register-text {
    margin-top: 20px;
  }
  .page-login__features-section,
  .page-login__cta-section,
  .page-login__faq-section {
    margin: 40px auto;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-login__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }
  .page-login__features-grid {
    grid-template-columns: 1fr;
  }
  .page-login__feature-item {
    padding: 25px;
  }
  .page-login__feature-icon {
    max-width: 100px;
  }
  .page-login__cta-content {
    padding: 30px;
  }
  .page-login__cta-title {
    font-size: 1.5em;
  }
  .page-login__cta-description {
    font-size: 1em;
  }
  .page-login__faq-item summary {
    padding: 15px;
    font-size: 1em;
  }
  .page-login__faq-answer {
    padding: 0 15px 15px 15px;
    font-size: 0.9em;
  }
  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  .page-login__section,
  .page-login__card,
  .page-login__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
    gap: 10px;
    padding-left: 0;
    padding-right: 0;
  }
  .page-login__cta-buttons {
    display: flex;
    flex-direction: column;
  }
}