/* style/login.css */
/* Base styles for the login page, scoped with .page-login */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-main-color, #F2FFF6); /* Default text color from custom palette */
  background-color: var(--background-color-page, #08160F); /* Page background from custom palette */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Fixed header spacing - body already handles padding-top */
/* No additional padding-top for the main content area to avoid double spacing */

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  width: 100%; /* Ensure it always takes full width within its parent */
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Image above text */
  align-items: center;
  padding: 60px 20px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  background-color: var(--card-bg-color, #11271B); /* Use card bg for hero section background */
  text-align: center;
}

.page-login__hero-image-wrapper {
  width: 100%;
  max-width: 1200px;
  margin-bottom: 30px; /* Space between image and content */
  box-sizing: border-box;
  overflow: hidden; /* Ensure image doesn't overflow */
}

.page-login__hero-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-height: 200px; /* Min image size */
}

.page-login__hero-content {
  max-width: 900px;
  color: var(--text-main-color, #F2FFF6);
}

.page-login__main-title {
  font-size: clamp(2em, 4vw, 3em); /* Responsive font size */
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-main-color, #F2FFF6);
}

.page-login__description {
  font-size: 1.1em;
  margin-bottom: 30px;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-login__cta-buttons {
  display: flex;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
  gap: 20px;
  justify-content: center;
  margin-top: 30px;
  width: 100%; /* Ensure container takes full width */
  max-width: 500px; /* Limit width for button group */
  box-sizing: border-box;
}

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1em;
  transition: background-color 0.3s ease, transform 0.2s ease;
  min-width: 180px;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons adapt to container width */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word; /* Allow long words to break */
}

.page-login__btn-primary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%); /* Custom button color */
  color: var(--text-main-color, #F2FFF6);
  border: 2px solid transparent;
}

.page-login__btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(42, 209, 111, 0.4);
}

.page-login__btn-secondary {
  background: transparent;
  color: var(--text-main-color, #F2FFF6);
  border: 2px solid var(--border-color, #2E7A4E); /* Custom border color */
}

.page-login__btn-secondary:hover {
  background-color: rgba(46, 122, 78, 0.2); /* Slightly lighter border color for hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(46, 122, 78, 0.2);
}

/* General Section Styling */
.page-login__section-title {
  font-size: clamp(1.8em, 3.5vw, 2.5em);
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
  color: var(--text-main-color, #F2FFF6);
}

.page-login__section-intro {
  font-size: 1.05em;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-login__guide-section,
.page-login__promotions-section,
.page-login__faq-section {
  padding: 60px 0;
  background-color: var(--background-color-page, #08160F);
}

.page-login__dark-section {
  background-color: var(--card-bg-color, #11271B); /* Darker background for contrast */
  color: var(--text-main-color, #F2FFF6);
  padding: 60px 0;
}

.page-login__dark-section .page-login__section-title,
.page-login__dark-section .page-login__section-intro,
.page-login__dark-section .page-login__subsection-title,
.page-login__dark-section .page-login__feature-title,
.page-login__dark-section .page-login__feature-description {
  color: var(--text-main-color, #F2FFF6);
}


/* Guide Section Specifics */
.page-login__steps-subsection {
  margin-bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-login__subsection-title {
  font-size: clamp(1.5em, 3vw, 2em);
  font-weight: bold;
  margin-bottom: 30px;
  text-align: center;
  color: var(--text-main-color, #F2FFF6);
}

.page-login__step-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  max-width: 800px;
  width: 100%;
  margin-bottom: 40px;
}

.page-login__step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background-color: var(--card-bg-color, #11271B);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #2E7A4E);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: var(--text-main-color, #F2FFF6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3em;
  font-weight: bold;
}

.page-login__step-content {
  text-align: left;
}

.page-login__step-title {
  font-size: 1.25em;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--text-main-color, #F2FFF6);
}

.page-login__step-description {
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-login__guide-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  min-height: 200px; /* Min image size */
  margin-top: 20px;
}

.page-login__troubleshooting-subsection {
  margin-top: 60px;
}

.page-login__troubleshooting-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.page-login__troubleshooting-list li {
  background-color: var(--card-bg-color, #11271B);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid var(--border-color, #2E7A4E);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  color: var(--text-secondary-color, #A7D9B8);
}

.page-login__troubleshooting-item-title {
  font-size: 1.15em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-main-color, #F2FFF6);
}

/* Why Choose Section */
.page-login__features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-login__feature-item {
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent white on dark background */
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border-color, #2E7A4E);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__feature-icon {
  width: 100%;
  max-width: 150px;
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  min-width: 200px; /* Min image size */
  min-height: 200px; /* Min image size */
  object-fit: contain; /* Ensure full icon is visible */
}

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

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

/* Promotions Section */
.page-login__promo-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.page-login__promo-card {
  background-color: var(--card-bg-color, #11271B);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border-color, #2E7A4E);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__card-title {
  font-size: 1.25em;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--text-main-color, #F2FFF6);
}

.page-login__card-description {
  font-size: 1em;
  margin-bottom: 25px;
  color: var(--text-secondary-color, #A7D9B8);
}

.page-login__promo-image {
  width: 100%;
  max-width: 1000px;
  height: auto;
  display: block;
  margin: 60px auto 0 auto;
  border-radius: 8px;
  object-fit: cover;
  min-height: 200px; /* Min image size */
}

/* FAQ Section */
.page-login__faq-list {
  max-width: 800px;
  margin: 40px auto 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.page-login__faq-item {
  background-color: var(--card-bg-color, #11271B);
  border: 1px solid var(--border-color, #2E7A4E);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  font-weight: bold;
  cursor: pointer;
  color: var(--text-main-color, #F2FFF6);
  background-color: var(--card-bg-color, #11271B);
  position: relative;
  transition: background-color 0.3s ease;
}

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

.page-login__faq-question::marker {
  display: none;
}

.page-login__faq-question:hover {
  background-color: rgba(46, 122, 78, 0.2);
}

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

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

.page-login__faq-item[open] .page-login__faq-toggle {
  content: '−'; /* Change to minus when open */
}

.page-login__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: var(--text-secondary-color, #A7D9B8);
  text-align: left;
}

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

/* CTA Footer */
.page-login__cta-footer {
  padding: 80px 20px;
  text-align: center;
}

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

  .page-login__container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-login__hero-section,
  .page-login__guide-section,
  .page-login__why-choose-section,
  .page-login__promotions-section,
  .page-login__faq-section,
  .page-login__cta-footer {
    padding-left: 0;
    padding-right: 0;
    padding-top: 30px;
    padding-bottom: 30px;
  }
  
  .page-login__hero-section {
    padding-top: 10px !important; /* body handles --header-offset, small top padding for hero */
  }

  .page-login__main-title {
    font-size: clamp(1.8em, 8vw, 2.5em);
  }

  .page-login__section-title {
    font-size: clamp(1.5em, 7vw, 2em);
  }

  .page-login__subsection-title {
    font-size: clamp(1.3em, 6vw, 1.8em);
  }

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

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

  /* Image responsiveness */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
    min-width: unset !important; /* Remove min-width constraint for mobile */
    min-height: unset !important; /* Remove min-height constraint for mobile */
  }

  .page-login__hero-image-wrapper,
  .page-login__guide-image,
  .page-login__feature-icon,
  .page-login__promo-image {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 15px; /* Add padding to image containers */
  }

  /* Card and section containers */
  .page-login__step-item,
  .page-login__troubleshooting-list li,
  .page-login__feature-item,
  .page-login__promo-card,
  .page-login__faq-item {
    padding: 20px;
    margin-left: 15px;
    margin-right: 15px;
    width: calc(100% - 30px); /* Adjust width for padding */
    box-sizing: border-box !important;
  }
  .page-login__faq-list {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
  }
}