/* style/register.css */

/* Custom Color Variables */
:root {
  --hb88-primary: #11A84E;
  --hb88-secondary: #22C768;
  --hb88-button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --hb88-card-bg: #11271B;
  --hb88-background: #08160F; /* Assuming this is the body background, implies dark background */
  --hb88-text-main: #F2FFF6;
  --hb88-text-secondary: #A7D9B8;
  --hb88-border: #2E7A4E;
  --hb88-glow: #57E38D;
  --hb88-gold: #F2C14E;
  --hb88-divider: #1E3A2A;
  --hb88-deep-green: #0A4B2C;
}

/* Base styles for the page-register scope */
.page-register {
  font-family: Arial, sans-serif;
  color: var(--hb88-text-main); /* Light text for dark background */
  background-color: var(--hb88-background); /* Explicitly setting background to ensure contrast */
  line-height: 1.6;
  font-size: 1rem;
}

/* General section styling */
.page-register__section {
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden; /* Prevent content overflow */
}

.page-register__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px; /* Add padding to prevent content from touching edges */
  box-sizing: border-box;
}

.page-register__section-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--hb88-text-main);
  line-height: 1.2;
}

.page-register__section-description {
  font-size: 1.15rem;
  color: var(--hb88-text-secondary);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Section */
.page-register__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0;
  padding-bottom: 60px; /* Adjust as needed */
  background-color: var(--hb88-deep-green); /* Example background for hero */
  overflow: hidden;
}

.page-register__hero-image-wrapper {
  width: 100%;
  max-height: 675px; /* Max height for common aspect ratios */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px; /* Space between image and text */
}

.page-register__hero-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.page-register__hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 15px;
}

.page-register__main-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem); /* Use clamp for H1 font size */
  font-weight: 700;
  color: var(--hb88-gold); /* Gold for prominent titles */
  margin-bottom: 20px;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.page-register__hero-description {
  font-size: 1.25rem;
  color: var(--hb88-text-main);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-register__btn-primary {
  background: var(--hb88-button-gradient);
  color: #ffffff; /* White text for contrast */
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-register__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-register__btn-secondary {
  background: transparent;
  color: var(--hb88-text-main);
  border: 2px solid var(--hb88-border);
}

.page-register__btn-secondary:hover {
  background: rgba(var(--hb88-border), 0.1);
  transform: translateY(-2px);
  color: var(--hb88-glow);
}

.page-register__btn-large {
  padding: 18px 40px;
  font-size: 1.25rem;
}

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

/* Why Join Section */
.page-register__why-join {
  background-color: var(--hb88-background);
}

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

.page-register__feature-card {
  background-color: var(--hb88-card-bg);
  border-radius: 12px;
  padding: 30px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border: 1px solid var(--hb88-border);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-register__feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.page-register__feature-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--hb88-glow);
}

.page-register__feature-text {
  font-size: 1rem;
  color: var(--hb88-text-secondary);
}

/* Register Steps Section */
.page-register__register-steps {
  background-color: var(--hb88-deep-green);
}

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

.page-register__step-item {
  text-align: center;
  background-color: var(--hb88-card-bg);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--hb88-border);
}

.page-register__step-image {
  width: 100%;
  height: auto;
  max-height: 250px; /* Limit height for consistency */
  object-fit: contain; /* Ensure image fits without cropping */
  border-radius: 8px;
  margin-bottom: 25px;
  display: block; /* Ensure block level for margin */
}

.page-register__step-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--hb88-glow);
}

.page-register__step-text {
  font-size: 1rem;
  color: var(--hb88-text-secondary);
}

/* Security Info Section */
.page-register__security-info {
  background-color: var(--hb88-background);
}

.page-register__content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: left;
}

.page-register__text-content {
  flex: 1;
  max-width: 600px;
}

.page-register__security-list {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.page-register__security-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 15px;
  color: var(--hb88-text-secondary);
  font-size: 1.05rem;
}

.page-register__security-item::before {
  content: '✅';
  position: absolute;
  left: 0;
  color: var(--hb88-glow);
  font-size: 1.2rem;
  line-height: 1;
}

.page-register__image-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.page-register__security-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  display: block; /* Ensure block level for proper rendering */
}

/* FAQ Section */
.page-register__faq {
  background-color: var(--hb88-deep-green);
}

.page-register__faq-list {
  margin-top: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-register__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--hb88-text-main);
  cursor: pointer;
  background-color: var(--hb88-card-bg); /* Ensure background for summary */
  list-style: none; /* Remove default marker */
}

.page-register__faq-question::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit browsers */
}

.page-register__faq-item[open] .page-register__faq-question {
  background-color: var(--hb88-deep-green);
  color: var(--hb88-glow);
}

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

.page-register__faq-toggle {
  font-size: 1.8rem;
  line-height: 1;
  margin-left: 15px;
  color: var(--hb88-glow);
}

.page-register__faq-item[open] .page-register__faq-toggle {
  color: var(--hb88-text-main);
}

.page-register__faq-answer {
  padding: 0 25px 20px 25px;
  font-size: 1rem;
  color: var(--hb88-text-secondary);
  text-align: left;
}

/* Final CTA Section */
.page-register__final-cta {
  background-color: var(--hb88-deep-green);
  padding: 80px 20px;
}

/* Responsive adjustments */
@media (min-width: 769px) {
  .page-register__content-wrapper {
    flex-direction: row;
  }
  .page-register__text-content {
    padding-right: 40px;
  }
  .page-register__image-content {
    padding-left: 40px;
  }
}

@media (max-width: 768px) {
  .page-register__section {
    padding: 40px 15px;
  }

  .page-register__section-title {
    font-size: 1.8rem;
  }

  .page-register__section-description {
    font-size: 1rem;
  }

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

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

  /* Images responsive */
  .page-register img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* All containers with images/content */
  .page-register__section,
  .page-register__card,
  .page-register__container,
  .page-register__hero-section,
  .page-register__hero-image-wrapper,
  .page-register__content-wrapper,
  .page-register__steps-grid,
  .page-register__features-grid {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Buttons responsive */
  .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__cta-center {
    flex-direction: column; /* Stack buttons vertically on mobile */
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }

  /* FAQ specific mobile adjustments */
  .page-register__faq-question {
    font-size: 1rem;
    padding: 15px 20px;
  }

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

  .page-register__faq-toggle {
    font-size: 1.5rem;
  }

  .page-register__hero-section {
    padding-top: 10px !important; /* Small top padding for hero on mobile, body handles header */
  }
}