/* style/faq.css */

/* Biến CSS cho màu sắc */
:root {
    --page-faq-primary-color: #FFD700; /* Gold */
    --page-faq-secondary-color: #000080; /* Dark Blue */
    --page-faq-text-light: #ffffff;
    --page-faq-text-dark: #333333;
    --page-faq-bg-dark: #1a1a1a; /* Body background from shared.css */
    --page-faq-card-bg: rgba(255, 255, 255, 0.1);
    --page-faq-border-color: rgba(255, 255, 255, 0.2);
}

.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--page-faq-text-light); /* Default text color for dark body background */
    background-color: var(--page-faq-bg-dark);
}

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

/* Hero Section */
.page-faq__hero-section {
    position: relative;
    padding: 120px 0 60px; /* Adjusted for header offset */
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--page-faq-secondary-color) 0%, rgba(0, 0, 128, 0.8) 50%, var(--page-faq-primary-color) 100%);
    color: var(--page-faq-text-light);
    padding-top: var(--header-offset, 120px); /* Ensure spacing from fixed header */
}

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

.page-faq__main-title {
    font-size: 3.2em;
    margin-bottom: 20px;
    color: var(--page-faq-primary-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: bold;
}

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

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

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

.page-faq__btn-primary {
    background-color: var(--page-faq-primary-color);
    color: var(--page-faq-secondary-color);
    border: 2px solid var(--page-faq-primary-color);
}

.page-faq__btn-primary:hover {
    background-color: #e6c200;
    color: var(--page-faq-secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

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

.page-faq__btn-secondary:hover {
    background-color: var(--page-faq-primary-color);
    color: var(--page-faq-secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

/* FAQ Section */
.page-faq__faq-section {
    padding: 60px 0;
    background-color: var(--page-faq-bg-dark);
    color: var(--page-faq-text-light);
}

.page-faq__section-title {
    font-size: 2.5em;
    text-align: center;
    margin-bottom: 20px;
    color: var(--page-faq-primary-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.page-faq__section-description {
    font-size: 1.1em;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px;
    color: rgba(255, 255, 255, 0.8);
}

.page-faq__faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.page-faq__faq-item {
    background-color: var(--page-faq-card-bg);
    border-radius: 10px;
    margin-bottom: 15px;
    overflow: hidden;
    border: 1px solid var(--page-faq-border-color);
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid transparent; /* default */
    transition: background-color 0.3s ease, border-bottom 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-question {
    background-color: rgba(255, 215, 0, 0.1);
    border-bottom: 1px solid var(--page-faq-primary-color);
}

.page-faq__faq-question:hover {
    background-color: rgba(255, 215, 0, 0.08);
}

.page-faq__faq-question h3 {
    margin: 0;
    font-size: 1.2em;
    color: var(--page-faq-primary-color);
}

.page-faq__faq-toggle {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--page-faq-primary-color);
    transition: transform 0.3s ease;
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg);
    color: var(--page-faq-text-light);
}

.page-faq__faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 25px;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: rgba(255, 255, 255, 0.75);
}

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

.page-faq__faq-answer p {
    margin-bottom: 15px;
}

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

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

.page-faq__contact-cta {
    text-align: center;
    margin-top: 50px;
    padding: 30px;
    background-color: rgba(0, 0, 128, 0.5); /* Darker blue for contrast */
    border-radius: 10px;
    border: 1px solid var(--page-faq-primary-color);
}

.page-faq__cta-text {
    font-size: 1.3em;
    margin-bottom: 25px;
    color: var(--page-faq-text-light);
    font-weight: bold;
}

/* Info Section */
.page-faq__info-section {
    padding: 60px 0;
    background-color: var(--page-faq-secondary-color);
    color: var(--page-faq-text-light);
}

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

.page-faq__info-card {
    background-color: var(--page-faq-card-bg);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--page-faq-border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

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

.page-faq__info-card-title {
    font-size: 1.3em;
    padding: 15px;
    margin-bottom: 5px;
}

.page-faq__info-card-title a {
    color: var(--page-faq-primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-faq__info-card-title a:hover {
    color: var(--page-faq-text-light);
}

.page-faq__info-card-description {
    font-size: 0.95em;
    padding: 0 15px 20px;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .page-faq__main-title {
        font-size: 2.8em;
    }
    .page-faq__section-title {
        font-size: 2.2em;
    }
}

@media (max-width: 768px) {
    .page-faq {
        font-size: 16px;
        line-height: 1.6;
    }

    .page-faq__hero-section {
        padding: 100px 0 40px;
        padding-top: var(--header-offset, 120px) !important; /* Ensure spacing from fixed header */
    }

    .page-faq__main-title {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .page-faq__description {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .page-faq__cta-buttons {
        flex-direction: column;
        gap: 15px;
        padding: 0 15px;
    }

    .page-faq__btn-primary,
    .page-faq__btn-secondary {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 20px;
        font-size: 1em;
    }

    .page-faq__faq-section,
    .page-faq__info-section {
        padding: 40px 0;
    }

    .page-faq__section-title {
        font-size: 2em;
    }

    .page-faq__section-description {
        font-size: 0.95em;
        margin-bottom: 30px;
    }

    .page-faq__faq-question {
        padding: 18px 20px;
    }

    .page-faq__faq-question h3 {
        font-size: 1.1em;
    }

    .page-faq__faq-answer {
        padding: 0 20px;
    }

    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 12px 20px 20px;
    }

    .page-faq__contact-cta {
        margin-top: 40px;
        padding: 25px;
    }

    .page-faq__cta-text {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .page-faq__info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .page-faq__info-card {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

    .page-faq__container,
    .page-faq__hero-section .page-faq__container,
    .page-faq__faq-section .page-faq__container,
    .page-faq__info-section .page-faq__container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Mobile image responsiveness */
    .page-faq img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
    }
    .page-faq__hero-section .page-faq__hero-image {
        position: relative;
        width: 100%;
        height: auto;
        opacity: 0.3;
        margin-top: 20px;
    }
    .page-faq__info-image {
        height: auto !important;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 1.8em;
    }
    .page-faq__section-title {
        font-size: 1.8em;
    }
    .page-faq__faq-question h3 {
        font-size: 1em;
    }
    .page-faq__faq-toggle {
        font-size: 1.5em;
    }
}