.site-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fff;
    font-size: 0.85rem;
    color: #666;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
}

.footer-links a:hover {
    color: #00a82d;
    /* El verde de tu formulario */
}

.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 9999;
    display: none;
    /* Se controla por JS */
    border: 1px solid #eee;
}

.cookie-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-container p {
    font-size: 0.9rem;
    color: #444;
    margin: 0;
}

.btn-accept {
    background-color: #00a82d;
    /* Tu verde */
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.cookie-link {
    font-size: 0.85rem;
    color: #666;
    text-decoration: underline;
    margin-left: 15px;
}

/* Ajuste para móviles */
@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav ul {
        flex-direction: column;
        gap: 10px;
    }
}

/* ESTILOS DEL MODAL LEGAL PREMIUM (POPUP) */
.legal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.legal-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.legal-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.legal-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 24px;
    padding: 40px 30px 40px 40px; /* Reducimos padding derecho para el scrollbar */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evitamos que el contenedor principal haga scroll */
    transform: translateY(30px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.legal-modal.active .legal-modal-content {
    transform: translateY(0);
}

.legal-modal-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: #f1f5f9;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 10002; /* Flota sobre el cuerpo con scroll */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.legal-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

/* Estilos de contenido y scroll dentro del modal - Unificados e independientes */
.legal-modal-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.8;
    color: #475569; /* Gris pizarra elegante para lectura */
    text-align: left;
    overflow-y: auto; /* El scroll se produce únicamente aquí */
    flex: 1;
    padding-right: 20px; /* Espacio para que el texto no toque la barra de scroll */
}

/* Barra de scroll premium personalizada para navegadores Webkit (Chrome, Safari, Edge) */
.legal-modal-body::-webkit-scrollbar {
    width: 6px; /* Barra de scroll ultra fina y elegante */
}

.legal-modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

.legal-modal-body::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.2); /* Color slate sutil */
    border-radius: 10px;
    transition: background 0.3s ease;
}

.legal-modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.45); /* Se oscurece al pasar el ratón */
}

/* Scrollbar para Firefox */
.legal-modal-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.2) rgba(0, 0, 0, 0.02);
}

/* Encabezados unificados */
.legal-modal-body h1, 
.legal-modal-body h2, 
.legal-modal-body h3 {
    color: #0f172a;
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 700;
    border: none;
    padding: 0;
}

.legal-modal-body h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: 800;
}

.legal-modal-body h2 {
    font-size: 1.35rem;
    margin-top: 32px;
}

.legal-modal-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 24px;
}

.legal-modal-body p {
    margin-bottom: 16px;
    font-size: 0.95rem;
    color: #475569;
}

.legal-modal-body strong {
    color: #0f172a;
}

/* Unificación de las cajas de información legales (ej. Datos del Titular) */
.legal-modal-body .info-box {
    background-color: #f8fafc;
    border-left: 4px solid #00a82d; /* El color verde característico de Kirvia */
    padding: 20px;
    border-radius: 8px;
    margin: 24px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.legal-modal-body .info-box h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.15rem;
    color: #0f172a;
}

.legal-modal-body .info-box p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.legal-modal-body .info-box p:last-child {
    margin-bottom: 0;
}

/* Listas ordenadas e inordenadas de las políticas */
.legal-modal-body ul, 
.legal-modal-body ol {
    margin-top: 8px;
    margin-bottom: 20px;
    padding-left: 20px;
}

.legal-modal-body li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #475569;
}

/* Nota de pie de página en los documentos */
.legal-modal-body .footer-note {
    font-size: 0.85em;
    color: #94a3b8;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
}

/* Estilos de tablas dentro del modal legal */
.legal-modal-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.9rem;
    color: #475569;
}

.legal-modal-body th,
.legal-modal-body td {
    border: 1px solid #e2e8f0;
    padding: 12px 8px;
    text-align: left;
}

.legal-modal-body th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #0f172a;
}

.legal-modal-body tr:nth-child(even) {
    background-color: #f8fafc;
}

.legal-modal-body caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f172a;
}