/* style/login.css */

/* Base styles for the page-login scope */
.page-login {
  font-family: Arial, sans-serif;
  color: var(--text-main, #FFF5E1); /* Default text color from custom scheme */
  background-color: var(--background, #B71C1C); /* Default background from custom scheme */
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

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

/* Hero Section */
.page-login__hero-section {
  position: relative;
  overflow: hidden;
  padding-top: 10px; /* Small top padding as per rule */
  padding-bottom: 40px;
  background-color: var(--background, #B71C1C); /* Ensure consistent background */
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Limit height for hero image */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and content */
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  min-height: 300px; /* Ensure minimum height */
}

.page-login__hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3.5em); /* Responsive font size for H1 */
  color: var(--text-main, #FFF5E1);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); /* Enhance readability on potentially busy backgrounds */
}

.page-login__hero-description {
  font-size: 1.1em;
  color: var(--text-main, #FFF5E1);
  margin-bottom: 30px;
}

.page-login__hero-cta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

/* Section titles and descriptions */
.page-login__section-title {
  font-size: 2.5em;
  color: var(--text-main, #FFF5E1);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 600;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.page-login__section-description {
  font-size: 1.1em;
  color: var(--text-main, #FFF5E1);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
}

/* Buttons */
.page-login__btn-primary,
.page-login__btn-secondary,
.page-login__submit-button {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1em;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for max-width */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Allow text wrapping */
  border: none;
}

.page-login__btn-primary,
.page-login__submit-button {
  background: linear-gradient(180deg, #FFD86A 0%, #E6B800 100%); /* Custom button color */
  color: #7A0E0E; /* Deep Red for text on gold button for contrast */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__btn-primary:hover,
.page-login__submit-button:hover {
  background: linear-gradient(180deg, #E6B800 0%, #FFD86A 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-login__btn-secondary {
  background: #7A0E0E; /* Deep Red */
  color: #FFF5E1; /* Text Main */
  border: 2px solid #F4D34D; /* Gold border */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__btn-secondary:hover {
  background: #5a0b0b; /* Darker Deep Red */
  border-color: #FFCC66; /* Glow Gold border */
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Login Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: var(--background, #B71C1C);
}

.page-login__login-form {
  background-color: var(--card-bg, #D32F2F); /* Card BG */
  padding: 40px;
  border-radius: 12px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border, #F2B544); /* Border color */
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 10px;
  font-size: 1.1em;
  color: var(--text-main, #FFF5E1);
  font-weight: 500;
}

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #F2B544; /* Border color */
  border-radius: 8px;
  font-size: 1em;
  background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent input */
  color: var(--text-main, #FFF5E1);
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: rgba(255, 245, 225, 0.7); /* Lighter placeholder text */
}

.page-login__form-input:focus {
  outline: none;
  border-color: #FFCC66; /* Glow color on focus */
  box-shadow: 0 0 0 3px rgba(255, 204, 102, 0.5); /* Glow effect */
}

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

.page-login__checkbox-label {
  color: var(--text-main, #FFF5E1);
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-login__checkbox-input {
  width: 18px;
  height: 18px;
  accent-color: #F4D34D; /* Gold accent for checkbox */
}

.page-login__forgot-password {
  color: #F4D34D; /* Gold color for link */
  text-decoration: none;
  font-size: 0.95em;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: #FFCC66; /* Glow color on hover */
  text-decoration: underline;
}

.page-login__register-text {
  text-align: center;
  margin-top: 25px;
  font-size: 1em;
  color: var(--text-main, #FFF5E1);
}

.page-login__register-link {
  color: #F4D34D; /* Gold color for link */
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__register-link:hover {
  color: #FFCC66; /* Glow color on hover */
  text-decoration: underline;
}

/* Features Section (Why Choose Us) */
.page-login__features-section {
  padding: 60px 0;
  background-color: var(--deep-red, #7A0E0E); /* Deep Red background */
}

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

.page-login__feature-card {
  background-color: var(--card-bg, #D32F2F); /* Card BG */
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #F2B544); /* Border color */
}

.page-login__feature-icon {
  width: 200px; /* Min size */
  height: 200px; /* Min size */
  object-fit: contain;
  margin-bottom: 20px;
  border-radius: 8px;
}

.page-login__feature-title {
  font-size: 1.5em;
  color: var(--gold, #F4D34D); /* Gold color for titles */
  margin-bottom: 10px;
  font-weight: 600;
}

.page-login__feature-description {
  font-size: 1em;
  color: var(--text-main, #FFF5E1);
}

/* Guide Section */
.page-login__guide-section {
  padding: 60px 0;
  background-color: var(--background, #B71C1C);
}

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

.page-login__guide-item {
  background-color: var(--card-bg, #D32F2F); /* Card BG */
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border, #F2B544); /* Border color */
}

.page-login__guide-title {
  font-size: 1.4em;
  color: var(--gold, #F4D34D); /* Gold color for titles */
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__guide-text {
  font-size: 1em;
  color: var(--text-main, #FFF5E1);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
  background-color: var(--background, #B71C1C);
}

.page-login__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.page-login__faq-item {
  background-color: var(--card-bg, #D32F2F); /* Card BG */
  border: 1px solid var(--border, #F2B544); /* Border color */
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  color: var(--gold, #F4D34D); /* Gold for questions */
  font-weight: 600;
  cursor: pointer;
  background-color: rgba(0, 0, 0, 0.2); /* Slightly darker background for summary */
  list-style: none; /* Hide default marker */
  transition: background-color 0.3s ease;
}

.page-login__faq-item[open] > .page-login__faq-question {
  background-color: rgba(0, 0, 0, 0.3);
}

.page-login__faq-question::-webkit-details-marker {
  display: none; /* Hide default marker for webkit browsers */
}

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

.page-login__faq-toggle {
  font-size: 1.5em;
  line-height: 1;
  margin-left: 15px;
  color: var(--glow, #FFCC66); /* Glow color for toggle */
}

.page-login__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: var(--text-main, #FFF5E1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, padding 0.3s ease-out;
}

.page-login__faq-item[open] .page-login__faq-answer {
  max-height: 500px; /* Sufficient height for answer */
  padding-top: 15px;
}

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

/* CTA Bottom Section */
.page-login__cta-bottom-section {
  padding: 60px 0;
  text-align: center;
  background-color: var(--deep-red, #7A0E0E); /* Deep Red background */
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap; /* Allow buttons to wrap */
}

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

/* Responsive styles for mobile */
@media (max-width: 768px) {
  .page-login {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Hero Section */
  .page-login__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    padding-bottom: 30px;
  }

  .page-login__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em); /* Smaller H1 for mobile */
  }

  .page-login__hero-description {
    font-size: 1em;
  }

  .page-login__hero-cta {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
    padding: 0 15px; /* Add padding to container */
  }

  /* Buttons */
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .page-login__submit-button,
  .page-login a[class*="button"],
  .page-login a[class*="btn"] {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 12px 20px; /* Adjust padding for smaller buttons */
    font-size: 1em;
  }

  /* Section titles and descriptions */
  .page-login__section-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

  .page-login__section-description {
    font-size: 1em;
    margin-bottom: 30px;
    padding: 0 15px; /* Add padding to container */
  }

  /* Login Form Section */
  .page-login__form-section {
    padding: 40px 0;
  }

  .page-login__login-form {
    padding: 30px 20px;
    margin: 0 15px; /* Add margin for mobile */
  }

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

  /* Features Section */
  .page-login__features-section {
    padding: 40px 0;
  }

  .page-login__features-grid {
    grid-template-columns: 1fr; /* Single column layout */
    margin-top: 30px;
    gap: 20px;
    padding: 0 15px;
  }

  .page-login__feature-icon {
    width: 200px !important;
    height: 200px !important;
    margin-left: auto;
    margin-right: auto;
  }

  /* Guide Section */
  .page-login__guide-section {
    padding: 40px 0;
  }

  .page-login__guide-steps {
    grid-template-columns: 1fr; /* Single column layout */
    margin-top: 30px;
    gap: 20px;
    padding: 0 15px;
  }

  .page-login__guide-item {
    padding: 25px 20px;
  }

  .page-login__guide-title {
    font-size: 1.2em;
  }

  /* FAQ Section */
  .page-login__faq-section {
    padding: 40px 0;
  }

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

  .page-login__faq-question {
    font-size: 1.1em;
    padding: 15px 20px;
  }

  .page-login__faq-answer {
    padding: 0 20px 15px 20px;
  }

  /* CTA Bottom Section */
  .page-login__cta-bottom-section {
    padding: 40px 0;
  }

  .page-login__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    margin-top: 30px;
    gap: 15px;
    padding: 0 15px;
  }

  /* General image and content container responsive */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-section,
  .page-login__features-section,
  .page-login__faq-section,
  .page-login__cta-bottom-section,
  .page-login__guide-section {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  /* Add specific padding for direct children of main or sections for consistency */
  .page-login__hero-section > .page-login__container,
  .page-login__form-section > .page-login__container,
  .page-login__features-section > .page-login__container,
  .page-login__guide-section > .page-login__container,
  .page-login__faq-section > .page-login__container,
  .page-login__cta-bottom-section > .page-login__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}