/* style/register.css */

/* Base Styles for .page-register */
.page-register {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: #333333; /* Default text color for light backgrounds */
  background-color: var(--background-color, #FFFFFF); /* Inherit from shared, default to white */
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Fixed Header Spacing */
/* Assuming shared.css does NOT set padding-top on body, so we set it here */
.page-register {
  padding-top: var(--header-offset, 120px);
}

/* Common Container */
.page-register__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Section Titles and Descriptions */
.page-register__section-title {
  font-size: 2.5em;
  color: #017439; /* Primary brand color */
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-register__section-description {
  font-size: 1.1em;
  color: #555555;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Buttons */
.page-register__btn-primary,
.page-register__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  text-align: center;
  box-sizing: border-box; /* Crucial for button responsiveness */
  white-space: normal; /* Allow text wrapping */
  word-wrap: break-word; /* Break long words */
}

.page-register__btn-primary {
  background-color: #C30808; /* Custom Register/Login button color */
  color: #FFFF00; /* Custom Register/Login font color */
  border: 2px solid #C30808;
}

.page-register__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

.page-register__btn-secondary {
  background-color: #FFFFFF;
  color: #017439; /* Primary brand color */
  border: 2px solid #017439;
}

.page-register__btn-secondary:hover {
  background-color: #f0f0f0;
  color: #005a2e;
  border-color: #005a2e;
}

.page-register__btn-large {
  padding: 18px 40px;
  font-size: 1.1em;
}

/* Dark Background Sections */
.page-register__dark-bg {
  background-color: #017439; /* Primary brand color */
  color: #ffffff; /* White text for contrast */
}

.page-register__dark-bg .page-register__section-title {
  color: #ffffff;
}

.page-register__dark-bg .page-register__section-description {
  color: #f0f0f0;
}

/* Light Background Sections */
.page-register__light-bg {
  background-color: #ffffff; /* Secondary brand color (white) */
  color: #333333; /* Dark text for contrast */
}

/* Hero Section */
.page-register__hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 40px;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.page-register__hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 1;
}

.page-register__hero-title {
  font-size: 3.5em;
  margin-bottom: 20px;
  line-height: 1.2;
  font-weight: bold;
}

.page-register__hero-description {
  font-size: 1.2em;
  margin-bottom: 30px;
}

.page-register__hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-register__hero-image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 700px;
  z-index: 0;
}

.page-register__hero-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

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

.page-register__step-card {
  background-color: #f9f9f9;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333333;
}

.page-register__step-card:hover {
  transform: translateY(-5px);
}

.page-register__step-image {
  width: 100%; /* Make image fill card width */
  max-width: 300px; /* Limit max size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
}

.page-register__step-title {
  font-size: 1.8em;
  color: #017439;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-register__step-text {
  font-size: 1em;
  color: #555555;
}

.page-register__cta-bottom {
  text-align: center;
  margin-top: 60px;
}

/* Benefits Section */
.page-register__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-register__benefit-card {
  background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white on dark bg */
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #ffffff; /* White text for dark background */
}

.page-register__benefit-card:hover {
  transform: translateY(-5px);
}

/* Adjust benefit icon size to meet minimum 200x200 requirement */
.page-register__benefit-icon {
  width: 200px;
  height: 200px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce minimum size */
  min-height: 200px; /* Enforce minimum size */
  object-fit: contain; /* Ensure full icon is visible */
}

.page-register__benefit-title {
  font-size: 1.8em;
  color: #ffffff;
  margin-bottom: 15px;
  font-weight: bold;
}

.page-register__benefit-text {
  font-size: 1em;
  color: #f0f0f0;
}

/* Why Choose Us Section */
.page-register__why-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-register__why-list li {
  background-color: #f9f9f9;
  border-left: 5px solid #017439;
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 8px;
  font-size: 1.1em;
  line-height: 1.5;
  color: #333333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-register__why-list li strong {
  color: #017439;
}

/* Download App Section */
.page-register__app-download-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* FAQ Section */
.page-register__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

.page-register__faq-item {
  background-color: #f9f9f9;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  color: #333333;
}

.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2em;
  font-weight: bold;
  color: #017439;
  cursor: pointer;
  background-color: #e8f5e9; /* Light green background for question */
  border-bottom: 1px solid #d4edda;
  user-select: none;
}

.page-register__faq-item[open] .page-register__faq-question {
  border-bottom: 1px solid transparent; /* No border when open */
}

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

.page-register__faq-toggle {
  font-size: 1.5em;
  margin-left: 15px;
  color: #017439;
  transition: transform 0.3s ease;
}

.page-register__faq-item[open] .page-register__faq-toggle {
  transform: rotate(45deg); /* Rotate plus to become cross */
}

.page-register__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1em;
  color: #555555;
  line-height: 1.6;
  max-height: 0; /* For JS-controlled toggle */
  overflow: hidden; /* For JS-controlled toggle */
  transition: max-height 0.3s ease-out; /* For JS-controlled toggle */
}

.page-register__faq-item[open] .page-register__faq-answer {
  max-height: 1000px; /* Adjust as needed for content length */
  transition: max-height 0.5s ease-in;
}

/* Native details element styling overrides */
.page-register__faq-item summary {
  list-style: none; /* Remove default marker */
}
.page-register__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit browsers */
}


/* CTA Section */
.page-register__cta-section {
  padding: 80px 20px;
  text-align: center;
}

.page-register__cta-section .page-register__section-description {
  margin-bottom: 50px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-register__hero-section {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px;
  }

  .page-register__hero-content {
    max-width: 100%;
  }

  .page-register__hero-title {
    font-size: 2.8em;
  }

  .page-register__hero-description {
    font-size: 1.1em;
  }

  .page-register__hero-image-wrapper {
    max-width: 100%;
    margin-top: 40px;
  }

  .page-register__process-steps,
  .page-register__benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  /* Mobile padding for main content */
  .page-register__container {
    padding: 20px 15px;
  }

  .page-register__section-title {
    font-size: 2em;
    margin-bottom: 15px;
  }

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

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

  .page-register__hero-title {
    font-size: 2.2em;
  }

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

  .page-register__hero-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-register__btn-primary,
  .page-register__btn-secondary,
  .page-register a[class*="button"],
  .page-register 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-left: 15px;
    padding-right: 15px;
  }
  
  .page-register__hero-buttons,
  .page-register__app-download-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-register__process-steps,
  .page-register__benefits-grid {
    grid-template-columns: 1fr; /* Single column layout */
    gap: 20px;
  }

  .page-register__step-card,
  .page-register__benefit-card {
    padding: 20px;
  }

  .page-register__step-image,
  .page-register__benefit-icon,
  .page-register__hero-image {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    min-width: 200px; /* Ensure minimum size is still met */
    min-height: 200px; /* Ensure minimum size is still met */
    box-sizing: border-box;
  }

  /* All containing elements for images/videos/buttons must also be responsive */
  .page-register__section,
  .page-register__card,
  .page-register__container,
  .page-register__hero-section,
  .page-register__process-section,
  .page-register__benefits-section,
  .page-register__why-choose-us,
  .page-register__download-app-section,
  .page-register__faq-section,
  .page-register__cta-section,
  .page-register__hero-image-wrapper,
  .page-register__process-steps,
  .page-register__benefits-grid,
  .page-register__faq-list {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent content overflow */
  }

  /* Adjust padding for sections in mobile to give some breathing room */
  .page-register__process-section,
  .page-register__benefits-section,
  .page-register__why-choose-us,
  .page-register__download-app-section,
  .page-register__faq-section,
  .page-register__cta-section {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

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

/* Ensure no filter on images */
.page-register img {
  filter: none !important;
}

/* Specific button colors from custom palette */
.page-register__btn-primary {
  background-color: #C30808;
  color: #FFFF00;
  border-color: #C30808;
}

.page-register__btn-primary:hover {
  background-color: #a30606;
  border-color: #a30606;
}

/* Ensure contrast for all text elements */
.page-register__dark-bg .page-register__step-text,
.page-register__dark-bg .page-register__benefit-text {
  color: #f0f0f0; /* Lighter text for dark background */
}

.page-register__light-bg .page-register__step-text,
.page-register__light-bg .page-register__benefit-text {
  color: #555555; /* Darker text for light background */
}

.page-register__faq-answer p {
  color: #555555; /* Ensure FAQ answer text is dark on light background */
}