/* style/login.css */

/* Variables for brand colors */
:root {
  --primary-color: #FFD700; /* Gold */
  --secondary-color: #8B0000; /* Dark Red */
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f4f4f4; /* From shared.css body background */
}

/* Base styles for the login page */
.page-login {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark); /* Default text color for light background */
  line-height: 1.6;
  background-color: var(--bg-light); /* Ensure consistency with body background */
}

/* 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); /* Ensure header offset */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-light);
  overflow: hidden; /* Prevent image overflow */
}

.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;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-login__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
}

.page-login__main-title {
  font-size: 2.8em;
  margin-bottom: 20px;
  color: var(--text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.page-login__description {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: rgba(255, 255, 255, 0.9);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.page-login__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--text-dark); /* Gold button with dark text for contrast */
  text-decoration: none;
  border-radius: 5px;
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 20px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-login__cta-button:hover {
  background: #FFC000; /* Slightly lighter gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.page-login__register-prompt {
  margin-top: 20px;
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

.page-login__register-prompt a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: bold;
  transition: color 0.3s ease;
}

.page-login__register-prompt a:hover {
  color: #FFC000;
}

/* General Section Styles */
.page-login__container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.page-login__section-title {
  font-size: 2.2em;
  color: var(--secondary-color); /* Dark red for section titles */
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
}

.page-login__section-title--light {
  color: var(--text-light);
}

/* Form Section */
.page-login__form-section {
  padding: 60px 0;
  background-color: var(--bg-light);
}

.page-login__form {
  background: var(--text-light);
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

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

.page-login__form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: var(--text-dark);
  font-size: 1.1em;
}

.page-login__form-input {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.page-login__form-input:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

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

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

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.page-login__checkbox-label {
  color: var(--text-dark);
}

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

.page-login__forgot-password:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-login__submit-button {
  width: 100%;
  padding: 15px;
  background: var(--secondary-color); /* Dark red button */
  color: var(--text-light);
  border: none;
  border-radius: 5px;
  font-size: 1.2em;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.page-login__submit-button:hover {
  background: #A00000; /* Slightly darker red on hover */
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.page-login__social-login-text {
  text-align: center;
  margin: 30px 0;
  color: #666;
  font-size: 1.1em;
}

.page-login__social-login-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-login__social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease;
  min-width: 180px; /* Ensure buttons are not too small */
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-login__social-button--facebook {
  background: #3b5998;
  color: var(--text-light);
}

.page-login__social-button--facebook:hover {
  background: #2d4373;
  transform: translateY(-2px);
}

.page-login__social-button--google {
  background: #dd4b39;
  color: var(--text-light);
}

.page-login__social-button--google:hover {
  background: #c23321;
  transform: translateY(-2px);
}

.page-login__no-account {
  text-align: center;
  font-size: 1em;
  color: var(--text-dark);
}

.page-login__no-account a {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
}

.page-login__no-account a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

/* Benefits Section */
.page-login__benefits-section {
  padding: 60px 0;
  background: var(--secondary-color); /* Dark red background */
  color: var(--text-light);
  text-align: center;
}

.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: rgba(255, 255, 255, 0.1); /* Semi-transparent white card for contrast */
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

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

.page-login__benefit-card img {
  width: 100%;
  height: auto;
  max-width: 400px; /* Constrain image size within card */
  border-radius: 8px;
  margin-bottom: 20px;
  object-fit: cover;
  min-height: 200px; /* Enforce minimum image size */
  min-width: 200px;
}

.page-login__benefit-title {
  font-size: 1.5em;
  margin-bottom: 15px;
  color: var(--primary-color); /* Gold title for emphasis */
}

.page-login__benefit-description {
  font-size: 1em;
  color: rgba(255, 255, 255, 0.8);
}

/* FAQ Section */
.page-login__faq-section {
  padding: 60px 0;
  background-color: var(--bg-light);
}

.page-login__faq-list {
  max-width: 800px;
  margin: 40px auto 0;
}

/* FAQ容器样式 */
.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--text-light);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* FAQ默认状态 - 答案隐藏 */
.page-login__faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease, opacity 0.4s ease;
  padding: 0 20px; /* Adjusted for consistency */
  opacity: 0;
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 使用!important和足够大的max-height确保一定能展开 */
.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to contain any content */
  padding: 20px !important; /* Adjusted for consistency */
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 5px 5px;
}