/* =========================================================
   CUADERNILLOS RUBIO · "EL RINCÓN RUBIO"
   Diseño compacto, editorial y distinto al catálogo de máquinas.
========================================================= */

.rubio-page{
    margin:0;
    min-height:100vh;
    color:#1b1d20;
    background:
        linear-gradient(rgba(246,244,240,.82),rgba(246,244,240,.82)),
        url('../images/cuadernillos-rubio/modelo3.webp') center / cover fixed no-repeat;
}

.rubio-main{
    width:min(1320px,96%);
    min-height:100vh;
    margin:auto;
    padding:156px 0 32px;
}

/* =========================================================
   TÍTULO · MUY CORTO
========================================================= */

.rubio-title{
    padding:24px 24px 20px;
    display:grid;
    grid-template-columns:auto 1fr;
    column-gap:24px;
    align-items:end;
    border-bottom:1px solid rgba(139,15,28,.18);
}

.rubio-title > span{
    grid-column:1 / -1;
    margin-bottom:6px;
    color:#8b0f1c;
    font-size:9px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.24em;
}

.rubio-title h1{
    margin:0;
    font-size:clamp(35px,4.8vw,62px);
    line-height:.95;
    font-weight:300;
    text-transform:uppercase;
}

.rubio-title h1 strong{
    font-weight:650;
    letter-spacing:.14em;
}

.rubio-title p{
    justify-self:end;
    max-width:430px;
    margin:0 0 3px;
    color:#65696e;
    font-size:12px;
    line-height:1.5;
}

/* =========================================================
   ESCAPARATE PRINCIPAL
========================================================= */

.rubio-window{
    min-height:410px;
    display:grid;
    grid-template-columns:minmax(0,1.7fr) minmax(270px,.7fr);
    border-bottom:1px solid rgba(255,255,255,.62);
    background:rgba(255,255,255,.18);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
}

/* =========================================================
   COMPOSICIÓN DE PORTADAS
   Los seis modelos forman una sola escena visual.
========================================================= */

.rubio-covers{
    position:relative;
    min-height:410px;
    overflow:hidden;
    background:
        radial-gradient(circle at 30% 40%,rgba(188,221,210,.30),transparent 28%),
        radial-gradient(circle at 75% 65%,rgba(244,207,189,.28),transparent 30%);
}

.cover{
    position:absolute;
    margin:0;
    padding:6px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.68);
    box-shadow:0 14px 30px rgba(31,29,27,.13);
    transition:transform .3s ease,z-index 0s;
}

.cover img{
    width:100%;
    height:100%;
    display:block;
    object-fit:contain !important;
}

/* Portadas distribuidas como un expositor real. */
.cover-1{
    width:22%;
    height:78%;
    left:6%;
    top:11%;
    z-index:5;
    transform:rotate(-6deg);
}

.cover-2{
    width:20%;
    height:69%;
    left:24%;
    top:17%;
    z-index:4;
    transform:rotate(4deg);
}

.cover-3{
    width:19%;
    height:65%;
    left:41%;
    top:10%;
    z-index:3;
    transform:rotate(-2deg);
}

.cover-4{
    width:19%;
    height:66%;
    left:56%;
    top:19%;
    z-index:4;
    transform:rotate(5deg);
}

.cover-5{
    width:21%;
    height:72%;
    left:70%;
    top:8%;
    z-index:5;
    transform:rotate(-4deg);
}

.cover-6{
    width:17%;
    height:59%;
    left:49%;
    top:36%;
    z-index:6;
    transform:rotate(2deg);
}

.cover:hover{
    z-index:20;
    transform:translateY(-7px) rotate(0);
}

/* =========================================================
   CATEGORÍAS
========================================================= */

.rubio-side{
    padding:34px 30px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    border-left:1px solid rgba(255,255,255,.60);
    background:rgba(255,255,255,.18);
}

.rubio-mini-title{
    margin-bottom:20px;
    color:#8b0f1c;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.18em;
}

.rubio-topics{
    border-top:1px solid rgba(27,29,32,.12);
}

.rubio-topics div{
    min-height:43px;
    display:flex;
    align-items:center;
    gap:16px;
    border-bottom:1px solid rgba(27,29,32,.12);
}

.rubio-topics strong{
    color:#8b0f1c;
    font-size:9px;
    letter-spacing:.08em;
}

.rubio-topics span{
    font-size:16px;
    font-weight:400;
}

.rubio-side p{
    margin:22px 0 18px;
    color:#65696e;
    font-size:12px;
    line-height:1.6;
}

.rubio-side a{
    align-self:flex-start;
    color:#8b0f1c;
    font-size:10px;
    font-weight:700;
    text-decoration:none;
    text-transform:uppercase;
    letter-spacing:.08em;
}

.rubio-side a:hover{
    text-decoration:underline;
}

/* =========================================================
   CINTA INFERIOR
   Muy fina para evitar scroll innecesario.
========================================================= */

.rubio-more{
    /* Carrusel inferior algo más protagonista, manteniendo la página compacta. */
    padding:24px 0 10px;
}

.rubio-more-heading{
    padding:0 20px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.rubio-more-heading span{
    color:#8b0f1c;
    font-size:10px;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.18em;
}

.rubio-more-heading small{
    color:#777b80;
    font-size:9px;
    text-transform:uppercase;
    letter-spacing:.10em;
}

.rubio-marquee{
    width:100%;
    overflow:hidden;
}

.rubio-track{
    width:max-content;
    display:flex;
    gap:9px;
    animation:rubioFlow 48s linear infinite;
}

.rubio-marquee:hover .rubio-track{
    animation-play-state:paused;
}

.rubio-track figure{
    /* Antes: 112 x 92 px. Aumentado para apreciar mejor las portadas. */
    width:240px;
    height:210px;
    margin:0;
    padding:8px;
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(255,255,255,.48);
    background:rgba(255,255,255,.22);
}

.rubio-track img{
    width:100%;
    height:100%;
    display:block;
    object-fit:contain !important;
}

@keyframes rubioFlow{
    from{transform:translateX(0)}
    to{transform:translateX(calc(-50% - 4.5px))}
}

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

@media(max-width:900px){
    .rubio-window{
        grid-template-columns:1fr;
    }

    .rubio-side{
        border-left:0;
        border-top:1px solid rgba(255,255,255,.60);
    }

    .rubio-topics{
        display:grid;
        grid-template-columns:repeat(2,1fr);
    }

    .rubio-topics div:nth-child(odd){
        padding-right:15px;
    }
}

@media(max-width:850px){
    .rubio-main{
        padding-top:124px;
    }
}

@media(max-width:620px){
    .rubio-main{
        width:100%;
        padding-top:100px;
    }

    .rubio-title{
        padding:22px 18px 18px;
        display:block;
    }

    .rubio-title h1{
        font-size:36px;
    }

    .rubio-title p{
        margin-top:10px;
    }

    .rubio-covers{
        min-height:330px;
    }

    /* En móvil mantenemos la composición, pero más compacta. */
    .cover{
        padding:4px;
    }

    .cover-1{width:29%;height:69%;left:3%;top:14%}
    .cover-2{width:27%;height:63%;left:22%;top:20%}
    .cover-3{width:25%;height:59%;left:40%;top:11%}
    .cover-4{width:25%;height:60%;left:55%;top:22%}
    .cover-5{width:28%;height:65%;left:69%;top:12%}
    .cover-6{width:23%;height:52%;left:43%;top:42%}

    .rubio-side{
        padding:26px 20px;
    }

    .rubio-topics span{
        font-size:14px;
    }

    .rubio-track figure{
        /* También se amplía en móvil sin convertirlo en una sección alta. */
        width:180px;
        height:158px;
    }
}
