/* =========================
   BASE GENERAL
========================= */

body{
    margin:0;
    font-family:'Segoe UI', sans-serif;
    background:#f4f7fb;
    color:#333;
}

/* =========================
   LAYOUT GENERAL
========================= */

.legal-layout{
    display:flex;
    gap:40px;

    width:100%;
    max-width:100%;

    padding:40px 60px;
    box-sizing:border-box;

    overflow:visible; /* ðŸ”¥ IMPORTANTE para sticky */
}

/* =========================
   SIDEBAR (ÃNDICE)
========================= */

.legal-sidebar{
    width:280px;
    min-width:260px;

    position:sticky;
    top:20px; /* ðŸ”¥ corregido */

    height:fit-content;

    background:#fff;
    padding:25px;
    border-radius:12px;

    box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

/* tÃ­tulo */
.legal-sidebar h3{
    font-size:18px;
    margin-bottom:15px;
    color:#1e5cc8;
}

/* lista */
.legal-sidebar ul{
    list-style:none;
    padding:0;
    margin:0;
}

/* item */
.legal-sidebar li{
    margin-bottom:8px;
}

/* link */
.legal-sidebar a{
    text-decoration:none;
    color:#444;
    font-size:14px;
    display:block;
    padding:6px 8px;
    border-radius:6px;
    transition:0.2s;
}

/* hover */
.legal-sidebar a:hover{
    background:#eef3ff;
    color:#1e5cc8;
    padding-left:10px;
}

/* activo */
.legal-sidebar a.active{
    background:#e6edff;
    color:#1e5cc8;
    font-weight:600;
}

/* =========================
   BLOQUE EXTRA (BOTONES)
========================= */

.legal-extra{
    margin-top:20px;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.legal-extra a,
.legal-extra button{
    background:#1e5cc8;
    color:#fff;
    padding:10px;
    border:none;
    border-radius:8px;
    text-align:center;
    cursor:pointer;
    font-size:14px;
    transition:0.2s;
}

.legal-extra a:hover,
.legal-extra button:hover{
    background:#1747a3;
}

/* =========================
   CONTENIDO DERECHO
========================= */

.legal-content{
    flex:1;
}

/* =========================
   CARD LEGAL
========================= */

.legal-card{
    width:100%;
    max-width:100%;
    overflow-wrap:break-word;
    padding:50px;
    border-radius:14px;

    background:#fff;
    box-shadow:0 10px 30px rgba(0,0,0,0.08);

    line-height:1.8;
}

/* =========================
   TITULO PRINCIPAL
========================= */

.legal-card h1{
    font-size:28px;
    text-align:center;
    color:#1e5cc8;
    margin-bottom:10px;
}

.empresa{
    text-align:center;
    font-weight:600;
    color:#555;
    margin-bottom:20px;
}

.intro{
    text-align:center;
    font-size:15px;
    color:#666;
    margin-bottom:30px;
}

/* =========================
   SECCIONES
========================= */

section{
    margin-bottom:30px;
}

/* subtÃ­tulos */
section h2{
    font-size:18px;
    color:#1e5cc8;

    display:flex;
    align-items:center;
    gap:8px;

    border-left:4px solid #1e5cc8;
    padding-left:10px;

    margin-bottom:10px;
}

/* iconos */
section h2 i{
    color:#1e5cc8;
}

/* texto */
section p{
    font-size:15px;
    color:#444;
}

/* listas */
section ul{
    padding-left:20px;
}

section ul li{
    margin-bottom:8px;
}

/* =========================
   FECHA
========================= */

.fecha{
    margin-top:30px;
    text-align:right;
    font-size:13px;
    color:#888;
}

/* =========================
   BOTÃ“N VOLVER ARRIBA
========================= */

#btnTop{
    position:fixed;
    bottom:30px;
    right:30px;

    background:#1e5cc8;
    color:#fff;

    border:none;
    padding:12px 15px;
    border-radius:50%;

    cursor:pointer;

    display:none;
    z-index:999;

    box-shadow:0 5px 15px rgba(0,0,0,0.2);
    transition:0.2s;
}

#btnTop:hover{
    background:#1747a3;
    transform:translateY(-2px);
}

/* =========================
   SCROLL SUAVE
========================= */

html{
    scroll-behavior:smooth;
}

/* =========================
   IMPRESIÃ“N
========================= */

@media print{

    body{
        background:#fff;
    }

    .legal-sidebar,
    #btnTop{
        display:none;
    }

    .legal-layout{
        padding:0;
    }

    .legal-card{
        box-shadow:none;
        padding:0;
    }
}

.legal-sidebar a.active{
    background:#e6edff;
    color:#1e5cc8;
    font-weight:600;
}

.form-check{
    margin-top:15px;
    font-size:13px;
    color:#555;
}

.form-check input{
    margin-right:6px;
}

.form-check a{
    color:#1e5cc8;
    text-decoration:none;
    font-weight:500;
}

.form-check a:hover{
    text-decoration:underline;
}

.cookie-banner{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    backdrop-filter:blur(8px);
    background:#1e5cc8;
    color:#fff;

    padding:15px;
    display:flex;
    justify-content:space-between;
    align-items:center;

    z-index:9999;
}

.cookie-banner a{
    color:#fff;
    text-decoration:underline;
}

.cookie-banner button{
    background:#fff;
    color:#1e5cc8;

    border:none;
    padding:8px 12px;
    border-radius:6px;
    cursor:pointer;
}
/* =========================================================
   MONITORES GRANDES
   24" / 27"
========================================================= */

@media (min-width:1600px){

    .legal-layout{

        max-width:2100px;

        margin:auto;

        gap:50px;

        padding:50px 80px;
    }

    .legal-sidebar{

        width:320px;

        min-width:320px;

        padding:30px;

        border-radius:18px;
    }

    .legal-sidebar h3{
        font-size:22px;
    }

    .legal-sidebar a{
        font-size:16px;
    }

    .legal-card{

        padding:70px 90px;

        border-radius:20px;
    }

    .legal-card h1{
        font-size:42px;
    }

    section h2{
        font-size:24px;
    }

    section p,
    section li{
        font-size:17px;
    }

    .intro{
        font-size:17px;
    }
}

/* =========================================================
   LAPTOPS 19" / 15"
========================================================= */

@media (max-width:1400px){

    .legal-layout{
        gap:28px;
    }

    .legal-card{
        padding:45px 50px;
    }
}

/* =========================================================
   LAPTOPS 14"
========================================================= */

@media (max-width:1200px){

    .legal-layout{

        gap:22px;

        padding:30px 35px;
    }

    .legal-sidebar{

        width:240px;

        min-width:240px;

        padding:20px;
    }

    .legal-card{
        padding:40px 35px;
    }

    .legal-card h1{
        font-size:30px;
    }

    section h2{
        font-size:18px;
    }

    section p,
    section li{
        font-size:14px;
    }
}

/* =========================================================
   TABLET HORIZONTAL
========================================================= */

@media (max-width:992px){

    .legal-layout{

        flex-direction:column;

        gap:20px;

        padding:22px;
    }

    .legal-sidebar{

        position:relative;

        top:auto;

        width:100%;

        min-width:100%;

        border-radius:16px;
    }

    .legal-card{

        padding:30px 24px;

        border-radius:16px;
    }

    .legal-card h1{
        font-size:26px;
    }

    .empresa{
        font-size:14px;
    }

    .intro{
        font-size:14px;
    }

    section{
        margin-bottom:24px;
    }

    section h2{
        font-size:17px;
    }

    section p,
    section li{
        font-size:14px;

        line-height:1.8;
    }
}

/* =========================================================
   TABLET VERTICAL
========================================================= */

@media (max-width:768px){

    .legal-layout{
        padding:18px;
    }

    .legal-sidebar{
        padding:18px;
    }

    .legal-sidebar h3{
        font-size:18px;
    }

    .legal-sidebar a{
        font-size:13px;
    }

    .legal-extra a,
    .legal-extra button{
        font-size:13px;
    }

    .legal-card{

        padding:24px 18px;

        border-radius:14px;
    }

    .legal-card h1{
        font-size:22px;
    }

    .intro{
        font-size:13px;
    }

    section h2{
        font-size:16px;
    }

    section p,
    section li{
        font-size:13px;
    }

    .fecha{
        font-size:12px;
    }

    #btnTop{

        bottom:20px;
        right:20px;

        padding:11px 13px;
    }

    .cookie-banner{

        flex-direction:column;

        gap:12px;

        text-align:center;

        padding:14px;
    }

    .cookie-banner button{
        width:100%;
    }
}

/* =========================================================
   TELEFONOS GRANDES
========================================================= */

@media (max-width:580px){

    .legal-layout{
        padding:14px;
    }

    .legal-sidebar{

        padding:15px;

        border-radius:14px;
    }

    .legal-sidebar h3{
        font-size:16px;
    }

    .legal-sidebar li{
        margin-bottom:5px;
    }

    .legal-sidebar a{

        font-size:12px;

        padding:6px 7px;
    }

    .legal-extra{
        gap:8px;
    }

    .legal-extra a,
    .legal-extra button{

        font-size:12px;

        padding:9px;
    }

    .legal-card{

        padding:20px 15px;

        border-radius:13px;
    }

    .legal-card h1{
        font-size:20px;
    }

    .empresa{
        font-size:13px;
    }

    .intro{
        font-size:12px;
    }

    section{
        margin-bottom:20px;
    }

    section h2{
        font-size:15px;
    }

    section p,
    section li{

        font-size:12px;

        line-height:1.7;
    }

    .fecha{
        font-size:11px;
    }

    #btnTop{

        width:42px;
        height:42px;

        display:flex;
        align-items:center;
        justify-content:center;

        padding:0;
    }

    .cookie-banner{
        padding:12px;
    }

    .cookie-banner p{
        font-size:12px;
    }

    .cookie-banner button{
        font-size:12px;
    }
}

/* =========================================================
   TELEFONOS PEQUEÑOS
========================================================= */

@media (max-width:420px){

    .legal-layout{
        padding:10px;
    }

    .legal-card{
        padding:16px 12px;
    }

    .legal-card h1{
        font-size:18px;
    }

    section h2{
        font-size:14px;
    }

    section p,
    section li{
        font-size:11px;
    }

    .intro{
        font-size:11px;
    }

    .legal-sidebar a{
        font-size:11px;
    }

    .cookie-banner{
        padding:10px;
    }
}