/* style/login.css */
:root {
  --primary-color: #003366;
  --secondary-color: #FFD700;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f9f9f9;
  --bg-dark: #002244;
  --border-color: #e0e0e0;
}

.page-login {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light); /* Default light background from shared.css */
}

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

.page-login__hero-section {
  position: relative;
  padding: 80px 0;
  padding-top: var(--header-offset, 120px); /* Ensures content is below sticky header */
  background: var(--primary-color);
  color: var(--text-light);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 600px;
  background-image: url('[GALLERY:hero:1920x1080:bj88,login_hero,interface,dark_blue,gold]');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.page-login__hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Dark overlay for text readability */
  z-index: 0;
}

.page-login__hero-section .page-login__container {
  position: relative;
  z-index: 1;
}

.page-login__main-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-login__description {
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e0e0;
}

.page-login__form-wrapper {
  background: rgba(0, 0, 0, 0.7);
  padding: 40px;
  border-radius: 10px;
  max-width: 450px;
  margin: 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.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;
  font-weight: bold;
  color: var(--text-light);
}

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

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

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

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

.page-login__checkbox {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  accent-color: var(--secondary-color);
}

.page-login__checkbox-label {
  color: #ccc;
}

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

.page-login__forgot-password-link:hover {
  color: #fff;
}

.page-login__btn-primary {
  display: inline-block;
  padding: 15px 30px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-login__btn-primary:hover {
  background: #e6c200;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-login__btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-login__register-cta {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #444;
  text-align: center;
}

.page-login__register-text {
  color: #ccc;
  margin-bottom: 15px;
  font-size: 16px;
}

.page-login__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  background: transparent;
  color: var(--secondary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid var(--secondary-color);
  cursor: pointer;
}

.page-login__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-login__btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* General Section Styles */
.page-login__section-title {
  font-size: 36px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.page-login__section-intro {
  font-size: 18px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: var(--text-dark);
}

.page-login__benefits-section,
.page-login__faq-section,
.page-login__news-section,
.page-login__cta-bottom-section {
  padding: 80px 0;
}

.page-login__benefits-section {
  background-color: var(--bg-light);
}

.page-login__benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

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

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

.page-login__benefit-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-bottom: 20px;
  max-width: 100%; /* Ensure responsiveness */
  height: auto; /* Ensure responsiveness */
}

.page-login__benefit-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.page-login__benefit-description {
  font-size: 16px;
  color: #555;
}

/* FAQ Styles */
.page-login__faq-section {
  background-color: var(--bg-light);
}

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

.page-login__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-login__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-login__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-login__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none;
}

.page-login__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--secondary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-login__faq-item.active .page-login__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Visual change for '-' */
}

.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 25px;
  opacity: 0;
  background: #fcfcfc;
  color: #555;
  font-size: 16px;
}

.page-login__faq-item.active .page-login__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

/* News Section */
.page-login__news-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-login__news-section .page-login__section-title {
  color: var(--secondary-color);
}

.page-login__news-section .page-login__section-intro {
  color: #e0e0e0;
}

.page-login__news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.page-login__news-item {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-login__news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.page-login__news-thumbnail {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  max-width: 100%; /* Ensure responsiveness */
  height: auto; /* Ensure responsiveness */
}

.page-login__news-content {
  padding: 20px;
}

.page-login__news-title {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-login__news-title a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-login__news-title a:hover {
  color: var(--secondary-color);
}

.page-login__news-excerpt {
  font-size: 15px;
  color: #666;
  margin-bottom: 15px;
}

.page-login__news-date {
  font-size: 14px;
  color: #999;
  display: block;
}

.page-login__news-cta {
  margin-top: 50px;
}

/* Bottom CTA Section */
.page-login__cta-bottom-section {
  background-color: var(--bg-light);
  text-align: center;
}

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

/* Responsive Design */
@media (max-width: 1024px) {
  .page-login__main-title {
    font-size: 40px;
  }

  .page-login__section-title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .page-login__hero-section {
    padding: 60px 0;
    padding-top: var(--header-offset, 120px) !important;
    min-height: 500px;
  }

  .page-login__main-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .page-login__description {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-login__form-wrapper {
    padding: 30px 20px;
  }

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

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

  .page-login__btn-primary,
  .page-login__btn-secondary {
    padding: 12px 25px;
    font-size: 16px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-login__register-cta {
    margin-top: 20px;
  }

  .page-login__benefits-section,
  .page-login__faq-section,
  .page-login__news-section,
  .page-login__cta-bottom-section {
    padding: 60px 0;
  }

  .page-login__section-title {
    font-size: 28px;
  }

  .page-login__section-intro {
    font-size: 16px;
    margin-bottom: 30px;
  }

  .page-login__benefits-grid,
  .page-login__news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-login__benefit-item,
  .page-login__news-item {
    padding: 20px;
  }

  .page-login__benefit-icon {
    width: 80px;
    height: 80px;
  }

  .page-login__benefit-title {
    font-size: 20px;
  }

  .page-login__faq-question {
    padding: 15px 20px;
  }

  .page-login__faq-question h3 {
    font-size: 16px;
  }

  .page-login__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .page-login__faq-answer {
    padding: 0 20px;
    font-size: 15px;
  }

  .page-login__faq-item.active .page-login__faq-answer {
    padding: 15px 20px !important;
  }

  .page-login__news-thumbnail {
    height: 180px;
  }

  .page-login__news-title {
    font-size: 18px;
  }

  .page-login__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  /* Ensure all images are responsive */
  .page-login img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Ensure all containers with images are responsive */
  .page-login__container,
  .page-login__hero-section,
  .page-login__benefits-section,
  .page-login__faq-section,
  .page-login__news-section,
  .page-login__cta-bottom-section,
  .page-login__form-wrapper,
  .page-login__benefits-grid,
  .page-login__news-grid,
  .page-login__benefit-item,
  .page-login__news-item,
  .page-login__news-content,
  .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; /* Prevent horizontal scroll */
  }
}

/* Specific overrides for mobile button sizing */
@media (max-width: 768px) {
  .page-login__login-button,
  .page-login__register-button {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 20px !important;
    font-size: 16px !important;
  }
  .page-login__cta-buttons a {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }
  .page-login__cta-buttons {
    gap: 10px; /* Adjust gap for mobile buttons */
  }
}

/* Color Contrast Adjustments */
.page-login__dark-bg {
  background: var(--primary-color);
  color: var(--text-light);
}

.page-login__light-bg {
  background: var(--bg-light);
  color: var(--text-dark);
}

.page-login__news-section .page-login__card {
  background: #ffffff;
  color: var(--text-dark);
}

.page-login__news-section .page-login__news-title a {
  color: var(--primary-color);
}

.page-login__news-section .page-login__news-excerpt {
  color: #666;
}