/* style/resources.css */
:root {
  --primary-color: #FFD700; /* Vàng sang trọng */
  --secondary-color: #1E90FF; /* Xanh dương đậm */
  --text-color-dark-bg: #ffffff;
  --text-color-light-bg: #333333;
  --background-dark: #121212;
  --background-light: #f9f9f9;
  --border-color: #e0e0e0;
}

.page-resources {
  color: var(--text-color-dark-bg); /* Body background is dark (#121212), so use light text */
  background-color: var(--background-dark);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  padding-top: 120px; /* Adjust for fixed header on desktop */
}

.page-resources h1, .page-resources h2, .page-resources h3, .page-resources h4, .page-resources h5, .page-resources h6 {
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 20px;
  line-height: 1.3;
}

.page-resources h1 {
  font-size: 44px;
  text-align: center;
}

.page-resources h2 {
  font-size: 36px;
  text-align: center;
}

.page-resources h3 {
  font-size: 24px;
}

.page-resources p {
  margin-bottom: 15px;
  color: var(--text-color-dark-bg);
}

.page-resources a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.page-resources a:hover {
  color: var(--primary-color);
}

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

/* Video Section */
.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: Adjust for fixed header */
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.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(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.page-resources__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  object-fit: cover;
  pointer-events: none; /* Prevent video controls from blocking click event */
}

.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.4);
  border-radius: 12px;
  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: #ffffff;
  font-size: 22px;
  font-weight: bold;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  padding: 12px 25px;
  background: rgba(255, 215, 0, 0.8);
  border-radius: 8px;
  white-space: nowrap;
}

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

.page-resources__play-now-button {
  display: inline-block;
  padding: 18px 45px;
  background: var(--primary-color);
  color: var(--text-color-light-bg);
  text-decoration: none;
  border-radius: 10px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
}

.page-resources__play-now-button:hover {
  background: #e6c200; /* Darker gold */
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-resources__play-now-button:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Title Section */
.page-resources__title-section {
  padding: 80px 20px;
  background: #1a1a1a;
  text-align: center;
  box-shadow: inset 0 5px 15px rgba(0,0,0,0.2);
}

.page-resources__main-title {
  font-size: 48px;
  margin-bottom: 25px;
  color: var(--primary-color);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.page-resources__title-description {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 40px auto;
  color: var(--text-color-dark-bg);
  opacity: 0.9;
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--secondary-color);
  color: #ffffff;
  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;
  text-transform: uppercase;
  min-width: 180px;
}

.page-resources__cta-button:hover {
  background: #1a7ad9; /* Darker blue */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.page-resources__cta-button--contact {
  background: var(--primary-color);
  color: var(--text-color-light-bg);
}

.page-resources__cta-button--contact:hover {
  background: #e6c200; /* Darker gold */
}

/* FAQ Section */
.page-resources__faq-section {
  padding: 80px 20px;
  background-color: var(--background-dark);
  color: var(--text-color-dark-bg);
}

.page-resources__faq-main-title {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.page-resources__faq-description {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 50px auto;
  text-align: center;
  opacity: 0.9;
}

.page-resources__faq-container {
  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.3);
  background-color: rgba(255, 255, 255, 0.05); /* Slightly transparent background */
}

.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;
  color: var(--text-color-dark-bg);
  background-color: rgba(255, 255, 255, 0.03);
}

.page-resources__faq-item.active .page-resources__faq-answer {
  max-height: 2000px !important; /* Use !important and sufficiently large value */
  padding: 20px !important;
  opacity: 1;
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  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: rgba(255, 255, 255, 0.15);
}

.page-resources__faq-question:active {
  background: rgba(255, 255, 255, 0.2);
}

.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; /* Prevent h3 from blocking click event */
}

.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; /* Prevent icon from blocking click event */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
  color: #ffffff;
  transform: rotate(45deg); /* Change to 'X' or '-' */
}

/* Brand Section */
.page-resources__brand-section {
  padding: 80px 20px;
  background: linear-gradient(to right, #1a1a1a, #0d0d0d);
  color: var(--text-color-dark-bg);
  text-align: center;
}

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

.page-resources__brand-title {
  color: var(--primary-color);
  margin-bottom: 40px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

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

.page-resources__brand-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__brand-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-resources__brand-item h3 {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 22px;
}

.page-resources__brand-item p {
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
}

.page-resources__brand-image {
  width: 100%;
  max-width: 400px; /* Ensure images are not too wide */
  height: auto;
  border-radius: 8px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Blog Section */
.page-resources__blog-section {
  padding: 80px 20px;
  background-color: var(--background-dark);
  color: var(--text-color-dark-bg);
}

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

.page-resources__blog-title {
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.page-resources__blog-description {
  font-size: 18px;
  max-width: 900px;
  margin: 0 auto 50px auto;
  text-align: center;
  opacity: 0.9;
}

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

.page-resources__blog-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-resources__blog-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.page-resources__blog-link {
  display: block;
  padding: 20px;
  color: var(--text-color-dark-bg);
  text-decoration: none;
}

.page-resources__blog-image {
  width: 100%;
  height: 200px; /* Fixed height for consistent look */
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-resources__blog-item-title {
  font-size: 20px;
  color: var(--primary-color);
  margin-bottom: 10px;
  line-height: 1.4;
}

.page-resources__blog-item-excerpt {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-resources__blog-item-date {
  font-size: 14px;
  color: var(--secondary-color);
  font-weight: bold;
}

.page-resources__cta-buttons--centered {
  margin-top: 50px;
  text-align: center;
}

/* Contact CTA Section */
.page-resources__contact-cta {
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--secondary-color), #004d99);
  color: #ffffff;
  text-align: center;
  box-shadow: inset 0 5px 15px rgba(0,0,0,0.2);
}

.page-resources__contact-title {
  color: #ffffff;
  margin-bottom: 20px;
}

.page-resources__contact-description {
  font-size: 18px;
  max-width: 800px;
  margin: 0 auto 40px auto;
  opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources h1 {
    font-size: 40px;
  }
  .page-resources h2 {
    font-size: 32px;
  }
  .page-resources h3 {
    font-size: 22px;
  }
  .page-resources__main-title {
    font-size: 42px;
  }
  .page-resources__play-now-button {
    padding: 16px 40px;
    font-size: 19px;
  }
}

@media (max-width: 768px) {
  .page-resources {
    padding-top: 10px !important; /* Mobile: Adjust for fixed header */
    font-size: 16px;
    line-height: 1.6;
  }
  
  .page-resources h1 {
    font-size: 32px;
  }
  .page-resources h2 {
    font-size: 28px;
  }
  .page-resources h3 {
    font-size: 20px;
  }
  
  .page-resources__video-section {
    padding-top: 10px !important; /* Mobile: Adjust for fixed header */
    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: 8px;
    overflow: hidden !important;
  }
  
  .page-resources__video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    object-fit: contain; /* Ensure video fits */
  }
  
  .page-resources__video-overlay {
    border-radius: 8px;
  }
  
  .page-resources__video-click-hint {
    font-size: 16px;
    padding: 10px 20px;
  }
  
  .page-resources__video-cta {
    margin-top: 30px;
    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: 14px 30px !important;
    font-size: 17px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__title-section,
  .page-resources__faq-section,
  .page-resources__brand-section,
  .page-resources__blog-section,
  .page-resources__contact-cta {
    padding: 50px 15px;
  }

  .page-resources__main-title {
    font-size: 36px;
    margin-bottom: 20px;
  }

  .page-resources__title-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;
    font-size: 16px !important;
    padding: 14px 20px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__faq-question {
    padding: 15px;
    flex-wrap: wrap;
  }
  
  .page-resources__faq-question h3 {
    font-size: 16px;
    width: calc(100% - 40px);
    margin-bottom: 5px;
  }
  
  .page-resources__faq-toggle {
    margin-left: 10px;
    width: 28px;
    height: 28px;
    font-size: 24px;
  }
  
  .page-resources__faq-answer {
    padding: 0 15px;
  }
  
  .page-resources__faq-item.active .page-resources__faq-answer {
    padding: 15px !important;
  }

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

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

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

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

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

  .page-resources__blog-item-title {
    font-size: 18px;
  }
  
  .page-resources__contact-title {
    font-size: 28px;
  }
  
  .page-resources__contact-description {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .page-resources h1 {
    font-size: 28px;
  }
  .page-resources h2 {
    font-size: 24px;
  }
  .page-resources__main-title {
    font-size: 30px;
  }
  .page-resources__video-click-hint {
    font-size: 14px;
    padding: 8px 15px;
  }
}