/* ==================================================
   Modern News Ticker - Estilos con Borde Configurable
   ================================================== */

/* Estilo base del contenedor de la marquesina */
.modern-news-ticker {
    position: relative;
    width: 100%;
    height: 70px; /* Altura fija para diseño consistente */
    line-height: 60px; /* Centra verticalmente el texto */
    font-size: 18px;
    overflow: hidden;
    background-color: #000000; /* Color de fondo por defecto (se sobrescribe desde JS) */
    color: #ffffff; /* Color de texto por defecto (se sobrescribe desde JS) */
    font-family: 'Barlow Condensed', 'Arial', sans-serif; /* Fuente moderna y condensada */
    margin: 20px 0;
    border-radius: 0; /* Sin bordes redondeados por defecto */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Contenedor interno que maneja el desplazamiento */
.modern-news-ticker .ticker-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Reset de estilos para listas */
.modern-news-ticker ul,
.modern-news-ticker li {
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

/* Estilo de cada elemento de noticia (li) */
.modern-news-ticker li {
    display: inline-block;
    margin-right: 10px; /* Espacio entre noticias */
    line-height: 50px; /* Alineación vertical */
    vertical-align: middle;
    /* Fondo sutil para separar visualmente cada titular */
    background-color: rgba(255, 255, 255, 0.05);

    padding: 0 20px;
    border-radius: 8px; /* Bordes más rectos */
    transition: all 0.2s ease;

/* --- Estilos de borde mejorados --- */
border: 2px solid rgba(255, 255, 255, 0.6); /* Borde blanco más visible */
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* Sombra más profunda */
}

/* Efecto al pasar el mouse sobre un titular */
.modern-news-ticker li:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Fondo más claro */
    transform: scale(1.05); /* Mayor ampliación */
    border-color: rgba(255, 255, 255, 0.8); /* Borde más brillante */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); /* Sombra más profunda */
    transition: all 0.3s ease-in-out; /* Transición más suave */
}


/* Estilo del enlace (título + imagen) */
.modern-news-ticker a {
    color: inherit; /* Hereda el color del texto del contenedor */
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
    width: 100%;
    height: 100%;
}

.modern-news-ticker a:hover {
    opacity: 0.9;
}

/* Estilo de la miniatura de la imagen */
.modern-news-ticker .thumbnail {
    width: 40px;
    height: 40px;
    object-fit: contain; /* adapta la imagen al contenedor */
    margin-right: 15px;
    margin-top: -4px; /* Ajuste para subir la imagen */
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Mensaje de error (si el feed falla) */
.modern-news-ticker .mt-error {
    font-size: 16px;
    font-style: italic;
    text-align: center;
    margin: 0;
    padding: 0 20px;
    color: #ff6b6b;
}

/* -------------------------------
   ESTILOS RESPONSIVE
   ------------------------------- */

@media screen and (max-width: 1024px) {
    .modern-news-ticker {
        height: 50px;
        line-height: 45px;
        font-size: 17px;
    }

    .modern-news-ticker li {
        line-height: 50px;
        margin-right: 10px;
        padding: 0 15px;
    }

    .modern-news-ticker .thumbnail {
        width: 40px;
        height: 40px;
        margin-right: 10px;
        object-fit: contain; /* adapta la imagen al contenedor */
    }
}

@media screen and (max-width: 768px) {
    .modern-news-ticker {
        height: 50px;
        line-height: 50px;
        font-size: 16px;
    }

    .modern-news-ticker li {
        line-height: 50px;
        margin-right: 10px;
        padding: 0 12px;
    }

    .modern-news-ticker .thumbnail {
        width: 40px;
        height: 40px;
        object-fit: contain; /* adapta la imagen al contenedor */
        margin-right: 10px;
    }
}

@media screen and (max-width: 480px) {
    .modern-news-ticker {
        height: 50px;
        line-height: 50px;
        font-size: 15px;
    }

    .modern-news-ticker li {
        line-height: 50px;
        margin-right: 10px;
        padding: 0 10px;
    }

    .modern-news-ticker .thumbnail {
        width: 40px;
        height:40px;
        margin-right: 8px;
        object-fit: contain; /* adapta la imagen al contenedor */
    }
}

/* Añadir al final del archivo CSS */

/* Estilo para imágenes que fallan al cargar */
.modern-news-ticker .thumbnail {
    object-fit: cover;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    text-align: center;
}

/* Placeholder para imágenes que no cargan */
.modern-news-ticker .thumbnail:after {
    content: "No image";
    display: none; /* Oculto por defecto, se muestra solo si la imagen falla */
}

/* Si la imagen falla, mostrar el fondo gris y el texto */
.modern-news-ticker .thumbnail[src*="data:image/svg+xml"] {
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-news-ticker .thumbnail[src*="data:image/svg+xml"]:after {
    content: "No image";
    display: block;
    color: white;
    font-size: 10px;
}

/* Añadir al final del archivo CSS */

/* Estilo específico para el logo de Yatvo como miniatura */
.modern-news-ticker .thumbnail[src*="Yatvocom-frontal.png"] {
    object-fit: contain; /* Cambiado de cover a contain para que se vea completo */
    background-color: transparent; /* Fondo transparente para el logo */
    padding: 5px; /* Espacio alrededor del logo */
}

/* Placeholder para imágenes que no cargan - ahora usa el logo */
.modern-news-ticker .thumbnail[src*="data:image/svg+xml"] {
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-news-ticker .thumbnail[src*="data:image/svg+xml"]:after {
    content: "No image";
    display: block;
    color: white;
    font-size: 10px;
}
