/* style/resources.css */

:root {
    --primary-color: #0047AB;
    --secondary-color: #FFD700;
    --dark-bg-color: #121212;
    --light-bg-color: #f8f9fa;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-color: #e0e0e0;
    --card-bg-dark: rgba(255, 255, 255, 0.1);
    --card-bg-light: #ffffff;
}

/* 确保内容不 bị che bởi fixed header */
.page-resources {
    padding-top: 120px; /* Desktop: Adjust based on actual header height */
    color: var(--text-light); /* Default text color for dark body background */
}

.page-resources__section {
    padding: 60px 20px;
    text-align: center;
}

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

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

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

.page-resources__section-title,
.page-resources__hero-title,
.page-resources__brand-title,
.page-resources__blog-title,
.page-resources__app-download-title,
.page-resources__contact-section h2 {
    font-size: 3.2em;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-light); /* Default for dark background */
}

.page-resources__section--light-bg .page-resources__section-title,
.page-resources__section--light-bg .page-resources__brand-title,
.page-resources__section--light-bg .page-resources__blog-title,
.page-resources__section--light-bg .page-resources__app-download-title,
.page-resources__section--light-bg .page-resources__contact-section h2 {
    color: var(--text-dark);
}

.page-resources__section-description,
.page-resources__hero-description,
.page-resources__app-download-description,
.page-resources__contact-section p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__section--light-bg .page-resources__section-description,
.page-resources__section--light-bg .page-resources__hero-description,
.page-resources__section--light-bg .page-resources__app-download-description,
.page-resources__section--light-bg .page-resources__contact-section p {
    color: var(--text-dark);
}

.page-resources__hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a2e63 100%);
    padding: 100px 20px;
    padding-top: 150px; /* More padding for hero to ensure it's below header */
    color: var(--text-light);
    text-align: center;
}

.page-resources__hero-title {
    font-size: 4em;
    margin-bottom: 25px;
    color: var(--text-light);
}

.page-resources__hero-description {
    font-size: 1.2em;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 40px;
}

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

.page-resources__cta-button {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
}

.page-resources__cta-button--primary {
    background: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

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

.page-resources__cta-button--secondary {
    background: transparent;
    color: var(--text-light);
    border-color: var(--text-light);
}

.page-resources__cta-button--secondary:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Highlight text */
.text-highlight {
    color: var(--secondary-color);
}

/* Grid for resources cards */
.page-resources__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-resources__card {
    background: var(--card-bg-light);
    color: var(--text-dark);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    text-align: left;
    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 8px 25px rgba(0, 0, 0, 0.2);
}

.page-resources__card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-resources__card-title {
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

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

.page-resources__card-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.page-resources__card-text {
    font-size: 1em;
    line-height: 1.6;
    color: #555;
    flex-grow: 1;
    margin-bottom: 20px;
}

.page-resources__card-button {
    display: inline-block;
    padding: 10px 25px;
    background: var(--primary-color);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.page-resources__card-button:hover {
    background: #003780;
}

/* Brand Section */
.page-resources__brand-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
    text-align: left;
}

.page-resources__brand-item {
    background: var(--card-bg-dark);
    color: var(--text-light);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.page-resources__brand-item:hover {
    transform: translateY(-5px);
}

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

.page-resources__brand-item p {
    font-size: 1em;
    line-height: 1.6;
    color: #ccc;
}

.page-resources__brand-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.page-resources__cta-full-width {
    margin-top: 60px;
    text-align: center;
}

/* FAQ Section */
.page-resources__faq-list {
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-resources__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--card-bg-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.page-resources__faq-question:hover {
    background: #f0f0f0;
    border-color: #c0c0c0;
}

.page-resources__faq-question h3 {
    margin: 0;
    padding: 0;
    flex: 1;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.5;
    pointer-events: none;
    color: var(--text-dark);
}

.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;
    border-radius: 50%;
    background: #eee;
}

.page-resources__faq-item.active .page-resources__faq-toggle {
    color: var(--primary-color);
    transform: rotate(45deg);
    background: 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: #fcfcfc;
    color: var(--text-dark);
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
}

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

.page-resources__faq-answer p {
    margin: 0;
    font-size: 1em;
    line-height: 1.6;
    color: #555;
}

/* Blog Section */
.page-resources__blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.page-resources__blog-item {
    background: var(--card-bg-dark);
    color: var(--text-light);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

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

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

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

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

.page-resources__blog-item-excerpt {
    font-size: 0.95em;
    line-height: 1.6;
    color: #ccc;
    margin: 0 20px 15px;
    flex-grow: 1;
}

.page-resources__blog-item-date {
    display: block;
    font-size: 0.85em;
    color: #999;
    margin: 0 20px 20px;
}

/* App Download Section */
.page-resources__app-download-container {
    display: flex;
    align-items: center;
    gap: 50px;
    text-align: left;
}

.page-resources__app-download-content {
    flex: 1;
}

.page-resources__app-download-title {
    font-size: 3em;
    color: var(--text-dark);
    text-align: left;
}

.page-resources__app-download-description {
    color: #555;
    text-align: left;
}

.page-resources__app-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-resources__app-button {
    display: inline-flex;
    align-items: center;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none;
    color: var(--text-light);
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.page-resources__app-button--android {
    background: #3DDC84; /* Android Green */
}

.page-resources__app-button--android:hover {
    background: #30bb6e;
    transform: translateY(-2px);
}

.page-resources__app-button--ios {
    background: #007AFF; /* iOS Blue */
}

.page-resources__app-button--ios:hover {
    background: #005cc9;
    transform: translateY(-2px);
}

.page-resources__app-button-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    object-fit: contain;
}

.page-resources__app-download-note {
    font-size: 0.9em;
    color: #777;
    margin-top: 25px;
    text-align: left;
}

.page-resources__app-download-image-wrapper {
    flex: 1;
    text-align: center;
}

.page-resources__app-download-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Contact Section */
.page-resources__contact-info {
    margin-top: 40px;
    font-size: 1.1em;
    line-height: 1.8;
    color: #ccc;
}

.page-resources__contact-info p strong {
    color: var(--secondary-color);
}

.page-resources__contact-link {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-resources__contact-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-resources__hero-title {
        font-size: 3.5em;
    }
    .page-resources__section-title,
    .page-resources__brand-title,
    .page-resources__blog-title,
    .page-resources__app-download-title,
    .page-resources__contact-section h2 {
        font-size: 2.8em;
    }
}

@media (max-width: 768px) {
    .page-resources {
        padding-top: 100px !important; /* Mobile: Adjust based on actual header height */
        font-size: 16px;
        line-height: 1.6;
    }
    .page-resources__hero-section {
        padding: 80px 15px;
        padding-top: 120px; /* More padding for mobile hero */
    }
    .page-resources__hero-title {
        font-size: 2.5em;
        margin-bottom: 20px;
    }
    .page-resources__hero-description {
        font-size: 1em;
        margin-bottom: 30px;
    }
    .page-resources__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-resources__cta-button {
        padding: 12px 25px;
        font-size: 1em;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-resources__section {
        padding: 40px 15px;
    }
    .page-resources__section-title,
    .page-resources__brand-title,
    .page-resources__blog-title,
    .page-resources__app-download-title,
    .page-resources__contact-section h2 {
        font-size: 2em;
        margin-bottom: 15px;
    }
    .page-resources__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }
    .page-resources__grid,
    .page-resources__brand-content,
    .page-resources__blog-list {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    .page-resources__card,
    .page-resources__brand-item,
    .page-resources__blog-item {
        padding: 25px;
    }
    .page-resources__card-title {
        font-size: 1.4em;
    }
    .page-resources__brand-item h3 {
        font-size: 1.5em;
    }
    .page-resources__blog-item-title {
        font-size: 1.2em;
    }
    .page-resources__faq-question {
        padding: 15px 20px;
    }
    .page-resources__faq-question h3 {
        font-size: 1em;
    }
    .page-resources__faq-toggle {
        font-size: 1.5em;
        width: 25px;
        height: 25px;
    }
    .page-resources__faq-answer {
        padding: 0 20px;
    }
    .page-resources__faq-item.active .page-resources__faq-answer {
        padding: 15px 20px !important;
    }
    .page-resources__app-download-container {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .page-resources__app-download-title,
    .page-resources__app-download-description,
    .page-resources__app-download-note {
        text-align: center;
    }
    .page-resources__app-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }
    .page-resources__app-button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        justify-content: center;
    }
    .page-resources__app-button-icon {
        margin-right: 8px;
    }
    .page-resources__app-download-image-wrapper {
        order: -1; /* Image first on mobile */
    }
    .page-resources img {
      max-width: 100% !important;
      height: auto !important;
      display: block !important;
      box-sizing: border-box !important;
    }
    .page-resources__container,
    .page-resources__card,
    .page-resources__section,
    .page-resources__brand-item,
    .page-resources__blog-item,
    .page-resources__faq-item,
    .page-resources__app-download-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 0;
        padding-right: 0;
    }
    .page-resources__cta-full-width {
        padding: 0 15px;
    }
    .page-resources__contact-info {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .page-resources__hero-title {
        font-size: 2em;
    }
    .page-resources__section-title,
    .page-resources__brand-title,
    .page-resources__blog-title,
    .page-resources__app-download-title,
    .page-resources__contact-section h2 {
        font-size: 1.8em;
    }
    .page-resources__faq-question h3 {
        font-size: 0.95em;
    }
    .page-resources__cta-button {
        font-size: 0.95em;
        padding: 10px 20px;
    }
    .page-resources__app-button {
        font-size: 0.95em;
        padding: 12px 20px;
    }
}