:root {
    --mint: #c9f5df;
    --navy: #071f3d;
    --navy-2: #102f56;
    --navy-3: #173b68;
    --white: #f8fbff;
    --soft: #c9d8ea;
    --green: #b7d21f;
    --red: #e33b3b;
    --orange: #ffb020;
    --yellow: #ffe066;
    --dx-old: #8ea1b8;
}

/* RESET */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--navy);
    color: var(--white);
}

/* HEADER */

.departure-header {
    display: grid;
    grid-template-columns: 150px 1fr 300px;
    align-items: center;
    background: var(--mint);
    color: var(--navy);
    padding: 14px 22px;
    gap: 16px;
}

.brand {
    display: flex;
    gap: 10px;
    font-weight: 900;
    font-size: 2rem;
}

.logo-mark {
    font-size: 2rem;
}

.title-block {
    min-width: 0;
}

.screen-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 0.9;
}

.screen-subtitle {
    font-size: 1rem;
}

.clock-block {
    text-align: right;
}

.clock-time {
    font-size: 2.2rem;
    font-weight: 900;
}

.clock-date {
    font-size: 0.9rem;
}

/* GRID */

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

/* BOX */

.box {
    border-right: 2px solid #07172c;
    border-bottom: 2px solid #07172c;
}

.box-header {
    display: flex;
    justify-content: space-between;
    background: #081a32;
    padding: 10px 18px;
}

.box h2 {
    margin: 0;
    font-size: 1.8rem;
}

.count {
    font-size: 1rem;
}

/* TABLE */

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

thead {
    display: none;
}

.departure-row:nth-child(odd) {
    background: var(--navy-2);
}

.departure-row:nth-child(even) {
    background: var(--navy-3);
}

.departure-row {
    min-height: 64px;
}

td {
    padding: 12px 10px;
    vertical-align: middle;
}

/* COLUMNAS */

.col-frequency {
    width: 22%;
    padding-right: 6px;
}

.col-band {
    width: 18%;
    text-align: center;
    vertical-align: middle;
}

.col-destination {
    width: 60%;
}

/* CONTENIDO */

.freq-label {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    background: var(--red);
    color: var(--white);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1;
}

.main-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.act-label {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
}

.ref-pill {
    background: white;
    color: black;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
}

.dx-pill {
    background: var(--dx-old);
    color: var(--navy);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 900;
}

/* DX según frescura */

.departure-row.fresh .dx-pill {
    background: var(--green);
    color: var(--navy);
}

.departure-row.mid .dx-pill {
    background: var(--orange);
    color: var(--navy);
}

.departure-row.old .dx-pill {
    background: var(--dx-old);
    color: var(--navy);
}

.park-label {
    display: block;
    font-size: 1rem;
    margin-top: 2px;
    line-height: 1.15;
}

.time-label {
    font-size: 0.8rem;
    color: var(--soft);
}

/* FRESH */

.departure-row.fresh {
    box-shadow: inset 6px 0 var(--green);
}

.departure-row.mid {
    box-shadow: inset 6px 0 var(--orange);
}

.departure-row.old {
    opacity: 0.82;
}

/* EMPTY */

.empty-row {
    color: var(--soft);
    font-size: 1rem;
    font-weight: 700;
}

/* FOOTER */

.footer {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #06172c;
}

/* ========================= */
/* MÓVIL VERTICAL */
/* ========================= */

@media (max-width: 800px) and (orientation: portrait) {

    .departure-header {
        display: block;
        padding: 14px 18px;
        text-align: left;
    }

    .brand {
        font-size: 1.6rem;
        margin-bottom: 6px;
    }

    .logo-mark {
        font-size: 1.6rem;
    }

    .screen-title {
        font-size: 2.6rem;
        line-height: 0.9;
    }

    .screen-subtitle {
        font-size: 1.1rem;
        line-height: 1.1;
    }

    .clock-block {
        margin-top: 10px;
        text-align: left;
    }

    .clock-time {
        font-size: 2.6rem;
        line-height: 1;
    }

    .clock-date {
        font-size: 0.9rem;
    }

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

    .box-header {
        padding: 10px 18px;
    }

    .box h2 {
        font-size: 1.85rem;
    }

    .count {
        font-size: 1rem;
    }

    td {
        padding: 12px 8px;
    }

    .col-frequency {
        width: 24%;
        padding-left: 10px;
        padding-right: 4px;
    }

    .col-band {
        width: 16%;
        text-align: center;
    }

    .col-destination {
        width: 60%;
        padding-left: 8px;
    }

    .freq-label {
        font-size: 1.9rem;
        letter-spacing: -0.04em;
    }

    .mode-pill {
        min-width: 52px;
        padding: 6px 9px;
        font-size: 0.72rem;
    }

    .act-label {
        font-size: 1.4rem;
    }

    .ref-pill,
    .dx-pill {
        font-size: 0.72rem;
        padding: 3px 7px;
        border-radius: 8px;
    }

    .park-label {
        font-size: 0.95rem;
        white-space: normal;
    }

    .time-label {
        font-size: 0.78rem;
    }

    .empty-row {
        padding: 14px 18px;
        font-size: 1rem;
    }

    .footer {
        display: block;
        text-align: center;
        font-size: 0.7rem;
        line-height: 1.35;
    }

    .footer span {
        display: block;
        margin: 2px 0;
    }
}

/* ========================= */
/* MÓVIL APAISADO */
/* ========================= */

@media (max-width: 950px) and (orientation: landscape) {

    .departure-header {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr) 210px;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
    }

    .brand {
        font-size: 1.4rem;
    }

    .logo-mark {
        font-size: 1.4rem;
    }

    .screen-title {
        font-size: 2.3rem;
        line-height: 0.9;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .screen-subtitle {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .clock-time {
        font-size: 1.8rem;
        line-height: 1;
    }

    .clock-date {
        font-size: 0.75rem;
    }

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

    td {
        padding: 9px 6px;
    }

    .col-frequency {
        width: 27%;
    }

    .col-band {
        width: 18%;
    }

    .col-destination {
        width: 55%;
    }

    .freq-label {
        font-size: 1.4rem;
    }

    .mode-pill {
        min-width: 48px;
        padding: 5px 8px;
        font-size: 0.68rem;
    }

    .act-label {
        font-size: 1.15rem;
    }

    .ref-pill,
    .dx-pill {
        font-size: 0.62rem;
        padding: 2px 5px;
    }

    .park-label {
        font-size: 0.8rem;
    }

    .time-label {
        font-size: 0.68rem;
    }
}
