/* style/login.css */

/* Base styles for the page-login scope */
.page-login {
  font-family: Arial, sans-serif;
  color: var(--text-main); /* Default text color for dark background */
  background-color: var(--background); /* Overall dark background */
  line-height: 1.6;
  padding-bottom: 50px; /* Ensure space above footer */
}

/* Custom properties from the palette */
.page-login {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --button-gradient: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow-color: #57E38D;
  --gold-color: #F2C14E;
  --divider-color: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* General container for content alignment */
.page-login__container {
  width: 100%; /* Ensure width is 100% for desktop */
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Section styling */
.page-login__hero-section,
.page-login__benefits-section,
.page-login__how-to-login-section,
.page-login__troubleshooting-section,
.page-login__security-rg-section,
.page-login__faq-section,
.page-login__cta-bottom-section {
  padding: 60px 0;
  text-align: center;
}

/* Specific section backgrounds */
.page-login__dark-section {
  background-color: var(--background);
}

.page-login__hero-section {
  padding-top: 10px; /* Small top padding, body handles --header-offset */
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 600px; /* Ensure hero section has a decent height */
  overflow: hidden; /* For image positioning */
  background-color: var(--deep-green); /* Fallback background */
}

.page-login__hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 675px; /* Limit height of the image wrapper */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.page-login__hero-content {
  position: relative; /* Ensure content is above the image but not overlapping it */
  z-index: 10;
  max-width: 800px;
  padding: 40px 20px;
  background-color: rgba(8, 22, 15, 0.8); /* Semi-transparent background for readability */
  border-radius: 10px;
  margin-top: 20px; /* Space between image and content */
}

.page-login__main-title {
  font-size: clamp(2.2rem, 4vw, 3.5rem); /* Responsive H1 font size */
  color: var(--text-main);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

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

.page-login__section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--text-main);
  font-weight: 600;
  margin-bottom: 20px;
}

.page-login__section-description {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 40px auto;
}

.page-login__sub-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--text-main);
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
}

.page-login__paragraph {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

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

.page-login__btn-primary,
.page-login__btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
  box-sizing: border-box;
  max-width: 100%; /* Ensure buttons don't overflow */
  white-space: normal; /* Allow text to wrap */
  word-wrap: break-word;
}

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

.page-login__btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-login__btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-login__btn-secondary:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-login__text-link {
  color: var(--gold-color);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__text-link:hover {
  color: var(--glow-color);
  text-decoration: underline;
}

/* Benefits Section */
.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(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-login__benefit-icon {
  width: 100%; /* Ensure image fills card width */
  max-width: 250px; /* Max size for icon-like images */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__benefit-title {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__benefit-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

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

.page-login__step-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-login__step-number {
  background-color: var(--gold-color);
  color: #000000; /* Black text for gold background for contrast */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.page-login__step-title {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__step-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.page-login__step-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  margin-top: auto; /* Push image to bottom if content varies */
}

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

.page-login__issue-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  text-align: left;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.page-login__issue-icon {
  width: 100%;
  max-width: 250px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

.page-login__issue-title {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__issue-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Security and Responsible Gaming Section */
.page-login__security-rg-section {
  text-align: left;
}

.page-login__security-rg-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  margin-top: 40px;
}

.page-login__security-rg-text {
  flex: 2;
}

.page-login__security-rg-image {
  flex: 1;
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* FAQ Section */
.page-login__faq-list {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.page-login__faq-item {
  background-color: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--deep-green);
  border-bottom: 1px solid var(--divider-color);
  transition: background-color 0.3s ease;
}

.page-login__faq-question:hover {
  background-color: var(--primary-color);
}

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

.page-login__faq-toggle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-left: 15px;
  color: var(--gold-color);
}

.page-login__faq-answer {
  padding: 0 25px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  color: var(--text-secondary);
}

.page-login__faq-answer p {
  padding-top: 15px;
  padding-bottom: 15px;
  margin: 0;
}

/* For <details> tag, override default styles */
.page-login__faq-item[open] .page-login__faq-answer {
  max-height: 2000px; /* Sufficiently large to show content */
  padding-bottom: 25px;
}

.page-login__faq-item summary {
  list-style: none; /* Remove default marker */
}

.page-login__faq-item summary::-webkit-details-marker {
  display: none; /* Remove default marker for Webkit browsers */
}

/* Mobile responsiveness */
@media (max-width: 1024px) {
  .page-login__hero-content {
    padding: 30px 15px;
  }
  .page-login__security-rg-content {
    flex-direction: column;
    align-items: center;
  }
  .page-login__security-rg-image {
    margin-top: 30px;
    max-width: 100%;
  }
}

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

  /* Force responsive for all images */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Force responsive for all video elements (if any) */
  .page-login video,
  .page-login__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Force responsive for all containers that might hold images/videos/buttons */
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__hero-section,
  .page-login__benefits-section,
  .page-login__how-to-login-section,
  .page-login__troubleshooting-section,
  .page-login__security-rg-section,
  .page-login__faq-section,
  .page-login__cta-bottom-section,
  .page-login__hero-content,
  .page-login__benefits-grid,
  .page-login__benefit-card,
  .page-login__steps-grid,
  .page-login__step-card,
  .page-login__troubleshooting-grid,
  .page-login__issue-card,
  .page-login__security-rg-content,
  .page-login__faq-list,
  .page-login__faq-item,
  .page-login__cta-buttons,
  .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; /* Prevent horizontal scroll */
  }

  /* Ensure buttons adapt */
  .page-login__cta-buttons {
    flex-direction: column; /* Stack buttons vertically */
    gap: 15px;
  }
  
  .page-login__btn-primary,
  .page-login__btn-secondary,
  .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-left: 15px;
    padding-right: 15px;
  }

  .page-login__hero-section {
    padding-top: 10px !important; /* Small top padding for mobile */
    min-height: auto;
  }
  
  .page-login__hero-image-wrapper {
    max-height: 400px; /* Adjust hero image height for mobile */
  }

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

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

  .page-login__benefit-card,
  .page-login__step-card,
  .page-login__issue-card {
    padding: 20px;
  }

  .page-login__faq-question {
    padding: 15px 20px;
    font-size: 1rem;
  }

  .page-login__faq-answer {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Ensure all text elements use text-main or text-secondary */
.page-login h1, .page-login h2, .page-login h3, .page-login h4, .page-login h5, .page-login h6 {
  color: var(--text-main);
}
.page-login p, .page-login li {
  color: var(--text-secondary);
}
.page-login__faq-qtext {
  color: var(--text-main);
}
.page-login__faq-answer p {
  color: var(--text-secondary);
}