/**
 * NJ FAQ Accordion Stylesheet
 * Responsive 2-column Desktop / 1-column Mobile
 * Font: Poppins
 * Animations: Fade-in and smooth accordion transitions
 */

/* ==================== GLOBAL WRAPPER & TYPOGRAPHY ==================== */
.nj-faq-wrapper {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.nj-faq-wrapper *,
.nj-faq-wrapper *::before,
.nj-faq-wrapper *::after {
    box-sizing: border-box;
}

/* ==================== FADE-IN ANIMATION ==================== */
@keyframes njFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nj-faq-fade-in {
    animation: njFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==================== HEADER (TITLE & SUBTITLE) ==================== */
.nj-faq-header {
    text-align: center;
    margin-bottom: 45px;
}

.nj-faq-subtitle {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.75rem, 1.8vw, 0.875rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f7941d;
    background-color: transparent !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 14px;
    transition: none;
    cursor: default;
}

.nj-faq-subtitle:hover {
    background-color: transparent !important;
    background: transparent !important;
    color: #f7941d !important;
    transform: none !important;
    box-shadow: none !important;
}

.nj-faq-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.65rem, 3.2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.25;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.02em;
}

/* ==================== COLUMNS GRID (1, 2, 3 COLUMNS) ==================== */
.nj-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    align-items: start;
}

/* 1 Column */
.nj-faq-cols-1 .nj-faq-grid,
.nj-faq-cols-1- .nj-faq-grid,
.nj-faq-cols--1 .nj-faq-grid {
    grid-template-columns: 1fr;
    max-width: 820px;
    margin: 0 auto;
}

/* 2 Columns (Default) */
.nj-faq-cols-2 .nj-faq-grid,
.nj-faq-cols-2- .nj-faq-grid,
.nj-faq-cols--2 .nj-faq-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* 3 Columns */
.nj-faq-cols-3 .nj-faq-grid,
.nj-faq-cols-3- .nj-faq-grid,
.nj-faq-cols--3 .nj-faq-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 18px;
}

/* ==================== FAQ ACCORDION ITEM ==================== */
.nj-faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s ease;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}

/* Item Hover State - Color change */
.nj-faq-item:hover {
    border-color: #7dd3fc;
    background-color: #f8fafc;
    box-shadow: 0 6px 18px rgba(43, 57, 146, 0.09);
    transform: translateY(-2px);
}

/* Item Active (Open) State - Color change */
.nj-faq-item.is-active {
    border-color: #2b3992;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(43, 57, 146, 0.12);
}

/* ==================== TRIGGER BUTTON ==================== */
.nj-faq-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.nj-faq-trigger:focus-visible {
    outline: 2px solid #2b3992;
    outline-offset: -2px;
}

/* ==================== QUESTION TYPOGRAPHY & COLORS ==================== */
.nj-faq-question {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.98rem, 1.35vw, 1.1rem);
    font-weight: 600;
    line-height: 1.45;
    color: #1e293b;
    margin: 0;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
}

/* Color change on hover & active */
.nj-faq-item:hover .nj-faq-question {
    color: #2b3992;
}

.nj-faq-item.is-active .nj-faq-question {
    color: #2b3992;
}

/* ==================== ICON CONTAINER & ANIMATION ==================== */
.nj-faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #f0f9ff;
    color: #2b3992;
    flex-shrink: 0;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.nj-faq-icon .nj-icon-svg {
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    stroke: #2b3992;
}

.nj-faq-icon .nj-icon-v {
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

/* Icon on Item Hover */
.nj-faq-item:hover .nj-faq-icon {
    background-color: #2b3992;
    color: #ffffff;
}

.nj-faq-item:hover .nj-faq-icon .nj-icon-svg {
    stroke: #ffffff;
}

/* Icon on Item Active */
.nj-faq-item.is-active .nj-faq-icon {
    background-color: #2b3992;
    color: #ffffff;
}

.nj-faq-item.is-active .nj-faq-icon .nj-icon-svg {
    stroke: #ffffff;
}

.nj-faq-item.is-active .nj-faq-icon .nj-icon-v {
    transform: rotate(90deg);
    opacity: 0;
}

.nj-faq-item.is-active .nj-faq-icon .nj-icon-svg {
    transform: rotate(180deg);
}

/* ==================== ANSWER CONTENT & FADE-IN ==================== */
.nj-faq-content {
    overflow: hidden;
    transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.nj-faq-content-inner {
    padding: 0 24px 22px 24px;
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-top: -2px;
}

@keyframes njContentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-6px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.nj-faq-item.is-active .nj-faq-content-inner {
    animation: njContentFadeIn 0.35s ease-out forwards;
}

.nj-faq-answer {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.88rem, 1.1vw, 0.95rem);
    font-weight: 400;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

/* ==================== RESPONSIVE: TABLET & MOBILE ==================== */
@media (max-width: 991px) {
    .nj-faq-grid,
    .nj-faq-cols-3 .nj-faq-grid,
    .nj-faq-cols-3- .nj-faq-grid,
    .nj-faq-cols--3 .nj-faq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .nj-faq-trigger {
        padding: 18px 20px;
    }

    .nj-faq-content-inner {
        padding: 0 20px 20px 20px;
        padding-top: 14px;
    }
}

/* Single column on mobile devices (<= 768px) */
@media (max-width: 768px) {
    .nj-faq-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .nj-faq-header {
        margin-bottom: 30px;
    }

    .nj-faq-trigger {
        padding: 16px 18px;
        gap: 12px;
    }

    .nj-faq-question {
        font-size: 0.98rem;
    }

    .nj-faq-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }

    .nj-faq-content-inner {
        padding: 0 18px 18px 18px;
        padding-top: 12px;
    }

    .nj-faq-answer {
        font-size: 0.9rem;
        line-height: 1.65;
    }
}

@media (max-width: 480px) {
    .nj-faq-wrapper {
        padding: 15px 10px;
    }

    .nj-faq-subtitle {
        font-size: 0.72rem;
        letter-spacing: 1.5px;
        padding: 5px 14px;
    }

    .nj-faq-title {
        font-size: 1.5rem;
    }

    .nj-faq-question {
        font-size: 0.92rem;
    }

    .nj-faq-answer {
        font-size: 0.86rem;
    }
}
