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

.page-resources {
  font-family: 'Arial', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--background-light);
  padding-top: var(--header-offset, 120px); /* Ensure content is below fixed header */
}

.page-resources__hero-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  overflow: hidden;
}

.page-resources__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__hero-image {
  width: 100%;
  margin-bottom: 30px;
}

.page-resources__hero-image img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.page-resources__hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  background: var(--secondary-color);
  color: var(--text-dark);
}

.page-resources__main-title {
  font-size: 44px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
  line-height: 1.2;
}

.page-resources__intro-text {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
  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-resources__btn-primary {
  background: var(--button-register-bg);
  color: var(--button-text-color);
  border: 2px solid var(--button-register-bg);
}

.page-resources__btn-primary:hover {
  background: darken(var(--button-register-bg), 10%);
  border-color: darken(var(--button-register-bg), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

.page-resources__btn-secondary:hover {
  background: darken(var(--button-login-bg), 10%);
  border-color: darken(var(--button-login-bg), 10%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.page-resources__section {
  padding: 60px 20px;
  text-align: center;
}

.page-resources__section-title {
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color);
}

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

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.page-resources__text-block {
  font-size: 17px;
  max-width: 900px;
  margin: 0 auto 30px auto;
  color: var(--text-dark);
}

.page-resources__text-block--light {
  color: var(--text-light);
}

.page-resources__about-resources {
  background-color: var(--secondary-color);
}

.page-resources__guide-watching {
  background-color: var(--primary-color);
  color: var(--text-light);
}

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

.page-resources__guide-item {
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.page-resources__guide-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

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

.page-resources__betting-strategies {
  background-color: var(--background-light);
}

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

.page-resources__strategy-card {
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  border: 1px solid var(--border-color);
}

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

.page-resources__card-link {
  text-decoration: none;
  color: var(--primary-color);
}

.page-resources__card-link:hover {
  text-decoration: underline;
}

.page-resources__cta-section {
  margin-top: 50px;
}

.page-resources__match-analysis {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources__analysis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
  margin-top: 40px;
  text-align: left;
}

.page-resources__analysis-item {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__analysis-item img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  min-width: 200px;
  min-height: 200px;
}

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

.page-resources__analysis-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-resources__analysis-list li {
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  font-size: 16px;
}

.page-resources__analysis-list li p {
  margin: 0;
}

.page-resources__analysis-list li::before {
  content: '✔️';
  margin-right: 10px;
  color: var(--secondary-color);
  font-size: 18px;
  line-height: 1.5;
  flex-shrink: 0;
}

.page-resources__latest-news {
  background-color: var(--background-light);
}

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

.page-resources__news-card {
  background: var(--secondary-color);
  color: var(--text-dark);
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: left;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.page-resources__news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  min-width: 200px;
  min-height: 200px;
}

.page-resources__news-card .page-resources__card-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.page-resources__news-card .page-resources__card-link {
  color: var(--primary-color);
  text-decoration: none;
}

.page-resources__news-card .page-resources__card-link:hover {
  text-decoration: underline;
}

.page-resources__news-excerpt {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__read-more {
  display: inline-block;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: bold;
  margin-top: auto;
}

.page-resources__read-more:hover {
  text-decoration: underline;
}

.page-resources__faq-section {
  background-color: var(--primary-color);
  color: var(--text-light);
}

.page-resources__faq-list {
  max-width: 900px;
  margin: 40px auto 0 auto;
  text-align: left;
}

/* FAQ容器样式 */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* FAQ默认状态 - 答案隐藏 */
.page-resources__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;
  background: var(--secondary-color);
  color: var(--text-dark);
}

/* FAQ展开状态 - 🚨 Sử dụng!important và đủ lớn max-height để đảm bảo có thể mở rộng */
.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* 🚨 Sử dụng!important để đảm bảo ưu tiên, giá trị đủ lớn để chứa mọi nội dung */
  padding: 20px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 8px 8px;
}

.page-resources__faq-answer p {
  margin: 0;
  font-size: 16px;
}

/* Vấn đề phong cách */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  background: var(--secondary-color);
  color: var(--text-dark);
  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-resources__faq-question:hover {
  background: var(--background-light);
  border-color: darken(var(--border-color), 5%);
}

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

/* Vấn đề tiêu đề phong cách */
.page-resources__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; /* Ngăn chặn thẻ h3 chặn sự kiện nhấp */
}

/* Chuyển đổi biểu tượng */
.page-resources__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; /* Ngăn chặn biểu tượng chặn sự kiện nhấp */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--primary-color);
  transform: rotate(45deg); /* Hoặc thay đổi nội dung thành '−' */
}

.page-resources__contact-cta {
  background-color: var(--secondary-color);
  padding-bottom: 80px;
}

.page-resources__contact-cta .page-resources__cta-buttons {
  margin-top: 40px;
}

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

  .page-resources__section-title {
    font-size: 30px;
  }

  .page-resources__intro-text {
    font-size: 16px;
  }

  .page-resources__guide-item img,
  .page-resources__analysis-item img,
  .page-resources__news-card img {
    height: 220px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: var(--header-offset, 120px) !important;
    font-size: 16px;
  }

  .page-resources__hero-section {
    padding: 40px 15px;
  }

  .page-resources__hero-image {
    margin-bottom: 20px;
  }

  .page-resources__hero-image img {
    border-radius: 4px;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources__hero-content {
    padding: 20px;
    border-radius: 8px;
  }

  .page-resources__main-title {
    font-size: 30px;
    margin-bottom: 15px;
  }

  .page-resources__intro-text {
    font-size: 15px;
    margin-bottom: 25px;
  }

  .page-resources__hero-cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  .page-resources__btn-primary,
  .page-resources__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-resources__section {
    padding: 40px 15px;
  }

  .page-resources__section-title {
    font-size: 26px;
  }

  .page-resources__text-block,
  .page-resources__text-block--light {
    font-size: 15px;
    margin-bottom: 20px;
  }

  .page-resources__content-grid,
  .page-resources__strategy-grid,
  .page-resources__analysis-grid,
  .page-resources__news-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .page-resources__guide-item,
  .page-resources__strategy-card,
  .page-resources__analysis-item,
  .page-resources__news-card {
    padding: 20px;
  }

  .page-resources__guide-item img,
  .page-resources__analysis-item img,
  .page-resources__news-card img {
    
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources__guide-title,
  .page-resources__card-title,
  .page-resources__analysis-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .page-resources__analysis-list li {
    font-size: 15px;
  }

  .page-resources__news-excerpt {
    font-size: 14px;
  }

  .page-resources__faq-question {
    padding: 15px;
  }
  
  .page-resources__faq-question h3 {
    font-size: 16px;
  }
  
  .page-resources__faq-toggle {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

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

  .page-resources__contact-cta .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
  }

  /* Ensure all image containers are responsive */
  .page-resources__section,
  .page-resources__container,
  .page-resources__hero-container,
  .page-resources__hero-content,
  .page-resources__guide-item,
  .page-resources__strategy-card,
  .page-resources__analysis-item,
  .page-resources__news-card,
  .page-resources__faq-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__hero-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-resources__hero-image {
    padding-left: 15px;
    padding-right: 15px;
  }

  .page-resources__faq-list {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .page-resources__faq-item {
    padding-left: 0;
    padding-right: 0;
  }
}