.weather {
    --weather-primary: #110022;
    --weather-accent: #250743;
    --weather-border: #d9d9d9;
    --weather-muted: #7c7c7c;
    --weather-bg: #f3f3f3;

    color: var(--weather-primary);

    margin-top: 10px;

    position: sticky;
    top: 170px;
}

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

.weather-hero {
    margin-bottom: 30px;
}

.weather-hero__wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    min-height: 238px;

    border: 1px solid var(--weather-border);
    border-radius: 4px;
    overflow: hidden;
    background: #eeeeee;
}

.weather-hero__content {
    padding: 38px 20px 28px;
}

.weather-hero__city {
    margin: 0 0 28px;

    font-size: 46px;
    font-weight: 400;
    line-height: 1;
    color: var(--weather-accent);
}

.weather-hero__date {
    margin-bottom: 18px;

    font-size: 18px;
    font-weight: 700;
    color: var(--weather-muted);
}

.weather-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;

    font-size: 14px;
    line-height: 1.35;
    color: var(--weather-muted);
}

.weather-hero__meta-label {
    margin-right: 4px;
}

.weather-hero__visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 18px;

    border-left: 1px solid var(--weather-border);
    background: #eeeeee;
}

.weather-hero__temp {
    margin-bottom: 30px;

    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    color: var(--weather-muted);
}

.weather-hero__icon {
    width: 112px;
    height: 112px;
}

.weather-hero__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ===============================
   FORECAST
================================= */

.weather-forecast {
    margin-bottom: 28px;
}

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

.forecast-card {
    min-height: 310px;

    display: flex;
    flex-direction: column;

    border: 1px solid var(--weather-border);
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.forecast-card__header {
    padding: 12px 10px 8px;

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

    color: var(--weather-muted);
    font-size: 16px;
    font-weight: 700;
}

.forecast-card__date,
.forecast-card__temp-range {
    white-space: nowrap;
}

.forecast-card__hours {
    flex: 1;

    border-top: 1px solid #eeeeee;

    display: grid;
    gap: 8px;

    padding: 8px 12px 14px;
}

.forecast-card__footer {
    margin: 0 12px;
    padding: 16px 0 10px;

    border-top: 1px solid #eeeeee;

    text-align: center;
    color: var(--weather-muted);
    font-size: 14px;
    line-height: 1.45;
}

.forecast-card__meta:not(:last-child) {
    margin-bottom: 2px;
}

.forecast-hour {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 92px;

    text-align: center;
}

.forecast-hour__time {
    margin-bottom: 8px;

    font-size: 14px;
    font-weight: 700;
    color: var(--weather-muted);
}

.forecast-hour__icon {
    width: 120px;
    height: 120px;
    margin-bottom: 8px;
}

.forecast-hour__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.forecast-hour__temp {
    font-size: 24px;
    font-weight: 700;
    color: var(--weather-muted);
}

/* ===============================
   CITIES
================================= */

.weather-cities {
    margin-top: 28px;
}

.weather-cities__header {
    padding: 8px 12px;

    background: var(--weather-accent);
    color: #ffffff;

    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

.weather-cities__grid {
    padding: 14px 8px 26px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 7px;
    row-gap: 3px;

    background: #ffffff;
}

.weather-city-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;

    min-height: 30px;

    text-decoration: none;
    color: var(--weather-accent);

    border-bottom: 1px solid #eeeeee;

    font-size: 16px;
    font-weight: 700;

    transition: color 0.2s ease;
}

.weather-city-card:hover {
    background-color: var(--weather-primary);
    color: #fff;
}

.weather-city-card__name {
    min-width: 0;
}

.weather-city-card__icon {
    margin-left: auto;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.weather-city-card__temp {
    font-size: 14px;
}

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

@media only screen and (max-width: 1024px) {
    .weather-forecast__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media only screen and (max-width: 768px) {
    .weather-hero__city {
        font-size: 40px;
    }

    .weather-hero__visual {
        border-left: 0;
        border-top: 1px solid var(--weather-border);
    }

    .weather-cities__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 18px;
    }
}

@media only screen and (max-width: 578px) {
    .weather-hero__content {
        padding: 28px 16px 22px;
    }

    .weather-hero__city {
        font-size: 34px;
    }

    .weather-hero__temp {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .weather-forecast__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .forecast-card__header {
        font-size: 15px;
    }

    .weather-cities__grid {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }
}

@media only screen and (max-width: 390px) {
    .weather-hero__wrapper {
        grid-template-columns: 1fr;
    }

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