/* style/resources.css */

/* Biến CSS */
:root {
    --primary-color: #017439;
    --secondary-color: #FFFFFF;
    --register-color: #C30808;
    --login-color: #C30808;
    --text-on-dark: #FFFFFF;
    --text-on-light: #333333;
    --bg-light: #FFFFFF;
    --bg-dark: #017439;
    --button-text-yellow: #FFFF00;
}

.page-resources {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-on-dark); /* Mặc định cho nền tối của body */
    background-color: var(--dark-bg); /* Giả định body background là dark */
}

.page-resources__hero-section {
    position: relative;
    width: 100%;
    height: 600px; /* Chiều cao cố định cho hero */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding-top: 0; /* Giả định shared.css đã xử lý padding-top cho body */
    background-color: var(--primary-color);
}

.page-resources__hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.7); /* Làm mờ ảnh để chữ nổi bật */
}

.page-resources__hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.page-resources__hero-content {
    position: relative;
    z-index: 3;
    color: var(--secondary-color);
    max-width: 900px;
    padding: 0 20px;
}

.page-resources__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: var(--secondary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.page-resources__hero-description {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.page-resources__btn-primary,
.page-resources__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    margin: 10px;
    box-sizing: border-box;
}

.page-resources__btn-primary {
    background-color: var(--register-color);
    color: var(--button-text-yellow);
    border: 2px solid var(--register-color);
}

.page-resources__btn-primary:hover {
    background-color: darken(var(--register-color), 10%);
    border-color: darken(var(--register-color), 10%);
}

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

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

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

.page-resources__section-title {
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
    color: var(--primary-color);
}

.page-resources__intro-section {
    background-color: var(--bg-light);
    color: var(--text-on-light);
}

.page-resources__text-block {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.7;
    text-align: justify;
}

.page-resources__dark-section {
    background-color: var(--bg-dark);
    color: var(--text-on-dark);
}

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

.page-resources__types-section .page-resources__section-title {
    color: var(--secondary-color);
}

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

.page-resources__card {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    color: var(--text-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__card:hover {
    transform: translateY(-10px);
}

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

.page-resources__card-title {
    font-size: 1.5em;
    padding: 15px;
    color: var(--secondary-color);
    min-height: 70px;
}

.page-resources__card-title a {
    color: var(--secondary-color);
    text-decoration: none;
}

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

.page-resources__card-description {
    padding: 0 15px 20px;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
}

.page-resources__list {
    list-style: disc inside;
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-resources__list-item {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.page-resources__benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
    color: var(--text-on-dark);
}

.page-resources__benefit-item {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-resources__benefit-item:hover {
    transform: translateY(-10px);
}

.page-resources__benefit-icon {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
}

.page-resources__benefit-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.page-resources__benefit-description {
    font-size: 1em;
    color: rgba(255, 255, 255, 0.8);
}

.page-resources__faq-section {
    background-color: var(--bg-light);
    color: var(--text-on-light);
}

.page-resources__faq-section .page-resources__section-title {
    color: var(--primary-color);
}

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

.page-resources__faq-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.page-resources__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: #eee;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color);
    transition: background-color 0.3s ease;
}

.page-resources__faq-question:hover {
    background-color: #e0e0e0;
}

.page-resources__faq-toggle {
    font-size: 1.5em;
    font-weight: normal;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

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

.page-resources__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-on-light);
}

.page-resources__faq-item.active .page-resources__faq-answer {
    max-height: 1000px !important; /* Đủ lớn để chứa mọi nội dung */
    padding: 15px 25px;
}

.page-resources__cta-section {
    text-align: center;
}

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

/* Responsive styles */
@media (max-width: 1024px) {
    .page-resources__main-title {
        font-size: 2.8em;
    }
    .page-resources__section-title {
        font-size: 2em;
    }
    .page-resources__grid,
    .page-resources__benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .page-resources {
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        height: 500px;
    }
    .page-resources__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }
    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 20px;
    }
    .page-resources__section-title {
        font-size: 1.8em;
    }
    .page-resources__container {
        padding: 30px 15px;
    }
    .page-resources__card,
    .page-resources__benefit-item {
        padding: 20px;
    }
    .page-resources__card-image {
        height: 200px;
    }
    .page-resources__card-title,
    .page-resources__benefit-title {
        font-size: 1.3em;
    }
    .page-resources__btn-primary,
    .page-resources__btn-secondary {
        padding: 12px 25px;
        font-size: 1em;
        width: 100%;
        max-width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }
    
    /* Mobile specific image, video, button, and container adaptations */
    .page-resources img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources video,
    .page-resources__video {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    
    .page-resources__section,
    .page-resources__card,
    .page-resources__container,
    .page-resources__video-section,
    .page-resources__video-container,
    .page-resources__video-wrapper,
    .page-resources__cta-buttons,
    .page-resources__button-group,
    .page-resources__btn-container {
        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__cta-button,
    .page-resources__btn-primary,
    .page-resources__btn-secondary,
    .page-resources a[class*="button"],
    .page-resources a[class*="btn"] {
        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-buttons {
        flex-wrap: wrap !important;
        gap: 10px;
        flex-direction: column; /* For stacked buttons on mobile */
    }
}

@media (max-width: 480px) {
    .page-resources__main-title {
        font-size: 1.8em;
    }
    .page-resources__hero-section {
        height: 400px;
    }
    .page-resources__section-title {
        font-size: 1.5em;
    }
    .page-resources__hero-description {
        font-size: 0.9em;
    }
}