/* Importar fuente */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

/* Contenedor de preguntas frecuentes */
.faq-container {
    width: 90%;
    max-width: 1250px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 50px auto;
    height: auto;
}

/* Título */
.faq-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #4A90E2;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 12px;
    transition: background-color 0.2s ease;
    font-size: 18px;  /* Ajuste para mejor lectura */
}

.faq-question:hover {
    background-color: #e1e1e1;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 16px;
    background-color: #f0f8ff;
    border: 1px solid #cce7ff;
    border-radius: 5px;
    margin-bottom: 12px;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.faq-answer-content {
    padding: 10px 0;
}

/* Flecha */
.arrow {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px; /* Ajusta a un valor alto para permitir que crezca según el contenido */
    padding: 10px;
    opacity: 1;
    visibility: visible;
    overflow: hidden; /* Asegura que el contenido no sobresalga */
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}


.faq-item.active .arrow {
    transform: rotate(180deg);
}

/* Estilos responsive */
@media (max-width: 600px) {
    .faq-title {
        font-size: 22px;
    }
    
    .faq-question {
        font-size: 16px;
        padding: 14px;
    }
    
    .faq-answer-content {
        font-size: 14px;
    }

    .faq-container {
        padding: 10px;
    }
}
