/* Marquesina «También en Quillota»: contenedor, controles y piezas con arte propio. */
.destacados-portada {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 26px 24px 22px;
    background: #f4f6f9;
    color: #0f172a;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    box-sizing: border-box;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.destacados-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.destacados-cabecera h2 {
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
}

.destacados-controles {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.destacados-controles[hidden],
.destacados-controles button[hidden] {
    display: none !important;
}

.destacados-posicion {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    font-variant-numeric: tabular-nums;
    margin-right: 4px;
}

.destacados-controles button {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.destacados-controles button:hover {
    background: #f8fafc;
    border-color: #64748b;
}

.destacados-controles button:focus-visible,
.destacados-lista:focus-visible,
.pieza-banner:focus-visible {
    outline: 3px solid #1e5a9b;
    outline-offset: 3px;
}

.destacados-lista {
    display: flex;
    gap: 16px;
    list-style: none;
    padding: 4px 4px 12px;
    margin: 0 -4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

/* Cuatro piezas en escritorio amplio; menos columnas en pantallas menores para conservar texto legible. */
.destacados-elemento {
    flex: 0 0 calc((100% - 48px) / 4);
    min-width: 0;
    scroll-snap-align: start;
}

@media (min-width: 1800px) {
    .destacados-elemento { flex-basis: calc((100% - 64px) / 5); }
}

@media (max-width: 1399px) {
    .destacados-elemento { flex-basis: calc((100% - 32px) / 3); }
}

@media (max-width: 999px) {
    .destacados-elemento { flex-basis: calc((100% - 16px) / 2); }
}

@media (max-width: 639px) {
    .destacados-portada { padding: 22px 16px 18px; }
    .destacados-cabecera h2 { font-size: 1.15rem; }
    .destacados-posicion { display: none; }
    .destacados-lista { gap: 12px; }
    .destacados-elemento { flex-basis: 84%; }
}

/* ---------- Base mínima compartida por las piezas ---------- */
/* Los colores llevan .destacados-portada para ganar a «a:visited { color: inherit; }» de mq_style.css. */
.pieza-banner {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 12 / 5;
    container-type: inline-size;
    border-radius: 14px;
    text-decoration: none !important;
    isolation: isolate;
    line-height: 1.2;
}

.pieza-banner > span { position: absolute; display: block; }
.pieza-banner .logo-recorte { background-repeat: no-repeat; }
.pieza-banner .titulo span { display: block; }

/* Respaldo: imagen oficial del banner o, en su ausencia, su título. */
.destacados-portada .pieza-oficial { background: #0f2557; color: #fff; }
.pieza-oficial img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pieza-oficial .oficial-titulo { left: 6cqw; right: 6cqw; bottom: 6cqw; color: #fff; font: 700 6cqw/1.1 'Outfit', sans-serif; }

/* 1. Acción Climática: el semillero */
.destacados-portada .pieza-clima { background: #1f3d1c; color: #fff; font-family: 'Outfit', sans-serif; }
.pieza-clima::before {
    content: ''; position: absolute; inset: 0; z-index: -2;
    background: url(../img/accionclimatica/hero-accion-climatica.jpg) 30% 60% / cover;
}
.pieza-clima::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(100deg, rgba(20,48,18,.94) 0 46%, rgba(20,48,18,.35) 78%, rgba(20,48,18,0));
}
.pieza-clima .titulo { left: 6cqw; top: 6.5cqw; font-size: 9.6cqw; line-height: .95; font-weight: 700; }
.pieza-clima .titulo span { color: #b9e769; }
.pieza-clima .bajada { left: 6cqw; bottom: 7cqw; font-size: 3.2cqw; font-weight: 500; max-width: 62cqw; }
.pieza-clima .sello {
    right: 5cqw; top: 6cqw; width: 16cqw; aspect-ratio: 330 / 340;
    background-image: url(../img/accionclimatica/logo-programa.png);
    background-size: 327.3% auto; background-position: 72% 50.9%;
    border-radius: 50%; background-color: rgba(255,255,255,.92); box-shadow: 0 0 0 1.2cqw rgba(255,255,255,.92);
}
.pieza-clima .accion { right: 5cqw; bottom: 6.5cqw; font-size: 3.3cqw; font-weight: 700; background: #b9e769; color: #14300f; padding: 1.3cqw 2.6cqw; border-radius: 99px; }

/* 2. PLADETUR: la postal del territorio */
.destacados-portada .pieza-turismo { background: #f7c51a; color: #14294f; font-family: 'Outfit', sans-serif; }
.pieza-turismo::after {
    content: ''; position: absolute; left: 36cqw; right: -3cqw; bottom: 3.6cqw; height: 22cqw; z-index: -1;
    background: url(../img/plaza-panoramica-quillota.png) center bottom / 100% auto no-repeat;
}
.pieza-turismo::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 7.6cqw; z-index: -2; background: #14294f; }
.pieza-turismo .plan { left: 5.5cqw; top: 5cqw; font-size: 3.2cqw; font-weight: 700; }
.pieza-turismo .comuna { left: 5cqw; top: 10.6cqw; font-weight: 800; font-size: 11cqw; line-height: 1; }
.pieza-turismo .comuna small { display: block; font-family: 'Outfit', sans-serif; font-size: 3.2cqw; font-weight: 600; letter-spacing: 0; margin-bottom: .4cqw; }
.pieza-turismo .periodo { left: 5.5cqw; bottom: 1.7cqw; color: #fff; font-size: 3.6cqw; font-weight: 700; }
.pieza-turismo .oficina {
    right: 4cqw; top: 4cqw; width: 26cqw; aspect-ratio: 180 / 58;
    background-image: url(../img/banner-turismo.png);
    background-size: 444.4% auto; background-position: 99% 92.7%;
    border-radius: 2cqw; background-color: #fff;
}
.pieza-turismo .accion { right: 4cqw; bottom: 2cqw; font-size: 3.2cqw; font-weight: 700; color: #f7c51a; }

/* 3. Directores para Chile: la convocatoria en tipografía */
.destacados-portada .pieza-directores { background: #0f2557; color: #fff; font-family: 'Outfit', sans-serif; }
.pieza-directores .titulo { left: 5cqw; top: 6cqw; font-weight: 800; text-transform: uppercase; font-size: 7.4cqw; line-height: 1; }
.pieza-directores .titulo .chile { font-weight: 300; }
.pieza-directores .convocatoria { left: 5cqw; bottom: 7.4cqw; font-size: 3.6cqw; font-weight: 400; text-transform: uppercase; }
.pieza-directores .bandera { left: 5cqw; bottom: 4.5cqw; width: 50cqw; height: .9cqw; background: linear-gradient(90deg, #2f6fd6 0 38%, #fff 38% 42%, #d63a3a 42%); }
.pieza-directores .servicio { right: 5cqw; bottom: 6.6cqw; font-size: 3.1cqw; font-weight: 800; text-transform: uppercase; }
.pieza-directores .servicio b { font-weight: 400; }
.pieza-directores .red {
    right: 4cqw; top: 6cqw; width: 26cqw; aspect-ratio: 208 / 52;
    background-image: url(../img/home-marquee/banner-directores-para-chile.png);
    background-size: 384.6% auto; background-position: 94.9% 54.5%;
}

/* 4. Carros alegóricos: la noche de fuegos */
.destacados-portada .pieza-carros { background: #0c0716; color: #fff; font-family: 'Outfit', sans-serif; }
.pieza-carros .fuego {
    z-index: -1; border-radius: 50%; width: var(--tamano); aspect-ratio: 1;
    background: repeating-conic-gradient(var(--color) 0 2deg, transparent 2deg 15deg);
    -webkit-mask: radial-gradient(circle, transparent 18%, #000 20%, #000 46%, transparent 50%);
            mask: radial-gradient(circle, transparent 18%, #000 20%, #000 46%, transparent 50%);
}
.pieza-carros .f1 { --tamano: 44cqw; --color: #ff3d9a; right: -8cqw; top: -14cqw; }
.pieza-carros .f2 { --tamano: 30cqw; --color: #ffb21b; right: 24cqw; top: -10cqw; }
.pieza-carros .f3 { --tamano: 26cqw; --color: #41d4ff; right: 4cqw; bottom: -12cqw; }
.pieza-carros .aniversario { left: 5cqw; top: 4.5cqw; display: flex; align-items: baseline; gap: 1.4cqw; color: #ffb21b; }
.pieza-carros .aniversario strong { font-size: 9cqw; line-height: 1; font-weight: 800; }
.pieza-carros .aniversario span { font-size: 3.4cqw; font-weight: 500; line-height: 1.05; }
.pieza-carros .titulo { left: 5cqw; top: 16cqw; font-size: 7.6cqw; line-height: 1; max-width: 70cqw; font-weight: 800; color: #ff3d9a; }
.pieza-carros .titulo span { display: inline; color: #fff; font-weight: 500; }
.pieza-carros .tema { right: 5cqw; bottom: 5.5cqw; text-align: right; font-size: 4cqw; font-weight: 700; line-height: 1; background: #ffb21b; color: #2a0f00; padding: 1.4cqw 2.2cqw; border-radius: 2cqw; }
.pieza-carros .accion { left: 5cqw; bottom: 4cqw; font-size: 3.2cqw; font-weight: 600; }

/* 5. Mujeres y Diversidades: el diagnóstico con su franja */
.destacados-portada .pieza-mujeres { background: #33263f; color: #fff; font-family: 'Outfit', sans-serif; }
.pieza-mujeres::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3.4cqw;
    background: linear-gradient(90deg, #6b3fa0 0 16%, #3d63c9 16% 38%, #4bb35c 38% 56%, #e7d62a 56% 68%, #f08a24 68% 84%, #d9232f 84%);
}
.pieza-mujeres .diagnostico { left: 6cqw; top: 6.5cqw; font-size: 3.6cqw; font-weight: 800; text-transform: uppercase; }
.pieza-mujeres .titulo { left: 5.5cqw; top: 12cqw; font-weight: 800; text-transform: uppercase; font-size: 7.4cqw; line-height: 1; color: #b8d433; }
.pieza-mujeres .accion { left: 6cqw; bottom: 8cqw; font-size: 3.3cqw; font-weight: 600; border-bottom: .45cqw solid #b8d433; }
.pieza-mujeres .municipal { right: 5cqw; top: 5cqw; width: 11cqw; aspect-ratio: 926 / 1080; background: url(../img/logo-blanco.png) center / contain no-repeat; }

@media (prefers-reduced-motion: reduce) {
    .destacados-controles button { transition: none !important; }
    .destacados-controles button[data-destacados-pausa] { display: none !important; }
}
