/* style/faq.css */

:root {
    --primary-color: #FFD700; /* Vàng kim */
    --secondary-color: #000080; /* Xanh đậm */
    --text-color-dark-bg: #ffffff; /* Trắng cho nền tối */
    --text-color-light-bg: #333333; /* Đen xám cho nền sáng */
    --card-bg-dark-mode: rgba(255, 255, 255, 0.1);
    --border-color-light: #e0e0e0;
    --hover-bg-light: #f5f5f5;
    --active-bg-light: #eeeeee;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover-color: rgba(0, 0, 0, 0.2);
}

.page-faq {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color-dark-bg); /* Mặc định chữ trắng trên nền body tối */
    background-color: #121212; /* Body background color from shared.css */
    padding-top: 120px; /* Đảm bảo nội dung không bị header cố định che khuất */
}

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

/* HERO Section */
.page-faq__hero-section {
    background: linear-gradient(135deg, var(--secondary-color), #000050);
    padding: 80px 0;
    text-align: center;
    color: var(--text-color-dark-bg);
    padding-top: 40px; /* Điều chỉnh để không bị header che mất sau padding-top của page-faq */
}

.page-faq__hero-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.page-faq__hero-description {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
}

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

.page-faq__brand-link:hover {
    color: #ffd700;
    text-decoration: underline;
}

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

.page-faq__cta-button {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow-color);
    border: none;
    cursor: pointer;
}

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

.page-faq__cta-button--primary:hover {
    background: #e6c200;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-hover-color);
}

.page-faq__cta-button--secondary {
    background: var(--secondary-color);
    color: var(--text-color-dark-bg);
    border: 2px solid var(--primary-color);
}

.page-faq__cta-button--secondary:hover {
    background: #000066;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-hover-color);
}

/* General Section Styling */
.page-faq__section-title {
    font-size: 2.5em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-faq__section-description {
    font-size: 1.1em;
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color-dark-bg);
    opacity: 0.8;
}

.page-faq__dark-bg {
    background-color: #1a1a1a;
    padding: 60px 0;
    color: var(--text-color-dark-bg);
}

/* FAQ Section */
.page-faq__faq-list-section {
    padding-bottom: 80px;
}

.page-faq__faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.page-faq__faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background-color: #2a2a2a; /* Nền tối cho item FAQ */
}

.page-faq__faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.page-faq__faq-question:hover {
    background: #4a4a4a;
    border-color: var(--primary-color);
}

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

.page-faq__faq-toggle {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
    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%;
    border: 1px solid var(--primary-color);
}

.page-faq__faq-item.active .page-faq__faq-toggle {
    transform: rotate(45deg);
    color: var(--text-color-dark-bg);
    background-color: var(--primary-color);
}

.page-faq__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;
    color: var(--text-color-dark-bg);
    background-color: #2a2a2a;
}

.page-faq__faq-item.active .page-faq__faq-answer {
    max-height: 2000px !important;
    padding: 20px 25px !important;
    opacity: 1;
    border-top: 1px solid #4a4a4a;
    border-radius: 0 0 8px 8px;
}

.page-faq__faq-answer p {
    margin: 0;
    font-size: 1em;
    line-height: 1.8;
    color: var(--text-color-dark-bg);
    opacity: 0.8;
}

/* Brand Section */
.page-faq__brand-section {
    background-color: #222222;
    padding: 80px 0;
    color: var(--text-color-dark-bg);
}

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

.page-faq__brand-item {
    background: #333333;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.page-faq__brand-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.page-faq__brand-item h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 15px;
}

.page-faq__brand-item p {
    font-size: 1em;
    line-height: 1.7;
    color: var(--text-color-dark-bg);
    opacity: 0.85;
}

.page-faq__brand-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    padding: 10px;
    background-color: #444444;
}

/* Blog Section */
.page-faq__blog-section {
    padding-bottom: 80px;
}

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

.page-faq__blog-item {
    background: #333333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.page-faq__blog-item-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #4a4a4a;
}

.page-faq__blog-item-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.page-faq__blog-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.page-faq__blog-item-title {
    font-size: 1.4em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.4;
}

.page-faq__blog-item-title:hover {
    text-decoration: underline;
}

.page-faq__blog-item-excerpt {
    font-size: 0.95em;
    color: var(--text-color-dark-bg);
    opacity: 0.8;
    margin-bottom: 15px;
    flex-grow: 1;
}

.page-faq__blog-item-date {
    font-size: 0.85em;
    color: #999999;
    text-align: right;
}

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

@media (max-width: 768px) {
    .page-faq {
        padding-top: 100px !important; /* Mobile: Adjusted for fixed header */
        font-size: 15px;
    }
    
    .page-faq__container {
        padding: 0 15px;
    }

    .page-faq__hero-section {
        padding: 60px 0;
    }

    .page-faq__main-title {
        font-size: 2.2em;
    }

    .page-faq__hero-description {
        font-size: 1em;
    }

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

    .page-faq__cta-button {
        padding: 12px 30px;
        font-size: 1em;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    .page-faq__section-title {
        font-size: 1.8em;
        margin-bottom: 15px;
    }

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

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

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

    .page-faq__faq-toggle {
        font-size: 24px;
        width: 26px;
        height: 26px;
    }

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

    .page-faq__faq-item.active .page-faq__faq-answer {
        padding: 15px 20px !important;
    }

    .page-faq__brand-content {
        grid-template-columns: 1fr;
    }

    .page-faq__brand-item {
        padding: 25px;
    }
    
    .page-faq__brand-image {
        width: 100px;
        height: 100px;
    }

    .page-faq__blog-list {
        grid-template-columns: 1fr;
    }

    .page-faq__blog-item-image {
        height: 180px;
    }

    .page-faq__blog-item-title {
        font-size: 1.2em;
    }
    
    /* Ensure all images are responsive */
    .page-faq img {
      max-width: 100% !important;
      width: 100% !important;
      height: auto !important;
      display: block !important;
    }
    
    .page-faq__hero-container,
    .page-faq__faq-list-section .page-faq__container,
    .page-faq__brand-section .page-faq__container,
    .page-faq__blog-section .page-faq__container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .page-faq__main-title {
        font-size: 1.8em;
    }
    .page-faq__section-title {
        font-size: 1.5em;
    }
    .page-faq__cta-button {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    .page-faq__faq-question h3 {
        font-size: 0.95em;
    }
}