/* =========================================
   FAQ PAGE STYLES
   ========================================= */

/* --- 1. HERO SECTION --- */
.hero-centered {
    background-color: var(--deep-blue);
    color: var(--white);
    position: relative;
    display: flex;
    justify-content: center;
    text-align: center;
    align-items: center;
    min-height: 300px;
    /* Ensure text is readable */
    padding-top: 100px; 
    padding-bottom: 60px;
}

.hero-centered h1 {
    color: var(--white);
    font-family: var(--font-sans);
    margin-bottom: 0;
    font-weight: 400;
}

.hero-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(62, 92, 154, 0.15) 0%, rgba(42, 64, 104, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

.hero-content-wrapper-center { z-index: 2; position: relative; }

/* --- 2. Layout --- */
.faq-container {
    display: flex;
    gap: 60px;
    margin-top: 25px; /* Overlap effect */
    position: relative;
    z-index: 10;
    margin-bottom: 80px;
}

/* --- 3. Sidebar Navigation (Modernized) --- */
.faq-sidebar {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05); /* Soft, diffuse shadow */
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.faq-cat-title {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #aaa;
    font-size: 0.75rem;
    margin-bottom: 20px;
    font-weight: 700;
    font-family: var(--font-sans);
}

.faq-nav-btn {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-grey);
    border-radius: 12px; /* Pill shape */
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0px;
}
.faq-nav-btn-ii {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    border-radius: 12px; /* Pill shape */
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0px;
    box-shadow: 0 5px 15px rgba(108, 140, 203, 0.3);
    background: #6bd682;
}
.faq-nav-btn i {
    width: 25px;
    font-size: 1.1rem;
    color: #ccc;
    transition: color 0.3s;
}

/* Hover State */
.faq-nav-btn:hover {
    background-color: #f4f8ff;
    color: var(--primary-blue);
}
.faq-nav-btn:hover i { color: var(--primary-blue); }

/* Active State */
.faq-nav-btn.active {
    background-color: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(62, 92, 154, 0.3);
}
.faq-nav-btn.active i { color: var(--white); }

/* Sidebar Contact Box */
.faq-contact-box {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    text-align: center;
}
.faq-contact-box p { font-size: 0.9rem; color: #888; margin-bottom: 10px; }
.faq-contact-link {
    color: var(--deep-blue);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 1px;
}

/* --- 4. Content Area --- */
.faq-content-area { flex: 1; }

.faq-tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}
.faq-tab-pane.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.sub-section-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--deep-blue);
    margin-bottom: 10px;
}

/* --- 5. Accordion (Clean & Floating) --- */
.accordion-item {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 5px;
    /* No border, just shadow for floating effect */
    box-shadow: 0 5px 15px rgba(0,0,0,0.03); 
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.accordion-header {
    width: 100%;
    text-align: left;
    background: #fff;
    border: none;
    padding: 10px 10px;
    font-family: var(--font-sans);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--deep-blue);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
    outline: none;
}

.accordion-header:hover { color: var(--primary-blue); }

.accordion-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

/* Open State */
.accordion-item.open .accordion-icon {
    transform: rotate(45deg); 
    background-color: #ffeaea;
    color: #c0392b; 
}

.accordion-item.open .accordion-header {
    color: var(--primary-blue);
    border-bottom: 1px solid #f9f9f9;
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff; /* Keep white for cleanliness */
}

.accordion-content {
    padding: 10px;
    font-size: 0.95rem;
    color: var(--text-grey);
    line-height: 1.8;
}

.accordion-header:focus {
    outline: none;
}


/* --- Responsive --- */
@media (max-width: 992px) {
    .faq-container {
        flex-direction: column;
        margin-top: 30px;
    }
    
    .faq-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        padding: 20px;
        display: block; /* Stack buttons vertically on mobile too, cleaner than scroll */
    }
    
    .faq-nav-btn { margin-bottom: 5px; }
    
    .faq-contact-box { display: none; } /* Hide contact box on mobile to save space */
}
/* =========================================
   FAQ CHATBOT STYLES (Sereth Theme)
   ========================================= */

/* --- 1. Floating Icon --- */
#chat-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--deep-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(42, 64, 104, 0.3);
    cursor: pointer;
    z-index: 2050;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chat-icon:hover {
    -webkit-transform: translateZ(0) scale(1.1);
    transform: translateZ(0) scale(1.1);
    background-color: var(--primary-blue);
}

/* Notification Badge */
#chat-icon::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background-color: #e74c3c;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* --- 2. Chat Window --- */
#chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 500px;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 2000;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 3. Header --- */
.chat-header {
    background-color: var(--deep-blue);
    color: #ffffff !important;
    padding: 15px 20px;
    font-family: var(--font-serif);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff !important;
}

#chat-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.8;
    color: #ffffff !important;
    transition: opacity 0.2s, transform 0.2s;
    padding: 0;
    line-height: 1;
}

#chat-close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

/* --- 4. Messages Area --- */
#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #FDFCF8;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 10px;
}

/* --- 5. Message Bubbles --- */
.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 15px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    align-self: flex-start;
    background-color: #fff;
    color: var(--text-grey);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background-color: var(--primary-blue);
    color: #fff;
    border-bottom-right-radius: 2px;
    box-shadow: 0 2px 5px rgba(62, 92, 154, 0.2);
}

/* Clickable links inside messages */
.message a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.message a:hover {
    opacity: 0.75;
}

/* --- 6. Options / Buttons --- */
.options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    justify-content: flex-start;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.option {
    background-color: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option:hover {
    background-color: var(--primary-blue);
    color: #fff;
}

/* --- 7. Typing Indicator --- */
.typing {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 20px;
}

.typing span {
    width: 6px;
    height: 6px;
    background-color: #ccc;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* --- 8. Responsive --- */
@media (max-width: 480px) {
    #chat-window {
        width: 90%;
        right: 5%;
        bottom: 80px;
        height: 60vh;
    }

    #chat-icon {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.3rem;
    }

    .message {
        max-width: 85%;
        font-size: 0.85rem;
    }

    .option {
        font-size: 0.75rem;
        padding: 7px 10px;
    }
}