/* style/resources-game-strategy-tips.css */

/* --- Variables --- */
:root {
  --primary-color: #0A192F;
  --secondary-color: #FFD700;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f8f8f8;
  --bg-dark: #0A192F;
  --border-color: #e0e0e0;
}

/* --- Base Styles --- */
.page-resources-game-strategy-tips {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark); /* Default text color for light backgrounds */
  background-color: var(--bg-light); /* Default body background is light */
}

.page-resources-game-strategy-tips__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-resources-game-strategy-tips__section-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.page-resources-game-strategy-tips__text-block {
  font-size: 1.1em;
  text-align: center;
  margin-bottom: 30px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.page-resources-game-strategy-tips__text-center {
  text-align: center;
}

/* --- Color Contrast Classes --- */
.page-resources-game-strategy-tips__light-bg {
  background-color: var(--bg-light);
  color: var(--text-dark);
}

.page-resources-game-strategy-tips__dark-bg {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.page-resources-game-strategy-tips__dark-bg .page-resources-game-strategy-tips__section-title {
  color: var(--secondary-color); /* Golden title on dark background */
}

/* --- Hero Section --- */
.page-resources-game-strategy-tips__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); /* Fixed header offset */
  background-color: var(--primary-color); /* Fallback background */
  overflow: hidden;
}

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

.page-resources-game-strategy-tips__hero-image {
  width: 100%;
  max-width: 1200px; /* Ensure image fits container */
  height: auto;
  display: block;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px;
}

.page-resources-game-strategy-tips__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 0 15px;
}

.page-resources-game-strategy-tips__hero-title {
  font-size: 3.2em;
  color: var(--secondary-color);
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.page-resources-game-strategy-tips__hero-description {
  font-size: 1.4em;
  color: var(--text-light);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.page-resources-game-strategy-tips__cta-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--secondary-color);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.3em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
}

.page-resources-game-strategy-tips__cta-button:hover {
  background: #ffe033; /* Slightly lighter gold */
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* --- Introduction Section --- */
.page-resources-game-strategy-tips__introduction-section {
  padding: 80px 0;
}

.page-resources-game-strategy-tips__feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.page-resources-game-strategy-tips__feature-item {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
}

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

.page-resources-game-strategy-tips__feature-title {
  font-size: 1.5em;
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 700;
}

/* --- Principles Section --- */
.page-resources-game-strategy-tips__principles-section {
  padding: 80px 0;
}

.page-resources-game-strategy-tips__image-full {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 40px auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  max-width: 800px; /* Constrain max width for content images */
}

.page-resources-game-strategy-tips__list {
  list-style: none;
  padding: 0;
  margin: 50px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.page-resources-game-strategy-tips__list-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 25px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.page-resources-game-strategy-tips__list-title {
  font-size: 1.4em;
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-weight: 600;
}

.page-resources-game-strategy-tips__list-item p {
  color: var(--text-light);
  font-size: 1em;
}

.page-resources-game-strategy-tips__button-group {
  text-align: center;
  margin-top: 40px;
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
}

.page-resources-game-strategy-tips__btn-primary,
.page-resources-game-strategy-tips__btn-secondary {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid;
  cursor: pointer;
  max-width: 100%; /* Ensure buttons are responsive */
  box-sizing: border-box;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources-game-strategy-tips__btn-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
  border-color: var(--secondary-color);
}

.page-resources-game-strategy-tips__btn-primary:hover {
  background: #ffe033;
  border-color: #ffe033;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-resources-game-strategy-tips__btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.page-resources-game-strategy-tips__btn-secondary:hover {
  background: var(--secondary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- Game Strategies Section --- */
.page-resources-game-strategy-tips__game-strategies-section {
  padding: 80px 0;
}

.page-resources-game-strategy-tips__game-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 50px;
  padding: 30px;
  border: 1px solid var(--border-color);
}

.page-resources-game-strategy-tips__game-card:last-of-type {
  margin-bottom: 0;
}

.page-resources-game-strategy-tips__card-title {
  font-size: 2em;
  color: var(--primary-color);
  margin-bottom: 25px;
  text-align: center;
  font-weight: 700;
}

.page-resources-game-strategy-tips__card-image {
  width: 100%;
  height: auto;
  max-height: 600px; /* Max height for card images */
  display: block;
  border-radius: 8px;
  margin: 0 auto 30px auto;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 200px; /* Minimum size requirement */
  min-height: 200px; /* Minimum size requirement */
}

.page-resources-game-strategy-tips__card-list {
  list-style: none;
  padding: 0;
  margin-bottom: 30px;
}

.page-resources-game-strategy-tips__card-list li {
  font-size: 1.1em;
  margin-bottom: 15px;
  line-height: 1.6;
  padding-left: 25px;
  position: relative;
}

.page-resources-game-strategy-tips__card-list li:before {
  content: "✅";
  position: absolute;
  left: 0;
  color: var(--secondary-color);
}

/* --- Advanced Tips Section --- */
.page-resources-game-strategy-tips__advanced-tips-section {
  padding: 80px 0;
}

/* --- FAQ Section --- */
.page-resources-game-strategy-tips__faq-section {
  padding: 80px 0;
}

.page-resources-game-strategy-tips__faq-list {
  max-width: 900px;
  margin: 50px auto 0 auto;
}

/* FAQ容器样式 */
.page-resources-game-strategy-tips__faq-item {
  margin-bottom: 15px;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* FAQ默认状态 - 答案隐藏 */
.page-resources-game-strategy-tips__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 15px;
  opacity: 0;
  font-size: 1em;
}

/* FAQ展开状态 - 🚨 使用!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-resources-game-strategy-tips__faq-item.active .page-resources-game-strategy-tips__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo độ ưu tiên, giá trị đủ lớn để chứa bất kỳ nội dung nào */
  padding: 20px 15px !important;
  opacity: 1;
  background: var(--bg-light);
  border-radius: 0 0 5px 5px;
  border-top: 1px solid var(--border-color);
}

/* Vấn đề kiểu dáng */
.page-resources-game-strategy-tips__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
}

.page-resources-game-strategy-tips__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources-game-strategy-tips__faq-question:active {
  background: #eeeeee;
}

/* Vấn đề tiêu đề kiểu dáng */
.page-resources-game-strategy-tips__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-color);
  pointer-events: none; /* Ngăn thẻ h3 chặn sự kiện nhấp */
}

/* Biểu tượng chuyển đổi */
.page-resources-game-strategy-tips__faq-toggle {
  font-size: 28px; /* Kích thước tăng để dễ nhìn hơn */
  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; /* Ngăn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; /* Kích thước tăng */
  height: 32px; /* Kích thước tăng */
  background-color: var(--primary-color);
  border-radius: 50%;
  color: var(--text-light);
}

.page-resources-game-strategy-tips__faq-item.active .page-resources-game-strategy-tips__faq-toggle {
  color: var(--secondary-color);
  background-color: var(--primary-color);
  transform: rotate(45deg); /* Xoay để tạo hiệu ứng 'x' */
}


/* --- CTA Bottom Section --- */
.page-resources-game-strategy-tips__cta-bottom-section {
  padding: 80px 0;
}

.page-resources-game-strategy-tips__cta-bottom-section .page-resources-game-strategy-tips__section-title {
  color: var(--secondary-color);
}

.page-resources-game-strategy-tips__cta-bottom-section .page-resources-game-strategy-tips__text-block {
  color: var(--text-light);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
  .page-resources-game-strategy-tips__hero-title {
    font-size: 2.8em;
  }
  .page-resources-game-strategy-tips__hero-description {
    font-size: 1.2em;
  }
  .page-resources-game-strategy-tips__section-title {
    font-size: 2em;
  }
}

@media (max-width: 768px) {
  .page-resources-game-strategy-tips {
    font-size: 16px;
    line-height: 1.6;
  }

  /* Cố định khoảng cách đầu trang cho di động */
  .page-resources-game-strategy-tips__hero-section {
    padding-top: var(--header-offset, 120px) !important;
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources-game-strategy-tips__hero-title {
    font-size: 2em;
  }
  .page-resources-game-strategy-tips__hero-description {
    font-size: 1em;
  }
  .page-resources-game-strategy-tips__cta-button {
    padding: 15px 30px;
    font-size: 1.1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources-game-strategy-tips__container {
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources-game-strategy-tips__section-title {
    font-size: 1.8em;
    margin-bottom: 30px;
  }

  .page-resources-game-strategy-tips__text-block {
    font-size: 1em;
    margin-bottom: 20px;
  }

  .page-resources-game-strategy-tips__feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .page-resources-game-strategy-tips__feature-item {
    padding: 25px;
  }

  .page-resources-game-strategy-tips__list {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .page-resources-game-strategy-tips__image-full {
    margin: 30px auto;
  }

  .page-resources-game-strategy-tips__game-card {
    padding: 20px;
    margin-bottom: 30px;
  }

  .page-resources-game-strategy-tips__card-title {
    font-size: 1.6em;
    margin-bottom: 20px;
  }

  .page-resources-game-strategy-tips__card-image {
    margin-bottom: 20px;
  }

  .page-resources-game-strategy-tips__card-list li {
    font-size: 0.95em;
    margin-bottom: 10px;
  }

  .page-resources-game-strategy-tips__button-group {
    flex-direction: column;
    gap: 15px;
  }

  .page-resources-game-strategy-tips__btn-primary,
  .page-resources-game-strategy-tips__btn-secondary {
    padding: 12px 25px;
    font-size: 1em;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources-game-strategy-tips__faq-list {
    margin-top: 30px;
  }

  .page-resources-game-strategy-tips__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources-game-strategy-tips__faq-question h3 {
    font-size: 1.05em;
    margin-bottom: 0;
    width: calc(100% - 40px); /* Điều chỉnh chiều rộng để tạo không gian cho nút chuyển đổi */
  }
  
  .page-resources-game-strategy-tips__faq-toggle {
    margin-left: 10px;
    width: 28px; /* Kích thước điều chỉnh */
    height: 28px; /* Kích thước điều chỉnh */
    font-size: 24px; /* Kích thước điều chỉnh */
  }
  
  .page-resources-game-strategy-tips__faq-answer {
    padding: 0 15px;
  }
  
  .page-resources-game-strategy-tips__faq-item.active .page-resources-game-strategy-tips__faq-answer {
    padding: 15px !important;
  }

  /* Hình ảnh phản hồi trên di động */
  .page-resources-game-strategy-tips img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important; /* Đảm bảo bao gồm phần đệm */
  }

  /* Đảm bảo không tràn ngang */
  .page-resources-game-strategy-tips__introduction-section,
  .page-resources-game-strategy-tips__principles-section,
  .page-resources-game-strategy-tips__game-strategies-section,
  .page-resources-game-strategy-tips__advanced-tips-section,
  .page-resources-game-strategy-tips__faq-section,
  .page-resources-game-strategy-tips__cta-bottom-section {
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  .page-resources-game-strategy-tips__hero-title {
    font-size: 1.8em;
  }
  .page-resources-game-strategy-tips__cta-button {
    font-size: 1em;
    padding: 12px 25px;
  }
  .page-resources-game-strategy-tips__section-title {
    font-size: 1.6em;
  }
  .page-resources-game-strategy-tips__feature-title {
    font-size: 1.3em;
  }
  .page-resources-game-strategy-tips__list-title {
    font-size: 1.2em;
  }
  .page-resources-game-strategy-tips__card-title {
    font-size: 1.4em;
  }
}