/* style/resources.css */

/* Biến CSS cho màu sắc thương hiệu */
:root {
  --primary-color: #FFD700; /* Vàng */
  --secondary-color: #000080; /* Xanh đậm */
  --text-light: #ffffff;
  --text-dark: #333333;
  --background-dark: #121212; /* Màu nền body từ shared.css */
  --card-bg-dark: rgba(255, 255, 255, 0.1);
  --card-bg-light: #ffffff;
  --border-color: #e0e0e0;
}

/* Đảm bảo nội dung trang không bị che bởi header cố định */
.page-resources {
  padding-top: 0; /* Đặt lại padding-top cho main, các section con sẽ tự điều chỉnh */
  background-color: var(--background-dark);
  color: var(--text-light); /* Toàn bộ trang dùng chữ sáng trên nền tối */
  min-height: 100vh;
}

/* 🚨 VIDEO SECTION - Start */
.page-resources__video-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  padding-top: 10px; /* 🚨 Desktop: Đảm bảo nội dung không bị cố định navigation bar che phủ */
  background-color: var(--background-dark);
}

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

.page-resources__video-link {
  display: block;
  text-decoration: none;
  position: relative;
  width: 100%;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__video-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.page-resources__video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 8px;
  object-fit: cover;
  pointer-events: none; /* Ngăn chặn điều khiển video chặn sự kiện click */
}

.page-resources__video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.page-resources__video-link:hover .page-resources__video-overlay {
  opacity: 1;
}

.page-resources__video-click-hint {
  color: var(--text-light);
  font-size: 18px;
  font-weight: bold;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: rgba(0, 123, 255, 0.8);
  border-radius: 5px;
  white-space: nowrap;
}

.page-resources__video-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
}

.page-resources__play-now-button {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color); /* Vàng */
  color: var(--text-light);
  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.15);
  border: none;
  cursor: pointer;
}

.page-resources__play-now-button:hover {
  background: #e6c200; /* Vàng đậm hơn */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.page-resources__play-now-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
/* 🚨 VIDEO SECTION - End */

/* 🚨 H1 TITLE SECTION - Start */
.page-resources__title-section {
  padding: 80px 20px;
  text-align: center;
  background-color: var(--secondary-color); /* Xanh đậm */
  color: var(--text-light);
  border-bottom: 5px solid var(--primary-color);
}

.page-resources__title-container {
  max-width: 1000px;
  margin: 0 auto;
}

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

.page-resources__title-description {
  font-size: 20px;
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

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

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

.page-resources__btn-primary {
  background: var(--primary-color); /* Vàng */
  color: var(--secondary-color); /* Xanh đậm */
  border: 2px solid var(--primary-color);
}

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

.page-resources__btn-secondary {
  background: transparent;
  color: var(--primary-color); /* Vàng */
  border: 2px solid var(--primary-color);
}

.page-resources__btn-secondary:hover {
  background: var(--primary-color);
  color: var(--secondary-color); /* Xanh đậm */
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}
/* 🚨 H1 TITLE SECTION - End */

/* 🚨 FAQ SECTION - Start */
.page-resources__faq-section {
  padding: 80px 20px;
  background-color: var(--card-bg-light); /* Nền sáng cho FAQ */
  color: var(--text-dark); /* Chữ tối trên nền sáng */
}

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

.page-resources__faq-main-title {
  font-size: 38px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: var(--secondary-color); /* Xanh đậm */
}

.page-resources__faq-description {
  font-size: 18px;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 50px;
  color: #555555;
}

.page-resources__faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  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-resources__faq-item.active .page-resources__faq-question {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background-color: #f5f5f5;
}

.page-resources__faq-question:hover {
  background: #f8f8f8;
  border-color: #c0c0c0;
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--secondary-color); /* Xanh đậm */
  pointer-events: none; /* Ngăn chặ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 chặ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 {
  transform: rotate(45deg);
  color: var(--primary-color); /* Vàng */
}

.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.3s ease;
  padding: 0 25px;
  opacity: 0;
  background: #fcfcfc;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.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;
  background: #fcfcfc;
}
/* 🚨 FAQ SECTION - End */

/* 🚨 BRAND SECTION - Start */
.page-resources__brand-section {
  padding: 80px 20px;
  background-color: var(--background-dark); /* Nền tối */
  color: var(--text-light); /* Chữ sáng */
  border-top: 5px solid var(--primary-color);
}

.page-resources__brand-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-resources__brand-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--primary-color); /* Vàng */
}

.page-resources__brand-intro-text {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #cccccc;
}

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

.page-resources__brand-item {
  background: var(--card-bg-dark); /* Nền thẻ tối */
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.page-resources__brand-item-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
  margin: 0 auto 20px auto;
  border-radius: 5px;
  object-fit: cover;
}

.page-resources__brand-item h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--primary-color); /* Vàng */
}

.page-resources__brand-item p {
  font-size: 16px;
  line-height: 1.7;
  color: #b0b0b0;
}
/* 🚨 BRAND SECTION - End */

/* 🚨 BLOG SECTION - Start */
.page-resources__blog-section {
  padding: 80px 20px;
  background-color: var(--card-bg-light); /* Nền sáng */
  color: var(--text-dark); /* Chữ tối */
}

.page-resources__blog-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.page-resources__blog-title {
  font-size: 38px;
  font-weight: bold;
  margin-bottom: 20px;
  color: var(--secondary-color); /* Xanh đậm */
}

.page-resources__blog-intro-text {
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 50px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #555555;
}

.page-resources__blog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.page-resources__blog-item {
  background: var(--card-bg-light);
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

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

.page-resources__blog-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-resources__blog-item-image {
  width: 100%;
  height: 200px; /* Chiều cao cố định cho hình ảnh blog */
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.page-resources__blog-item-title {
  font-size: 22px;
  font-weight: 700;
  margin: 20px 20px 10px 20px;
  color: var(--secondary-color); /* Xanh đậm */
  line-height: 1.3;
}

.page-resources__blog-item-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #666666;
  margin: 0 20px 15px 20px;
  flex-grow: 1;
}

.page-resources__blog-item-date {
  font-size: 14px;
  color: #999999;
  margin: 0 20px 20px 20px;
  display: block;
}

.page-resources__blog-cta {
  margin-top: 20px;
}
/* 🚨 BLOG SECTION - End */

/* 🚨 General Responsive Styles - Start */
/* Tất cả hình ảnh phải responsive */
.page-resources img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 🚨 Mobile Responsive Design (max-width: 768px) - Start */
@media (max-width: 768px) {
  .page-resources {
    font-size: 16px;
    line-height: 1.6;
  }

  /* 🚨 Padding-top cho main content trên mobile */
  .page-resources__video-section {
    padding-top: 10px !important; /* Mobile: Điều chỉnh padding-top cho video section */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .page-resources__video-container {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 0;
    padding-right: 0;
    overflow: hidden !important;
  }

  .page-resources__video-link {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .page-resources__video-wrapper {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 4px;
    overflow: hidden !important;
  }

  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 4px;
    object-fit: contain; /* Đảm bảo video hiển thị đầy đủ trên mobile */
  }

  .page-resources__video-cta {
    margin-top: 20px;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

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

  .page-resources__video-click-hint {
    font-size: 14px !important;
    padding: 8px 16px !important;
  }

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

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

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

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

  .page-resources__cta-button {
    width: 100%;
    padding: 12px 25px;
    font-size: 16px;
  }

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

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

  .page-resources__faq-description {
    font-size: 16px;
    margin-bottom: 40px;
  }

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

  .page-resources__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
  }

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

  .page-resources__faq-answer {
    padding: 0 20px;
  }

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

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

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

  .page-resources__brand-intro-text {
    font-size: 16px;
    margin-bottom: 40px;
  }

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

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

  .page-resources__brand-item h3 {
    font-size: 20px;
  }

  .page-resources__brand-item p {
    font-size: 15px;
  }

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

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

  .page-resources__blog-intro-text {
    font-size: 16px;
    margin-bottom: 40px;
  }

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

  .page-resources__blog-item-title {
    font-size: 18px;
    margin: 15px;
  }

  .page-resources__blog-item-excerpt,
  .page-resources__blog-item-date {
    font-size: 14px;
    margin-left: 15px;
    margin-right: 15px;
  }

  .page-resources__blog-item-image {
    height: 180px;
  }

  /* 🚨 Global responsive for images, videos, and containers */
  .page-resources img,
  .page-resources video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  .page-resources__section,
  .page-resources__card,
  .page-resources__container,
  .page-resources__video-section,
  .page-resources__video-container,
  .page-resources__video-wrapper,
  .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: 15px;
    padding-right: 15px;
    overflow: hidden !important;
  }
}
/* 🚨 Mobile Responsive Design (max-width: 768px) - End */

/* 🚨 General Styles for all elements (text color, background, etc.) */
.page-resources h1, .page-resources h2, .page-resources h3, .page-resources h4, .page-resources h5, .page-resources h6 {
  color: var(--primary-color); /* Tiêu đề màu vàng */
}

.page-resources p, .page-resources li {
  color: var(--text-light); /* Đoạn văn và list item màu trắng */
}

/* Override for light background sections */
.page-resources__light-bg h1, .page-resources__light-bg h2, .page-resources__light-bg h3, .page-resources__light-bg h4, .page-resources__light-bg h5, .page-resources__light-bg h6 {
  color: var(--secondary-color); /* Tiêu đề màu xanh đậm trên nền sáng */
}

.page-resources__light-bg p, .page-resources__light-bg li {
  color: var(--text-dark); /* Đoạn văn và list item màu tối trên nền sáng */
}

.page-resources__card {
  background: var(--card-bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.page-resources__card p, .page-resources__card li {
  color: var(--text-dark);
}

/* 🚨 No CSS filter for images */
.page-resources img {
  filter: none; /* Đảm bảo không có filter nào thay đổi màu sắc hình ảnh */
}