/* Smooth Scroll Global */
html {
    scroll-behavior: smooth;
}

/* Animaciones de Scroll (Reveal) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

/* Clase que añade JS cuando el elemento entra en pantalla */
.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover effect para iconos de servicios */
.group:hover .icon-service-box {
    background-color: var(--dark-bg) !important;
    color: white !important;
}

.group:hover .icon-service-box i,
.group:hover .icon-service-box svg {
    transform: scale(1.1);
}

/* WYSIWYG Content Support (Restaurar estilos base de Tailwind) */
.wysiwyg-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.wysiwyg-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.wysiwyg-content p {
    margin-bottom: 0.75rem;
}
.wysiwyg-content strong {
    font-weight: 700;
}
.wysiwyg-content em {
    font-style: italic;
}
.wysiwyg-content a {
    color: inherit;
    text-decoration: underline;
}
.wysiwyg-content blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1rem;
    font-style: italic;
    color: #4b5563;
}

/* ============================================================================
   MODAL TEXTOS LEGALES
   ============================================================================ */

.legal-modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease-out;
}

.legal-modal-overlay.active {
    visibility: visible;
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.legal-modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 42rem;
    width: 100%;
    max-height: 85vh;
    padding: 1.5rem;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.legal-modal-overlay.active .legal-modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Scrollbar personalizada para el contenido del modal */
#legal-modal-body::-webkit-scrollbar {
    width: 6px;
}

#legal-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#legal-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive: modal más pequeño en móviles */
@media (max-width: 640px) {
    .legal-modal-content {
        padding: 1rem;
        border-radius: 0.75rem;
        max-height: 90vh;
    }
    
    #legal-modal-body {
        max-height: 55vh !important;
    }
}

/* ============================================================================
   LOGOS INSTITUCIONALES FOOTER
   ============================================================================ */

.footer-institutional-logo {
    /* Inversión sutil para fondos oscuros */
    filter: invert(1) brightness(0.85) grayscale(0.2);
    opacity: 0.75;
    transition: opacity 0.3s ease;
}

.footer-institutional-logo:hover {
    opacity: 0.9;
}
