/* =====================================================
   Sección NOVEDADES: "cartelera".
   Cada novedad es una unidad compacta: su flyer (9:16) en
   una caja y, debajo, su propia tarjeta de texto aparte.
   Las unidades van en una fila que se desliza.
   Se carga después de secciones.css (usa --azul y --texto).
   ===================================================== */

/* La sección usa todo el ancho (sin el relleno lateral de las demás) */
.nov{
    overflow-x:clip;
    padding-left:0;
    padding-right:0;
}
.nov .sec-cab{ padding:0 20px; }

.nov-carrusel{
    --w:min(62vw, 250px);
    --lado:max(20px, calc(50% - 590px));
    position:relative;
    width:100%;
}

/* Con una sola novedad, se muestra más grande */
.nov-carrusel.nov-uno{ --w:min(62vw, 250px); }

/* ---------- Fila deslizable ---------- */
.nov-pista{
    display:flex;
    gap:14px;
    padding:18px var(--lado) 22px;
    scroll-padding:0 var(--lado);
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
    outline:none;
}
.nov-pista::-webkit-scrollbar{ display:none; }
.nov-carrusel.nov-centrar .nov-pista{ justify-content:center; }

/* ---------- Unidad: flyer + tarjeta de texto ---------- */
.nov-card{
    --c:#1C75D4;
    flex:0 0 var(--w);
    display:flex;
    flex-direction:column;
    gap:10px;
    scroll-snap-align:start;
}

/* Entrada escalonada (solo si hay JavaScript) */
.nov-carrusel.anim .nov-card{ opacity:0; transform:translateY(16px); }
.nov-carrusel.anim.visto .nov-card{
    opacity:1;
    transform:none;
    transition:opacity .6s ease calc(var(--i, 0) * 80ms), transform .6s ease calc(var(--i, 0) * 80ms);
}

/* Caja del flyer */
.nov-foto{
    position:relative;
    aspect-ratio:9 / 16;
    border-radius:16px;
    overflow:hidden;
    border:1px solid color-mix(in srgb, var(--c) 70%, #000);
    background:#000;
    cursor:zoom-in;
    box-shadow:0 6px 16px rgba(0,0,0,.45),
               0 0 16px color-mix(in srgb, var(--c) 34%, transparent);
    transition:transform .3s ease, box-shadow .3s ease;
}
.nov-card:hover .nov-foto{
    transform:translateY(-4px);
    box-shadow:0 10px 22px rgba(0,0,0,.5),
               0 0 26px color-mix(in srgb, var(--c) 52%, transparent);
}
/* Brillo diagonal suave al pasar el mouse */
.nov-foto::after{
    content:"";
    position:absolute;
    inset:0;
    z-index:4;
    background:linear-gradient(115deg, transparent 38%, rgba(255,255,255,.14) 50%, transparent 62%);
    transform:translateX(-120%);
    pointer-events:none;
}
.nov-card:hover .nov-foto::after{
    transform:translateX(120%);
    transition:transform .8s ease;
}

.nov-media{ position:absolute; inset:0; background:#000; }
.nov-media img, .nov-media video{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}
.nov-media.completo img:not(.nov-fondo), .nov-media.completo video{ object-fit:contain; z-index:1; }
.nov-media .nov-fondo{
    inset:-12%;
    width:124%;
    height:124%;
    filter:blur(22px) brightness(.45);
}

.nov-barra{ display:none; }

.nov-ampliar{
    position:absolute;
    right:8px; bottom:8px;
    z-index:3;
    width:26px; height:26px;
    display:flex; align-items:center; justify-content:center;
    border-radius:8px;
    background:rgba(0,0,0,.55);
    color:#fff;
    pointer-events:none;
}
.nov-ampliar svg{ width:14px; height:14px; }

/* Tarjeta de texto (aparte, debajo del flyer) */
.nov-info{
    flex:1;
    display:flex;
    flex-direction:column;
    padding:14px;
    border-radius:14px;
    border:1px solid color-mix(in srgb, var(--c) 45%, #000);
    border-top:2px solid color-mix(in srgb, var(--c) 85%, #000);
    background:linear-gradient(160deg, #0b1220, #05080f);
    box-shadow:0 4px 12px rgba(0,0,0,.4);
    font-family:Arial, sans-serif;
}
.nov-etq{
    align-self:flex-start;
    margin-bottom:8px;
    padding:4px 11px;
    border-radius:20px;
    background:var(--c);
    color:#fff;
    font:700 10px Arial, sans-serif;
    letter-spacing:.1em;
    box-shadow:0 0 9px color-mix(in srgb, var(--c) 56%, transparent);
}
.nov-info h3{
    font-size:16px;
    line-height:1.25;
    margin-bottom:6px;
    color:#fff;
    display:-webkit-box;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.nov-info p{
    font-size:13px;
    line-height:1.45;
    color:#cdd5e0;
    margin-bottom:12px;
    display:-webkit-box;
    -webkit-line-clamp:3;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
.nov-precio{
    display:block;
    font-size:20px;
    color:#fff;
    margin-bottom:12px;
    text-shadow:0 0 9px color-mix(in srgb, var(--c) 80%, transparent);
}
.nov-btn{
    margin-top:auto;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:10px 8px;
    border-radius:12px;
    background:var(--azul);
    color:#fff;
    font:700 13.5px Arial, sans-serif;
    text-align:center;
    text-decoration:none;
    box-shadow:0 0 11px rgba(28,117,212,.34);
}
.nov-btn img{ width:28px; height:28px; flex:0 0 auto; }
.nov-btn .solo-d{ display:none; }

/* ---------- Flechas (solo tablet y escritorio) ---------- */
.nov-flecha{
    display:none;
    position:absolute;
    top:calc(18px + var(--w) * 16 / 18);
    z-index:5;
    width:46px; height:46px;
    margin-top:-23px;
    border-radius:50%;
    border:1px solid var(--azul);
    background:rgba(0,0,0,.78);
    color:#fff;
    font-size:28px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 0 13px rgba(28,117,212,.32);
    transition:opacity .25s ease;
}
.nov-flecha:disabled{ opacity:.3; cursor:default; }
.nov-flecha.prev{ left:12px; }
.nov-flecha.next{ right:12px; }

/* ---------- Barra de posición ---------- */
.nov-progreso{
    position:relative;
    width:min(160px, 40%);
    height:3px;
    margin:2px auto 0;
    border-radius:3px;
    background:rgba(255,255,255,.16);
}
.nov-progreso i{
    position:absolute;
    top:0;
    height:100%;
    min-width:14px;
    border-radius:3px;
    background:var(--azul);
    box-shadow:0 0 7px var(--azul);
}

.nov-carrusel.nov-sinflechas .nov-flecha,
.nov-carrusel.nov-sinflechas .nov-progreso{ display:none !important; }

/* ---------- Visor a pantalla completa ---------- */
.nov-visor{
    position:fixed; inset:0;
    z-index:1000;
    display:none;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:20px;
    background:rgba(0,0,0,.92);
    font-family:Arial, sans-serif;
    color:#fff;
    text-align:center;
}
.nov-visor.abierto{ display:flex; }
.nov-visor img, .nov-visor video{
    max-width:100%;
    max-height:80vh;
    max-height:80dvh;
    aspect-ratio:auto;
    border-radius:14px;
    box-shadow:0 0 32px rgba(28,117,212,.32), 0 12px 40px rgba(0,0,0,.6);
    background:#000;
}
.nov-visor p{ font-size:16px; max-width:420px; }
.nov-visor small{ display:block; margin-top:4px; color:var(--texto); font-size:13px; }
.nov-visor button{
    position:absolute; top:14px; right:18px;
    background:none; border:none; color:#fff; font-size:38px; cursor:pointer;
}

/* Celulares muy angostos: botón con texto corto */
@media (max-width:360px){
    .nov-btn .solo-m{ display:none; }
    .nov-btn .solo-d{ display:inline; }
}

/* ---------- Tablet y escritorio ---------- */
@media (min-width:768px){
    .nov-carrusel{ --w:200px; }
    .nov-carrusel.nov-uno{ --w:240px; }
    .nov-pista{ scroll-snap-type:x proximity; }
    .nov-flecha{ display:block; }

    .nov-info h3{ font-size:16px; }
    .nov-info p{ font-size:13px; }
    .nov-precio{ font-size:20px; }
    .nov-btn{ font-size:13.5px; padding:10px; }
    .nov-btn .solo-m{ display:none; }
    .nov-btn .solo-d{ display:inline; }
}

@media (prefers-reduced-motion: reduce){
    .nov-carrusel.anim .nov-card{ opacity:1; transform:none; }
    .nov-foto, .nov-foto::after{ transition:none; }
}

/* ---------- Aviso cuando no hay novedades publicadas ---------- */
.nov-vacio{
    width:calc(100% - 40px);
    max-width:520px;
    margin:10px auto 30px;
    padding:34px 24px;
    text-align:center;
    border:1px solid var(--azul);
    border-radius:18px;
    background:#000;
    box-shadow:0 0 18px rgba(28,117,212,.22), inset 0 0 24px rgba(28,117,212,.06);
    font-family:Arial, sans-serif;
}
.nov-vacio-ico{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:56px; height:56px;
    margin-bottom:14px;
    border-radius:50%;
    border:1.5px solid var(--azul);
    color:var(--azul);
    box-shadow:0 0 13px rgba(28,117,212,.36);
}
.nov-vacio-ico svg{ width:26px; height:26px; }
.nov-vacio h3{ font-size:22px; margin-bottom:10px; color:#fff; }
.nov-vacio p{ font-size:15px; line-height:1.5; color:var(--texto); margin-bottom:20px; }
.nov-vacio .nov-btn{
    display:inline-flex;
    margin-top:0;
    padding:11px 20px;
    font-size:14px;
}
.nov-vacio .nov-btn img{ width:26px; height:26px; }
