/* style/resources.css */
:root {
    --primary-color: #FFD700; /* Vàng */
    --secondary-color: #1A1A1A; /* Đen đậm */
    --text-light: #ffffff;
    --text-dark: #333333;
    --bg-dark: #0d0d0d;
    --border-color: #333333;
    --card-bg-dark: rgba(255, 255, 255, 0.08);
}

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

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

/* Hero Section */
.page-resources__hero-section {
    padding: 120px 0 60px; /* Adjusted padding-top for fixed header */
    text-align: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0d0d0d 100%);
    position: relative;
    overflow: hidden;
}

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

.page-resources__hero-description {
    font-size: 18px;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 40px;
}

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

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-color);
    color: var(--secondary-color);
    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;
}

.page-resources__cta-button:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Section Titles and Descriptions */
.page-resources__section-title {
    font-size: 36px;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
    padding-top: 60px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.page-resources__section-description {
    font-size: 17px;
    color: var(--text-light);
    text-align: center;
    max-width: 900px;
    margin: 0 auto 50px;
}

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

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

.page-resources__card {
    background: var(--card-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-resources__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.page-resources__card-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-link {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.page-resources__card-title-link:hover {
    color: #e6c200;
}

.page-resources__card-title {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-resources__card-text {
    font-size: 16px;
    color: #cccccc;
    line-height: 1.6;
}

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

.page-resources__card-text a:hover {
    text-decoration: underline;
    color: #e6c200;
}

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

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

/* FAQ容器样式 */
.page-resources__faq-item {
  margin-bottom: 15px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* 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 25px;
  opacity: 0;
  color: #cccccc;
  background: var(--secondary-color);
}

/* 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: 25px !important;
  opacity: 1;
  background: var(--secondary-color);
  border-radius: 0 0 8px 8px;
}

/* Question Style */
.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  background: var(--card-bg-dark);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-light);
}

.page-resources__faq-item.active .page-resources__faq-question {
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.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: 18px;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none; /* Ngăn h3 chặn sự kiện click */
  color: var(--primary-color);
}

/* Toggle Icon */
.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: 20px;
  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(--text-light);
  transform: rotate(45deg);
}

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

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

.page-resources__blog-item {
    background: var(--card-bg-dark);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

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

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

.page-resources__blog-title-link:hover {
    color: #e6c200;
}

.page-resources__blog-item-title {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 1.3;
}

.page-resources__blog-item-excerpt {
    font-size: 16px;
    color: #cccccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

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

.page-resources__blog-item-excerpt a:hover {
    text-decoration: underline;
    color: #e6c200;
}

.page-resources__blog-item-date {
    font-size: 14px;
    color: #888888;
    margin-top: auto;
}

/* About New88 Section */
.page-resources__about-section {
    padding: 40px 0 80px;
    background-color: var(--bg-dark);
}

/* Contact Section */
.page-resources__contact-section {
    padding: 40px 0 80px;
    text-align: center;
    background-color: var(--secondary-color);
}

/* Links within text */
.page-resources p a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* General dark section styling */
.page-resources__dark-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

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

@media (max-width: 768px) {
    .page-resources__hero-section {
        padding: 100px 15px 40px; /* Mobile padding-top for fixed header */
    }
    .page-resources__main-title {
        font-size: 32px;
    }
    .page-resources__hero-description {
        font-size: 16px;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    .page-resources__cta-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        font-size: 16px;
        padding: 12px 20px;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__section-title {
        font-size: 28px;
        padding-top: 40px;
    }
    .page-resources__section-description {
        font-size: 15px;
        margin-bottom: 30px;
    }
    .page-resources__container {
        padding: 0 15px;
    }
    .page-resources__card-grid, .page-resources__blog-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .page-resources__card-image, .page-resources__blog-image {
        height: 180px;
    }
    .page-resources__card-title, .page-resources__blog-item-title {
        font-size: 20px;
    }
    .page-resources__card-text, .page-resources__blog-item-excerpt {
        font-size: 15px;
    }

    /* FAQ Mobile */
    .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: 20px !important;
    }

    /* Image Responsive */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__card,
    .page-resources__blog-item,
    .page-resources__hero-section,
    .page-resources__guides-section,
    .page-resources__faq-section,
    .page-resources__news-section,
    .page-resources__about-section,
    .page-resources__contact-section,
    .page-resources__container,
    .page-resources__cta-buttons,
    .page-resources__card-grid,
    .page-resources__blog-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-resources__cta-buttons {
        flex-wrap: wrap !important;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .page-resources__main-title {
        font-size: 28px;
    }
    .page-resources__section-title {
        font-size: 24px;
    }
    .page-resources__hero-description {
        font-size: 15px;
    }
    .page-resources__cta-button {
        font-size: 15px;
        padding: 10px 15px;
    }
    .page-resources__card-title, .page-resources__blog-item-title {
        font-size: 18px;
    }
    .page-resources__card-text, .page-resources__blog-item-excerpt {
        font-size: 14px;
    }
}