/* ===================================
   FAQ System Styles - Style 3
   =================================== */

/* FAQ Landing Page - Category Cards */
.faq-category-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.faq-category-card:hover {
    border-color: #E67C3C;
    box-shadow: 0 5px 15px rgba(230, 124, 60, 0.2);
    transform: translateY(-5px);
}

.faq-category-icon {
    font-size: 48px;
    color: #E67C3C;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.faq-category-card:hover .faq-category-icon {
    transform: scale(1.1);
}

.faq-category-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.faq-category-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.faq-intro {
    text-align: center;
    margin-bottom: 50px;
}

.faq-intro h3 {
    color: #E67C3C;
    font-size: 28px;
    margin-bottom: 15px;
}

.faq-intro p {
    color: #666;
    font-size: 16px;
}

/* FAQ Category Page - Accordion Style 3 */
.faq-accordion {
    margin-bottom: 15px;
}

.faq-item {
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #E67C3C;
}

.faq-question {
    background: #f8f8f8;
    padding: 20px 25px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    user-select: none;
}

.faq-question:hover {
    background: #fff5f0;
}

.faq-question.active {
    background: #E67C3C;
    color: #fff;
}

.faq-question h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    padding-right: 40px;
    color: inherit;
}

.faq-toggle-icon {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-toggle-icon {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #fff;
    padding: 0 25px;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 20px 25px;
    border-top: 1px solid #e0e0e0;
}

.faq-answer p {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.8;
    font-size: 15px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    margin: 10px 0;
    padding-left: 20px;
    color: #666;
}

.faq-answer li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Rich Text Editor Styles */
.faq-answer a {
    color: #E67C3C;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-answer a:hover {
    color: #d16a2d;
    text-decoration: underline;
}

.faq-answer strong,
.faq-answer b {
    color: #333 !important;
    font-weight: 700 !important;
}

.faq-answer em,
.faq-answer i {
    font-style: italic !important;
}

.faq-answer h1,
.faq-answer h2,
.faq-answer h3,
.faq-answer h4,
.faq-answer h5,
.faq-answer h6 {
    color: #333;
    margin: 15px 0 10px 0;
    font-weight: 600;
}

.faq-answer h2,
.faq-answer h3,
.faq-answer h4 {
    color: #E67C3C;
    margin-top: 15px;
    margin-bottom: 10px;
}

.faq-answer blockquote {
    border-left: 3px solid #E67C3C;
    padding-left: 15px;
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

.faq-answer code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    font-size: 14px;
}

.faq-answer pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.faq-answer img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border-radius: 5px;
}

.faq-answer table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.faq-answer table th,
.faq-answer table td {
    padding: 10px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.faq-answer table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #333;
}

/* Category Introduction */
.category-intro {
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    border-left: 4px solid #E67C3C;
}

.category-intro h3 {
    color: #E67C3C;
    margin-top: 0;
    margin-bottom: 15px;
}

.category-intro p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.8;
}

/* Back to FAQ Link */
.back-to-faq {
    margin-bottom: 20px;
}

.back-to-faq a {
    color: #E67C3C;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.back-to-faq a:hover {
    text-decoration: underline;
}

.back-to-faq i {
    margin-right: 5px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .faq-category-card {
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .faq-intro h3 {
        font-size: 24px;
    }

    .faq-intro p {
        font-size: 14px;
    }

    .faq-category-icon {
        font-size: 40px;
    }

    .faq-category-title {
        font-size: 20px;
    }

    .faq-question {
        padding: 18px 20px;
    }

    .faq-question h4 {
        font-size: 16px;
        padding-right: 45px;
        line-height: 1.5;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .faq-answer {
        padding: 0 20px;
    }

    .faq-answer.active {
        padding: 18px 20px;
    }

    .category-intro {
        padding: 20px;
    }

    .faq-toggle-icon {
        right: 20px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .faq-category-card {
        padding: 25px 15px;
    }

    .faq-category-icon {
        font-size: 36px;
        margin-bottom: 15px;
    }

    .faq-category-title {
        font-size: 18px;
    }

    .faq-item {
        margin-bottom: 12px;
    }

    .faq-question {
        padding: 15px 18px;
    }

    .faq-question h4 {
        font-size: 15px;
        padding-right: 40px;
        line-height: 1.4;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .faq-answer {
        padding: 0 18px;
    }

    .faq-answer.active {
        padding: 15px 18px;
    }

    .faq-answer p {
        font-size: 14px;
        line-height: 1.6;
    }

    .faq-toggle-icon {
        right: 18px;
        font-size: 16px;
    }

    .category-intro {
        padding: 15px;
    }

    .category-intro h3 {
        font-size: 18px;
    }

    .back-to-faq a {
        font-size: 14px;
    }
}
