/* style/terms-conditions.css */

/* Biến CSS */
:root {
  --primary-color: #FFD700; /* Vàng */
  --secondary-color: #000080; /* Xanh Navy */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #121212;
  --border-color: #333333;
}

/* Body background from shared.css is #121212 (dark), so use light text */
.page-terms-conditions {
  font-family: 'Arial', sans-serif;
  color: var(--text-light); /* Light text for dark body background */
  line-height: 1.7;
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

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

.page-terms-conditions__hero-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  background: var(--secondary-color); /* Use secondary color for hero background */
  color: var(--text-light);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-terms-conditions__hero-container {
  max-width: 900px;
  margin: 0 auto;
}

.page-terms-conditions__main-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary-color); /* Gold color for main title */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.page-terms-conditions__hero-description {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.9;
}

.page-terms-conditions__hero-cta {
  margin-top: 30px;
}

.page-terms-conditions__cta-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: var(--secondary-color); /* Navy text on gold button for contrast */
  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-terms-conditions__cta-button:hover {
  background: #E5C100; /* Slightly darker gold on hover */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__content-section {
  background: var(--background-dark); /* Dark background for content sections */
  color: var(--text-light);
  padding: 60px 0;
}

.page-terms-conditions__section-title {
  font-size: 36px;
  font-weight: 700;
  margin-top: 50px;
  margin-bottom: 30px;
  color: var(--primary-color); /* Gold color for section titles */
  text-align: left;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}

.page-terms-conditions__sub-title {
  font-size: 24px;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-terms-conditions__paragraph {
  margin-bottom: 15px;
  font-size: 17px;
  line-height: 1.8;
  color: #f0f0f0; /* Slightly off-white for body text */
}

.page-terms-conditions__list {
  list-style-type: disc;
  margin-left: 25px;
  margin-bottom: 20px;
  color: #f0f0f0;
}

.page-terms-conditions__list-item {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.6;
}

.page-terms-conditions__list-item strong {
  color: var(--primary-color);
}

.page-terms-conditions__image-wrapper {
  margin: 40px 0;
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: cover;
}

.page-terms-conditions__image-caption {
  font-size: 15px;
  color: #cccccc;
  margin-top: 15px;
  padding: 0 15px;
}

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

.page-terms-conditions__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05); /* Slightly visible background for FAQ items */
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.page-terms-conditions__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--secondary-color); /* Navy background for question */
  color: var(--primary-color); /* Gold text for question */
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  font-weight: 600;
}

.page-terms-conditions__faq-question:hover {
  background: #000066; /* Darker navy on hover */
}

.page-terms-conditions__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Prevent h3 from blocking click event */
  color: var(--primary-color); /* Ensure gold color for question text */
}

.page-terms-conditions__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: var(--primary-color); /* Gold color for toggle icon */
  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-terms-conditions__faq-item.active .page-terms-conditions__faq-toggle {
  color: var(--text-light); /* White color when active */
  transform: rotate(45deg); /* Optional: Rotate for 'x' effect if using a plus sign */
}

.page-terms-conditions__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;
  color: #cccccc;
}

.page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
  max-height: 2000px !important; /* Sufficiently large to contain content */
  padding: 20px 25px !important;
  opacity: 1;
  background: rgba(255, 255, 255, 0.08); /* Lighter background for answer */
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0 0 8px 8px;
}

.page-terms-conditions__faq-answer p {
  margin: 0;
  color: #f0f0f0;
}

/* CTA Bottom Section */
.page-terms-conditions__cta-bottom {
  text-align: center;
  margin-top: 60px;
  padding: 40px 20px;
  background: var(--secondary-color); /* Navy background */
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.page-terms-conditions__cta-text {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 30px;
  color: var(--primary-color); /* Gold text */
}

.page-terms-conditions__cta-button--large {
  padding: 18px 50px;
  font-size: 20px;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
  .page-terms-conditions {
    padding-top: var(--header-offset, 120px) !important;
  }

  .page-terms-conditions__container {
    padding: 30px 15px;
  }

  .page-terms-conditions__hero-section {
    padding: 60px 15px;
  }

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

  .page-terms-conditions__hero-description {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .page-terms-conditions__cta-button {
    padding: 12px 30px;
    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-terms-conditions__section-title {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
  }

  .page-terms-conditions__sub-title {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
  }

  .page-terms-conditions__paragraph,
  .page-terms-conditions__list-item {
    font-size: 15px;
    line-height: 1.7;
  }

  .page-terms-conditions__list {
    margin-left: 20px;
  }

  .page-terms-conditions__image-wrapper {
    margin: 30px 0;
  }

  .page-terms-conditions__image-caption {
    font-size: 13px;
  }

  /* FAQ Mobile Styles */
  .page-terms-conditions__faq-question {
    padding: 15px 20px;
    flex-wrap: wrap;
  }
  
  .page-terms-conditions__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }
  
  .page-terms-conditions__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-terms-conditions__faq-answer {
    padding: 0 20px;
  }
  
  .page-terms-conditions__faq-item.active .page-terms-conditions__faq-answer {
    padding: 15px 20px !important;
  }

  .page-terms-conditions__cta-bottom {
    margin-top: 40px;
    padding: 30px 15px;
  }

  .page-terms-conditions__cta-text {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .page-terms-conditions__cta-button--large {
    padding: 15px 40px;
    font-size: 18px;
  }

  /* Image responsiveness for all images in content */
  .page-terms-conditions img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  /* Ensure all containers are responsive and prevent overflow */
  .page-terms-conditions__hero-section,
  .page-terms-conditions__content-section,
  .page-terms-conditions__container,
  .page-terms-conditions__hero-container,
  .page-terms-conditions__image-wrapper,
  .page-terms-conditions__faq-list,
  .page-terms-conditions__faq-item,
  .page-terms-conditions__faq-question,
  .page-terms-conditions__faq-answer,
  .page-terms-conditions__cta-bottom {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important; /* Prevent horizontal scroll */
  }

  .page-terms-conditions__faq-question,
  .page-terms-conditions__faq-answer {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}