/* style/resources.css */

:root {
    --primary-color: #017439;
    --secondary-color: #005f2f;
    --text-color-light: #ffffff;
    --text-color-dark: #333333;
    --background-light: #ffffff;
    --background-dark: #0d0d0d; /* Giả định background-color của body là dark */
    --accent-register: #C30808;
    --accent-login: #C30808;
    --font-login-register: #FFFF00;
}

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

.page-resources__section {
    padding: 60px 0;
    position: relative;
}

.page-resources__dark-section {
    background-color: var(--primary-color);
    color: var(--text-color-light);
}

.page-resources__light-bg {
    background-color: var(--background-light);
    color: var(--text-color-dark);
}

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

/* Hero Section */
.page-resources__hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    padding-top: var(--header-offset, 120px); /* Đảm bảo không bị header che */
    background: linear-gradient(135deg, var(--primary-color) 0%, #005f2f 100%); /* Gradient background */
    color: var(--text-color-light);
    overflow: hidden;
}

.page-resources__hero-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.page-resources__hero-image {
    width: 100%;
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.page-resources__hero-image img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
    object-fit: cover;
}

.page-resources__hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.page-resources__hero-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--text-color-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.9);
}

.page-resources__cta-button {
    display: inline-block;
    padding: 16px 45px;
    background: var(--accent-register);
    color: var(--font-login-register);
    text-decoration: none;
    border-radius: 8px;
    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;
}

.page-resources__cta-button:hover {
    background: #a80707;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* General Section Styling */
.page-resources__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 50px;
    font-weight: 700;
    color: inherit;
}

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

.page-resources__sub-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    font-weight: 600;
    color: inherit;
}

.page-resources__text-block {
    font-size: 1em;
    margin-bottom: 15px;
    line-height: 1.7;
    color: inherit;
}

.page-resources__text-block strong {
    color: inherit; /* Đảm bảo màu chữ vẫn đúng trên nền tối/sáng */
}

.page-resources__content-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.page-resources__content-grid--reverse {
    flex-direction: row-reverse;
}

.page-resources__image-wrapper {
    flex: 1;
    min-width: 300px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-resources__image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.page-resources__text-content {
    flex: 1.5;
    padding: 20px;
    box-sizing: border-box;
}

/* Buttons */
.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
    border: 2px solid transparent;
}

.page-resources__btn-primary {
    background: var(--primary-color);
    color: var(--text-color-light);
    border-color: var(--primary-color);
}

.page-resources__btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

.page-resources__dark-section .page-resources__btn-secondary {
    color: var(--text-color-light);
    border-color: var(--text-color-light);
}

.page-resources__btn-secondary:hover {
    background: var(--primary-color);
    color: var(--text-color-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.page-resources__dark-section .page-resources__btn-secondary:hover {
    background: var(--text-color-light);
    color: var(--primary-color);
}

/* FAQ Section */
.page-resources__faq-intro {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-light);
}

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

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

.page-resources__faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 25px;
  background: var(--background-light);
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  position: relative;
  color: var(--text-color-dark);
}

.page-resources__dark-section .page-resources__faq-question {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color-light);
}

.page-resources__faq-question:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.page-resources__dark-section .page-resources__faq-question:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.page-resources__faq-question h3 {
  margin: 0;
  padding: 0;
  flex: 1;
  font-size: 1.1em;
  font-weight: 600;
  line-height: 1.5;
  pointer-events: none;
}

.page-resources__faq-toggle {
  font-size: 1.8em;
  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;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.page-resources__dark-section .page-resources__faq-toggle {
    color: rgba(255, 255, 255, 0.7);
}

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

.page-resources__dark-section .page-resources__faq-item.active .page-resources__faq-toggle {
    color: var(--text-color-light);
}

.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-color-dark);
  border-radius: 0 0 8px 8px;
}

.page-resources__dark-section .page-resources__faq-answer {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

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

.page-resources__faq-item.active .page-resources__faq-question {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.page-resources__btn-secondary--faq-more {
    display: block;
    margin: 40px auto 0 auto;
    text-align: center;
    max-width: 300px;
}

/* Bottom CTA */
.page-resources__cta-bottom {
    padding: 80px 0;
    text-align: center;
    background-color: #f8f8f8;
}

.page-resources__cta-bottom .page-resources__section-title {
    color: var(--primary-color);
}

.page-resources__cta-bottom .page-resources__text-block {
    max-width: 800px;
    margin: 0 auto 30px auto;
    color: var(--text-color-dark);
}

.page-resources__cta-button--large {
    font-size: 1.3em;
    padding: 18px 50px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .page-resources__hero-title {
        font-size: 2.5em;
    }
    .page-resources__hero-description {
        font-size: 1.1em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__sub-title {
        font-size: 1.5em;
    }
    .page-resources__content-grid {
        flex-direction: column;
    }
    .page-resources__content-grid--reverse {
        flex-direction: column;
    }
    .page-resources__text-content {
        padding: 0;
    }
    .page-resources__image-wrapper {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        padding-top: var(--header-offset, 120px) !important;
        padding-bottom: 40px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__hero-title {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-resources__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__section {
        padding: 40px 0;
    }
    .page-resources__section-title {
        font-size: 1.8em;
        margin-bottom: 30px;
    }
    .page-resources__sub-title {
        font-size: 1.3em;
    }
    .page-resources__container {
        padding: 0 15px;
    }
    .page-resources__image-wrapper img,
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    .page-resources__image-wrapper,
    .page-resources__card,
    .page-resources__container,
    .page-resources__content-grid,
    .page-resources__text-content,
    .page-resources__cta-bottom .page-resources__cta-content {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__faq-question {
        padding: 15px;
        flex-wrap: wrap;
    }
    .page-resources__faq-question h3 {
        font-size: 1em;
        margin-bottom: 0;
        width: calc(100% - 40px);
    }
    .page-resources__faq-toggle {
        margin-left: 10px;
        width: 24px;
        height: 24px;
        font-size: 1.5em;
    }
    .page-resources__faq-answer {
        padding: 0 15px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px !important;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__cta-bottom .page-resources__cta-content {
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__cta-button--large {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}