/* style/login.css */

/* Root variables and base styles from shared.css will handle --header-offset and body padding */

.page-login {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-main); /* Light text on dark background */
  background-color: var(--background);
}

/* --- Hero Section --- */
.page-login__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column; /* Ensure content stacks vertically on top of image */
  align-items: center;
  justify-content: center;
  min-height: 700px;
  padding-top: 10px; /* Small top padding, body handles header offset */
  padding-bottom: 60px;
  overflow: hidden;
  box-sizing: border-box;
}

.page-login__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0; /* Ensure image is behind content */
}

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

.page-login__hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  width: 100%; /* Ensure content takes full width within max-width */
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
  background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay for text readability */
  border-radius: 10px;
  margin-top: 50px; /* Push content down slightly from top of hero */
}

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

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

.page-login__login-form-wrapper {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  margin: 0 auto;
}

.page-login__login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.page-login__form-group {
  text-align: left;
}

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-weight: 600;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background-color: #0A2218; /* Darker input background */
  color: var(--text-main);
  font-size: 1em;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9em;
}

.page-login__forgot-password {
  color: var(--glow);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__forgot-password:hover {
  color: var(--gold);
}

.page-login__remember-me {
  display: flex;
  align-items: center;
  gap: 5px;
}

.page-login__checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  background-color: #0A2218;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.page-login__checkbox:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.page-login__checkbox:checked::before {
  content: '✔';
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.page-login__checkbox-label {
  color: var(--text-secondary);
  cursor: pointer;
}

.page-login__submit-button {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  padding: 14px 25px;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.page-login__submit-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

.page-login__register-prompt {
  margin-top: 25px;
  text-align: center;
  color: var(--text-secondary);
}

.page-login__register-prompt p {
  margin-bottom: 15px;
}

.page-login__register-button {
  display: inline-block;
  background: var(--gold);
  color: #11271B; /* Dark text on gold button */
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1em;
  transition: background 0.3s ease, transform 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.page-login__register-button:hover {
  background: #E0B03E;
  transform: translateY(-2px);
}

/* --- General Section Styles --- */
.page-login__content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: clamp(1.8em, 3vw, 2.5em);
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  margin-bottom: 20px;
}

.page-login__section-description {
  font-size: 1.05em;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__dark-section {
  background-color: var(--background);
  color: var(--text-main);
  padding: 60px 0;
}

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

.page-login__benefit-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__benefit-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-login__benefit-icon {
  width: 100px; /* Adjust size as needed */
  height: auto;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border-radius: 8px; /* Slightly rounded corners for images */
}

.page-login__benefit-title {
  font-size: 1.4em;
  color: var(--glow);
  margin-bottom: 10px;
  font-weight: 600;
}

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

/* --- How To Login Section --- */
.page-login__how-to-login-section {
  padding: 60px 0;
  background-color: #0A1E15; /* Slightly different background for contrast */
}

.page-login__step-by-step-guide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-top: 40px;
}

.page-login__guide-item {
  background-color: var(--card-bg);
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__guide-step-number {
  font-size: 1.3em;
  color: var(--glow);
  margin-bottom: 10px;
  font-weight: 600;
}

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

.page-login__guide-image-wrapper {
  grid-column: 2 / 3; /* Position image on the right for larger screens */
  text-align: center;
}

.page-login__guide-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.page-login__troubleshooting {
  margin-top: 50px;
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__troubleshooting-title {
  font-size: 1.5em;
  color: var(--gold);
  margin-bottom: 20px;
  text-align: center;
}

.page-login__troubleshooting-list {
  list-style-type: none;
  padding: 0;
  text-align: left;
}

.page-login__troubleshooting-list li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
}

.page-login__troubleshooting-list li strong {
  color: var(--text-main);
}

.page-login__troubleshooting-list li::before {
  content: '•';
  color: var(--glow);
  position: absolute;
  left: 0;
  font-size: 1.2em;
  line-height: 1;
}

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

.page-login__promotion-card {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__promotion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-login__promotion-image {
  width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.page-login__promotion-title {
  font-size: 1.3em;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

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

.page-login__promotion-link {
  display: inline-block;
  color: var(--glow);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.page-login__promotion-link:hover {
  color: var(--text-main);
}

.page-login__cta-promotions {
  text-align: center;
  margin-top: 50px;
}

.page-login__view-all-promos-button {
  display: inline-block;
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  padding: 14px 30px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 700;
  transition: background 0.3s ease, transform 0.2s ease;
}

.page-login__view-all-promos-button:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
}

/* --- Security & Responsible Gaming Section --- */
.page-login__security-responsible-gaming-section {
  padding: 60px 0;
  background-color: #0A1E15; /* Consistent with how-to section */
}

.page-login__security-responsible-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
  align-items: center;
}

.page-login__security-item {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.page-login__security-item:nth-child(3) { /* Special styling for responsible gaming item */
  /* On larger screens, this will be reset by media query below */
}

.page-login__security-title {
  font-size: 1.4em;
  color: var(--glow);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-login__security-text {
  color: var(--text-secondary);
  font-size: 0.95em;
  margin-bottom: 15px;
}

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

.page-login__read-more-link:hover {
  color: var(--text-main);
}

.page-login__security-image-wrapper {
  text-align: center;
}

.page-login__security-image {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

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

.page-login__faq-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  font-size: 1.15em;
  color: var(--text-main);
  font-weight: 600;
  cursor: pointer;
  background-color: #11271B; /* Slightly darker background for question */
  transition: background-color 0.3s ease;
  list-style: none; /* For details/summary */
}

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

.page-login__faq-question:hover {
  background-color: #1A3025;
}

.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);
  transition: transform 0.3s ease;
}

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

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

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

.page-login__faq-answer a {
  color: var(--glow);
  text-decoration: none;
  font-weight: 600;
}

.page-login__faq-answer a:hover {
  text-decoration: underline;
}

.page-login__cta-button--small {
  margin-top: 15px;
  padding: 8px 15px;
  font-size: 0.9em;
}

/* --- Call to Action Section --- */
.page-login__cta-section {
  background-color: var(--deep-green);
  padding: 60px 0;
  text-align: center;
}

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

.page-login__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.2em;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  min-width: 200px; /* Ensure buttons have a minimum width */
  box-sizing: border-box;
}

.page-login__cta-button--primary {
  background: var(--gold);
  color: #11271B; /* Dark text on gold */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-login__cta-button--primary:hover {
  background: #E0B03E;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.page-login__cta-button--secondary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--glow); /* Add a subtle border */
}

.page-login__cta-button--secondary:hover {
  background: linear-gradient(180deg, #13994A 0%, #2AD16F 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
  .page-login__hero-content {
    margin-top: 20px;
    padding: 25px;
  }
  .page-login__main-title {
    font-size: clamp(2em, 5vw, 3em);
  }
  .page-login__description {
    font-size: 1em;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    min-height: 600px;
    padding-bottom: 40px;
  }
  .page-login__hero-content {
    margin-top: 0;
    padding: 20px;
  }
  .page-login__main-title {
    font-size: clamp(1.8em, 6vw, 2.5em);
  }
  .page-login__description {
    font-size: 0.95em;
  }
  .page-login__login-form-wrapper {
    padding: 25px;
  }
  .page-login__form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  /* General responsive for content areas */
  .page-login__content-area {
    padding: 30px 15px;
  }
  .page-login__section-title {
    font-size: clamp(1.6em, 5vw, 2.2em);
  }
  .page-login__section-description {
    font-size: 0.9em;
  }

  /* Benefits grid */
  .page-login__benefits-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-login__benefit-item {
    padding: 25px;
  }
  .page-login__benefit-title {
    font-size: 1.2em;
  }

  /* How-to guide */
  .page-login__step-by-step-guide {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-login__guide-image-wrapper {
    grid-column: auto; /* Reset column for mobile */
    order: -1; /* Place image above text steps */
  }
  .page-login__troubleshooting {
    padding: 25px;
  }
  .page-login__troubleshooting-title {
    font-size: 1.3em;
  }

  /* Promotions grid */
  .page-login__promotions-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-login__promotion-card {
    padding: 25px;
  }
  .page-login__promotion-title {
    font-size: 1.2em;
  }

  /* Security & Responsible Gaming */
  .page-login__security-responsible-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .page-login__security-item {
    grid-column: auto; /* Reset column for mobile */
    padding: 25px;
  }
  .page-login__security-image-wrapper {
    order: -1; /* Place image above text */
  }

  /* FAQ */
  .page-login__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-login__faq-answer {
    padding: 0 20px 15px;
    font-size: 0.9em;
  }

  /* CTA buttons */
  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  .page-login__cta-button {
    width: 100%;
    max-width: 100%;
    font-size: 1.1em;
    padding: 12px 20px;
  }

  /* Specific reset for security grid on larger screens */
  @media (min-width: 769px) {
    .page-login__security-item:nth-child(3) {
      grid-column: span 1;
    }
  }
}

/* Image responsive overrides with !important for mobile */
@media (max-width: 768px) {
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__hero-image-wrapper,
  .page-login__benefits-section,
  .page-login__how-to-login-section,
  .page-login__promotions-section,
  .page-login__security-responsible-gaming-section,
  .page-login__faq-section,
  .page-login__cta-section,
  .page-login__card,
  .page-login__content-area,
  .page-login__login-form-wrapper,
  .page-login__step-by-step-guide,
  .page-login__troubleshooting,
  .page-login__promotions-grid,
  .page-login__security-responsible-grid,
  .page-login__faq-list,
  .page-login__cta-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
  .page-login__hero-section {
    padding-top: 10px !important; /* body already handles header offset */
  }

  /* Button responsive overrides with !important for mobile */
  .page-login__cta-button,
  .page-login__submit-button,
  .page-login__register-button,
  .page-login__view-all-promos-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-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__cta-buttons {
    flex-direction: column !important; /* Stack buttons vertically */
    gap: 10px !important;
  }
}

/* Color contrast adjustments based on specified palette and rules */
:root {
  --primary-color: #11A84E;
  --secondary-color: #22C768;
  --card-bg: #11271B;
  --background: #08160F;
  --text-main: #F2FFF6;
  --text-secondary: #A7D9B8;
  --border-color: #2E7A4E;
  --glow: #57E38D;
  --gold: #F2C14E;
  --divider: #1E3A2A;
  --deep-green: #0A4B2C;
}

/* Ensure text contrast for default elements */
.page-login {
  color: var(--text-main); /* Light text on dark background */
}

.page-login__card {
  background-color: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.page-login__dark-section {
  background-color: var(--background);
  color: var(--text-main);
}

.page-login__cta-button--primary {
  background: var(--gold);
  color: #11271B; /* Dark text on gold */
}

.page-login__cta-button--secondary {
  background: linear-gradient(180deg, #2AD16F 0%, #13994A 100%);
  color: #ffffff;
}

/* Ensure all links and interactive elements have good contrast */
.page-login a {
  color: var(--glow); /* Default link color, good contrast */
}
.page-login a:hover {
  color: var(--gold);
}
.page-login__forgot-password {
  color: var(--glow);
}
.page-login__forgot-password:hover {
  color: var(--gold);
}
.page-login__checkbox-label {
  color: var(--text-secondary);
}
.page-login__promotion-link {
  color: var(--glow);
}
.page-login__read-more-link {
  color: var(--gold);
}
.page-login__faq-qtext {
  color: var(--text-main);
}
.page-login__faq-toggle {
  color: var(--glow);
}
.page-login__faq-answer a {
  color: var(--glow);
}