/* style/login.css */

:root {
  --bmw55-primary-color: #F2C14E;
  --bmw55-secondary-color: #FFD36B;
  --bmw55-background-color: #0A0A0A;
  --bmw55-card-background: #111111;
  --bmw55-text-main: #FFF6D6;
  --bmw55-border-color: #3A2A12;
  --bmw55-glow-color: #FFD36B;
  --bmw55-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --header-offset: 120px; /* Default for desktop, adjusted by shared.css media queries */
}

.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--bmw55-text-main); /* Default text color for the page */
  background-color: var(--bmw55-background-color); /* Main background */
  line-height: 1.6;
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.page-login__hero-section {
  background: var(--bmw55-background-color);
  padding-top: var(--header-offset, 120px); /* Ensures content is not hidden by fixed header */
  padding-bottom: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px; /* Ensure sufficient height for hero */
  position: relative;
  overflow: hidden;
}

.page-login__hero-content {
  text-align: center;
  max-width: 800px;
  margin-bottom: 40px;
  z-index: 1;
}

.page-login__main-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--bmw55-secondary-color);
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

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

.page-login__login-card {
  background: var(--bmw55-card-background);
  border: 1px solid var(--bmw55-border-color);
  border-radius: 10px;
  padding: 40px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  text-align: center;
  z-index: 2;
}

.page-login__login-card-title {
  font-size: 2rem;
  color: var(--bmw55-secondary-color);
  margin-bottom: 30px;
}

.page-login__form-group {
  margin-bottom: 20px;
  text-align: left;
}

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--bmw55-text-main);
  font-size: 0.95rem;
}

.page-login__form-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--bmw55-border-color);
  border-radius: 5px;
  background-color: #1a1a1a;
  color: var(--bmw55-text-main);
  font-size: 1rem;
  box-sizing: border-box;
}

.page-login__form-input::placeholder {
  color: rgba(255, 246, 214, 0.6);
}

.page-login__form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

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

.page-login__checkbox {
  margin-right: 8px;
  accent-color: var(--bmw55-primary-color);
}

.page-login__checkbox-label {
  color: var(--bmw55-text-main);
  font-size: 0.9rem;
}

.page-login__forgot-password-link {
  color: var(--bmw55-primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.page-login__forgot-password-link:hover {
  color: var(--bmw55-glow-color);
}

.page-login__btn-primary {
  display: block;
  width: 100%;
  padding: 15px 25px;
  border: none;
  border-radius: 5px;
  background: var(--bmw55-button-gradient);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-primary:hover {
  background: linear-gradient(180deg, #DDA11D 0%, #FFD86A 100%);
  transform: translateY(-2px);
}

.page-login__register-text {
  color: var(--bmw55-text-main);
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.page-login__btn-secondary {
  display: block;
  width: 100%;
  padding: 15px 25px;
  border: 1px solid var(--bmw55-primary-color);
  border-radius: 5px;
  background: transparent;
  color: var(--bmw55-primary-color);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__btn-secondary:hover {
  background-color: var(--bmw55-primary-color);
  color: #ffffff;
  transform: translateY(-2px);
}

/* General Section Styles */
.page-login__benefits-section,
.page-login__device-access-section,
.page-login__troubleshooting-section,
.page-login__security-section,
.page-login__explore-games-section,
.page-login__faq-section,
.page-login__cta-section {
  padding: 80px 0;
  background-color: var(--bmw55-background-color);
}

.page-login__section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--bmw55-primary-color);
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.2;
}

.page-login__section-description {
  font-size: 1.05rem;
  color: var(--bmw55-text-main);
  text-align: center;
  max-width: 900px;
  margin: 0 auto 50px auto;
}

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

.page-login__benefit-item,
.page-login__device-item,
.page-login__troubleshoot-item,
.page-login__security-item {
  background: var(--bmw55-card-background);
  border: 1px solid var(--bmw55-border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.page-login__benefit-item:hover,
.page-login__device-item:hover,
.page-login__troubleshoot-item:hover,
.page-login__security-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.page-login__benefit-icon,
.page-login__security-icon {
  width: 200px; /* Minimum size */
  height: auto;
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-login__device-image {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 5px;
}

.page-login__benefit-title,
.page-login__device-title,
.page-login__troubleshoot-title,
.page-login__security-title {
  font-size: 1.5rem;
  color: var(--bmw55-secondary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

.page-login__benefit-text,
.page-login__device-text,
.page-login__troubleshoot-text,
.page-login__security-text {
  font-size: 0.95rem;
  color: var(--bmw55-text-main);
}

/* CTA Support */
.page-login__cta-support {
  text-align: center;
  margin-top: 60px;
}

.page-login__cta-support-text {
  font-size: 1.1rem;
  color: var(--bmw55-text-main);
  margin-bottom: 20px;
}

/* Game Categories */
.page-login__game-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-login__game-card {
  background: var(--bmw55-card-background);
  border: 1px solid var(--bmw55-border-color);
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  text-decoration: none;
  color: var(--bmw55-text-main);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.page-login__game-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  background: rgba(242, 193, 78, 0.1);
}

.page-login__game-icon {
  width: 30px; /* Allowed small icon size */
  height: 30px; /* Allowed small icon size */
  margin-bottom: 15px;
  filter: drop-shadow(0 0 5px var(--bmw55-glow-color));
}

.page-login__game-title {
  font-size: 1.4rem;
  color: var(--bmw55-secondary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-login__game-text {
  font-size: 0.9rem;
  color: var(--bmw55-text-main);
}

/* FAQ Section */
.page-login__faq-list {
  margin-top: 40px;
}

.page-login__faq-item {
  background: var(--bmw55-card-background);
  border: 1px solid var(--bmw55-border-color);
  border-radius: 8px;
  margin-bottom: 15px;
  overflow: hidden;
}

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

.page-login__faq-question:hover {
  background-color: rgba(242, 193, 78, 0.05);
}

.page-login__faq-question h3 {
  margin: 0;
  color: var(--bmw55-text-main);
  font-size: 1.1rem;
  font-weight: 600;
}

.page-login__faq-toggle {
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--bmw55-primary-color);
  transition: transform 0.3s ease;
  line-height: 1;
}

.page-login__faq-item.active .page-login__faq-toggle {
  transform: rotate(0deg); /* No rotation for minus sign */
}

.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--bmw55-text-main);
  font-size: 0.95rem;
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 1000px !important; /* Sufficiently large to show all content */
  padding: 15px 25px 25px 25px;
}

.page-login__faq-answer p {
  margin: 0;
}

/* Final CTA Section */
.page-login__cta-section {
  text-align: center;
  padding-bottom: 100px;
}

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

.page-login__btn-large {
  padding: 18px 35px;
  font-size: 1.2rem;
  min-width: 280px;
}

/* Image styles */
.page-login img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .page-login__hero-content {
    margin-bottom: 30px;
  }

  .page-login__hero-section {
    flex-direction: column;
    padding-bottom: 60px;
  }

  .page-login__login-card {
    max-width: 400px;
    padding: 30px;
  }

  .page-login__benefits-section,
  .page-login__device-access-section,
  .page-login__troubleshooting-section,
  .page-login__security-section,
  .page-login__explore-games-section,
  .page-login__faq-section,
  .page-login__cta-section {
    padding: 60px 0;
  }

  .page-login__section-description {
    margin-bottom: 40px;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 100px) !important; /* Mobile specific padding top */
    padding-bottom: 40px;
    min-height: auto;
  }

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

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

  .page-login__login-card {
    padding: 25px;
    margin: 0 15px;
  }

  .page-login__login-card-title {
    font-size: 1.7rem;
  }

  .page-login__btn-primary,
  .page-login__btn-secondary {
    font-size: 1rem;
    padding: 12px 20px;
  }

  .page-login__benefits-section,
  .page-login__device-access-section,
  .page-login__troubleshooting-section,
  .page-login__security-section,
  .page-login__explore-games-section,
  .page-login__faq-section,
  .page-login__cta-section {
    padding: 40px 0;
  }

  .page-login__section-title {
    font-size: clamp(1.8rem, 7vw, 2.2rem);
    margin-bottom: 15px;
  }

  .page-login__section-description {
    font-size: 0.95rem;
    margin-bottom: 30px;
  }

  .page-login__benefits-grid,
  .page-login__device-grid,
  .page-login__troubleshoot-grid,
  .page-login__security-grid,
  .page-login__game-categories {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__benefit-item,
  .page-login__device-item,
  .page-login__troubleshoot-item,
  .page-login__security-item,
  .page-login__game-card {
    padding: 20px;
  }

  .page-login__benefit-icon,
  .page-login__security-icon,
  .page-login__device-image {
    width: 100% !important; /* Ensure image responsive */
    max-width: 100% !important;
    height: auto !important;
  }

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding: 0 15px;
  }

  .page-login__btn-large {
    min-width: unset;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__cta-buttons,
  .page-login__button-group,
  .page-login__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-login__faq-question,
  .page-login__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .page-login__faq-item.active .page-login__faq-answer {
    padding-left: 15px;
    padding-right: 15px;
    padding-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .page-login__login-card {
    margin: 0 10px;
  }

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

  .page-login__forgot-password-link {
    align-self: flex-end;
  }

  .page-login__btn-large {
    padding: 15px 20px;
  }
}