.city-weather {
    max-width: 1100px;
    margin: 30px auto;
    padding: 26px;
    border-radius: 22px;
    background: linear-gradient(180deg,#16263a,#0e1a29);
    color: #ffffff;
}

.city-weather h3 {
    font-size: 26px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.weather-today {
    line-height: 1.75;
    font-size: 15px;
    margin-bottom: 18px;
}

.alert-bar {
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: bold;
    margin: 14px 0;
    text-align: center;
}

.alert-wind {
    background: linear-gradient(90deg, #7a2d2d, #a94444);
    animation: pulse-wind 2s infinite;
}

.alert-air-good {
    background: linear-gradient(90deg, #1f6f4a, #2fa66d);
}

@keyframes pulse-wind {
    0% { box-shadow: 0 0 0 rgba(255,80,80,0.4); }
    50% { box-shadow: 0 0 20px rgba(255,80,80,0.75); }
    100% { box-shadow: 0 0 0 rgba(255,80,80,0.4); }
}

/* ===== POWIETRZE ===== */

.air-grid {
    display: grid;
    gap: 18px;
    margin: 22px 0;
}

.air-grid-4 {
    grid-template-columns: repeat(4,1fr);
}

.air-tile {
    border-radius: 18px;
    padding: 18px;
    background: rgba(255,255,255,0.06);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
}

.pm-val strong {
    font-size: 30px;
    display: block;
    margin-top: 6px;
    text-shadow: 0 0 10px rgba(255,255,255,0.25);
}

.pm-val.good strong { color: #2ecc71; }
.pm-val.moderate strong { color: #f39c12; }
.pm-val.bad strong { color: #e74c3c; }

/* ===== LEGENDA ===== */

.pm-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    opacity: 0.85;
}

.pm-row {
    font-weight: 600;
    padding: 2px 0;
    text-shadow: 0 0 6px rgba(255,255,255,0.18);
}

.pm-row.good { color: #2ecc71; }
.pm-row.moderate { color: #f39c12; }
.pm-row.bad { color: #e74c3c; }

/* ===== PROGNOZA ===== */

.forecast-5d {
    display: grid;
    grid-template-columns: repeat(5,1fr);
    gap: 16px;
    margin-top: 24px;
}

.forecast-day {
    background: rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 16px 12px;
    text-align: center;
    font-size: 13px;
}

.forecast-day .icon {
    font-size: 24px;
    margin: 8px 0;
}

/* ===== RESPONSYWNOŚĆ ===== */

@media (max-width: 900px) {
    .air-grid-4 {
        grid-template-columns: repeat(2,1fr);
    }
}

/* ===== KAFELKI – POGODA DZIŚ ===== */

.weather-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
}

.weather-tile {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 6px 6px;
    text-align: center;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.weather-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.weather-tile span {
    opacity: 0.75;
    font-size: 12px;
}

.weather-tile strong {
    font-size: 18px;
    font-weight: 700;
}

.weather-tile.wide {
    grid-column: span 3;
}

/* RESPONSYWNOŚĆ */
@media (max-width: 900px) {
    .weather-tiles {
        grid-template-columns: repeat(2, 1fr);
    }

    .weather-tile.wide {
        grid-column: span 2;
    }
}

/* ===== HOVER GLOW – KAFELKI POGODY ===== */

.weather-tile {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}

/* Desktop hover */
@media (hover: hover) and (pointer: fine) {
    .weather-tile:hover {
        transform: translateY(-2px);
        border-color: rgba(255,255,255,0.18);
        box-shadow:
            0 0 0 1px rgba(255,255,255,0.05),
            0 6px 16px rgba(0,0,0,0.45),
            0 0 14px rgba(100,180,255,0.35);
    }
}

/* =====================================================
   INLINE POGODA POD MIASTEM – NADPISANIE LAYOUTU
   (NIC INNEGO NIE ZMIENIA WYGLĄDU)
   ===================================================== */

#city-weather {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 12px 0 20px 0;
    box-sizing: border-box;
}

/* nadpisanie starego centrowania */
#city-weather.city-weather {
    max-width: 100%;
    margin: 12px 0 20px 0;
}

/* zabezpieczenie przed wychodzeniem */
#city-weather * {
    box-sizing: border-box;
}

/* przycisk zamknięcia */
.weather-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: none;
    color: #9fb3d9;
    cursor: pointer;
    font-size: 14px;
    z-index: 2;
}

.weather-close:hover {
    color: #ffffff;
}
/* =====================================================
   POGODA POD MIASTEM – PEŁNA SZEROKOŚĆ LISTY MIAST
   ===================================================== */

/* lista miast jest gridem – karta ma zająć cały wiersz */
.cities #city-weather {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
    margin: 14px 0 22px 0;
}

/* jeśli .cities jest flexem (zabezpieczenie) */
.cities {
    align-items: stretch;
}
