/* style/login.css */

/* Custom properties for colors */
:root {
  --primary-color: #017439; /* Main brand color (dark green) */
  --secondary-color: #FFFFFF; /* Auxiliary color (white) */
  --login-button-bg: #C30808; /* Specific color for login button (red) */
  --login-button-text: #FFFF00; /* Specific color for login button text (yellow) */
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --border-color: #e0e0e0;
  --form-input-bg: #f9f9f9;
  --form-input-border: #ccc;
  --link-color: #007bff; /* Default link color, adjust if needed for contrast */
}

/* Base styles for the page content, ensuring proper text color against white body background */
.page-login {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark); /* Default text color for light background */
  background-color: var(--secondary-color); /* Matches body background from shared.css */
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  background: linear-gradient(135deg, var(--primary-color) 0%, #004d26 100%); /* Darker gradient for hero */
  color: var(--text-color-light); /* Light text on dark background */
}

.page-login__hero-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.page-login__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

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

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 600px; /* Constrain content width */
}

.page-login__main-title {
  font-size: 2.5em;
  margin-bottom: 20px;
  color: var(--login-button-text); /* Using yellow for main title on dark background */
}

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

.page-login__form-wrapper {
    background: var(--secondary-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px; /* Max width for the form */
    margin: 20px auto 0; /* Center the form below hero content */
    color: var(--text-color-dark); /* Dark text on white form background */
}

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

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--form-input-border);
  border-radius: 5px;
  background-color: var(--form-input-bg);
  font-size: 1em;
  box-sizing: border-box;
  color: var(--text-color-dark);
}

.page-login__form-input::placeholder {
    color: #888;
}

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

.page-login__checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-login__checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
}

.page-login__checkbox-label {
    cursor: pointer;
}

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

.page-login__forgot-password:hover {
  color: #004d26;
  text-decoration: underline;
}

.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  box-sizing: border-box; /* Ensure padding doesn't increase total width */
  text-align: center;
  border: none;
  cursor: pointer;
}

.page-login__btn-login {
  background: var(--login-button-bg); /* Specific red for login button */
  color: var(--login-button-text); /* Specific yellow for login button text */
}

.page-login__btn-login:hover {
  background: #a30606; /* Slightly darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__register-prompt {
    margin-top: 20px;
    font-size: 0.95em;
    text-align: center;
}

.page-login__register-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.page-login__register-link:hover {
    text-decoration: underline;
}

.page-login__alternative-login {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.page-login__alternative-login p {
    margin-bottom: 15px;
    color: #666;
}

.page-login__social-login-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.page-login__social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    color: var(--text-color-light);
    transition: background-color 0.3s ease;
    min-width: 120px;
}

.page-login__social-btn--facebook {
    background-color: #3b5998;
}

.page-login__social-btn--facebook:hover {
    background-color: #2d4373;
}

.page-login__social-btn--google {
    background-color: #dd4b39;
}

.page-login__social-btn--google:hover {
    background-color: #c23321;
}

/* General Content Sections */
.page-login__content-section {
  padding: 80px 20px;
  text-align: center;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-login__section-title {
  font-size: 2.2em;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-login__section-description {
  font-size: 1.1em;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Light Background Section */
.page-login__light-bg {
  background-color: var(--secondary-color); /* White background */
  color: var(--text-color-dark); /* Dark text */
}

/* Dark Background Section */
.page-login__dark-bg {
  background-color: var(--primary-color); /* Dark green background */
  color: var(--text-color-light); /* Light text */
}
.page-login__dark-bg .page-login__section-title {
    color: var(--login-button-text); /* Yellow title on dark green */
}
.page-login__dark-bg .page-login__section-description {
    color: var(--text-color-light);
}

/* Benefits Section */
.page-login__benefits-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

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

.page-login__benefit-card {
  background: var(--secondary-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
}

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

.page-login__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px; /* Enforce min size */
  min-height: 200px; /* Enforce min size */
}

.page-login__card-title {
  font-size: 1.4em;
  margin-bottom: 15px;
  color: var(--primary-color); /* Dark green title */
}

.page-login__card-text {
  font-size: 1em;
  line-height: 1.7;
  color: #555;
}

/* CTA Buttons */
.page-login__cta-section {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* Allow wrapping for multiple buttons */
}

.page-login__cta-button.page-login__btn-primary {
  background: var(--primary-color);
  color: var(--text-color-light);
  border: 2px solid transparent;
}

.page-login__cta-button.page-login__btn-primary:hover {
  background: #004d26;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-login__cta-button.page-login__btn-secondary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.page-login__cta-button.page-login__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Security Info Section */
.page-login__security-info {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-login__security-list {
    list-style: none;
    padding: 0;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: left;
}

.page-login__security-item {
    background: rgba(255, 255, 255, 0.1); /* Slightly transparent white on dark green */
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    color: var(--text-color-light);
}

.page-login__security-item h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: var(--login-button-text); /* Yellow for feature titles */
}

.page-login__security-item p {
    font-size: 0.95em;
    line-height: 1.7;
    color: #f0f0f0; /* Slightly off-white for body text */
}

/* Troubleshooting Section */
.page-login__troubleshooting-section {
    padding-top: 60px;
    padding-bottom: 60px;
}

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

.page-login__troubleshooting-card {
    background: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
    color: var(--text-color-dark);
}

.page-login__troubleshooting-card .page-login__card-title {
    color: var(--primary-color);
    font-size: 1.3em;
}

.page-login__link-text {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    margin-top: 15px;
    display: inline-block;
}

.page-login__link-text:hover {
    text-decoration: underline;
}

.page-login__contact-support-prompt {
    margin-top: 50px;
    font-size: 1.1em;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #444;
}

/* Register Callout Section */
.page-login__register-callout {
    padding-top: 60px;
    padding-bottom: 60px;
}
.page-login__register-callout .page-login__cta-button {
    margin-top: 0; /* Adjust margin for multiple buttons */
}


/* Mobile Access Section */
.page-login__mobile-access {
    padding-top: 60px;
    padding-bottom: 60px;
}

.page-login__mobile-flex-container {
    display: flex;
    align-items: center;
    gap: 50px;
    text-align: left;
}

.page-login__mobile-text-content {
    flex: 1;
}

.page-login__mobile-text-content .page-login__section-title {
    text-align: left;
}

.page-login__mobile-text-content .page-login__section-description {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

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

.page-login__mobile-features li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    color: #555;
    font-size: 1em;
}

.page-login__mobile-features li p {
    margin: 0;
    padding-left: 10px;
    position: relative;
}

.page-login__mobile-features li p::before {
    content: '✅';
    position: absolute;
    left: -15px;
    top: 0;
    font-size: 1.2em;
}

.page-login__mobile-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-login__mobile-app-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px; /* Enforce min size */
    min-height: 200px; /* Enforce min size */
}

/* Responsible Gaming Section */
.page-login__responsible-gaming-callout {
    padding-top: 60px;
    padding-bottom: 60px;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .page-login__main-title {
        font-size: 2em;
    }
    .page-login__section-title {
        font-size: 1.8em;
    }
    .page-login__hero-description,
    .page-login__section-description {
        font-size: 1em;
    }
    .page-login__cta-button {
        padding: 12px 30px;
        font-size: 1em;
    }
    .page-login__grid-container,
    .page-login__security-list,
    .page-login__troubleshooting-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .page-login__mobile-flex-container {
        flex-direction: column;
        text-align: center;
    }
    .page-login__mobile-text-content .page-login__section-title,
    .page-login__mobile-text-content .page-login__section-description {
        text-align: center;
    }
    .page-login__mobile-features {
        text-align: left; /* Keep feature list left-aligned */
        margin-left: auto;
        margin-right: auto;
        max-width: 400px;
    }
    .page-login__mobile-features li p::before {
        left: -20px;
    }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 120px) !important; /* Mobile header offset */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__hero-image img {
    border-radius: 4px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-login__main-title {
    font-size: 1.8em;
  }

  .page-login__hero-description {
    font-size: 0.95em;
  }

  .page-login__form-wrapper {
      padding: 20px;
      max-width: 100%;
  }

  .page-login__login-form {
      gap: 10px;
  }

  .page-login__form-input {
      padding: 10px 12px;
  }

  .page-login__form-options {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
  }

  .page-login__cta-button {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    margin-top: 15px;
  }

  .page-login__social-login-buttons {
    flex-direction: column;
    gap: 10px;
  }
  .page-login__social-btn {
    width: 100%;
    max-width: 100%;
  }

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

  .page-login__section-title {
    font-size: 1.6em;
    margin-bottom: 15px;
  }

  .page-login__section-description {
    font-size: 0.9em;
    margin-bottom: 30px;
  }

  .page-login__grid-container,
  .page-login__security-list,
  .page-login__troubleshooting-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__card-image {
    height: auto; /* Allow height to adjust on mobile */
    max-width: 100% !important;
    width: 100% !important;
    min-width: 200px !important;
    min-height: 200px !important;
  }

  .page-login__card-title {
    font-size: 1.2em;
  }

  .page-login__cta-section {
    flex-direction: column;
    gap: 15px;
  }
  .page-login__cta-section .page-login__cta-button {
      width: 100%;
  }

  /* General image and container responsive rules */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__form-wrapper,
  .page-login__social-login-buttons {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__container {
      padding-left: 0;
      padding-right: 0;
  }
  .page-login__security-item,
  .page-login__troubleshooting-card,
  .page-login__benefit-card {
      padding-left: 20px;
      padding-right: 20px;
  }

  .page-login__mobile-flex-container {
      flex-direction: column;
      gap: 30px;
  }
  .page-login__mobile-text-content .page-login__section-title,
  .page-login__mobile-text-content .page-login__section-description {
      text-align: center;
  }
  .page-login__mobile-features {
      text-align: left;
      margin-left: auto;
      margin-right: auto;
  }
}