/* style/resources.css */

/* Biến CSS cho màu sắc và phông chữ */
:root {
  --primary-color: #1A202C; /* Màu chủ đạo: Xám đen */
  --secondary-color: #FFD700; /* Màu phụ trợ: Vàng kim */
  --text-dark: #333333; /* Màu chữ tối */
  --text-light: #ffffff; /* Màu chữ sáng */
  --background-light: #ffffff; /* Nền sáng */
  --background-dark: #1A202C; /* Nền tối */
  --border-color: #e0e0e0; /* Màu đường viền */
  --font-family-primary: 'Arial', sans-serif;
}

/* Thiết lập cơ bản cho trang */
.page-resources {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: var(--text-dark); /* Mặc định chữ tối trên nền sáng (body) */
  background-color: var(--background-light);
  padding-top: 120px; /* Khoảng cách trên để tránh header cố định */
}

.page-resources .text-highlight {
  color: var(--secondary-color);
}

.page-resources__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.page-resources__section-description {
  font-size: 18px;
  text-align: center;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-dark);
}

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

/* Hero Section */
.page-resources__hero-section {
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-color), #343a40);
  color: var(--text-light);
}

.page-resources__hero-title {
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--text-light);
}

.page-resources__hero-description {
  font-size: 20px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: #e0e0e0;
}

.page-resources__cta-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  word-wrap: break-word;
}

.page-resources__btn-primary {
  background: var(--secondary-color);
  color: var(--primary-color);
}

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

.page-resources__btn-secondary {
  background: transparent;
  color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

.page-resources__btn-secondary:hover {
  background: rgba(255, 215, 0, 0.1);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Guides Section */
.page-resources__guides-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

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

.page-resources__guides-section .page-resources__section-description {
  color: #e0e0e0;
}

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

.page-resources__guide-card {
  background: var(--background-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__guide-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.page-resources__guide-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.page-resources__card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__card-title {
  font-size: 24px;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 15px;
  color: var(--primary-color);
  line-height: 1.3;
}

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

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

.page-resources__card-excerpt {
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 20px;
  flex-grow: 1;
}

.page-resources__read-more-link {
  display: inline-flex;
  align-items: center;
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
  transition: color 0.3s ease;
  margin-top: auto;
}

.page-resources__read-more-link:hover {
  color: var(--primary-color);
}

.page-resources__read-more-link .arrow {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.page-resources__read-more-link:hover .arrow {
  transform: translateX(5px);
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 80px 0;
  background-color: var(--background-light);
}

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

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

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--background-light);
  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: #f5f5f5;
  border-color: #d0d0d0;
}

.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 h3 chặn sự kiện click */
}

.page-resources__faq-toggle {
  font-size: 28px;
  font-weight: bold;
  line-height: 1;
  color: #666;
  transition: transform 0.3s ease, color 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
  pointer-events: none; /* Ngăn icon chặn sự kiện click */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: var(--secondary-color);
  transform: rotate(180deg);
}

.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 25px;
  opacity: 0;
  background: #f9f9f9;
  color: var(--text-dark);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Đảm bảo đủ lớn để chứa mọi nội dung */
  padding: 20px 25px !important;
  opacity: 1;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 8px 8px;
}

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

/* Brand Section */
.page-resources__brand-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

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

.page-resources__brand-section .page-resources__section-description {
  color: #e0e0e0;
}

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

.page-resources__brand-item {
  background: var(--background-light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__brand-item .page-resources__item-title {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__brand-icon {
  width: 120px;
  height: 120px;
  margin: 0 auto 25px auto;
  object-fit: contain;
  display: block;
}

/* News Section */
.page-resources__news-section {
  padding: 80px 0;
  background-color: var(--background-light);
}

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

.page-resources__news-item {
  background: var(--background-light);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__news-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.page-resources__news-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.page-resources__item-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.page-resources__news-item .page-resources__item-title {
  font-size: 22px;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
  line-height: 1.4;
}

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

.page-resources__news-item .page-resources__item-title a:hover {
  color: var(--secondary-color);
}

.page-resources__item-excerpt {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
  flex-grow: 1;
}

.page-resources__item-date {
  font-size: 14px;
  color: #888;
  margin-top: auto;
  display: block;
}

/* Responsible Gambling Section */
.page-resources__responsible-gambling-section {
  padding: 80px 0;
  background-color: var(--background-dark);
  color: var(--text-light);
}

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

.page-resources__responsible-gambling-section .page-resources__section-description {
  color: #e0e0e0;
}

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

.page-resources__responsible-item {
  background: var(--background-light);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__responsible-item .page-resources__item-title {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.page-resources__responsible-item p {
  flex-grow: 1;
}

.page-resources__mt-40 {
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__hero-title {
    font-size: 40px;
  }
  .page-resources__section-title {
    font-size: 32px;
  }
  .page-resources__card-title {
    font-size: 22px;
  }
  .page-resources__news-item .page-resources__item-title {
    font-size: 20px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: 100px !important; /* Khoảng cách trên cho mobile */
    font-size: 16px;
    line-height: 1.6;
  }

  .page-resources__container {
    padding: 0 15px !important;
  }

  .page-resources__hero-section {
    padding: 60px 0;
  }

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

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

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

  .page-resources__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px !important;
    font-size: 16px !important;
  }

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

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

  .page-resources__guides-section, 
  .page-resources__faq-section, 
  .page-resources__brand-section, 
  .page-resources__news-section, 
  .page-resources__responsible-gambling-section {
    padding: 60px 0;
  }

  .page-resources__guide-grid,
  .page-resources__brand-content,
  .page-resources__news-list,
  .page-resources__responsible-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

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

  .page-resources__card-excerpt {
    font-size: 15px;
  }

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

  .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 20px !important;
  }

  .page-resources__brand-item, .page-resources__responsible-item {
    padding: 25px;
  }

  .page-resources__brand-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
  }

  .page-resources__news-image {
    height: 160px;
  }

  .page-resources__news-item .page-resources__item-title {
    font-size: 18px;
  }

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

  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }

  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper,
  .page-resources__guide-card,
  .page-resources__brand-item,
  .page-resources__news-item,
  .page-resources__responsible-item,
  .page-resources__cta-buttons,
  .page-resources__button-group,
  .page-resources__btn-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow: hidden !important;
  }

  .page-resources__guide-card .page-resources__card-content,
  .page-resources__brand-item,
  .page-resources__news-item .page-resources__item-content,
  .page-resources__responsible-item {
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
}