/* ===================================================================================================================
   🌎 CLIMA 24.7 - CARD PROVINCIAS / REGIONES / CIUDADES
   -------------------------------------------------------------------------------------------------------------------
   CSS LIMPIO Y ORGANIZADO
   ---------------------------------------------------------------------------------------------------------------
   Este archivo reemplaza los patches acumulados.
   Mantiene SOLO el layout actual:
   - Card base
   - Header Provincia + Región
   - Columna izquierda: mapa / bandera / escudo / próxima provincia
   - Panel derecho TV: ciudad + badges + clima principal + turismo
   - Footer: última actualización + contador ciudad
   - Standby
=================================================================================================================== */


/* ===================================================================================================================
   1) STACK CONTENEDOR
=================================================================================================================== */

.footer-left-stack {
    position: absolute;

    left: 30px;
    bottom: 145px !important;

    z-index: 80;

    display: flex;
    flex-direction: row;
    align-items: flex-end;

    pointer-events: none;
}

/* Oculta provincias durante ríos/mensajes */
.footer-left-stack.is-editorial-standby .card {
    display: none;
}

/* Mientras hay mensajes, NO mostrar el mini standby-card */
.footer-left-stack.is-editorial-standby .weather-standby-card {
    display: none;
}

/* Solo cuando ya terminaron mensajes/ríos, mostrar standby-card */
.footer-left-stack.is-standby .weather-standby-card {
    display: flex;
}
/* ===================================================================================================================
   2) CARD BASE
=================================================================================================================== */

.card {
    position: relative;

    width: 920px;
    min-height: 460px;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border-left: 6px solid var(--codelis-logoL-rgb);
    border-radius: 10px;

    background: linear-gradient(
        90deg,
        rgba(112, 56, 142, 0.55),
        rgba(143, 85, 155, 0.35)
    );

    box-shadow:
        0 12px 30px rgba(0,0,0,.35),
        0 0 30px rgba(112,56,142,.25);

    color: #fff;
}


/* ===================================================================================================================
   3) HEADER
=================================================================================================================== */

.card-header {
    width: 100%;
    min-height: 80px;

    display: flex;
    flex-direction: column;

    border-radius: 10px 10px 0 0;

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.card-header-top {
    flex: 1;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0 14px;
}

.card-header-top-txt {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    font-size: 35px;
    font-weight: 900;

    color: #fff;

    text-align: center;

    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
         0 0 8px #000;
}

.card-header-province,
.card-header-region {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    min-width: 0;

    white-space: nowrap;
}

.card-header-province {
    justify-content: flex-start;

    overflow: hidden;
    text-overflow: ellipsis;
}

.card-header-region {
    justify-content: flex-end;

    font-size: 26px;
}


/* ===================================================================================================================
   4) BODY
=================================================================================================================== */

.card-middle {
    flex: 1;

    display: flex;

    min-height: 0;
}


/* ===================================================================================================================
   5) LEFT COLUMN - MAPA / BANDERA / ESCUDO / PRÓXIMA
=================================================================================================================== */

.card-left {
    width: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
}


/* -------------------------------------------------------------------------------------------------------------------
   MAPA PROVINCIA
------------------------------------------------------------------------------------------------------------------- */

.card-left-top {
    width: 100%;
    height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding-top: 12px;
    padding-bottom: 6px;

    overflow: hidden;

}

.card-left-top img {
    max-width: 145px;
    max-height: 145px;

    width: auto;
    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(0 0 6px rgba(143, 85, 155, 0.65))
        drop-shadow(0 0 12px rgba(112, 56, 142,.12));
}


/* -------------------------------------------------------------------------------------------------------------------
   BANDERA + ESCUDO
------------------------------------------------------------------------------------------------------------------- */

.card-left-middle {
    width: 100%;
    min-height: 140px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 8px;

    padding-top: 8px;
    padding-bottom: 10px;

}

.card-left-middle img {
    object-fit: contain;

    filter:
        drop-shadow(0 0 6px rgba(143, 85, 155, 0.65))
        drop-shadow(0 0 12px rgba(112, 56, 142,.12));
}

.province-flag-left {
    width: 140px;
    max-height: 100px;
}

.card-left-middle #province-coat-arms {
    width: 100px;
    height: auto;
}


/* -------------------------------------------------------------------------------------------------------------------
   PRÓXIMA PROVINCIA + TIMER
------------------------------------------------------------------------------------------------------------------- */

.card-left-bottom {
    width: calc(100% - 16px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    margin-top: auto;
    margin-left: 8px;
    margin-right: 8px;
    margin-bottom: 10px;

    padding-top: 14px;
    padding-bottom: 12px;

    
    border-radius: 10px;
    border: 1px solid var(--info-oscuro-rgb);
    backdrop-filter: blur(10px);
    background: linear-gradient(
        180deg,
        rgba(28, 90, 156,.09),
        rgba(22, 66, 114,.15)
    );
}

.card-left-bottom-next-label {
    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    line-height: 1;

    color: #fff;
}

.card-left-bottom-next-name {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 4px 8px;

    font-size: 24px;
    font-weight: 900;

    color: #fff;

    text-align: center;
}

.next-prov-timer {
    width: 78px;

    margin: 8px auto 0;
    padding: 8px 8px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    font-size: 24px;
    font-weight: 900;

    color: var(--blanco);

    background: rgba(22, 66, 114,.35);

    border: 1px solid rgba(28, 90, 156,.25);
}

.next-prov-timer.alert {
    color: var(--blanco);

    background: var(--danger);
    border-color: var(--danger-claro);

    animation: pulseProvTimer .7s infinite alternate;
}

@keyframes pulseProvTimer{
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}


/* ===================================================================================================================
   6) RIGHT COLUMN - PANEL TV
=================================================================================================================== */

.card-right {
    flex: 1;

    min-width: 0;
    min-height: 320px;

    display: flex;
    flex-direction: column;

    padding: 8px 10px;

    overflow: hidden;
}

.card-right-txt {
    font-size: 19px;
    color: #fff;
}

.city-list {
    width: 100%;
    height: 100%;

    min-width: 0;

    display: flex;
}

.city-weather-card {
    width: 100%;
}

.city-tv-card {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    gap: 8px;

    animation: cityOneFade .35s ease;
}

@keyframes cityOneFade{
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* -------------------------------------------------------------------------------------------------------------------
   CIUDAD
------------------------------------------------------------------------------------------------------------------- */

.city-tv-city-line {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 10px;

    padding: 4px 2px 8px;

    border-bottom: 1px solid rgba(255,255,255,.12);

    font-size: 30px;
    font-weight: 900;
    line-height: 1;

    color: #fff;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;

    text-shadow: 0 0 8px rgba(0,0,0,.65);
    margin-bottom: 4px;
}

.city-tv-city-line i {
    flex-shrink: 0;

    font-size: 30px;
}


/* -------------------------------------------------------------------------------------------------------------------
   LAYOUT INTERNO: BADGES + CLIMA PRINCIPAL
------------------------------------------------------------------------------------------------------------------- */


/* -------------------------------------------------------------------------------------------------------------------
   BADGES TÉCNICOS
------------------------------------------------------------------------------------------------------------------- */


.city-extra-item,
.city-extra-item-temp {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    white-space: nowrap;
}

.city-extra-item {
    min-width: 0;
    min-height: 48px;

    flex-direction: column;

    gap: 3px;

    padding: 5px 6px;

    overflow: hidden;

    border: 1px solid rgba(0,123,255,.85);
    backdrop-filter: blur(6px);
    background: linear-gradient(
        90deg,
        rgba(3, 28, 54, 0.75),
        rgba(28, 90, 156, 0.25)
    );

    font-weight: 900;
}

.city-extra-item i {
    font-size: 30px;
    line-height: 1;
}

.city-extra-item b {
    width: 100%;

    display: block;

    font-size: 20px;
    font-weight: 900;
    line-height: 1;

    color: #fff;

    text-align: center;
    text-transform: uppercase;
    letter-spacing: .25px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-extra-item strong {
    width: 100%;

    display: block;

    font-size: 24px;
    font-weight: 900;
    line-height: 1;

    color: #fff;

    text-align: center;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.city-extra-wind strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 5px;
}


/* -------------------------------------------------------------------------------------------------------------------
   CLIMA PRINCIPAL
------------------------------------------------------------------------------------------------------------------- */


.city-tv-icon {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 88px;
    line-height: 1;

    filter: drop-shadow(0 0 8px rgba(0,0,0,.65));
}

.city-tv-desc {
    width: 100%;

    padding: 0;

    background: transparent;
    border: 0;
    box-shadow: none;

    font-size: 23px;
    font-weight: 900;
    line-height: 1.05;

    color: rgba(255,255,255,.94);

    text-align: center;

    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


.city-temp,
.city-st,
.city-tv-temp,
.city-tv-st {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: auto;
    min-height: 52px;

    border-radius: 8px;

    font-weight: 900;
    line-height: 1;

    white-space: nowrap;
}

.city-tv-temp {
    font-size: 42px;
}

.city-tv-st {
    font-size: 29px;
}


/* -------------------------------------------------------------------------------------------------------------------
   MIN / MAX
------------------------------------------------------------------------------------------------------------------- */

.city-tv-minmax {
    flex: 0 0 auto;

    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

.city-tv-min,
.city-tv-max {
    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 7px;

    font-size: 27px;
    font-weight: 900;
    line-height: 1;

    box-shadow:
        0 0 7px rgba(0,0,0,.30),
        inset 0 0 0 1px rgba(255,255,255,.14);
}


/* -------------------------------------------------------------------------------------------------------------------
   TURISMO
------------------------------------------------------------------------------------------------------------------- */


/* ===================================================================================================================
   7) FOOTER - ÚLTIMA ACTUALIZACIÓN + CONTADOR CIUDAD
=================================================================================================================== */

.card-footer {
    width: 100%;
    height: 54px;
    min-height: 54px;

    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    gap: 14px;

    padding: 0 14px;

    border-top: 2px solid rgba(255,255,255,.08);
    border-radius: 0 0 10px 10px;

    background: linear-gradient(
        90deg,
        rgba(0,0,0,.18),
        rgba(255,255,255,.03)
    );

    overflow: hidden;
}

.card-footer-last-update {
    flex: 1 1 auto;

    min-width: 0;

    display: flex;
    align-items: center;
    justify-content: flex-start;

    gap: 6px;

    overflow: visible;

    font-size: 20px;
    font-weight: 900;
    line-height: 1.05;

    color: rgba(255,255,255,.95);

    text-align: left;

    white-space: normal;

    text-shadow: 0 0 6px rgba(0,0,0,.65);
}

.card-footer-last-update br {
    display: none;
}

.card-footer-last-update i {
    flex-shrink: 0;
}

.card-footer-last-update .txt-warning {
    display: inline-flex;

    margin-left: 4px;

    color: var(--warning);
}

.card-footer-city-counter {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 6px;

    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    padding: 8px;
    background: linear-gradient(
        90deg,
        rgba(3, 28, 54, 0.95),
        rgba(28, 90, 156, 0.45)
    );
    border-radius: 8px;
    border: 1px solid var(--info-oscuro-rgb);
    border-left: 6px solid var(--info-rgb);
    color: var(--blanco-rgb);

    text-align: right;
    white-space: nowrap;

    text-shadow: 0 0 6px rgba(0,0,0,.65);
}


/* ===================================================================================================================
   8) STANDBY
=================================================================================================================== */

.weather-standby-card {
    display: none;

    position: absolute;

    left: 0;
    bottom: 0;

    width:max-content;
    height: 50px;
    
    border-left: 6px solid var(--codelis-logoL-rgb);
    border-bottom: 2px solid var(--codelis-logoR-rgb);
    border-radius: 12px;

    background: linear-gradient(
        90deg,
        rgba(47, 1, 44),
        rgba(56, 21, 75),
        rgba(112, 56, 142),
        rgba(143, 85, 155)
    );

    backdrop-filter: blur(6px);

    color: var(--blanco);
}

.footer-left-stack.is-standby .card {
    display: none;
}

.footer-left-stack.is-standby .weather-standby-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-standby-title {
    margin-left: 20px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}

/* CONTADOR REGRESIVO DEL STANDBY · MISMO ESTILO QUE EL TIMER DE CÁMARAS */
#weather-standby-timer {
    min-width: 66px;
    height: 36px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-left: 5px;
    padding: 0 8px;
    margin-right: 20px;
    border: 1px solid #007bff;
    border-radius: 9px;

    background: #164272;
    color: var(--warning-rgb);

    font-family: Monaco, Consolas, monospace;
    font-size: 20px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: .02em;

    box-sizing: border-box;
    text-shadow: 0 2px 4px rgba(0,0,0,.65);
    vertical-align: middle;
}

#weather-standby-timer.alert {
    border-color: #dc3545;
    background: #5b1118;
    color: #ffffff;

    animation: weatherStandbyTimerAlert .8s infinite alternate;
}

@keyframes weatherStandbyTimerAlert {
    from { box-shadow: 0 0 0 rgba(220,53,69,0); }
    to   { box-shadow: 0 0 12px rgba(220,53,69,.72); }
}


/* ===================================================================================================================
   10) EXTENSIÓN 2026-06 - VISTAS ROTATIVAS AHORA / PRÓXIMOS DÍAS
   -------------------------------------------------------------------------------------------------------------------
   Mantiene la carcasa original de 920px y reutiliza exclusivamente el panel derecho.
   No invade el sector derecho de alertas / Windy.
=================================================================================================================== */

.city-tv-city-line {
    justify-content: space-between;
    gap: 14px;
}

.city-tv-city-name {
    min-width: 0;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-view-badge {
    flex: 0 0 auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 6px 9px;

    border: 1px solid rgba(40, 167, 69, .88);
    border-radius: 999px;

    background: rgba(11, 74, 30, .70);

    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .35px;

    color: #fff;
    white-space: nowrap;
}

.city-view-badge i {
    font-size: 18px;
    color: #6ef08d;
}

.city-view-badge b {
    color: rgba(255, 255, 255, .72);
}

.city-view-badge-forecast {
    border-color: rgba(0, 123, 255, .90);
    background: rgba(3, 28, 54, .85);
}

.city-view-badge-forecast i {
    color: #5ab3ff;
}

.city-footer-view {
    margin-left: 3px;
    padding: 4px 6px;

    border-radius: 999px;

    background: rgba(255, 255, 255, .12);

    font-size: 14px;
    letter-spacing: .4px;
}

/* -------------------------------------------------------------------------------------------------------------------
   VISTA AHORA
------------------------------------------------------------------------------------------------------------------- */

.city-now-layout {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 0;

    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 9px;
}

.city-now-main {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 4px 6px;

    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;

    background: linear-gradient(
        180deg,
        rgba(3, 28, 54, .62),
        rgba(28, 90, 156, .16)
    );
}

.city-now-main .city-tv-icon {
    font-size: 70px;
}

.city-now-main .city-tv-desc {
    min-height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.city-now-temperatures {
    width: 100%;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.city-now-temperatures .city-tv-temp,
.city-now-temperatures .city-tv-st {
    min-height: 42px;
}

.city-now-temperatures .city-tv-temp {
    font-size: 33px;
}

.city-now-temperatures .city-tv-st {
    font-size: 22px;
}

.city-now-main .city-tv-minmax {
    gap: 6px;
}

.city-now-main .city-tv-min,
.city-now-main .city-tv-max {
    min-height: 34px;
    font-size: 21px;
}

.city-now-metrics {
    min-width: 0;
    min-height: 0;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, minmax(0, 1fr));
    gap: 5px;
}

.city-now-metrics .city-extra-item {
    min-height: 0;

    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    justify-content: stretch;
    gap: 5px;

    padding: 4px 6px;

    border-color: rgba(0, 123, 255, .62);
    border-radius: 6px;
}

.city-now-metrics .city-extra-item > i {
    width: 26px;

    font-size: 20px;
    text-align: center;
}

.city-now-metrics .city-extra-item b,
.city-now-metrics .city-extra-item strong {
    width: auto;
    min-width: 0;

    display: block;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-now-metrics .city-extra-item b {
    font-size: 18px;
    text-align: left;
}

.city-now-metrics .city-extra-item strong {
    font-size: 22px;
    text-align: right;
}

.city-now-metrics .city-extra-wind strong {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.city-wind-arrow {
    color: #fd7e14;
}

/* -------------------------------------------------------------------------------------------------------------------
   FRANJA CONTEXTUAL: LLUVIA / NIEVE / CAPE / TURISMO
------------------------------------------------------------------------------------------------------------------- */

.city-context-strip {
    flex: 0 0 43px;

    width: 100%;
    min-height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    padding: 5px 10px;

    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;

    background: linear-gradient(
        90deg,
        rgba(3, 28, 54, .92),
        rgba(28, 90, 156, .50)
    );

    overflow: hidden;
}

.city-context-icon {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 27px;
}

.city-context-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    overflow: hidden;
}

.city-context-copy strong,
.city-context-copy span {
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-context-copy strong {
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .25px;
    text-transform: uppercase;
}

.city-context-copy span {
    margin-top: 4px;

    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.city-context-copy-inline {
    flex: 1 1 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.city-context-cape {
    justify-content: flex-start;

    border-color: rgba(255, 193, 7, .90);
    background: linear-gradient(90deg, rgba(88, 56, 0, .94), rgba(140, 88, 0, .70));
}

.city-context-cape .city-context-icon {
    color: #ffc107;
}

.city-context-cape[data-cape-kind="elevated"] {
    border-color: rgba(253, 126, 20, .95);
    background: linear-gradient(90deg, rgba(95, 44, 2, .96), rgba(156, 66, 0, .76));
}

.city-context-cape[data-cape-kind="elevated"] .city-context-icon {
    color: #fd7e14;
}

.city-context-cape[data-cape-kind="severe"] {
    border-color: rgba(220, 53, 69, .95);
    background: linear-gradient(90deg, rgba(87, 5, 13, .98), rgba(145, 12, 26, .76));
}

.city-context-cape[data-cape-kind="severe"] .city-context-icon {
    color: #ff5b6a;
}

.city-context-snow {
    border-color: rgba(126, 199, 255, .92);
}

.city-context-snow .city-context-icon {
    color: #bce5ff;
}

.city-context-rain {
    border-color: rgba(0, 123, 255, .92);
}

.city-context-rain .city-context-icon {
    color: #6db7ff;
}


/* -------------------------------------------------------------------------------------------------------------------
   VISTA PRÓXIMOS DÍAS
------------------------------------------------------------------------------------------------------------------- */

.city-forecast-layout {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 0;

    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 8px;
}

.forecast-tourism {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;

    padding: 8px;

    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 9px;

    background: linear-gradient(
        180deg,
        rgba(3, 28, 54, .70),
        rgba(28, 90, 156, .20)
    );

    overflow: hidden;
    text-align: center;
}

.forecast-tourism span {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, .70);
}

.forecast-tourism img {
    width: 100%;
    max-height: 72px;

    object-fit: contain;
}

.forecast-tourism strong {
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 19px;
    font-weight: 900;
}

.forecast-tourism small {
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 13px;
    font-weight: 800;
    color: rgba(255, 255, 255, .82);
}

.city-forecast-grid {
    min-width: 0;
    min-height: 0;

    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.city-forecast-grid.has-empty {
    grid-template-columns: 1fr;
}

.forecast-day-card {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;

    padding: 6px;

    border: 1px solid rgba(0, 123, 255, .74);
    border-radius: 8px;

    background: linear-gradient(
        180deg,
        rgba(3, 28, 54, .80),
        rgba(28, 90, 156, .28)
    );

    overflow: hidden;
}

.forecast-day-date {
    padding-bottom: 4px;

    border-bottom: 1px solid rgba(255, 255, 255, .12);

    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
}

.forecast-day-icon {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 42px;
    line-height: 1;

    filter: drop-shadow(0 0 6px rgba(0, 0, 0, .62));
}

.forecast-day-desc {
    min-height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    font-size: 16px;
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
}


.forecast-special-cape {
    background: rgba(253, 126, 20, .72);
}

.forecast-special-snow {
    background: rgba(0, 123, 255, .62);
}

.forecast-special-wind {
    background: rgba(255, 193, 7, .62);
}

.forecast-special-uv {
    background: rgba(220, 53, 69, .62);
}

.forecast-empty {
    width: 100%;
    min-height: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 16px;

    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 9px;

    background: rgba(3, 28, 54, .62);

    text-align: center;
}

.forecast-empty i {
    font-size: 48px;
    color: rgba(255, 255, 255, .72);
}

.forecast-empty strong {
    font-size: 22px;
    font-weight: 900;
}

.forecast-empty span {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, .78);
}

/* ===================================================================================================================
   11) AJUSTE V2 - CLIMA PRINCIPAL ARRIBA + TURISMO DEBAJO
   -------------------------------------------------------------------------------------------------------------------
   El bloque grande de estado actual queda alineado arriba. El espacio liberado debajo se usa para el logo turístico.
=================================================================================================================== */

.city-now-left {
    min-width: 0;
    min-height: 0;

    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;

    gap: 6px;
}

.city-now-left .city-now-main {
    flex: 0 0 auto;

    justify-content: flex-start;

    gap: 4px;

    padding: 7px 6px 6px;
}

.city-now-left .city-tv-icon {
    font-size: 65px;
}

.city-now-left .city-tv-desc {
    min-height: 29px;

    font-size: 19px;
}

.city-now-left .city-now-temperatures .city-tv-temp,
.city-now-left .city-now-temperatures .city-tv-st {
    min-height: 38px;
}

.city-now-left .city-now-temperatures .city-tv-temp {
    font-size: 31px;
}

.city-now-left .city-now-temperatures .city-tv-st {
    font-size: 21px;
}

.city-now-left .city-tv-min,
.city-now-left .city-tv-max {
    min-height: 31px;

    font-size: 20px;
}

.city-now-tourism {
    flex: 1 1 auto;

    min-width: 0;
    min-height: 42px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 4px;

    padding: 4px 6px;

    border: 1px solid rgba(0, 123, 255, .55);
    border-radius: 7px;

    background: linear-gradient(
        90deg,
        rgba(3, 28, 54, .76),
        rgba(28, 90, 156, .26)
    );

    overflow: hidden;
}

.city-now-tourism img {
    width: auto;
    max-width: 100%;
    max-height: 34px;

    object-fit: contain;
}

.city-now-tourism span {
    max-width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 14px;
    font-weight: 900;
    line-height: 1;

    color: rgba(255, 255, 255, .93);
}

/* La franja inferior queda reservada únicamente para lluvia, nieve o CAPE relevante. */
.city-view-current .city-context-strip {
    margin-top: 1px;
}

.web-text {
    font-size: 20px !important;
}


/* ===================================================================================================================
   12) AJUSTE V3 - COLORES ÍCONOS / SOL DOBLE / FORECAST EN BADGES
=================================================================================================================== */

.city-now-tourism img {
    display: block;

    width: 100%;
    height: auto;

    max-width: none;
    max-height: none;

    object-fit: contain;
}

.city-extra-sun strong {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.city-sol-times {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.city-sol-line {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.city-sol-line i {
    font-size: 20px;
    line-height: 1;
    flex: 0 0 auto;
}

.city-sol-line span {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.forecast-tourism img {
    width: auto;
    max-width: 100%;
    max-height: 86px;
    object-fit: contain;
}

.forecast-day-card {
    gap: 5px;
}

.forecast-day-desc {
    min-height: 28px;
    font-size: 15px;
}

.forecast-badge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.forecast-temp-badge {
    min-height: 24px;
    padding: 5px 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    box-shadow: 0 0 6px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.12);
    white-space: nowrap;
}

.forecast-metrics-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
}

.forecast-mini-badge {
    min-width: 0;
    min-height: 28px;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px;
    padding: 4px 5px;
    border: 1px solid rgba(0,123,255,.62);
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(3, 28, 54, 0.76), rgba(28, 90, 156, 0.26));
    overflow: hidden;
}

.forecast-mini-badge i {
    width: 18px;
    font-size: 15px;
    text-align: center;
}

.forecast-mini-badge b,
.forecast-mini-badge span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
}

.forecast-mini-badge b {
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.forecast-mini-badge span {
    font-size: 12px;
    font-weight: 900;
    text-align: right;
}

.forecast-mini-badge-special {
    border-color: rgba(255,255,255,.24);
}

.forecast-mini-badge-special b {
    letter-spacing: .2px;
}

.forecast-special-cape {
    background: linear-gradient(90deg, rgba(95, 44, 2, .92), rgba(156, 66, 0, .72));
    border-color: rgba(253,126,20,.88);
}

.forecast-special-snow {
    background: linear-gradient(90deg, rgba(3, 63, 117, .92), rgba(0, 123, 255, .56));
    border-color: rgba(126,199,255,.88);
}

.forecast-special-wind {
    background: linear-gradient(90deg, rgba(92, 74, 3, .92), rgba(180, 141, 0, .62));
    border-color: rgba(255,193,7,.88);
}

.forecast-special-uv {
    background: linear-gradient(90deg, rgba(87, 5, 13, .92), rgba(145, 12, 26, .62));
    border-color: rgba(220,53,69,.88);
}

/* Ocultamos el layout de pronóstico anterior porque ahora se reemplaza por badges nuevos. */


/* ===================================================================================================================
   13) AJUSTE V4 - CONTEXTO CAPE EN UNA SOLA LÍNEA
=================================================================================================================== */
.city-context-copy-cape-inline {
    gap: 8px;
}

.city-context-copy-cape-inline strong,
.city-context-copy-cape-inline span {
    margin-top: 0;
}

.city-context-copy-cape-inline span {
    text-transform: none;
}

/* ===================================================================================================================
   PATCH FORECAST ÚNICAMENTE
   Ícono + título en primera línea / valor debajo.
   Aumenta tipografía solo dentro de PRÓXIMOS DÍAS.
=================================================================================================================== */

.forecast-temp-badge {
    font-size: 16px !important;
}

.forecast-mini-badge {
    grid-template-columns: 18px minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;

    column-gap: 5px !important;
    row-gap: 3px !important;

    min-height: 36px !important;
    padding: 5px 6px !important;
}

.forecast-mini-badge i {
    grid-column: 1 !important;
    grid-row: 1 !important;

    font-size: 18px !important;
}

.forecast-mini-badge b {
    grid-column: 2 !important;
    grid-row: 1 !important;

    font-size: 18px !important;
    text-align: left !important;
}

.forecast-mini-badge span {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;

    font-size: 18px !important;
    text-align: center !important;
}
.forecast-mini-badge-atmosfera span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.05 !important;
}

.forecast-mini-badge-sol > span,
.forecast-mini-badge-atmosfera > span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.05 !important;
}

.forecast-sol-times {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 8px;
}

.forecast-sol-line {
    display: inline-flex;
    align-items: center;

    gap: 4px;

    min-width: 0;
}

.forecast-sol-line i {
    flex: 0 0 auto;

    font-size: 18px;
    line-height: 1;
}

.forecast-sol-line span {
    font-size: 18px;
    font-weight: 900;
    line-height: 1;

    white-space: nowrap;
}

.forecast-mini-badge-sol .forecast-sol-times,
.forecast-mini-badge-sol .forecast-sol-line,
.forecast-mini-badge-sol .forecast-sol-line span {
    grid-column: auto !important;
    grid-row: auto !important;
}

/* Títulos centrados en todos los badges de PRÓXIMOS DÍAS */
.forecast-mini-badge {
    position: relative;
}

.forecast-mini-badge > i {
    position: absolute;

    left: 6px;
    top: 5px;
}

.forecast-mini-badge > b {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;

    width: 100%;

    padding-left: 22px;
    padding-right: 22px;

    text-align: center !important;
}


.datos-source {
    padding-top: 2px;
    text-align: center;
}