/* =============================================================================
   FAQ Content Elements - Styles
   ============================================================================= */

/* =================================
   Base Styles
   ================================= */

.faq-content-element {
    margin-bottom: 2rem;
}

.faq-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background-color: var(--green, #28a745);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--green, #28a745);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.faq-icon i {
    font-size: 1rem;
}

.faq-category {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.faq-question {
    margin: 0;
    font-weight: 600;
}

.faq-answer {
    line-height: 1.7;
    color: #495057;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* =================================
   Accordion Layout
   ================================= */

.faq-accordion .accordion-item {
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    border-radius: 0 !important;
}

.faq-accordion .accordion-item:first-child {
    border-top-left-radius: 0.375rem !important;
    border-top-right-radius: 0.375rem !important;
}

.faq-accordion .accordion-item:last-child {
    border-bottom-left-radius: 0.375rem !important;
    border-bottom-right-radius: 0.375rem !important;
    margin-bottom: 0;
}

.faq-accordion .accordion-button {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #212529;
    background-color: #fff;
    border: none;
    border-radius: 0;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background-color: rgba(40, 167, 69, 0.05);
    color: var(--green, #28a745);
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(40, 167, 69, 0.25);
}

.faq-accordion .accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2328a745'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    flex-shrink: 0;
    margin-left: auto;
}

.faq-accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2328a745'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.faq-accordion .accordion-button .faq-question {
    flex: 1;
    text-align: left;
}

.faq-accordion .accordion-body {
    padding: 1rem 1.25rem 1.25rem;
    background-color: #fff;
}

/* =================================
   Tabs Layout (Horizontal)
   ================================= */

.faq-tabs .faq-tabs-nav {
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.faq-tabs .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #495057;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.faq-tabs .nav-link:hover {
    color: var(--green, #28a745);
    border-bottom-color: rgba(40, 167, 69, 0.3);
}

.faq-tabs .nav-link.active {
    color: var(--green, #28a745);
    border-bottom-color: var(--green, #28a745);
    background-color: transparent;
}

.faq-tabs .faq-tabs-content {
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
}

.faq-tabs .faq-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-tabs .faq-question-full {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

/* =================================
   Tabs Layout (Vertical)
   ================================= */

.faq-tabs-vertical .faq-tabs-nav-vertical {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 0.5rem;
}

.faq-tabs-vertical .faq-tabs-nav-vertical .nav-link {
    display: flex;
    align-items: flex-start;
    padding: 0.875rem 1rem;
    color: #495057;
    border-radius: 0.25rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background-color: transparent;
}

.faq-tabs-vertical .faq-tabs-nav-vertical .nav-link:last-child {
    margin-bottom: 0;
}

.faq-tabs-vertical .faq-tabs-nav-vertical .nav-link:hover {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--green, #28a745);
}

.faq-tabs-vertical .faq-tabs-nav-vertical .nav-link.active {
    background-color: var(--green, #28a745);
    color: #fff;
}

.faq-tabs-vertical .faq-tabs-nav-vertical .nav-link.active .faq-number {
    background-color: #fff;
    color: var(--green, #28a745);
}

.faq-tabs-vertical .faq-tabs-nav-vertical .nav-link.active .faq-icon {
    color: #fff;
}

.faq-tabs-vertical .faq-tabs-nav-vertical .faq-question-nav {
    flex: 1;
    line-height: 1.4;
}

.faq-tabs-vertical .faq-tabs-content-vertical {
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    min-height: 300px;
}

.faq-tabs-vertical .faq-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-tabs-vertical .faq-question-full {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

/* =================================
   List Layout
   ================================= */

.faq-list .faq-list-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    transition: box-shadow 0.2s ease;
}

.faq-list .faq-list-item:last-child {
    margin-bottom: 0;
}

.faq-list .faq-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-list .faq-list-question {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-list .faq-list-question .faq-question {
    flex: 1;
    min-width: 200px;
    font-size: 1.125rem;
}

.faq-list .faq-list-answer {
    padding-left: 0;
}

/* With numbers, add left padding */
.faq-list .faq-list-question .faq-number + .faq-question,
.faq-list .faq-list-question .faq-icon + .faq-question {
    flex: 1;
}

/* =================================
   Cards Layout
   ================================= */

.faq-cards .faq-card {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.faq-cards .faq-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.faq-cards .faq-card-header {
    padding: 0;
    background-color: transparent;
    border-bottom: none;
}

.faq-cards .faq-card-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background-color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-align: center;
}

.faq-cards .faq-card-toggle:hover {
    background-color: rgba(40, 167, 69, 0.05);
}

.faq-cards .faq-card-toggle:not(.collapsed) {
    background-color: rgba(40, 167, 69, 0.08);
}

.faq-cards .faq-card-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(40, 167, 69, 0.1);
    border-radius: 50%;
    margin-bottom: 1rem;
}

.faq-cards .faq-card-icon {
    color: var(--green, #28a745);
    font-size: 1.5rem;
}

.faq-cards .faq-card-toggle .faq-number {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    margin: 0;
}

.faq-cards .faq-card-question {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
}

.faq-cards .faq-card-toggle-icon {
    color: var(--green, #28a745);
    transition: transform 0.3s ease;
}

.faq-cards .faq-card-toggle:not(.collapsed) .faq-card-toggle-icon {
    transform: rotate(180deg);
}

.faq-cards .faq-card-body {
    padding: 1.25rem;
    background-color: #fafafa;
    border-top: 1px solid #e9ecef;
}

/* =================================
   Responsive Adjustments
   ================================= */

@media (max-width: 991.98px) {
    .faq-tabs-vertical .row {
        flex-direction: column;
    }

    .faq-tabs-vertical .col-md-4,
    .faq-tabs-vertical .col-lg-3 {
        width: 100%;
        margin-bottom: 1rem;
    }

    .faq-tabs-vertical .col-md-8,
    .faq-tabs-vertical .col-lg-9 {
        width: 100%;
    }

    .faq-tabs-vertical .faq-tabs-nav-vertical {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .faq-tabs-vertical .faq-tabs-nav-vertical .nav-link {
        flex: 1 1 auto;
        min-width: 150px;
        margin-bottom: 0;
        text-align: center;
        justify-content: center;
    }

    .faq-tabs-vertical .faq-tabs-content-vertical {
        min-height: auto;
    }
}

@media (max-width: 767.98px) {
    .faq-accordion .accordion-button {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .faq-accordion .accordion-body {
        padding: 0.875rem 1rem;
    }

    .faq-tabs .nav-link {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .faq-tabs .faq-tabs-content {
        padding: 1rem;
    }

    .faq-tabs .faq-question-full {
        font-size: 1.125rem;
    }

    .faq-list .faq-list-item {
        padding: 1rem;
    }

    .faq-list .faq-list-question .faq-question {
        font-size: 1rem;
    }

    .faq-cards .faq-card-toggle {
        padding: 1.25rem;
    }

    .faq-cards .faq-card-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .faq-cards .faq-card-icon {
        font-size: 1.25rem;
    }

    .faq-cards .faq-card-question {
        font-size: 0.9375rem;
    }

    .faq-number {
        min-width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .faq-icon {
        width: 24px;
        height: 24px;
    }
}

/* =================================
   List with Image Layout
   ================================= */

.faq-list-with-image .faq-image-item {
    padding: 2rem;
    margin-bottom: 1.5rem;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.faq-list-with-image .faq-image-item:last-child {
    margin-bottom: 0;
}

.faq-list-with-image .faq-image-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.faq-list-with-image .faq-image-wrapper {
    margin-bottom: 1rem;
}

.faq-list-with-image .faq-image {
    border-radius: 0.375rem;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.faq-list-with-image .faq-image-question {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-list-with-image .faq-image-question .faq-question {
    flex: 1;
    min-width: 200px;
    font-size: 1.25rem;
    margin: 0;
}

.faq-list-with-image .faq-image-answer {
    line-height: 1.7;
}

@media (min-width: 768px) {
    .faq-list-with-image .faq-image-wrapper {
        margin-bottom: 0;
    }
}

/* =================================
   Timeline Layout
   ================================= */

.faq-timeline {
    position: relative;
    padding-left: 40px;
}

.faq-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--green, #28a745) 0%, rgba(40, 167, 69, 0.3) 100%);
    border-radius: 2px;
}

.faq-timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 30px;
}

.faq-timeline-item:last-child {
    margin-bottom: 0;
}

.faq-timeline .timeline-marker {
    position: absolute;
    left: -40px;
    top: 0;
    width: 34px;
    height: 34px;
    background-color: var(--green, #28a745);
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.875rem;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    z-index: 1;
}

.faq-timeline .timeline-marker .timeline-number {
    font-weight: 700;
}

.faq-timeline .timeline-marker i {
    font-size: 0.875rem;
}

.faq-timeline .timeline-content {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
}

.faq-timeline .timeline-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 8px;
    width: 16px;
    height: 16px;
    background-color: #fff;
    border-left: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    transform: rotate(45deg);
}

.faq-timeline .timeline-header {
    margin-bottom: 1rem;
}

.faq-timeline .timeline-header .faq-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--green, #28a745);
    margin-bottom: 0.5rem;
}

.faq-timeline .timeline-header .faq-question {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #212529;
}

.faq-timeline .timeline-body {
    line-height: 1.7;
    color: #495057;
}

.faq-timeline .timeline-image {
    float: right;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
    max-width: 150px;
}

@media (max-width: 767.98px) {
    .faq-timeline {
        padding-left: 30px;
    }

    .faq-timeline::before {
        left: 10px;
    }

    .faq-timeline .timeline-marker {
        left: -30px;
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .faq-timeline-item {
        padding-left: 20px;
    }

    .faq-timeline .timeline-content {
        padding: 1rem;
    }

    .faq-timeline .timeline-image {
        float: none;
        margin-left: 0;
        max-width: 100%;
        margin-bottom: 1rem;
    }
}

/* =================================
   Simple Layout
   ================================= */

.faq-simple .faq-simple-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.faq-simple .faq-simple-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.faq-simple .faq-simple-question {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.faq-simple .faq-simple-question .faq-question {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
}

.faq-simple .faq-simple-answer {
    padding-left: 0;
    line-height: 1.8;
    color: #495057;
}

.faq-simple .faq-simple-question .faq-number + .faq-question,
.faq-simple .faq-simple-question .faq-icon + .faq-question {
    padding-left: 0;
}

/* With numbers/icons, add left padding to answer */
.faq-simple .faq-simple-question .faq-number ~ .faq-question,
.faq-simple .faq-simple-question .faq-icon ~ .faq-question {
    flex: 1;
}

/* =================================
   Link Wrapper (All Layouts)
   ================================= */

.faq-link-wrapper {
    margin-top: 1rem;
}

.faq-link-inline a {
    text-decoration: none;
    font-weight: 500;
}

.faq-link-inline a:hover {
    text-decoration: underline;
}

/* =================================
   Print Styles
   ================================= */

@media print {
    .faq-accordion .accordion-collapse {
        display: block !important;
        height: auto !important;
    }

    .faq-accordion .accordion-button::after {
        display: none;
    }

    .faq-tabs .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }

    .faq-cards .collapse {
        display: block !important;
    }

    .faq-cards .faq-card-toggle-icon {
        display: none;
    }

    .faq-timeline::before {
        background: #000;
    }

    .faq-timeline .timeline-marker {
        background: #000;
        border-color: #fff;
    }
}
