/**
 * TT FAQ Styles
 *
 * @package TT_Elementor_Flux
 * @since 1.1.4
 */

/* Base Styles */
.tt-faq {
    width: 100%;
}

.tt-faq__wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tt-faq__item {
    position: relative;
}

.tt-faq__header {
    position: relative;
}

.tt-faq__question {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 22px;
    font-weight: 500;
    color: inherit;
    transition: all 0.3s ease;
}

/* Ensure Elementor icons keep their original color - not affected by question color */
.tt-faq__question .tt-faq__custom-icon i,
.tt-faq__question .tt-faq__custom-icon svg {
    color: initial;
}

.tt-faq__question:focus {
    outline: none;
}

.tt-faq__title-text {
    flex: 1;
    padding-right: 15px;
}

.tt-faq__custom-icon {
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
}

.tt-faq__custom-icon i,
.tt-faq__custom-icon svg {
    color: inherit;
}

.tt-faq__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tt-faq__content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.tt-faq__item.active .tt-faq__content {
    /* max-height is set via JS */
}

.tt-faq__answer {
    font-size: 16px;
    line-height: 1.6;
}

.tt-faq__answer p {
    margin: 0 0 10px;
}

.tt-faq__answer p:last-child {
    margin-bottom: 0;
}

/* ============================================
   STYLE 1 - Minimal Line
   ============================================ */

.tt-faq--style-1 .tt-faq__item {
    border-bottom: 1px solid #e5e5e5;
}

.tt-faq--style-1 .tt-faq__question {
    padding: 16px 0;
    color: #7288a2;
}

.tt-faq--style-1 .tt-faq__question:hover {
    color: #03b5d2;
}

.tt-faq--style-1 .tt-faq__item.active .tt-faq__question {
    color: #03b5d2;
    border-bottom: 1px solid #03b5d2;
}

.tt-faq--style-1 .tt-faq__icon-style-1 {
    position: relative;
    width: 22px;
    height: 22px;
    border: 1px solid currentColor;
    border-radius: 50%;
}

.tt-faq--style-1 .tt-faq__icon-line-h,
.tt-faq--style-1 .tt-faq__icon-line-v {
    position: absolute;
    background: currentColor;
    transition: all 0.3s ease;
}

.tt-faq--style-1 .tt-faq__icon-line-h {
    top: 50%;
    left: 5px;
    width: 10px;
    height: 2px;
    transform: translateY(-50%);
}

.tt-faq--style-1 .tt-faq__icon-line-v {
    top: 5px;
    left: 50%;
    width: 2px;
    height: 10px;
    transform: translateX(-50%);
}

.tt-faq--style-1 .tt-faq__item.active .tt-faq__icon-line-v {
    opacity: 0;
}

.tt-faq--style-1 .tt-faq__content {
    max-height: 0;
    opacity: 0;
}

.tt-faq--style-1 .tt-faq__item.active .tt-faq__content {
    max-height: 500px;
    opacity: 1;
}

.tt-faq--style-1 .tt-faq__answer {
    padding: 24px 0;
    color: #4d5974;
}

/* ============================================
   STYLE 2 - Card Box
   ============================================ */

.tt-faq--style-2 .tt-faq__item {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.tt-faq--style-2 .tt-faq__question {
    padding: 20px 60px 20px 20px;
    font-size: 22px;
    font-weight: 600;
    color: #333;
    position: relative;
}

.tt-faq--style-2 .tt-faq__icon-style-2 {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.tt-faq--style-2 .tt-faq__item.active .tt-faq__icon-style-2 {
    transform: translateY(-50%) rotate(45deg);
}

.tt-faq--style-2 .tt-faq__content {
    max-height: 0;
}

.tt-faq--style-2 .tt-faq__item.active .tt-faq__content {
    max-height: 500px;
}

.tt-faq--style-2 .tt-faq__answer {
    padding: 0 20px 20px;
    line-height: 24px;
    color: #555;
}

/* ============================================
   STYLE 3 - Dark Header
   ============================================ */

.tt-faq--style-3 .tt-faq__wrapper {
    grid-template-columns: 1fr;
}

.tt-faq--style-3 .tt-faq__item {
    margin-bottom: 20px;
    border: none;
}

.tt-faq--style-3 .tt-faq__header {
    background: #000;
    overflow: hidden;
    position: relative;
}

.tt-faq--style-3 .tt-faq__header::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 30%;
    height: 100%;
    background: #f9d800;
    transform: skewX(-35deg) translateX(50%);
    transition: all 0.3s ease;
}

.tt-faq--style-3 .tt-faq__question {
    padding: 12px 50px 12px 15px;
    color: #fff;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.tt-faq--style-3 .tt-faq__icon-style-3 {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    font-weight: 300;
    z-index: 1;
}

.tt-faq--style-3 .tt-faq__icon-style-3 i{
    color: #000;
}

.tt-faq--style-3 .tt-faq__icon-minus {
    display: none;
}

.tt-faq--style-3 .tt-faq__item.active .tt-faq__icon-plus {
    display: none;
}

.tt-faq--style-3 .tt-faq__item.active .tt-faq__icon-minus {
    display: inline;
}

.tt-faq--style-3 .tt-faq__content {
    background: #fff;
    position: relative;
}

.tt-faq--style-3 .tt-faq__content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: #242c42;
}

.tt-faq--style-3 .tt-faq__content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50%;
    height: 2px;
    background: #86bc42;
    z-index: 1;
}

.tt-faq--style-3 .tt-faq__answer {
    padding: 20px 15px;
    color: #555;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .tt-faq--style-1 .tt-faq__question {
        font-size: 20px;
    }

    .tt-faq--style-2 .tt-faq__question {
        font-size: 18px;
        padding: 15px 50px 15px 15px;
    }

    .tt-faq--style-2 .tt-faq__icon-style-2 {
        font-size: 20px;
    }

    .tt-faq--style-3 .tt-faq__question {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .tt-faq--style-2 .tt-faq__item {
        border-radius: 12px;
    }

    .tt-faq--style-2 .tt-faq__question {
        padding: 12px 40px 12px 12px;
    }

    .tt-faq--style-2 .tt-faq__answer {
        padding: 0 12px 12px;
    }
}
