.faq-section {
    background: linear-gradient(rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.91)), url('/Imagenes_Inicio/Imagen.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, transparent 20%, rgba(0, 128, 0, 0.17) 70%);
    z-index: 1;
    animation: pulseGlow 8s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    animation: slideUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.faq-header {
    text-align: center;
    margin-bottom: 60px;
}

.faq-header h2 {
    font-size: 3.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: linear-gradient(90deg, #ffffff, #e0e0e0, #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% center; }
    50% { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.faq-header p {
    font-size: 1.35rem;
    color: #ffffff;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: calc(0.1s * var(--item-index, 1));
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    text-align: left;
    padding: 20px 0;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    will-change: transform, color;
}

.faq-question:hover {
    color: #86ff05;
    transform: translateX(5px);
}

.faq-question::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    width: 0;
    height: 2px;
    background: #86ff05;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(-50%);
}

.faq-question:hover::before {
    width: 8px;
}

.faq-question i {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), color 0.3s ease;
    color: #86ff05;
    will-change: transform;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: #86ff05;
    text-shadow: 0 0 10px rgba(0, 255, 76, 0.5);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), 
                padding 0.6s cubic-bezier(0.165, 0.84, 0.44, 1),
                opacity 0.6s ease;
    padding: 0 20px;
    border-left: 2px solid #86ff05;
    margin-left: 10px;
    opacity: 0;
    will-change: max-height, padding, opacity;
    box-shadow: -5px 0 15px -5px rgba(0, 255, 76, 0.1);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px;
    opacity: 1;
}

.faq-answer p {
    color: #ffffff;
    line-height: 1.6;
    transform: translateY(10px);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) 0.1s;
}

.faq-item.active .faq-answer p {
    transform: translateY(0);
}

.faq-more {
    text-align: center;
    margin-top: 50px;
    opacity: 0;
    animation: fadeIn 1s ease-out 1s forwards;
}

.faq-more p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.btn-contact {
    display: inline-block;
    background: linear-gradient(90deg, #008000, #86ff05);
    background-size: 200% auto;
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 5px 15px rgba(0, 255, 76, 0.2);
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, background-position;
}

.btn-contact:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 255, 76, 0.4);
    background-position: right center;
}

.btn-contact::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.8);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.btn-contact:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(20) translate(-50%, -50%);
        opacity: 0;
    }
}

/* Efectos visuales adicionales */
@media (min-width: 768px) {
    .faq-item {
        position: relative;
        overflow: hidden;
    }
    
    .faq-item::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, #86ff05, transparent);
        transition: width 0.7s cubic-bezier(0.19, 1, 0.22, 1);
    }
    
    .faq-item:hover::after {
        width: 100%;
    }
    
    .faq-item:nth-child(odd) {
        transform: translateX(-10px);
    }
    
    .faq-item:nth-child(even) {
        transform: translateX(10px);
    }
    
    .faq-item:hover {
        transform: translateX(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .faq-header h2 {
        font-size: 2.2rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 15px 0;
    }
    
    .faq-section {
        padding: 60px 0;
    }
    
    .faq-item.active .faq-answer {
        max-height: 800px; /* Mayor altura para móviles */
    }
}

/* Añadir esto al JavaScript para asignar índices a los elementos FAQ */
/* 
document.querySelectorAll('.faq-item').forEach((item, index) => {
    item.style.setProperty('--item-index', index + 1);
});
*/
