/* style/resources.css */

/* Base Styles & Typography */
.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #0a0a0a; /* Inherited from body via shared.css */
}

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

.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    color: #ffffff;
    font-weight: bold;
}

.page-resources__sub-title {
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: bold;
}

.page-resources__text-block {
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.8;
}

.page-resources a {
    color: #FFFFFF;
    text-decoration: none;
}

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

/* Section Styling */
.page-resources__hero-section {
    position: relative;
    width: 100%;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: var(--header-offset, 120px);
    background-color: #017439; /* Brand primary color for hero */
    color: #ffffff;
}

.page-resources__hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Overlay for readability */
    z-index: 1;
}

.page-resources__hero-section .page-resources__container {
    position: relative;
    z-index: 2;
    padding-top: 0; /* Already handled by section padding-top */
}

.page-resources__hero-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #FFFF00; /* Use yellow for highlight */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.page-resources__hero-description {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

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

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: normal;
    word-wrap: break-word;
    box-sizing: border-box;
}

.page-resources__btn-primary {
    background-color: #C30808; /* Custom 'Đăng ký'/'Đăng nhập' color */
    color: #ffffff; /* Force white text for contrast on #C30808 */
    border: 2px solid #C30808;
}

.page-resources__btn-primary:hover {
    background-color: #a00606;
    border-color: #a00606;
}

.page-resources__btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-resources__btn-secondary:hover {
    background-color: #ffffff;
    color: #017439;
}

/* Content Area */
.page-resources__content-area {
    padding: 80px 0;
}

.page-resources__content-area .page-resources__section-title,
.page-resources__content-area .page-resources__sub-title {
    color: #ffffff; /* Text on dark body background */
}

.page-resources__content-area .page-resources__text-block {
    color: #f0f0f0;
}

/* Guides Section */
.page-resources__guides-section {
    padding: 80px 0;
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__guide-item {
    background-color: rgba(255, 255, 255, 0.08); /* Slightly lighter background for cards */
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__guide-title {
    font-size: 1.5em;
    color: #FFFF00;
    margin-bottom: 15px;
}

.page-resources__guide-description {
    margin-bottom: 20px;
    color: #f0f0f0;
}

.page-resources__guide-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
}

/* Features Section */
.page-resources__features-section {
    padding: 80px 0;
    background-color: #0a0a0a;
    color: #ffffff;
}

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

.page-resources__feature-card {
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__feature-card:hover {
    transform: translateY(-5px);
}

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

.page-resources__feature-title {
    font-size: 1.3em;
    color: #FFFF00;
    padding: 15px 20px 5px;
}

.page-resources__feature-title a {
    color: #FFFF00;
    text-decoration: none;
}

.page-resources__feature-title a:hover {
    text-decoration: underline;
}

.page-resources__feature-description {
    font-size: 0.95em;
    color: #f0f0f0;
    padding: 0 20px 20px;
}

/* Security and Support Section */
.page-resources__security-support-section {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
}

.page-resources__security-support-section .page-resources__section-title,
.page-resources__security-support-section .page-resources__sub-title {
    color: #ffffff;
}

.page-resources__security-support-section .page-resources__text-block {
    color: #f0f0f0;
}

.page-resources__info-block {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.page-resources__info-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 20px;
}

/* FAQ Section */
.page-resources__faq-section {
    padding: 80px 0;
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__faq-section .page-resources__section-title,
.page-resources__faq-section .page-resources__text-block {
    color: #ffffff;
}

.page-resources__faq-list {
    max-width: 800px;
    margin: 40px auto 0;
}

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

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.3s ease;
}

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

.page-resources__faq-title {
    font-size: 1.2em;
    color: #FFFF00;
    margin: 0;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFFF00;
    transition: transform 0.3s ease;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    transform: rotate(0deg); /* Stays as '-' */
}

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.05);
    color: #f0f0f0;
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Sufficiently large to show content */
    padding: 20px 25px;
}

.page-resources__faq-answer p {
    margin: 0;
    color: #f0f0f0;
}

/* News Section */
.page-resources__news-section {
    padding: 80px 0;
    background-color: #017439;
    color: #ffffff;
    text-align: center;
}

.page-resources__news-section .page-resources__section-title {
    color: #ffffff;
}

.page-resources__news-section .page-resources__text-block {
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Final CTA Section */
.page-resources__cta-final {
    padding: 80px 0;
    background-color: #0a0a0a;
    color: #ffffff;
    text-align: center;
}

.page-resources__cta-final .page-resources__section-title {
    color: #ffffff;
}

.page-resources__cta-final .page-resources__text-block {
    color: #f0f0f0;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__sub-title {
        font-size: 1.5em;
    }
    .page-resources__feature-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        min-height: 500px;
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Ensure header offset on mobile */
    }
    .page-resources__hero-title {
        font-size: 2.2em;
    }
    .page-resources__hero-description {
        font-size: 1em;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__sub-title {
        font-size: 1.3em;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources__container,
    .page-resources__guide-item,
    .page-resources__feature-card,
    .page-resources__info-block,
    .page-resources__faq-item,
    .page-resources__faq-list {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
    }
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
    .page-resources__video-section {
        padding-top: var(--header-offset, 120px) !important;
    }
    .page-resources__feature-grid {
        grid-template-columns: 1fr;
    }
    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-answer {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 1.8em;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__sub-title {
        font-size: 1.2em;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 12px 25px;
        font-size: 1em;
    }
}

/* Color Contrast Fixes - Applied based on body background #0a0a0a (dark) */
.page-resources__dark-bg {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__light-bg {
    background-color: #0a0a0a;
    color: #ffffff;
}

.page-resources__content-area,
.page-resources__text-block {
    color: #f0f0f0; /* Light text on dark body background */
}

.page-resources p,
.page-resources li {
    color: #f0f0f0; /* Light text on dark body background */
}

.page-resources__card, .page-resources__guide-item, .page-resources__feature-card, .page-resources__info-block, .page-resources__faq-item {
    background-color: rgba(255, 255, 255, 0.08); /* Semi-transparent white on dark body */
    color: #ffffff;
    border: none;
}

.page-resources__btn-primary {
    background: #C30808;
    color: #ffffff; /* FORCED WHITE TEXT for WCAG AA contrast on #C30808 */
    border: 2px solid #C30808;
}

.page-resources__btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.page-resources__hero-title, .page-resources__guide-title, .page-resources__feature-title, .page-resources__faq-title, .page-resources__faq-toggle {
    color: #FFFF00; /* Custom yellow for highlights */
}