/* style/promotions.css */
:root {
  --primary-color: #017439;
  --secondary-color: #FFFFFF;
  --register-button-bg: #C30808;
  --login-button-bg: #C30808;
  --button-text-color: #FFFF00;
  --text-color-dark: #333333;
  --text-color-light: #ffffff;
  --background-color: #FFFFFF;
  --border-color: #e0e0e0;
}

/* Base styles for the promotions page */
.page-promotions {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: var(--background-color); /* Body background is white */
  padding-top: 0; /* Handled by shared.css body padding, or hero section below */
}

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

.page-promotions__section {
  padding: 60px 0;
  margin-bottom: 20px;
}

.page-promotions__dark-bg {
  background-color: var(--primary-color);
  color: var(--text-color-light);
}

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

.page-promotions__section-title {
  font-size: 32px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 40px;
  color: inherit; /* Inherit color from parent section for contrast */
}

.page-promotions__text-block {
  font-size: 16px;
  margin-bottom: 20px;
}

/* Hero Section */
.page-promotions__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%, #339966 100%); /* Adjusted gradient for better visual */
  color: var(--text-color-light);
  overflow: hidden; /* Prevent image overflow */
}

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

.page-promotions__hero-image {
  width: 100%;
  margin-bottom: 30px;
  max-width: 100%;
  box-sizing: border-box;
}

.page-promotions__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  filter: none; /* Ensure no filter is applied */
}

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

.page-promotions__main-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.2;
  color: var(--text-color-light);
}

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

.page-promotions__cta-group {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.page-promotions__cta-button {
  display: inline-block;
  padding: 15px 40px;
  text-decoration: none;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
  white-space: normal;
  word-wrap: break-word;
}

.page-promotions__cta-button.page-promotions__btn-register {
  background: var(--register-button-bg);
  color: var(--button-text-color);
  border: 2px solid var(--register-button-bg);
}

.page-promotions__cta-button.page-promotions__btn-register:hover {
  background: #a80707;
  border-color: #a80707;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.page-promotions__cta-button.page-promotions__btn-login {
  background: var(--login-button-bg);
  color: var(--button-text-color);
  border: 2px solid var(--login-button-bg);
}

.page-promotions__cta-button.page-promotions__btn-login:hover {
  background: #a80707;
  border-color: #a80707;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Introduction Section */
.page-promotions__introduction .page-promotions__section-title {
  color: var(--primary-color);
}

/* Exclusive Offers Section */
.page-promotions__exclusive-offers .page-promotions__section-title {
  color: var(--text-color-light);
}

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

.page-promotions__card {
  background: var(--background-color);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--text-color-dark);
}

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

.page-promotions__card-image {
  width: 100%;
  height: 200px; /* Fixed height for consistency */
  object-fit: cover;
  display: block;
  filter: none; /* Ensure no filter is applied */
}

.page-promotions__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.page-promotions__card-content p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.page-promotions__card-content .page-promotions__cta-button {
  width: fit-content;
  align-self: flex-start;
  background: var(--primary-color);
  color: var(--text-color-light);
  padding: 10px 25px;
  font-size: 15px;
  border-radius: 6px;
  border: 2px solid var(--primary-color);
}

.page-promotions__card-content .page-promotions__cta-button:hover {
  background: #005f2e;
  border-color: #005f2e;
}

/* Participation Guide Section */
.page-promotions__participation-guide .page-promotions__section-title {
  color: var(--primary-color);
}

.page-promotions__guide-list {
  list-style: none;
  padding: 0;
  margin-top: 40px;
}

.page-promotions__guide-list li {
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.page-promotions__guide-list li:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.page-promotions__guide-list h3 {
  font-size: 20px;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 10px;
}

.page-promotions__guide-list p {
  font-size: 16px;
  line-height: 1.6;
}

.page-promotions__guide-list a {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-promotions__guide-list a:hover {
  color: #005f2e;
}

.page-promotions__cta-center {
  text-align: center;
  margin-top: 40px;
}

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

.page-promotions__cta-center .page-promotions__cta-button:hover {
  background: #005f2e;
  border-color: #005f2e;
}

/* Terms and Conditions Section */
.page-promotions__terms-conditions .page-promotions__section-title {
  color: var(--text-color-light);
}

.page-promotions__terms-list {
  list-style: disc;
  margin-left: 20px;
  font-size: 16px;
  color: var(--text-color-light);
}

.page-promotions__terms-list li {
  margin-bottom: 10px;
}

.page-promotions__terms-list a {
  color: var(--button-text-color); /* Yellow for links on dark background */
  text-decoration: underline;
}

.page-promotions__terms-list a:hover {
  color: #fff;
}

/* FAQ Section */
.page-promotions__faq-section .page-promotions__section-title {
  color: var(--primary-color);
}

.page-promotions__faq-list {
  margin-top: 40px;
}

/* FAQ container styles */
.page-promotions__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* FAQ default state - answer hidden */
.page-promotions__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;
  opacity: 0;
}

/* FAQ expanded state - 🚨 Using !important and sufficiently large max-height */
.page-promotions__faq-item.active .page-promotions__faq-answer {
  max-height: 2000px !important; /* 🚨 Use !important to ensure priority, value large enough to accommodate any content */
  padding: 20px 20px !important;
  opacity: 1;
  background: #f9f9f9;
  border-radius: 0 0 8px 8px;
}

/* Question style */
.page-promotions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  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-promotions__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-promotions__faq-question:active {
  background: #eeeeee;
}

/* Question title style */
.page-promotions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-color-dark);
  pointer-events: none; /* Prevent h3 tag from blocking click event */
}

/* Toggle icon */
.page-promotions__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color);
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-promotions__faq-item.active .page-promotions__faq-toggle {
  color: #333;
  transform: rotate(45deg); /* Change to X or rotate */
}

/* Call to Action Section */
.page-promotions__call-to-action .page-promotions__section-title {
  color: var(--text-color-light);
}

.page-promotions__call-to-action .page-promotions__text-block {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 30px auto;
  color: var(--text-color-light);
}

.page-promotions__call-to-action a {
  color: var(--button-text-color);
  text-decoration: underline;
}

.page-promotions__call-to-action a:hover {
  color: #fff;
}

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

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

  .page-promotions__hero-description {
    font-size: 16px;
  }

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

@media (max-width: 768px) {
  .page-promotions__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-promotions__container {
    padding: 15px;
  }

  .page-promotions__section {
    padding: 40px 0;
  }

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

  .page-promotions__section-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .page-promotions__hero-image img,
  .page-promotions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    filter: none; /* Ensure no filter is applied */
  }

  .page-promotions__section,
  .page-promotions__card,
  .page-promotions__container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-promotions__cta-group {
    flex-direction: column;
    gap: 15px;
  }

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

  .page-promotions__offer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-promotions__card-image {
    height: 180px;
  }

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

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

  .page-promotions__card-content p,
  .page-promotions__text-block,
  .page-promotions__guide-list p,
  .page-promotions__terms-list li,
  .page-promotions__faq-question h3 {
    font-size: 15px;
  }

  .page-promotions__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }

  .page-promotions__faq-question h3 {
    width: calc(100% - 40px);
  }

  .page-promotions__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }

  .page-promotions__faq-answer {
    padding: 0 15px;
  }

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