/* style/resources.css */
:root {
  --primary-color: #FFD700; /* Vàng kim */
  --secondary-color: #8B0000; /* Đỏ sẫm */
  --text-light: #ffffff;
  --text-dark: #333333;
  --bg-dark: var(--dark-bg-1, #1a1a1a); /* Sử dụng biến từ shared.css, mặc định nếu không có */
  --card-bg-dark: rgba(255, 255, 255, 0.08);
  --border-dark: rgba(255, 255, 255, 0.15);
}

.page-resources {
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
}

/* Đảm bảo nội dung không bị che bởi fixed header */
.page-resources__hero-section {
  padding-top: 120px; /* Desktop: Adjust based on actual header height */
  padding-bottom: 60px;
  background: linear-gradient(135deg, var(--bg-dark), #2a2a2a);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-resources__hero-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-resources__main-title {
  font-size: 3.2em;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: bold;
  line-height: 1.2;
}

.page-resources__hero-description {
  font-size: 1.2em;
  color: var(--text-light);
  margin-bottom: 40px;
  opacity: 0.9;
}

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

.page-resources__cta-button {
  display: inline-block;
  padding: 15px 35px;
  background: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 50px;
  font-size: 1.1em;
  font-weight: bold;
  transition: all 0.3s ease;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.page-resources__cta-button:hover {
  background: #ffc107; /* Slightly darker gold */
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

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

/* FAQ Section */
.page-resources__faq-section {
  padding: 60px 20px;
  background-color: #1a1a1a; /* Darker background for contrast */
  color: var(--text-light);
}

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

.page-resources__faq-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

.page-resources__faq-list {
  margin-top: 30px;
}

.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--card-bg-dark);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
  background: rgba(255, 255, 255, 0.12);
}

.page-resources__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;
}

.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;
  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); /* Change to X or rotate for minus */
  color: var(--secondary-color);
}

.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: #2a2a2a;
  color: var(--text-light);
  border-top: 1px solid var(--border-dark);
}

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

/* Brand Introduction Section */
.page-resources__brand-section {
  padding: 60px 20px;
  background-color: #0d0d0d; /* Even darker background */
  color: var(--text-light);
}

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

.page-resources__brand-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-resources__brand-item {
  background: var(--card-bg-dark);
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.page-resources__brand-image {
  max-width: 250px; /* Adjusted from 100px to meet min 200x200 requirement */
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  object-fit: cover;
}

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

.page-resources__brand-item p {
  font-size: 1em;
  color: var(--text-light);
  opacity: 0.85;
}

/* Blog List Section */
.page-resources__blog-section {
  padding: 60px 20px;
  background-color: #1a1a1a;
  color: var(--text-light);
}

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

.page-resources__blog-title {
  font-size: 2.5em;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 40px;
  font-weight: bold;
}

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

.page-resources__blog-item {
  background: var(--card-bg-dark);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-resources__blog-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-dark);
}

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

.page-resources__blog-item-excerpt {
  font-size: 0.95em;
  color: var(--text-light);
  margin: 0 20px 15px;
  opacity: 0.8;
}

.page-resources__blog-item-date {
  display: block;
  font-size: 0.85em;
  color: var(--text-light);
  opacity: 0.6;
  margin: 0 20px 20px;
}

/* General text and links */
.page-resources h1, .page-resources h2, .page-resources h3, .page-resources h4, .page-resources h5, .page-resources h6 {
  color: var(--primary-color);
}

.page-resources p, .page-resources li {
  color: var(--text-light);
}

.page-resources a {
  color: var(--primary-color);
  text-decoration: none;
}

.page-resources a:hover {
  text-decoration: underline;
  color: #ffc107;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-resources__main-title {
    font-size: 2.8em;
  }
  .page-resources__hero-description {
    font-size: 1.1em;
  }
}

@media (max-width: 768px) {
  .page-resources__hero-section {
    padding-top: 100px; /* Mobile: Adjust based on actual header height */
    padding-bottom: 40px;
    padding-left: 15px;
    padding-right: 15px;
  }

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

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

  .page-resources__cta-buttons {
    flex-direction: column;
    gap: 15px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    padding: 0 15px;
  }

  .page-resources__cta-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 25px !important;
    font-size: 1em !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .page-resources__faq-section,
  .page-resources__brand-section,
  .page-resources__blog-section {
    padding: 40px 15px;
  }

  .page-resources__faq-title,
  .page-resources__brand-title,
  .page-resources__blog-title {
    font-size: 2em;
    margin-bottom: 30px;
  }

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

  .page-resources__faq-question h3 {
    font-size: 1em;
  }

  .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-content,
  .page-resources__blog-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }

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

  .page-resources__brand-item h3 {
    font-size: 1.5em;
  }

  .page-resources__blog-item-title {
    font-size: 1.2em;
  }

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

  /* Image responsive adjustments */
  .page-resources img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
  }
  
  .page-resources__hero-section,
  .page-resources__faq-section,
  .page-resources__brand-section,
  .page-resources__blog-section,
  .page-resources__hero-container,
  .page-resources__faq-container,
  .page-resources__brand-container,
  .page-resources__blog-container,
  .page-resources__brand-item,
  .page-resources__blog-item {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px;
    padding-right: 15px;
    overflow: hidden !important; /* Ensure no overflow for sections/containers */
  }

  .page-resources__brand-image {
    max-width: 200px !important; /* Ensure min size but also responsive */
    margin: 0 auto 20px auto;
  }
}

@media (max-width: 480px) {
  .page-resources__main-title {
    font-size: 1.8em;
  }
  .page-resources__hero-description {
    font-size: 0.9em;
  }
  .page-resources__cta-button {
    font-size: 0.9em !important;
    padding: 10px 20px !important;
  }
  .page-resources__faq-title,
  .page-resources__brand-title,
  .page-resources__blog-title {
    font-size: 1.8em;
  }
}