/* ============================================================
   OROSEIMETEO · STAZIONI
   Grafica coerente con la nuova Home: bianca, tipografica,
   leggibile, con il blu usato solo come accento.
   ============================================================ */


/* ============================================================
   HERO PAGINA
   ============================================================ */

.stations-hero {
    background: #fff;
    border-bottom: 1px solid var(--om-line-strong);
}

.stations-hero-inner {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 52px;
    padding-top: 54px;
    padding-bottom: 54px;
}

.stations-hero .eyebrow {
    display: block;
    color: var(--om-blue);
    font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .055em;
    text-transform: uppercase;
}

.stations-hero h1 {
    margin: 8px 0 14px;
    color: var(--om-blue-dark);
    font-size: clamp(42px, 4.4vw, 58px);
    line-height: 1.02;
    letter-spacing: -.9px;
    font-weight: 700;
}

.stations-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--om-muted);
    font-size: 18px;
    line-height: 1.55;
}

.stations-hero-badge {
    flex: 0 0 auto;
    min-width: 190px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 4px 0 4px 30px;
    border-left: 1px solid var(--om-line-strong);
}

.stations-hero-badge strong {
    color: var(--om-blue);
    font-size: 58px;
    line-height: .9;
    letter-spacing: -2px;
    font-weight: 700;
}

.stations-hero-badge span {
    color: #5f6d75;
    font-size: 15px;
    line-height: 1.18;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .035em;
}


/* ============================================================
   SEZIONE STAZIONI
   ============================================================ */

.stations-section {
    padding: 58px 0 62px;
    background: #fff;
}


/* ============================================================
   MAPPA RETE STAZIONI
   ============================================================ */

.stations-map-section {
    margin-bottom: 34px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--om-line-strong);
}

.stations-map-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.stations-map-head > div {
    min-width: 0;
}

.stations-map-kicker {
    display: block;
    color: var(--om-blue);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.stations-map-head h2 {
    margin: 7px 0 0;
    color: var(--om-blue-dark);
    font-size: 32px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -.4px;
}

.stations-map-head p {
    max-width: 460px;
    margin: 0;
    color: var(--om-muted);
    font-size: 16px;
    line-height: 1.5;
    text-align: right;
}

.stations-map-card {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--om-line);
    border-radius: var(--om-radius);
    background: #fff;
}

.stations-map-card img {
    display: block;
    width: 100%;
    height: auto;
}

.stations-map-card figcaption {
    padding: 12px 16px;
    border-top: 1px solid var(--om-line);
    color: var(--om-muted);
    font-size: 14px;
    line-height: 1.4;
}


/* ============================================================
   GRIGLIA STAZIONI
   4 stazioni su desktop ampio.
   ============================================================ */

.stations-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.station-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--om-line);
    border-top: 3px solid var(--om-blue);
    border-radius: var(--om-radius);
    background: #fff;
    box-shadow: none;
}

.station-panel::before,
.station-panel::after {
    display: none;
}


/* ============================================================
   TESTATA CARD
   ============================================================ */

.station-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 25px 24px 22px;
}

.station-panel-id {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.station-panel-id > div {
    min-width: 0;
}

.station-index {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--om-line-strong);
    border-radius: 3px;
    background: #fff;
    color: var(--om-blue);
    font-size: 13px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .035em;
}

.station-panel-id small {
    display: block;
    margin: 1px 0 5px;
    color: var(--om-blue);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.station-panel-id h2 {
    margin: 0;
    color: var(--om-blue-dark);
    font-size: 25px;
    line-height: 1.08;
    letter-spacing: -.3px;
    font-weight: 700;
}

.station-panel-id p {
    margin: 6px 0 0;
    color: var(--om-muted);
    font-size: 15px;
    line-height: 1.4;
}


/* ============================================================
   STATO STAZIONE
   ============================================================ */

.station-status {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f1f3f4;
    color: #69757c;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .025em;
}

.station-status::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
    background: #9aa4aa;
}

.station-status.online {
    background: var(--om-green-soft);
    color: #337c4f;
}

.station-status.online::before {
    background: #45ab6a;
}

.station-status.offline {
    background: var(--om-red-soft);
    color: #ad474c;
}

.station-status.offline::before {
    background: #d15c62;
}


/* ============================================================
   LETTURA PRINCIPALE
   ============================================================ */

.station-reading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
    padding: 24px;
    border-top: 1px solid var(--om-line);
    border-bottom: 1px solid var(--om-line);
    background: #fff;
}

.station-temperature-wrap {
    min-width: 0;
}

.station-reading-label {
    display: block;
    color: var(--om-muted);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
}


/* Condizione meteo */

.station-condition {
    display: block;
    min-height: 22px;
    margin-top: 9px;
    color: var(--om-blue-dark);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
}


.station-temperature-line {
    display: flex;
    align-items: flex-start;
    gap: 3px;
    margin-top: 10px;
}

.station-temp {
    display: block;
    color: var(--om-blue-dark);
    font-size: 68px;
    line-height: .9;
    font-weight: 600;
    letter-spacing: -2.7px;
    transition: color .22s ease;
}


/* ============================================================
   SCALA CROMATICA TEMPERATURA
   ============================================================ */

.station-temp.is-temp-freezing {
    color: #315fca;
}

.station-temp.is-temp-cold {
    color: #2f7fce;
}

.station-temp.is-temp-cool {
    color: #249bb7;
}

.station-temp.is-temp-mild {
    color: #27956f;
}

.station-temp.is-temp-warm {
    color: #d09a18;
}

.station-temp.is-temp-hot {
    color: #e9782f;
}

.station-temp.is-temp-very-hot {
    color: #d9534f;
}


/* ============================================================
   AGGIORNAMENTO
   ============================================================ */

.station-update {
    min-width: 118px;
    padding-bottom: 3px;
    text-align: right;
}

.station-update span {
    display: block;
    color: var(--om-muted-2);
    font-size: 13px;
    line-height: 1.2;
    font-weight: 600;
}

.station-updated {
    display: block;
    margin-top: 5px;
    color: #536771;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    white-space: nowrap;
}


/* ============================================================
   METRICHE · 2 × 2
   Umidità / Dew point
   Vento / Pioggia
   ============================================================ */

.station-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 24px;
}

.station-metric {
    min-width: 0;
    padding: 17px 16px;
    border-bottom: 1px solid var(--om-line);
}

.station-metric:nth-child(odd) {
    padding-left: 0;
    border-right: 1px solid var(--om-line);
}

.station-metric:nth-child(even) {
    padding-right: 0;
}

.station-metric:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.station-metric span {
    display: block;
    color: var(--om-muted);
    font-size: 14px;
    line-height: 1.25;
}

.station-metric strong {
    display: block;
    margin-top: 5px;
    color: var(--om-blue-dark);
    font-size: 18px;
    line-height: 1.25;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.station-metric-rain strong {
    color: var(--om-blue);
}


/* ============================================================
   AZIONI
   ============================================================ */

.station-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    gap: 10px;
    margin-top: auto;
    padding: 4px 24px 24px;
}

.station-action {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease;
}

.station-action-primary {
    justify-content: space-between;
    padding: 0 16px;
    background: var(--om-blue);
    color: #fff;
}

.station-action-primary:hover {
    background: #0e6389;
}

.station-action-primary b {
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
}

.station-action-secondary {
    padding: 0 14px;
    border-color: var(--om-line-strong);
    background: #fff;
    color: #465c67;
}

.station-action-secondary:hover {
    border-color: #9fb5c0;
    background: #f7f7f7;
}


/* ============================================================
   NOTA FINALE
   ============================================================ */

.stations-footnote {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--om-line-strong);
    color: var(--om-muted);
    font-size: 15px;
    line-height: 1.45;
}

.stations-footnote strong {
    color: var(--om-blue-dark);
    font-size: 16px;
    font-weight: 700;
}


/* ============================================================
   DESKTOP LARGO · 4 COLONNE
   ============================================================ */

@media (min-width: 1181px) {

    .station-panel-top {
        flex-direction: column;
        justify-content: flex-start;
        gap: 15px;
        padding: 24px 20px 21px;
    }

    .station-panel-id {
        width: 100%;
    }

    .station-status {
        margin-left: 54px;
    }

    .station-panel-id small {
        min-height: 32px;
    }

    .station-panel-id h2 {
        min-height: 54px;
    }

    .station-panel-id p {
        min-height: 63px;
    }

    .station-reading {
        gap: 12px;
        padding: 22px 20px;
    }

    .station-condition {
        font-size: 17px;
    }

    .station-temp {
        font-size: 64px;
    }

    .station-update {
        min-width: 102px;
    }

    .station-metrics {
        padding: 0 20px;
    }

    .station-metric {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .station-metric:nth-child(odd) {
        padding-right: 10px;
    }

    .station-metric:nth-child(even) {
        padding-left: 10px;
    }

    .station-actions {
        padding: 4px 20px 20px;
    }

    .station-action {
        font-size: 14px;
    }
}


/* ============================================================
   DESKTOP / TABLET ORIZZONTALE · 2 × 2
   ============================================================ */

@media (min-width: 761px) and (max-width: 1180px) {

    .stations-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .station-panel-id small {
        min-height: 32px;
    }

    .station-panel-id h2 {
        min-height: 54px;
    }

    .station-panel-id p {
        min-height: 42px;
    }
}


/* ============================================================
   RESPONSIVE INTERMEDIO
   ============================================================ */

@media (max-width: 900px) {

    .stations-hero-inner {
        min-height: 0;
        gap: 30px;
        padding-top: 44px;
        padding-bottom: 44px;
    }

    .stations-hero h1 {
        font-size: 42px;
    }

    .stations-hero-badge {
        min-width: 165px;
        padding-left: 24px;
    }

    .stations-hero-badge strong {
        font-size: 50px;
    }

    .station-panel {
        border-top-width: 2px;
    }

    .stations-map-section {
        margin-bottom: 28px;
        padding-bottom: 24px;
    }

    .stations-map-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .stations-map-head p {
        max-width: none;
        text-align: left;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 760px) {

    .stations-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .station-panel-top {
        padding: 24px 26px 21px;
    }

    .station-reading {
        padding: 24px 26px;
    }

    .station-metrics {
        padding: 0 26px;
    }

    .station-actions {
        padding: 4px 26px 26px;
    }
}


/* ============================================================
   MOBILE COMPATTO
   ============================================================ */

@media (max-width: 620px) {

    .stations-hero-inner {
        align-items: stretch;
        flex-direction: column;
        gap: 24px;
        padding-top: 40px;
        padding-bottom: 38px;
    }

    .stations-hero .eyebrow {
        font-size: 14px;
    }

    .stations-hero h1 {
        margin-top: 7px;
        font-size: 36px;
        letter-spacing: -.5px;
    }

    .stations-hero p {
        font-size: 17px;
        line-height: 1.5;
    }

    .stations-hero-badge {
        width: 100%;
        min-width: 0;
        padding: 19px 0 0;
        border-left: 0;
        border-top: 1px solid var(--om-line);
    }

    .stations-hero-badge strong {
        font-size: 46px;
    }

    .stations-hero-badge span {
        font-size: 14px;
    }

    .stations-section {
        padding: 42px 0 48px;
    }

    .stations-map-head h2 {
        font-size: 28px;
        letter-spacing: -.3px;
    }

    .stations-map-head p {
        font-size: 15px;
    }

    .station-panel-top {
        gap: 12px;
        padding: 22px 20px 19px;
    }

    .station-panel-id {
        gap: 11px;
    }

    .station-index {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
        font-size: 12px;
    }

    .station-panel-id small {
        font-size: 12px;
    }

    .station-panel-id h2 {
        font-size: 24px;
    }

    .station-panel-id p {
        font-size: 14px;
    }

    .station-status {
        min-height: 30px;
        padding: 0 9px;
        font-size: 11px;
    }

    .station-reading {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
        padding: 22px 20px;
    }

    .station-reading-label {
        font-size: 14px;
    }

    .station-condition {
        margin-top: 8px;
        font-size: 17px;
    }

    .station-temp {
        font-size: 62px;
    }

    .station-update {
        min-width: 105px;
    }

    .station-update strong {
        font-size: 14px;
    }

    .station-update span {
        font-size: 12px;
    }

    .station-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0 20px;
    }

    .station-metric {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .station-metric:nth-child(odd) {
        padding-right: 12px;
    }

    .station-metric:nth-child(even) {
        padding-left: 12px;
    }

    .station-metric span {
        font-size: 13px;
    }

    .station-metric strong {
        font-size: 17px;
    }

    .station-actions {
        grid-template-columns: 1fr 1fr;
        padding: 4px 20px 20px;
    }

    .station-action {
        min-height: 46px;
        font-size: 14px;
    }

    .stations-footnote {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
        margin-top: 24px;
        font-size: 14px;
    }
}


/* ============================================================
   MOBILE STRETTO
   ============================================================ */

@media (max-width: 430px) {

    .station-panel-top {
        flex-wrap: wrap;
    }

    .station-status {
        margin-left: 47px;
    }

    .station-reading {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .station-update {
        min-width: 0;
        padding-top: 15px;
        border-top: 1px solid var(--om-line);
        text-align: left;
    }

    .station-updated {
        white-space: normal;
    }

    /*
     * Manteniamo le quattro metriche in 2 × 2:
     * Umidità / Dew point
     * Vento / Pioggia
     */

    .station-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .station-metric {
        display: block;
        min-width: 0;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .station-metric:nth-child(odd) {
        padding-left: 0;
        padding-right: 11px;
        border-right: 1px solid var(--om-line);
    }

    .station-metric:nth-child(even) {
        padding-left: 11px;
        padding-right: 0;
        border-right: 0;
    }

    .station-metric:nth-child(-n + 2) {
        border-bottom: 1px solid var(--om-line);
    }

    .station-metric:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .station-metric strong {
        margin-top: 5px;
        text-align: left;
    }

    .station-actions {
        grid-template-columns: 1fr;
    }
}