/* style/faq.css */

/* Base styles for the page-faq component */
.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #ffffff; /* Default text color for dark body background */
    background-color: #1a1a1a; /* Assuming body background from shared.css */
}

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

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    padding: 80px 0;
    text-align: center;
    background-color: #017439; /* Brand color for hero */
    color: #ffffff;
    padding-top: var(--header-offset, 120px); /* Fixed header offset */
    overflow: hidden; /* Ensure content doesn't overflow */
}

.page-faq__main-title {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #FFFF00; /* Yellow for title as per "Đăng ký và Đăng nhập" font color */
}

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

.page-faq__cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.page-faq__btn-primary,
.page-faq__btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    box-sizing: border-box;
    max-width: 100%; /* Ensure buttons are responsive */
    white-space: normal; /* Allow text wrapping */
    word-wrap: break-word; /* Allow text wrapping */
}

.page-faq__btn-primary {
    background-color: #C30808; /* Red for 'Đăng ký' as per custom color */
    color: #FFFF00; /* Yellow for font as per custom color */
    border: 2px solid #C30808;
}

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

.page-faq__btn-secondary {
    background-color: transparent;
    color: #FFFF00; /* Yellow for font as per custom color */
    border: 2px solid #C30808; /* Red for 'Đăng nhập' as per custom color */
}

.page-faq__btn-secondary:hover {
    background-color: #C30808;
    color: #ffffff;
}

.page-faq__hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    display: block; /* Ensures image is treated as block for margin auto */
    margin: 0 auto; /* Center the image */
}

/* FAQ Section */
.page-faq__faq-section {
    padding: 60px 0;
    background-color: #1a1a1a; /* Dark background from body */
    color: #ffffff;
}

.page-faq__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: #FFFF00; /* Yellow for titles */
}

.page-faq__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
    color: #f0f0f0;
}

.page-faq__faq-item {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards */
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: #017439; /* Brand color for question header */
    color: #ffffff;
    font-weight: bold;
    font-size: 1.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-faq__faq-question:hover {
    background-color: #005f2e;
}

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

.page-faq__faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg); /* Plus to X for active */
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #f0f0f0;
}

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

.page-faq__faq-answer p {
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #f0f0f0;
}

.page-faq__faq-answer ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.page-faq__faq-answer li {
    margin-bottom: 8px;
    color: #f0f0f0;
}

.page-faq__cta-bottom {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    background-color: rgba(195, 8, 8, 0.1); /* Light red tint for CTA */
    border-radius: 8px;
    border: 1px solid rgba(195, 8, 8, 0.3);
}

.page-faq__cta-text {
    font-size: 1.3em;
    margin-bottom: 25px;
    color: #f0f0f0;
    font-weight: bold;
}

/* More Info Section */
.page-faq__more-info-section {
    padding: 60px 0;
    background-color: #1a1a1a; /* Dark background */
    color: #ffffff;
}

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

.page-faq__info-card {
    background-color: rgba(255, 255, 255, 0.1); /* Semi-transparent white for cards */
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Make card content flex for better layout */
    flex-direction: column;
    justify-content: space-between;
}

.page-faq__info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.page-faq__card-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block; /* Ensure block for margin auto */
    margin-left: auto;
    margin-right: auto;
}

.page-faq__card-title {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFFF00; /* Yellow for card titles */
}

.page-faq__card-text {
    font-size: 1em;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow text to grow and push button to bottom */
    color: #f0f0f0;
}

.page-faq__btn-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #C30808; /* Red for link buttons */
    color: #FFFF00; /* Yellow for link button text */
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-top: auto; /* Push button to bottom if content varies */
}

.page-faq__btn-link:hover {
    background-color: #a00606;
    color: #ffffff;
}

.page-faq__final-text {
    text-align: center;
    font-size: 1.1em;
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: #f0f0f0;
}

/* Global image styles - prevent small icons and ensure responsiveness */
.page-faq img {
  min-width: 200px;
  min-height: 200px;
  object-fit: cover;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 2.8em;
    }
    .page-faq__section-title {
        font-size: 2em;
    }
    .page-faq__faq-question {
        font-size: 1.1em;
    }
    .page-faq__card-title {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    .page-faq__hero-section {
        padding: 60px 0;
        padding-top: var(--header-offset, 120px) !important; /* Ensure mobile offset */
    }
    .page-faq__main-title {
        font-size: 2.2em;
    }
    .page-faq__intro-description {
        font-size: 1em;
    }
    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .page-faq__btn-primary,
    .page-faq__btn-secondary,
    .page-faq__btn-link {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px !important;
        font-size: 1em !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__section-title {
        font-size: 1.8em;
    }
    .page-faq__section-description {
        font-size: 0.95em;
    }
    .page-faq__faq-question {
        font-size: 1em;
        padding: 15px 20px;
    }
    .page-faq__faq-answer {
        padding: 0 20px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px;
    }
    .page-faq__cta-bottom {
        padding: 20px;
    }
    .page-faq__cta-text {
        font-size: 1.1em;
    }
    .page-faq__grid {
        grid-template-columns: 1fr;
    }
    .page-faq__info-card {
        padding: 20px;
    }
    .page-faq__card-title {
        font-size: 1.2em;
    }
    .page-faq__card-text {
        font-size: 0.95em;
    }

    /* Mobile image responsiveness */
    .page-faq img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        min-width: 200px !important;
        min-height: 200px !important;
    }

    .page-faq__section,
    .page-faq__card,
    .page-faq__container,
    .page-faq__hero-section,
    .page-faq__faq-section,
    .page-faq__more-info-section,
    .page-faq__cta-buttons,
    .page-faq__button-group,
    .page-faq__btn-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow-x: hidden !important;
    }
    .page-faq__faq-item {
        margin-left: 15px;
        margin-right: 15px;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 1.8em;
    }
    .page-faq__section-title {
        font-size: 1.5em;
    }
    .page-faq__faq-question {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    .page-faq__faq-answer {
        padding: 0 15px;
    }
    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 12px 15px;
    }
    .page-faq__card-title {
        font-size: 1.1em;
    }
    .page-faq__card-text {
        font-size: 0.9em;
    }
}