/* style/login.css */

/* Variables for consistency */
:root {
  --ph365-primary: #F2C14E;
  --ph365-secondary: #FFD36B;
  --ph365-card-bg: #111111;
  --ph365-text-main: #FFF6D6;
  --ph365-border: #3A2A12;
  --ph365-glow: #FFD36B;
  --ph365-button-gradient: linear-gradient(180deg, #FFD86A 0%, #DDA11D 100%);
  --header-offset: 120px; /* Default for desktop */
}

.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--ph365-text-main); /* Ensure text is visible on dark body background */
  background-color: #0A0A0A; /* Matches body background for consistency */
}

/* Hero Section */
.page-login__hero-section {
  position: relative;
  overflow: hidden;
  padding-bottom: 60px; /* Space below content */
  padding-top: var(--header-offset); /* Desktop header offset, from shared.css */
}

.page-login__hero-image-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.2; /* Subtle background image */
}

.page-login__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6); /* Darken image for better text contrast */
}

.page-login__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.page-login__login-card {
  background-color: var(--ph365-card-bg);
  border-radius: 10px;
  padding: 40px;
  max-width: 450px;
  margin: 60px auto 0; /* Center card below hero image */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--ph365-border);
  text-align: center;
}

.page-login__main-title {
  font-size: 2.8em;
  font-weight: bold;
  color: var(--ph365-secondary);
  margin-bottom: 15px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.page-login__subtitle {
  font-size: 1.1em;
  color: #cccccc;
  margin-bottom: 30px;
  line-height: 1.5;
}

.page-login__login-form {
  text-align: left;
}

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

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

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

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

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

.page-login__checkbox-container {
  display: block;
  position: relative;
  padding-left: 25px;
  cursor: pointer;
  font-size: 0.9em;
  user-select: none;
  color: #cccccc;
}

.page-login__checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.page-login__checkbox-checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: #333333;
  border: 1px solid var(--ph365-border);
  border-radius: 3px;
}

.page-login__checkbox-container input:checked ~ .page-login__checkbox-checkmark {
  background-color: var(--ph365-primary);
  border-color: var(--ph365-primary);
}

.page-login__checkbox-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.page-login__checkbox-container input:checked ~ .page-login__checkbox-checkmark:after {
  display: block;
}

.page-login__checkbox-container .page-login__checkbox-checkmark:after {
  left: 6px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

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

.page-login__forgot-password-link:hover {
  color: var(--ph365-primary);
}

.page-login__submit-button {
  background: var(--ph365-button-gradient);
  color: #ffffff;
  padding: 14px 25px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: bold;
  width: 100%;
  transition: background 0.3s ease, transform 0.2s ease;
  box-sizing: border-box;
  text-decoration: none; /* Make sure it doesn't look like a link itself */
  display: block; /* Ensure it takes full width */
}

.page-login__submit-button:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Nested anchor for promotion link */
.page-login__submit-button-link {
  color: #ffffff;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.page-login__register-prompt, .page-login__download-prompt {
  margin-top: 25px;
  font-size: 0.95em;
  color: #cccccc;
}

.page-login__register-link, .page-login__download-link {
  color: var(--ph365-secondary);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__register-link:hover, .page-login__download-link:hover {
  color: var(--ph365-primary);
}

/* General Section Styling */
.page-login__benefits-section, .page-login__security-section, .page-login__faq-section, .page-login__cta-section {
  padding: 60px 0;
  background-color: #0A0A0A;
}

.page-login__section-title {
  font-size: 2.5em;
  color: var(--ph365-primary);
  text-align: center;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-login__section-description {
  font-size: 1.1em;
  color: #cccccc;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

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

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

.page-login__benefit-item:hover, .page-login__security-item:hover {
  transform: translateY(-5px);
}

.page-login__benefit-icon, .page-login__security-icon {
  width: 100%; /* Ensure images fill card width */
  max-width: 200px; /* Adjust as needed, but not smaller than 200px */
  height: auto;
  margin-bottom: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.page-login__benefit-title, .page-login__security-title {
  font-size: 1.4em;
  color: var(--ph365-secondary);
  margin-bottom: 10px;
  font-weight: bold;
}

.page-login__benefit-text, .page-login__security-text {
  font-size: 1em;
  color: #cccccc;
  line-height: 1.5;
}

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

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

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  cursor: pointer;
  background-color: #111111; /* Card BG */
  color: var(--ph365-text-main);
  font-size: 1.1em;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

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

.page-login__faq-question h3 {
  margin: 0;
  color: inherit;
  font-size: 1.1em; /* Ensure consistent font size */
}

.page-login__faq-toggle {
  font-size: 1.8em;
  line-height: 1;
  transition: transform 0.3s ease;
  color: var(--ph365-secondary);
}

.page-login__faq-item.active .page-login__faq-toggle {
  transform: rotate(45deg); /* Plus sign rotates to form an 'X' or minus */
}

.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 25px;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: #cccccc;
  background-color: #1a1a1a; /* Slightly lighter background for answer */
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 1000px !important; /* Sufficiently large value */
  padding: 20px 25px;
}

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

/* CTA Section */
.page-login__cta-section {
  text-align: center;
  background-color: var(--ph365-card-bg);
  padding: 80px 0;
  border-top: 1px solid var(--ph365-border);
}

.page-login__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-login__btn-primary, .page-login__btn-secondary {
  padding: 15px 30px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
  text-align: center;
}

.page-login__btn-primary {
  background: var(--ph365-button-gradient);
  color: #ffffff;
  border: 2px solid transparent;
}

.page-login__btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.page-login__btn-secondary {
  background: #111111;
  color: var(--ph365-primary);
  border: 2px solid var(--ph365-primary);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 2.2em;
  }
  .page-login__section-title {
    font-size: 2em;
  }
  .page-login__login-card {
    margin-top: 30px;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding-top: var(--header-offset, 100px) !important; /* Mobile header offset */
  }
  .page-login__main-title {
    font-size: 1.8em;
    margin-top: 20px;
  }
  .page-login__subtitle {
    font-size: 1em;
  }
  .page-login__login-card {
    padding: 30px 20px;
    margin: 30px auto 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .page-login__benefits-grid, .page-login__security-features {
    grid-template-columns: 1fr;
  }
  .page-login__benefit-item, .page-login__security-item {
    padding: 25px;
  }
  .page-login__benefit-icon, .page-login__security-icon {
    max-width: 150px;
  }
  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__btn-primary, .page-login__btn-secondary {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-login__faq-question {
    padding: 15px 20px;
    font-size: 1em;
  }
  .page-login__faq-answer {
    padding: 0 20px;
  }
  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px 20px;
  }

  /* Mobile image responsiveness */
  .page-login img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  .page-login__section,
  .page-login__card,
  .page-login__container,
  .page-login__login-card,
  .page-login__benefits-grid,
  .page-login__security-features,
  .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;
  }
  .page-login__hero-image-wrapper {
    left: 0;
    right: 0;
    width: 100%;
  }
  .page-login__hero-image {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-login__login-card {
    margin-left: 0;
    margin-right: 0;
  }
  .page-login__main-title {
    font-size: 1.5em;
  }
  .page-login__section-title {
    font-size: 1.8em;
  }
  .page-login__faq-question h3 {
    font-size: 0.95em;
  }
}