/* style/login.css */

/* Variables */
:root {
  --primary-color: #017439; /* Brand green */
  --secondary-color: #FFFFFF; /* White */
  --button-login-bg: #C30808; /* Login/Register button background */
  --button-login-text: #FFFF00; /* Login/Register button text */
  --text-dark: #333333;
  --text-light: #ffffff;
  --background-light: #ffffff;
  --background-dark: #017439; /* Using primary color as dark background for contrast */
  --border-color: #e0e0e0;
}

/* Base styles for the page-login scope */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--background-light); /* Default light background */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Sections */
.page-login__section {
  padding: 60px 20px;
  text-align: center;
}

.page-login__hero-section {
  position: relative;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
  padding-bottom: 60px;
  color: var(--text-light);
  background-color: var(--background-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.page-login__dark-section {
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-login__light-bg {
  background-color: var(--background-light);
  color: var(--text-dark);
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.page-login__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  font-weight: bold;
  color: var(--text-light);
}

.page-login__section-title {
  font-size: 2.2em;
  margin-bottom: 30px;
  font-weight: bold;
  color: inherit; /* Inherit color from parent section (dark or light) */
}

.page-login__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: inherit; /* Inherit color from parent section */
}

/* CTA Buttons */
.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__submit-button {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
  box-sizing: border-box; /* Include padding and border in the element's total width and height */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Break long words */
  max-width: 100%; /* Ensure buttons don't overflow */
}

.page-login__btn-primary,
.page-login__submit-button {
  background-color: var(--button-login-bg);
  color: var(--button-login-text);
  border-color: var(--button-login-bg);
}

.page-login__btn-primary:hover,
.page-login__submit-button:hover {
  background-color: #a30606; /* Slightly darker red */
  border-color: #a30606;
}

.page-login__btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-login__btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--secondary-color);
}

/* Login Form Section */
.page-login__form-section {
  padding: 80px 20px;
  background-color: var(--background-light);
}

.page-login__form-wrapper {
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--secondary-color);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.page-login__login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

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

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  box-sizing: border-box;
}

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

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -10px; /* Adjust spacing with form groups */
  font-size: 0.95em;
}

.page-login__remember-me {
  display: flex;
  align-items: center;
  color: var(--text-dark);
}

.page-login__checkbox {
  margin-right: 8px;
}

.page-login__forgot-password {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
}

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

.page-login__submit-button {
  width: 100%;
  margin-top: 20px;
}

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

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

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

/* Video Section */
.page-login__video-section {
    padding: 80px 20px;
    background-color: var(--background-dark);
    color: var(--text-light);
}

.page-login__video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.page-login__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block; /* Ensure it behaves as a block element for max-width */
}

.page-login__video-link {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10; /* Ensure link is clickable over video */
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 80px 20px;
  background-color: var(--background-light);
}

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

.page-login__benefit-card {
  background-color: var(--secondary-color);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-dark);
}

.page-login__benefit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.page-login__benefit-icon {
  width: 100%; /* Make icon responsive within card */
  height: auto;
  max-width: 250px; /* Max size for the icon */
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__benefit-title {
  font-size: 1.4em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-login__benefit-text {
  font-size: 1em;
  color: var(--text-dark);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 80px 20px;
  background-color: var(--background-dark);
  color: var(--text-light);
}

.page-login__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

.page-login__faq-item {
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent white for dark background */
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text-light);
  background-color: rgba(255, 255, 255, 0.05);
  transition: background-color 0.3s ease;
}

.page-login__faq-question:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.page-login__faq-question h3 {
  margin: 0;
  color: inherit;
  font-size: 1.1em; /* Ensure h3 inside question doesn't become too large */
}

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  transition: transform 0.3s ease;
}

.page-login__faq-item.active .page-login__faq-toggle {
  transform: rotate(45deg); /* Change + to X or - */
}

.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 20px; /* Horizontal padding, vertical will be added on active */
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
  color: var(--text-light);
  text-align: left;
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show content */
  padding: 15px 20px 20px; /* Vertical padding when active */
}

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


/* Bottom CTA Section */
.page-login__cta-bottom-section {
    padding: 80px 20px;
    background-color: var(--background-light);
    color: var(--text-dark);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 2.4em;
  }
  .page-login__section-title {
    font-size: 1.8em;
  }
  .page-login__benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure mobile header offset */
    padding-bottom: 40px;
    min-height: 300px;
  }

  .page-login__main-title {
    font-size: 2em;
  }

  .page-login__section-title {
    font-size: 1.6em;
  }

  .page-login__description {
    font-size: 1em;
  }

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px; /* Add horizontal padding to button container */
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__submit-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px;
    font-size: 1em;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  /* Image responsiveness */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-wrapper,
  .page-login__video-wrapper,
  .page-login__benefits-grid,
  .page-login__faq-list,
  .page-login__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow-x: hidden !important; /* Ensure no horizontal scroll */
  }

  .page-login__video-section {
    padding-top: var(--header-offset, 120px) !important; /* Ensure video section also respects header offset on mobile */
  }

  /* Video responsiveness */
  .page-login video,
  .page-login__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-login__video-section,
  .page-login__video-container,
  .page-login__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }

  /* Specific padding adjustment for top sections if needed */
  .page-login__form-section,
  .page-login__benefits-section,
  .page-login__faq-section,
  .page-login__cta-bottom-section {
    padding: 40px 15px; /* Adjust section padding for mobile */
  }
  
  .page-login__form-wrapper {
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .page-login__main-title {
    font-size: 1.8em;
  }
  .page-login__section-title {
    font-size: 1.4em;
  }
  .page-login__form-wrapper {
    padding: 25px 15px;
  }
  .page-login__form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* Color Contrast Fixes (as per instructions) */
.page-login__dark-bg {
  color: var(--text-light); /* Deep background, light text */
  background: var(--background-dark);
}

.page-login__light-bg {
  color: var(--text-dark); /* Light background, dark text */
  background: var(--background-light);
}

/* Ensure content area text is readable */
.page-login__content-area,
.page-login__text-block {
  color: var(--text-dark);
  background: var(--background-light);
}

.page-login p,
.page-login li {
  color: inherit; /* Inherit from parent section, which handles contrast */
}

.page-login__card {
  background: var(--secondary-color); /* White background for cards */
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

/* Specific text color for buttons if needed, but already handled by button-login-text */
.page-login__btn-primary {
  color: var(--button-login-text);
}
.page-login__submit-button {
  color: var(--button-login-text);
}