/* ===========================
   FAQ CATEGORIES SECTION
   =========================== */

.faq-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.faq-category {
    margin-bottom: 80px;
    animation: fadeInUp 0.8s ease backwards;
}

.faq-category:nth-child(1) {
    animation-delay: 0.1s;
}

.faq-category:nth-child(2) {
    animation-delay: 0.2s;
}

.faq-category:nth-child(3) {
    animation-delay: 0.3s;
}

.faq-category:nth-child(4) {
    animation-delay: 0.4s;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 50px;
    padding: 24px 32px;
    background: linear-gradient(135deg, rgba(46, 143, 51, 0.08) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-radius: 16px;
    border-left: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
    animation: fadeInLeft 0.8s ease backwards;
}

.category-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: -50%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(46, 143, 51, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-header i {
    font-size: 32px;
    color: var(--primary-color);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin: 0 auto;
}

.faq-item {
    background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%);
    border: 1px solid rgba(46, 143, 51, 0.12);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04),
                0 1px 3px rgba(0, 0, 0, 0.02);
    animation: fadeInUp 0.8s ease backwards;
    position: relative;
}

.faq-item:nth-child(1) {
    animation-delay: 0.1s;
}

.faq-item:nth-child(2) {
    animation-delay: 0.15s;
}

.faq-item:nth-child(3) {
    animation-delay: 0.2s;
}

.faq-item:nth-child(4) {
    animation-delay: 0.25s;
}

.faq-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #2e8f33 0%, #25a832 50%, #1e8a2a 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 20px 0 0 20px;
    box-shadow: 2px 0 8px rgba(46, 143, 51, 0.3);
}

.faq-item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(46, 143, 51, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    border-radius: 20px;
}

.faq-item.active::before {
    transform: scaleY(1);
}

.faq-item.active::after {
    opacity: 1;
}

.faq-item:hover {
    border-color: rgba(46, 143, 51, 0.25);
    box-shadow: 0 12px 40px rgba(46, 143, 51, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px) scale(1.01);
}

.faq-item.active {
    border-color: rgba(46, 143, 51, 0.35);
    box-shadow: 0 16px 50px rgba(46, 143, 51, 0.18),
                0 6px 20px rgba(46, 143, 51, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    background: linear-gradient(145deg, #ffffff 0%, rgba(46, 143, 51, 0.03) 100%);
}

.faq-question {
    padding: 20px 36px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.3s ease;
    gap: 24px;
    background: transparent;
    position: relative;
}

.faq-question:hover {
    background: linear-gradient(135deg, rgba(46, 143, 51, 0.04) 0%, rgba(46, 143, 51, 0.02) 100%);
}

.faq-item.active .faq-question {
    background: linear-gradient(135deg, rgba(46, 143, 51, 0.06) 0%, rgba(46, 143, 51, 0.03) 100%);
    padding-bottom: 24px;
}

.faq-question h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
    line-height: 1.5;
    flex: 1;
    text-align: left;
    transition: color 0.3s ease;
}

.faq-item.active .faq-question h3 {
    color: #2e8f33;
}

.faq-question i {
    color: #2e8f33;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 18px;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(46, 143, 51, 0.1) 0%, rgba(46, 143, 51, 0.08) 100%);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(46, 143, 51, 0.1);
}

.faq-question:hover i {
    background: linear-gradient(135deg, rgba(46, 143, 51, 0.15) 0%, rgba(46, 143, 51, 0.12) 100%);
    box-shadow: 0 4px 12px rgba(46, 143, 51, 0.15);
    transform: scale(1.08);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg) scale(1.1);
    background: linear-gradient(135deg, #2e8f33 0%, #25a832 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(46, 143, 51, 0.3);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.5s ease;
    background: transparent;
    opacity: 0;
}

.faq-item.active .faq-answer {
    max-height: 600px;
    opacity: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    position: relative;
}

/* Custom scrollbar for accordion content */
.faq-item.active .faq-answer::-webkit-scrollbar {
    width: 8px;
}

.faq-item.active .faq-answer::-webkit-scrollbar-track {
    background: rgba(46, 143, 51, 0.05);
    border-radius: 10px;
    margin: 8px 0;
}

.faq-item.active .faq-answer::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2e8f33 0%, #25a832 100%);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.faq-item.active .faq-answer::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #25a832 0%, #1e8a2a 100%);
}

/* Firefox scrollbar */
.faq-item.active .faq-answer {
    scrollbar-width: thin;
    scrollbar-color: #2e8f33 rgba(46, 143, 51, 0.05);
}

/* Scroll indicator - fade effect at bottom */
.faq-item.active .faq-answer::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 40%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 8px;
}

/* Show fade when scrollable */
.faq-item.active .faq-answer.has-scroll::after {
    opacity: 1;
}

/* Scroll hint icon */
.faq-item.active .faq-answer.has-scroll::before {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: sticky;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    color: #2e8f33;
    font-size: 14px;
    z-index: 10;
    animation: bounceDown 1.5s ease-in-out infinite;
    pointer-events: none;
    display: block;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(46, 143, 51, 0.2);
}

@keyframes bounceDown {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(4px);
    }
}

.faq-answer p {
    padding: 20px 36px 0;
    color: #555;
    font-size: 15.5px;
    line-height: 1.9;
    margin: 0 0 16px 0;
}

.faq-answer p:first-child {
    border-top: 1px solid rgba(46, 143, 51, 0.08);
    padding-top: 24px;
}

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

.faq-answer div {
    padding: 0 36px;
    margin-bottom: 20px;
}

.faq-answer > div:first-of-type {
    padding-top: 0;
}

.faq-answer span {
    display: block;
    font-weight: 700;
    color: #2e8f33;
    font-size: 16px;
    margin: 20px 36px 12px;
    padding: 8px 0;
    border-bottom: 2px solid rgba(46, 143, 51, 0.15);
}

.faq-answer > p + span {
    margin-top: 24px;
}

.faq-answer span:first-child {
    margin-top: 0;
    padding-top: 0;
}

.faq-answer ul,
.faq-answer ui {
    list-style: none;
    padding: 0;
    margin: 0 36px 20px;
    background: rgba(46, 143, 51, 0.02);
    border-radius: 12px;
    padding: 12px 0;
}

.faq-answer ul li,
.faq-answer ui li {
    padding: 12px 16px 12px 36px;
    color: #555;
    font-size: 15px;
    line-height: 1.8;
    position: relative;
    border-left: 3px solid transparent;
    margin: 0 12px 6px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.faq-answer ul li:last-child,
.faq-answer ui li:last-child {
    margin-bottom: 0;
}

.faq-answer ul li:hover,
.faq-answer ui li:hover {
    border-left-color: #2e8f33;
    background: rgba(46, 143, 51, 0.06);
    padding-left: 40px;
    transform: translateX(4px);
}

.faq-answer ul li i,
.faq-answer ui li i {
    color: #2e8f33;
    margin-right: 12px;
    font-size: 14px;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.faq-answer ul li strong,
.faq-answer ui li strong {
    color: #1a1a1a;
    font-weight: 700;
}

.faq-answer > *:last-child {
    margin-bottom: 32px;
}

/* Fix for nested content spacing */
.faq-answer div:last-child {
    margin-bottom: 32px;
}

.faq-answer ul:last-child,
.faq-answer ui:last-child {
    margin-bottom: 32px;
}

/* Extra padding when scrollable */
.faq-item.active .faq-answer.has-scroll > *:last-child {
    margin-bottom: 60px;
}

.faq-answer span + ul,
.faq-answer span + ui {
    margin-top: 0;
}

/* Ensure proper spacing between elements */
.faq-answer > p + span {
    margin-top: 28px;
}

.faq-answer > span + span {
    margin-top: 24px;
}

/* Add subtle animation to list items */
.faq-item.active .faq-answer ul li,
.faq-item.active .faq-answer ui li {
    animation: slideInLeft 0.4s ease backwards;
}

.faq-item.active .faq-answer ul li:nth-child(1),
.faq-item.active .faq-answer ui li:nth-child(1) {
    animation-delay: 0.1s;
}

.faq-item.active .faq-answer ul li:nth-child(2),
.faq-item.active .faq-answer ui li:nth-child(2) {
    animation-delay: 0.15s;
}

.faq-item.active .faq-answer ul li:nth-child(3),
.faq-item.active .faq-answer ui li:nth-child(3) {
    animation-delay: 0.2s;
}

.faq-item.active .faq-answer ul li:nth-child(4),
.faq-item.active .faq-answer ui li:nth-child(4) {
    animation-delay: 0.25s;
}

.faq-item.active .faq-answer ul li:nth-child(5),
.faq-item.active .faq-answer ui li:nth-child(5) {
    animation-delay: 0.3s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .faq-question {
        padding: 28px 32px;
    }

    .faq-item.active .faq-question {
        padding-bottom: 20px;
    }

    .faq-question i {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .faq-answer p {
        padding: 18px 32px 0;
        margin-bottom: 14px;
    }

    .faq-answer p:first-child {
        padding-top: 20px;
    }

    .faq-answer div {
        padding: 0 32px;
        margin-bottom: 16px;
    }

    .faq-answer span {
        margin: 16px 32px 10px;
        font-size: 15px;
        padding: 6px 0;
    }

    .faq-answer ul,
    .faq-answer ui {
        margin: 0 32px 16px;
        padding: 10px 0;
    }

    .faq-answer ul li,
    .faq-answer ui li {
        font-size: 14px;
        padding: 10px 14px 10px 32px;
        margin: 0 10px 5px;
    }

    .faq-answer ul li i,
    .faq-answer ui li i {
        left: 10px;
        font-size: 13px;
    }

    /* Tablet scrollable height */
    .faq-item.active .faq-answer {
        max-height: 500px;
    }
}

@media (max-width: 480px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .faq-item {
        border-radius: 16px;
    }

    .faq-question {
        padding: 24px 28px;
    }

    .faq-item.active .faq-question {
        padding-bottom: 18px;
    }

    .faq-question h3 {
        font-size: 16px;
    }

    .faq-question i {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .faq-answer p {
        padding: 16px 28px 0;
        font-size: 14px;
        margin-bottom: 12px;
    }

    .faq-answer p:first-child {
        padding-top: 18px;
    }

    .faq-answer div {
        padding: 0 28px;
        margin-bottom: 14px;
    }

    .faq-answer span {
        margin: 14px 28px 8px;
        font-size: 14px;
        padding: 5px 0;
    }

    .faq-answer ul,
    .faq-answer ui {
        margin: 0 28px 14px;
        padding: 8px 0;
    }

    .faq-answer ul li,
    .faq-answer ui li {
        font-size: 13px;
        padding: 9px 12px 9px 30px;
        margin: 0 8px 4px;
    }

    .faq-answer ul li i,
    .faq-answer ui li i {
        font-size: 12px;
        left: 8px;
    }

    /* Mobile scrollable height */
    .faq-item.active .faq-answer {
        max-height: 400px;
    }

    /* Smaller scrollbar on mobile */
    .faq-item.active .faq-answer::-webkit-scrollbar {
        width: 6px;
    }

    .category-header {
        margin-bottom: 30px;
    }

    .category-header h2 {
        font-size: 22px;
    }

    .category-header i {
        font-size: 24px;
    }
}

