/* --- Estilos Generales y Animaciones --- */
:root {
    --primary-color: #6a11cb;
    --secondary-color: #2575fc;
    --text-color: #4a4a4a;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --radius: 16px;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

body {
    background-color: var(--bg-color);
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.7;
}

/* --- Hero Section --- */
.faq-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), #a24aca, #5a67ff);
    background-size: 300% 300%;
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    border-radius: 0 0 var(--radius) var(--radius);
    animation: gradient-animation 15s ease infinite;
    margin-bottom: 50px;
}

.faq-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.faq-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* --- Search Bar --- */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

#helpSearch {
    width: 100%;
    padding: 18px 50px 18px 25px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#helpSearch:focus {
    outline: none;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2), 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 25px;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1.2rem;
}

/* --- Contenedor Principal --- */
.legal-container {
    max-width: 900px;
    margin: -50px auto 50px;
    padding: 30px;
    background-color: transparent; /* El fondo lo tendrán las tarjetas */
    border-radius: var(--radius);
    position: relative;
    z-index: 10;
}

/* --- FAQ Section --- */
.faq-section {
    animation: fade-in-up 0.8s ease-out forwards;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.faq-item {
    background-color: var(--card-bg);
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.4s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.2rem;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), padding 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    /* El padding se gestionará en el estado activo para una mejor animación */
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Altura suficiente para el contenido */
    padding: 0 30px 25px; /* Añade padding cuando está abierto */
}

.faq-answer p, .faq-answer ul, .faq-answer ol {
    margin: 0;
    padding-bottom: 25px;
    font-size: 1rem;
    line-height: 1.8;
}

.faq-answer a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease;
}

.faq-answer a:hover {
    border-bottom-color: var(--secondary-color);
}

/* --- Support Section --- */
.support-section {
    border-radius: var(--radius) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.support-section:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.support-section a:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .faq-hero h1 {
        font-size: 2.5rem;
    }
    .legal-container {
        padding: 15px;
        margin-top: -30px;
    }
    .faq-question {
        padding: 20px;
        font-size: 1rem;
    }
    .faq-answer {
        padding: 0 20px;
    }
}
