/**
 * Estilos para Toggle de Términos Legales - Independiente
 * Reutilizable en cualquier parte del sitio
 */

/* ========================================
   BOTÓN TOGGLE
   ======================================== */

.toggle-legales {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 21px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #264067;
    border: none;
    background: transparent;
    user-select: none;
    transition: color 0.3s ease;
    outline: none;

    background: transparent;
    color: #264067;
    text-decoration: none !important;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #264067;
}

.toggle-legales:hover {
    background: #264067;
    color: #FFFFFF !important;
    border-color: #264067;
    text-decoration: none !important;
}

.toggle-legales:focus {
    background: #264067;
    color: #FFFFFF !important;
    border-color: #264067;
    text-decoration: none !important;
}

/* Icono del toggle */
.toggle-legales .toggle-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0A9BC7;
    border-radius: 4px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    flex-shrink: 0;
}

.toggle-legales:hover .toggle-icon {
    background: #0A9BC7;
}

/* Contenido del icono (+ o −) */
.toggle-legales .toggle-icon::before {
    content: '+';
    font-size: 16px;
    font-weight: 700;
    color: #264067;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-legales:hover .toggle-icon::before {
    color: white;
}

/* Cuando está activo (abierto) */
.toggle-legales.active .toggle-icon::before {
    content: '−';
}

/* ========================================
   CONTENEDOR DE TÉRMINOS LEGALES
   ======================================== */

.legales-content {
    max-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.4s ease, opacity 0.4s ease !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    display: block !important;
    opacity: 0;
    pointer-events: none;
    margin-top: 0 !important;
    border-radius: 0;
}

/* Cuando está activo (expandido) */
.legales-content.active {
    display: block !important;
    max-height: 5000px !important;
    height: auto !important;
    padding: 16px 24px !important;
    margin: 12px 0 0 0 !important;
    overflow-y: visible !important;
    opacity: 1 !important;
    pointer-events: auto;
    border-left: 4px solid #0A9BC7;
}

/* ========================================
   CONTENIDO DENTRO DEL TOGGLE
   ======================================== */

.legales-content p {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    margin: 8px 0;
}

.legales-content p:first-child {
    margin-top: 0;
}

.legales-content p:last-child {
    margin-bottom: 0;
}

.legales-content strong {
    color: #264067;
    font-weight: 600;
}

.legales-content em {
    color: #666;
    font-style: italic;
}

.legales-content a {
    color: #0A9BC7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.legales-content a:hover {
    color: #264067;
    text-decoration: underline;
}

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

@media (max-width: 768px) {
    .toggle-legales {
        padding: 10px 0;
        font-size: 12px;
    }

    .toggle-legales .toggle-icon {
        width: 20px;
        height: 20px;
    }

    .toggle-legales .toggle-icon::before {
        font-size: 14px;
    }

    .legales-content {
        padding: 12px 16px !important;
    }

    .legales-content p {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .toggle-legales {
        padding: 8px 0;
        font-size: 11px;
        gap: 10px;
    }

    .toggle-legales .toggle-icon {
        width: 18px;
        height: 18px;
    }

    .toggle-legales .toggle-icon::before {
        font-size: 12px;
    }

    .legales-content {
        padding: 10px 12px !important;
    }

    .legales-content p {
        font-size: 11px;
        line-height: 1.5;
    }
}

/* ========================================
   ANIMACIÓN
   ======================================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legales-content.active {
    animation: slideDown 0.4s ease;
}

