/* =========================================================
   TICKER DE AVISOS
========================================================= */

#ticker-container {
    flex: 1;
    min-width: 0;
}
.avisos-ticker {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    background: #168447;
    color: #fff;
    border-radius: 7px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,.12);
    transition: background .35s ease,color .35s ease,border .35s ease,box-shadow .35s ease;
}
.ticker-icon {
    width: 46px;
    min-width: 46px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.10);
    font-size: 18px;
}
.ticker-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    overflow: hidden;
}
.ticker-label {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .6px;
    white-space: nowrap;
}
.ticker-separator {
    width: 1px;
    height: 20px;
    flex-shrink: 0;
    background: rgba(255,255,255,.45);
}
.ticker-text {
    position: relative;
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 400;
}
.ticker-marquee-inner {
    display: inline-block;
    white-space: nowrap;
    transform: translateX(0);
    will-change: transform;
}
.ticker-marquee-inner.ticker-marquee {
    animation: tickerMarquee 12s linear infinite;
}
@keyframes tickerMarquee {
    0% { transform: translateX(0); }
    15% { transform: translateX(0); }
    85% { transform: translateX(var(--ticker-distance)); }
    100% { transform: translateX(var(--ticker-distance)); }
}

/* =========================================================
   BOTÓN VER AVISO
========================================================= */

.ticker-link.opcion-1 {
    flex-shrink: 0;
    margin-right: 8px;
    padding: 5px 12px;
    background: #f1f7f3;
    color: #168447;
    border: 1px solid #c9dfcf;
    border-radius: 5px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.1;
    white-space: nowrap;
    transition: background .25s ease,border-color .25s ease,box-shadow .25s ease,transform .15s ease;
}
.ticker-link.opcion-1:hover {
    background: #fff;
    color: #168447;
    border-color: #168447;
    box-shadow: 0 3px 8px rgba(22,132,71,.18);
    transform: scale(1.04);
}
.ticker-link.opcion-1:active {
    background: #eef7f1;
    color: #106738;
    border-color: #106738;
    box-shadow: 0 1px 3px rgba(22,132,71,.15);
    transform: scale(.96);
}

/* =========================================================
   BOTÓN URGENTE
========================================================= */

.avisos-ticker[data-estado="urgente"] .ticker-link.opcion-1 {
    background: #fff5f5;
    color: #c62828;
    border-color: #efcaca;
}
.avisos-ticker[data-estado="urgente"] .ticker-link.opcion-1:hover {
    background: #fff;
    color: #c62828;
    border-color: #c62828;
    box-shadow: 0 3px 8px rgba(198,40,40,.18);
}
.avisos-ticker[data-estado="urgente"] .ticker-link.opcion-1:active {
    background: #fff0f0;
    color: #b71c1c;
    border-color: #b71c1c;
    box-shadow: 0 1px 3px rgba(198,40,40,.15);
}
.ticker-fade {
    animation: tickerFade .45s ease;
}
@keyframes tickerFade {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}
.avisos-ticker[data-estado="urgente"] {
    background: #c62828;
    color: #fff;
    box-shadow: 0 3px 10px rgba(198,40,40,.18);
}
.avisos-ticker[data-estado="urgente"] .ticker-icon {
    background: rgba(0,0,0,.10);
}
.avisos-ticker[data-estado="minimal"] {
    background: #f4f7f5;
    color: #168447;
    border: 1px solid #dfe8e2;
    box-shadow: none;
}
.avisos-ticker[data-estado="minimal"] .ticker-icon {
    background: transparent;
    color: #168447;
}
.avisos-ticker[data-estado="minimal"] .ticker-separator {
    background: #c9d8cf;
}
.avisos-ticker[data-estado="minimal"] .ticker-text {
    color: #333;
}

/* =========================================================
   MULTIPLE
========================================================= */

.ticker-multiple {
    display: none;
    position: relative;
    width: 100%;
    height: 44px;
    align-items: center;
    min-width: 0;
}
.ticker-multiple-list {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    gap: 8px;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 1;
}
.ticker-multiple-item {
    flex: 0 0 calc((100% - 16px) / 3);
    min-width: 0;
    height: 36px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    background: #fff;
    border: 1px solid #d8e5dc;
    border-radius: 5px;
    overflow: hidden;
    box-sizing: border-box;
    color: #333 !important;
    -webkit-tap-highlight-color: transparent;
    transition: background .2s ease,box-shadow .2s ease,border-color .2s ease,transform .12s ease;
}
.ticker-multiple-item[href] {
    text-decoration: none !important;
    cursor: pointer;
}
.ticker-multiple-item:not([href]) {
    text-decoration: none !important;
    cursor: default;
}
.ticker-multiple-item[href]:hover {
    background: #f8fbf9 !important;
    color: #333 !important;
    transform: scale(1.015);
    text-decoration: none !important;
}
.ticker-multiple-item[href]:active {
    background: #eef5f0 !important;
    color: #333 !important;
    transform: scale(.975);
    text-decoration: none !important;
}
.ticker-multiple-item[href]:focus,
.ticker-multiple-item[href]:focus-visible {
    outline: 2px solid #168447;
    outline-offset: 1px;
    text-decoration: none !important;
    color: #333 !important;
}

/* =========================================================
   CONTORNO ROJO PARA AVISO URGENTE
========================================================= */

.ticker-multiple-item[data-tipo="urgente"]:focus,
.ticker-multiple-item[data-tipo="urgente"]:focus-visible {
    outline: none !important;
}
.ticker-multiple-item[href][data-tipo="urgente"]:focus,
.ticker-multiple-item[href][data-tipo="urgente"]:focus-visible {
    outline: 2px solid #c62828 !important;
    outline-offset: 1px;
}
.ticker-multiple-item,
.ticker-multiple-item *,
.ticker-multiple-item:hover,
.ticker-multiple-item:hover *,
.ticker-multiple-item:active,
.ticker-multiple-item:active * {
    text-decoration: none !important;
    -webkit-text-decoration: none !important;
}
.ticker-multiple-item[data-tipo="normal"],
.ticker-multiple-item[data-tipo="evento"],
.ticker-multiple-item[data-tipo="convocatoria"] {
    border-color: #d8e5dc;
    box-shadow: 0 2px 8px rgba(22,132,71,.15);
}
.ticker-multiple-item[href][data-tipo="normal"]:hover,
.ticker-multiple-item[href][data-tipo="evento"]:hover,
.ticker-multiple-item[href][data-tipo="convocatoria"]:hover {
    border-color: #d8e5dc !important;
    box-shadow: 0 4px 13px rgba(22,132,71,.25) !important;
}
.ticker-multiple-item[href][data-tipo="normal"]:active,
.ticker-multiple-item[href][data-tipo="evento"]:active,
.ticker-multiple-item[href][data-tipo="convocatoria"]:active {
    border-color: #d8e5dc !important;
    box-shadow: 0 2px 8px rgba(22,132,71,.20) !important;
}
.ticker-multiple-item[data-tipo="urgente"] {
    border-color: #efcaca;
    box-shadow: 0 2px 8px rgba(198,40,40,.20);
}
.ticker-multiple-item[href][data-tipo="urgente"]:hover {
    border-color: #efcaca !important;
    box-shadow: 0 4px 13px rgba(198,40,40,.34) !important;
}
.ticker-multiple-item[href][data-tipo="urgente"]:active {
    border-color: #efcaca !important;
    box-shadow: 0 2px 8px rgba(198,40,40,.27) !important;
}
.ticker-multiple-item-icon {
    flex-shrink: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    border-radius: 50%;
    background: #eef5f0;
}
.ticker-multiple-item-info {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    height: 100%;
}
.ticker-multiple-item-label {
    position: relative;
    flex-shrink: 0;
    padding-right: 7px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .3px;
    white-space: nowrap;
    color: #168447;
    line-height: 1;
}
.ticker-multiple-item-label::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 18px;
    background: #c9d8cf;
    transform: translateY(-50%);
}
.ticker-multiple-item-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: clip;
    font-size: 15px;
    font-weight: 400;
    color: #333;
    line-height: 1;
    display: flex;
    align-items: center;
    height: 100%;
}
.ticker-multiple-item-text span {
    display: inline-flex;
    white-space: nowrap;
    transform: translateX(0);
    will-change: transform;
}
.ticker-multiple-item-text span span {
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
}
.ticker-multiple-item-text span span + span {
    margin-left: 45px;
}
.ticker-multiple-item-text.ticker-scroll > span {
    animation: tickerMultipleScroll var(--multiple-duration) linear infinite;
}
@keyframes tickerMultipleScroll {
    0% { transform: translateX(0); }
    15% { transform: translateX(0); }
    85% { transform: translateX(var(--multiple-distance)); }
    100% { transform: translateX(var(--multiple-distance)); }
}
.ticker-multiple-arrow {
    position: absolute;
    top: 0;
    width: 40px;
    min-width: 40px;
    height: 44px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f4f7f5;
    color: #168447;
    font-family: Arial,sans-serif;
    font-size: 30px;
    z-index: 5;
    cursor: pointer;
    transition: background .2s ease,color .2s ease,transform .15s ease;
    transform: scale(1);
}
.ticker-multiple-prev {
    left: 0 !important;
    right: auto !important;
    border-radius: 6px 0 0 6px;
}
.ticker-multiple-next {
    right: 0 !important;
    left: auto !important;
    border-radius: 0 6px 6px 0;
}
.ticker-multiple-arrow:hover {
    background: #e8f1eb;
    color: #106738;
    transform: scale(1.05) !important;
}
.ticker-multiple-arrow:active {
    background: #dcebe1;
    color: #0f6033;
    transform: scale(.95) !important;
}
.ticker-multiple-arrow:focus {
    outline: none;
}
.ticker-multiple-item[data-tipo="urgente"] .ticker-multiple-item-icon {
    background: #fdeaea;
}
.ticker-multiple-item[data-tipo="urgente"] .ticker-multiple-item-label {
    color: #c62828;
}
.ticker-multiple-item[data-tipo="evento"] .ticker-multiple-item-icon {
    background: #eaf6ee;
}
.ticker-multiple-item[data-tipo="evento"] .ticker-multiple-item-label {
    color: #168447;
}
.ticker-multiple-item[data-tipo="convocatoria"] .ticker-multiple-item-icon {
    background: #faf5df;
}
.ticker-multiple-item[data-tipo="convocatoria"] .ticker-multiple-item-label {
    color: #9a7610;
}
.avisos-ticker[data-estado="multiple"] {
    position: relative;
    background: #f4f7f5;
    color: #333;
    border: 1px solid #d8e5dc;
    box-shadow: 0 3px 10px rgba(0,0,0,.06);
}
.avisos-ticker[data-estado="multiple"] .ticker-icon,
.avisos-ticker[data-estado="multiple"] .ticker-content,
.avisos-ticker[data-estado="multiple"] .ticker-link {
    display: none !important;
}
.avisos-ticker[data-estado="multiple"] .ticker-multiple {
    display: flex;
}

/* =========================================================
   PC / TABLET
========================================================= */

@media (min-width:701px) {
    .slider-title {
        display: flex;
        align-items: center;
        gap: 25px;
        height: 55px;
        padding: 5px 20px;
        white-space: nowrap;
    }
    .slider-title::after {
        display: none;
    }
    #ticker-container {
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
        height: 44px;
    }
    .avisos-ticker {
        height: 44px;
        min-height: 44px;
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (min-width:701px) and (max-width:850px) {
    .slider-title {
        gap: 15px;
    }
    .ticker-content {
        padding: 0 10px;
    }
    .ticker-text {
        font-size: 13px;
    }
    .ticker-label {
        font-size: 15px;
    }
    .ticker-link.opcion-1 {
        font-size: 13px;
        padding: 7px 9px;
    }
    .ticker-multiple-list {
        padding-left: 36px;
        padding-right: 36px;
    }
    .ticker-multiple-item {
        padding: 0 7px;
        gap: 5px;
    }
    .ticker-multiple-item-label {
        font-size: 14px;
        font-weight: 400;
    }
    .ticker-multiple-item-text {
        font-size: 14px;
        font-weight: 400;
    }
    .ticker-multiple-arrow {
        width: 32px;
        min-width: 32px;
        font-size: 28px;
    }
}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width:700px) {
    .slider-title {
        display: block;
        padding: 13px 17px 9px;
        font-size: 21px;
        white-space: normal;
    }
    .slider-title::after {
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-top: 2px;
    }
    #ticker-container {
        width: 100%;
        margin-top: 3px;
    }
    .avisos-ticker {
        width: 100%;
        min-height: 43px;
        height: 43px;
    }
    .ticker-icon {
        width: 30px;
        min-width: 30px;
        height: 43px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        font-size: 15px;
    }
    .ticker-content {
        gap: 3px;
        padding: 0 4px;
        display: flex;
        align-items: center;
        height: 43px;
        transform: none;
    }
    .ticker-label,
    .ticker-text {
        transform: none;
    }
    .ticker-label {
        font-size: 14px;
        line-height: 1;
    }
    .ticker-separator {
        height: 18px;
        align-self: center;
    }
    .ticker-text {
        font-size: 14px;
        line-height: 1;
        display: flex;
        align-items: center;
        height: 100%;
    }
    .ticker-marquee-inner {
        line-height: 1;
    }
    .ticker-link.opcion-1 {
        margin-right: 5px;
        padding: 6px 7px;
        font-size: 14px;
        line-height: 1.1;
    }
    .ticker-multiple {
        height: 43px;
        align-items: center;
    }
    .ticker-multiple-list {
        gap: 0;
        padding-left: 32px;
        padding-right: 32px;
        height: 43px;
        align-items: center;
    }
    .ticker-multiple-item {
        flex: 0 0 100%;
        width: 100%;
        height: 35px;
        gap: 6px;
        padding: 0 7px;
        align-items: center;
    }
    .ticker-multiple-item-icon {
        width: 22px;
        height: 22px;
        font-size: 12px;
        flex-shrink: 0;
    }
    .ticker-multiple-item-info {
        gap: 6px;
        align-items: center;
        height: 100%;
        transform: none;
    }
    .ticker-multiple-item-label {
        padding-right: 5px;
        font-size: 14px;
        font-weight: 400;
        line-height: 1;
    }
    .ticker-multiple-item-label::after {
        height: 16px;
    }
    .ticker-multiple-item-text {
        font-size: 14px;
        font-weight: 400;
        line-height: 1;
        display: flex;
        align-items: center;
        height: 100%;
    }
    .ticker-multiple-item-text > span {
        line-height: 1;
    }
    .ticker-multiple-arrow {
        width: 28px;
        min-width: 28px;
        height: 43px;
        font-size: 25px;
        z-index: 5;
    }
    .ticker-multiple-arrow:active {
        background: #dcebe1;
        color: #0f6033;
        transform: scale(.94) !important;
    }
    .ticker-multiple-prev {
        left: 0 !important;
    }
    .ticker-multiple-next {
        right: 0 !important;
    }
    .ticker-fade {
        animation: tickerFadeMobile .45s ease;
    }
    @keyframes tickerFadeMobile {
        0% {
            opacity: 0;
            transform: none;
        }
        100% {
            opacity: 1;
            transform: none;
        }
    }
}

/* =========================================================
   MÓVIL MUY PEQUEÑO
========================================================= */

@media (max-width:400px) {
    .ticker-label,
    .ticker-separator {
        display: none;
    }
    .ticker-text {
        font-size: 14px;
    }
    .ticker-link.opcion-1 {
        font-size: 14px;
        padding: 5px 6px;
    }
    .ticker-multiple-list {
        padding-left: 30px;
        padding-right: 30px;
    }
    .ticker-multiple-item {
        flex: 0 0 100%;
        width: 100%;
    }
    .ticker-multiple-item-label {
        font-size: 14px;
        font-weight: 400;
    }
    .ticker-multiple-item-text {
        font-size: 14px;
        font-weight: 400;
    }
    .ticker-multiple-arrow {
        width: 26px;
        min-width: 26px;
        font-size: 24px;
    }
}