/* =====================================================================
   Páginas legales (aviso legal / privacidad / cookies)
   ===================================================================== */
[x-cloak] { display: none !important; }

.legal-wrap { max-width: 820px; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.legal-wrap h1 { font-size: clamp(1.8rem, 3.5vw, 2.2rem); font-weight: 800; color: #0f172a; margin: 0 0 .5rem; letter-spacing: -.02em; line-height: 1.2; }
.legal-wrap .legal-meta { color: #64748b; font-size: .88rem; margin: 0 0 2rem; }
.legal-wrap h2 { font-size: 1.4rem; font-weight: 800; color: #0f172a; margin: 2.2rem 0 .8rem; letter-spacing: -.01em; }
.legal-wrap h3 { font-size: 1.08rem; font-weight: 700; color: #1e293b; margin: 1.4rem 0 .4rem; }
.legal-wrap p, .legal-wrap li { color: #334155; line-height: 1.7; font-size: 1rem; }
.legal-wrap p { margin: 0 0 1rem; }
.legal-wrap ul, .legal-wrap ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.legal-wrap li { margin-bottom: .35rem; }
.legal-wrap strong { color: #0f172a; font-weight: 700; }
.legal-wrap a { color: #0891b2; text-decoration: underline; text-underline-offset: 3px; }
.legal-wrap a:hover { color: #0e7490; }
.legal-wrap table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .9rem; }
.legal-wrap th, .legal-wrap td { border: 1px solid #e2e8f0; padding: .6rem .75rem; text-align: left; vertical-align: top; }
.legal-wrap th { background: #f8fafc; font-weight: 700; color: #0f172a; }
.legal-wrap hr { border: 0; height: 1px; background: #e2e8f0; margin: 2rem 0; }

html.dark .legal-wrap h1, html.dark .legal-wrap h2, html.dark .legal-wrap h3 { color: #f1f5f9; }
html.dark .legal-wrap strong { color: #f1f5f9; }
html.dark .legal-wrap p, html.dark .legal-wrap li { color: #cbd5e1; }
html.dark .legal-wrap .legal-meta { color: #94a3b8; }
html.dark .legal-wrap th { background: #1e293b; color: #f1f5f9; }
html.dark .legal-wrap th, html.dark .legal-wrap td { border-color: #334155; }
html.dark .legal-wrap hr { background: #334155; }

/* =====================================================================
   Footer
   ===================================================================== */
.site-footer {
    background: #0f172a;
    color: rgba(255,255,255,.75);
    padding: 2.5rem 1.25rem 1.75rem;
    margin-top: 3rem;
}
.site-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
}
.site-footer-col h4 {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 700;
    color: #fff;
    margin: 0 0 .85rem;
}
.site-footer-col ul { list-style: none; padding: 0; margin: 0; }
.site-footer-col li { margin-bottom: .45rem; }
.site-footer-col a {
    color: rgba(255,255,255,.72);
    text-decoration: none;
    font-size: .9rem;
    transition: color .15s;
}
.site-footer-col a:hover { color: #67e8f9; }
.site-footer-brand p { margin: .5rem 0 0; font-size: .88rem; line-height: 1.55; color: rgba(255,255,255,.7); max-width: 320px; }
.site-footer-brand .logo { color: #fff; font-weight: 700; font-size: 1.1rem; display: inline-flex; align-items: center; gap: .5rem; }
.site-footer-brand .logo img { height: 30px; }
.site-footer-bottom {
    max-width: 1180px;
    margin: 2rem auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .82rem;
    color: rgba(255,255,255,.55);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
.site-footer-bottom button {
    background: transparent;
    border: 0;
    color: rgba(255,255,255,.75);
    text-decoration: underline;
    cursor: pointer;
    font-size: .82rem;
}
.site-footer-bottom button:hover { color: #67e8f9; }
@media (max-width: 900px) {
    .site-footer-inner { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 560px) {
    .site-footer { padding: 2rem 1rem 1.25rem; }
    .site-footer-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    .site-footer-col h4 { margin-bottom: .6rem; }
    .site-footer-brand p { max-width: none; margin-inline: auto; }
    .site-footer-brand .logo { justify-content: center; }
    .site-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: .75rem;
        margin-top: 1.5rem;
    }
}

/* =====================================================================
   Banner de cookies + modal de configuración
   ===================================================================== */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    max-width: 760px;
    width: calc(100% - 2rem);
    background: #0f172a;
    color: #fff;
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: .9rem;
    animation: cookieSlideUp .3s ease;
}
@keyframes cookieSlideUp { from { transform: translate(-50%, 20px); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.cookie-banner-title { font-size: 1.05rem; font-weight: 700; color: #fff; margin: 0; display: flex; align-items: center; gap: .5rem; }
.cookie-banner-body { font-size: .9rem; line-height: 1.55; color: rgba(255,255,255,.85); margin: 0; }
.cookie-banner-body a { color: #67e8f9; text-decoration: underline; }
.cookie-banner-actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.cookie-btn {
    padding: .62rem 1.15rem;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    font-size: .88rem;
    font-weight: 600;
    font-family: inherit;
    transition: background .15s, transform .12s;
}
.cookie-btn:hover { transform: translateY(-1px); }
.cookie-btn-primary { background: #0891b2; color: #fff; }
.cookie-btn-primary:hover { background: #06b6d4; }
.cookie-btn-secondary { background: rgba(255,255,255,.14); color: #fff; }
.cookie-btn-secondary:hover { background: rgba(255,255,255,.22); }
.cookie-btn-link { background: transparent; color: #67e8f9; text-decoration: underline; padding: .4rem .5rem; }

.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(3px);
}
.cookie-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.cookie-modal h3 { font-size: 1.3rem; font-weight: 800; margin: 0 0 .3rem; color: #0f172a; }
.cookie-modal > p { margin: 0 0 1.25rem; color: #64748b; font-size: .9rem; }
.cookie-modal .cookie-category {
    border-top: 1px solid #e2e8f0;
    padding: .95rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.cookie-modal .cookie-category:first-of-type { border-top: 0; padding-top: 0; }
.cookie-category-info { flex: 1; }
.cookie-category-info strong { display: block; color: #0f172a; font-weight: 700; font-size: .95rem; margin-bottom: .15rem; }
.cookie-category-info p { margin: 0; color: #475569; font-size: .84rem; line-height: 1.5; }
.cookie-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .18s;
    margin-top: 2px;
}
.cookie-toggle:checked { background: #0891b2; }
.cookie-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .18s;
    box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.cookie-toggle:checked::before { transform: translateX(20px); }
.cookie-toggle:disabled { opacity: .55; cursor: not-allowed; }
.cookie-modal-footer { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: 1.35rem; padding-top: 1rem; border-top: 1px solid #e2e8f0; }

html.dark .cookie-banner { background: #020617; }
html.dark .cookie-modal { background: #1e293b; }
html.dark .cookie-modal h3 { color: #f1f5f9; }
html.dark .cookie-modal > p { color: #94a3b8; }
html.dark .cookie-modal .cookie-category,
html.dark .cookie-modal-footer { border-top-color: #334155; }
html.dark .cookie-category-info strong { color: #f1f5f9; }
html.dark .cookie-category-info p { color: #cbd5e1; }
html.dark .cookie-toggle { background: #475569; }
