/* ============================================================
   MARQUESINAS DEL PORTAL
   1. Marquesina Superior (Último Momento - RSS) - Arriba del Header
   2. Marquesina de Servicios (Dólar, Clima, Rutas) - Debajo del Header
   ============================================================ */

.marquesina-bar {
    width: 100%;
    background-color: #141414;
    color: #f5f5f5;
    height: 40px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #262626;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 13px;
    box-sizing: border-box;
    z-index: 99;
}

/* Renglón blanco entre la marquesina superior y el header */
.renglon-blanco-header {
    width: 100%;
    height: 18px;
    background-color: #ffffff;
    display: block;
    clear: both;
}

.marquesina-superior {
    margin-bottom: 0;
}

/* Marquesina de servicios debajo del header: Fondo blanco y letras gris oscuro */
.marquesina-servicios {
    background-color: #ffffff !important;
    color: #2c2c2c !important;
    border-top: 1px solid #e2e2e2;
    border-bottom: 1px solid #d5d5d5;
    height: 38px;
    font-size: 13px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.marquesina-servicios .marq-item {
    color: #2c2c2c !important;
}

.marquesina-servicios .marq-item:hover {
    color: #000000 !important;
}

.marquesina-servicios .marq-val-highlight {
    font-weight: 700;
    color: #1a1a1a !important;
}

.marquesina-servicios .marq-val-sub {
    color: #555555 !important;
    font-size: 12px;
}

.marquesina-servicios .marq-sep {
    color: #c4c4c4 !important;
}

/* Estilos de etiquetas para fondo blanco */
.marquesina-servicios .marq-tag-oficial { background: #f0f0f0; color: #222222; border: 1px solid #dcdcdc; }
.marquesina-servicios .marq-tag-blue    { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }
.marquesina-servicios .marq-tag-mep     { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.marquesina-servicios .marq-tag-ccl     { background: #f3e5f5; color: #4a148c; border: 1px solid #ce93d8; }
.marquesina-servicios .marq-tag-clima   { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.marquesina-servicios .marq-tag-rutas   { background: #eceff1; color: #263238; border: 1px solid #cfd8dc; }
.marquesina-servicios .marq-tag-pronostico { background: #e0f2f1; color: #004d40; border: 1px solid #80cbc4; }

/* ============================================================
   ROTADOR CON FADE PARA SERVICIOS (DÓLAR, RUTAS, CLIMA)
   ============================================================ */
.servicios-fade-viewport {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.servicios-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
    pointer-events: none;
    white-space: nowrap;
}

.servicios-slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.servicios-slide.fade-out {
    opacity: 0;
    transform: translateY(-6px);
    visibility: hidden;
}

.servicios-rotator-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 14px;
    flex-shrink: 0;
    user-select: none;
}

.servicios-counter {
    font-size: 11px;
    font-weight: 600;
    color: #888888;
    min-width: 24px;
    text-align: center;
    letter-spacing: 0.5px;
}

.servicios-nav-btn {
    background: #f7f7f7;
    border: 1px solid #dcdcdc;
    color: #555555;
    border-radius: 3px;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.servicios-nav-btn:hover {
    background: #e9ecef;
    color: #111111;
    border-color: #bbbbbb;
}

.servicios-nav-btn:focus {
    outline: none;
}

@media (max-width: 768px) {
    .solo-desktop {
        display: none !important;
    }
    .servicios-slide {
        padding: 0 8px;
        gap: 6px;
    }
    .servicios-rotator-nav {
        padding-right: 6px;
        gap: 4px;
    }
    .servicios-counter {
        display: none;
    }
    .servicios-nav-btn {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }
}

@media (min-width: 769px) {
    .solo-movil {
        display: none !important;
    }
}


.marquesina-badge {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #e30613;
    color: #ffffff;
    height: 100%;
    padding: 0 16px;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
    z-index: 3;
    white-space: nowrap;
}

/* Badge especial para la marquesina de servicios (Verde financiero / Mercados) */
.badge-servicios {
    background-color: #1b5e20;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.4);
}

.marquesina-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: pulseGlow 1.5s infinite ease-in-out;
}

.badge-servicios .pulse-dot {
    background-color: #69f0ae;
}

@keyframes pulseGlow {
    0% { transform: scale(0.85); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 6px rgba(255, 255, 255, 0.9); }
    100% { transform: scale(0.85); opacity: 0.7; }
}

.marquesina-ticker-viewport {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(to right, transparent 0, black 20px, black calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 20px, black calc(100% - 20px), transparent 100%);
}

.marquesina-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    will-change: transform;
    animation: tickerLoop 65s linear infinite;
}

.marquesina-track-servicios {
    animation: tickerLoop 35s linear infinite;
}

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

@keyframes tickerLoop {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

.marquesina-items-group {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-right: 20px;
}

.marq-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.marq-item:hover {
    color: #ffffff;
}

/* Enlace a nota individual en la marquesina superior */
.marq-noticia-link {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.marq-noticia-link:hover {
    color: #ff9800;
    text-decoration: underline;
}

.marq-tag {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

.marq-tag-urgente { background: #b71c1c; color: #ffcdd2; border: 1px solid #d32f2f; }
.marq-tag-noticia { background: #37474f; color: #cfd8dc; border: 1px solid #455a64; }
.marq-tag-oficial { background: #333333; color: #ffffff; border: 1px solid #444; }
.marq-tag-blue    { background: #0d47a1; color: #bbdefb; border: 1px solid #1565c0; }
.marq-tag-mep     { background: #1b5e20; color: #c8e6c9; border: 1px solid #2e7d32; }
.marq-tag-ccl     { background: #4a148c; color: #e1bee7; border: 1px solid #6a1b9a; }
.marq-tag-clima   { background: #e65100; color: #ffe0b2; border: 1px solid #f57c00; }
.marq-tag-rutas   { background: #263238; color: #eceff1; border: 1px solid #37474f; }

.marq-val-highlight {
    font-weight: 700;
    color: #ffffff;
}

.marq-val-sub {
    color: #aaaaaa;
    font-size: 12px;
}

.marq-sep {
    color: #404040;
    font-weight: bold;
    user-select: none;
}

@media (max-width: 768px) {
    .marquesina-bar {
        height: 36px;
        font-size: 12px;
    }
    .marquesina-superior {
        margin-bottom: 12px;
    }
    .marquesina-badge {
        padding: 0 10px;
        font-size: 10px;
    }
    .marquesina-badge .badge-text-full {
        display: none;
    }
    .marquesina-badge .badge-text-short {
        display: inline;
    }
    .marquesina-items-group {
        gap: 14px;
        padding-right: 14px;
    }
    .marq-item {
        font-size: 12px;
        gap: 6px;
    }
    .marq-noticia-link {
        font-size: 12px;
    }
}
@media (min-width: 769px) {
    .marquesina-badge .badge-text-short {
        display: none;
    }
    .marquesina-badge .badge-text-full {
        display: inline;
    }
}
