/* ==================================================
   Modern News Ticker v3.1 - Estilos Optimizados
   ================================================== */

.modern-news-ticker {
    position: relative;
    width: 100%;
    height: 70px;
    line-height: 70px;
    font-size: 20px;
    overflow: hidden;
    font-family: 'Barlow Condensed', 'Arial', sans-serif;
    margin: 0;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modern-news-ticker .ticker-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modern-news-ticker ul,
.modern-news-ticker li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline;
}

.modern-news-ticker ul {
    position: absolute;
    height: 100%;
    white-space: nowrap;
    transition: transform 0.3s ease-out;
    will-change: transform;
    margin: 0;
    padding: 0;
}

.modern-news-ticker li {
    display: inline-block;
    padding: 0;
    height: 100%;
    line-height: 70px;
    vertical-align: top;
    margin: 0;
    border: none;
}

.modern-news-ticker a {
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    height: 100%;
    transition: opacity 0.3s ease;
    padding: 0 15px;
}

.modern-news-ticker a:hover {
    opacity: 0.8;
}

.modern-news-ticker .thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-right: 10px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    vertical-align: middle;
}

.modern-news-ticker .title {
    display: inline-block;
    vertical-align: middle;
    font-size: 1.2em;
}

.modern-news-ticker .loading-message,
.modern-news-ticker .error-message {
    display: block;
    padding-left: 15px;
    font-size: 1.2em;
    font-weight: 400;
}

.modern-news-ticker .error-message {
    color: #ff5555;
    font-weight: bold;
}

/* Logo separador entre noticias */
.modern-news-ticker .ticker-separator-logo {
    display: inline-block;
    vertical-align: middle;
    line-height: 70px;
}

.modern-news-ticker .separator-logo {
    height: 60px;
    width: auto;
    vertical-align: middle;
    margin: 0 10px;
}

.modern-news-ticker .ticker-separator {
    display: inline-block;
    margin: 0 15px;
    font-size: 1.2em;
    opacity: 0.8;
    vertical-align: middle;
}

/* Título de la marquesina */
.modern-news-ticker .ticker-title {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background-color: #333;
    color: #fff;
    padding: 0 20px;
    font-weight: bold;
    z-index: 10;
    text-transform: uppercase;
    line-height: 70px;
    clip-path: polygon(0 0, 100% 0, calc(100% - 15px) 100%, 0% 100%);
    padding-right: 35px;
    font-size: 16px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.modern-news-ticker .ticker-title .title-text {
    display: inline-block;
}

/* Contenedor del wrapper cuando hay título */
.modern-news-ticker.has-title .ticker-wrapper {
    left: auto;
}

.modern-news-ticker.has-title .ticker-wrapper {
    left: 150px;
    width: calc(100% - 150px);
}

.modern-news-ticker.has-title.has-controls .ticker-wrapper {
    width: calc(100% - 150px - 80px);
}

/* Botones de navegación */
.modern-news-ticker .ticker-controls {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    background: inherit;
    padding-left: 10px;
    background-color: inherit;
}

.modern-news-ticker .ticker-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 24px;
    height: 100%;
    width: 40px;
    cursor: pointer;
    transition: background-color 0.2s;
    line-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modern-news-ticker .ticker-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
/* Tablets - Aumenta estos valores */
@media (max-width: 768px) {
    .modern-news-ticker {
        height: 60px;        /* Aumentado de 50px */
        line-height: 60px;
        font-size: 18px;     /* Aumentado de 14px */
    }
    
        .modern-news-ticker .title {
        font-size: 1.5em;    /* Aumentado de 0.9em */
    }
}
    
    .modern-news-ticker .ticker-title {
        font-size: 12px;
        padding: 0 12px;
        padding-right: 25px;
        line-height: 50px;
        clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0% 100%);
    }
    
    .modern-news-ticker .thumbnail {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }
    
    .modern-news-ticker li,
    .modern-news-ticker a {
        line-height: 50px;
    }
    
    .modern-news-ticker .title {
        font-size: 0.9em;
    }
    
    .modern-news-ticker .ticker-controls button {
        line-height: 50px;
        font-size: 20px;
        width: 35px;
    }
    
    .modern-news-ticker.has-title .ticker-wrapper {
        left: 110px;
        width: calc(100% - 110px);
    }
    
    .modern-news-ticker.has-title.has-controls .ticker-wrapper {
        width: calc(100% - 110px - 70px);
    }
    
    .modern-news-ticker .separator-logo {
        height: 30px;
        margin: 0 10px;
    }
}

@media (max-width: 480px) {
    .modern-news-ticker {
        height: 50px;        /* Aumentado de 42px */
        line-height: 50px;
        font-size: 16px;     /* Aumentado de 12px */
    }
    
        .modern-news-ticker .title {
        font-size: 1.2em;    /* Aumentado de 0.8em */
    }
}
    
    .modern-news-ticker .ticker-title {
        font-size: 10px;
        padding: 0 8px;
        padding-right: 18px;
        line-height: 42px;
        clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0% 100%);
    }
    
    .modern-news-ticker .thumbnail {
        width: 30px;
        height: 30px;
        margin-right: 5px;
    }
    
    .modern-news-ticker li,
    .modern-news-ticker a {
        line-height: 42px;
        padding: 0 8px;
    }
    
    .modern-news-ticker .title {
        font-size: 0.8em;
    }
    
    .modern-news-ticker .ticker-controls button {
        line-height: 42px;
        font-size: 16px;
        width: 30px;
    }
    
    .modern-news-ticker.has-title .ticker-wrapper {
        left: 85px;
        width: calc(100% - 85px);
    }
    
    .modern-news-ticker.has-title.has-controls .ticker-wrapper {
        width: calc(100% - 85px - 60px);
    }
    
    .modern-news-ticker .separator-logo {
        height: 25px;
        margin: 0 8px;
    }
}

.modern-news-ticker .thumbnail.error-loaded {
    object-fit: contain;
    background-color: transparent;
    padding: 5px;
}