/* ============================================================
   WeatherPro — шаблон главной страницы
   (стили вынесены из indexmeteo.html)
   ============================================================ */

:root {
    --weather-dark: #0b1728;
    --weather-dark-light: #122944;
    --weather-blue: #2196f3;
    --weather-blue-light: #eaf5ff;
    --weather-text: #16263b;
    --weather-muted: #7d8da1;
    --weather-border: #e4ebf3;
    --weather-bg: #f4f8fc;
}

.site-header {
    background: var(--weather-dark);
    color: #fff;
}

.navbar {
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
    text-decoration: none;
}

.brand:hover {
    color: #fff;
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #5bc5ff, #2165e9);
    font-size: 25px;
}

.brand small {
    display: block;
    color: #91a5bc;
    font-size: 11px;
    font-weight: 400;
    margin-top: 2px;
}

.main-nav .nav-link {
    color: #c2d0df;
    font-size: 14px;
    padding: 27px 15px !important;
    border-bottom: 3px solid transparent;
}

.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: #fff;
    border-bottom-color: #43b8ff;
}

.city-search {
    position: relative;
    width: 280px;
}

.city-search input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 42px;
    border: 1px solid #2c4764;
    border-radius: 12px;
    background: #1a3553;
    color: #fff;
    outline: none;
}

.city-search input::placeholder {
    color: #a8bad0;
}

.city-search input:focus {
    border-color: #43b8ff;
    box-shadow: 0 0 0 3px rgba(67, 184, 255, .14);
}

.city-search .search-icon {
    position: absolute;
    left: 15px;
    top: 11px;
    color: #c6d8eb;
    pointer-events: none;
}

.city-search .suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    overflow: hidden;
    display: none;
    z-index: 60;
    max-height: 340px;
    overflow-y: auto;
}

.city-search .suggest.open { display: block; }

.city-search .suggest-item {
    padding: 11px 14px;
    cursor: pointer;
    font-size: 14px;
    color: var(--weather-text);
    border-bottom: 1px solid var(--weather-border);
}

.city-search .suggest-item:hover { background: var(--weather-blue-light); }

.city-search .suggest-item .s-sub { color: var(--weather-muted); font-size: 12px; }

.weather-hero {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            90deg,
            rgba(7, 27, 49, 1) 0%,
            rgba(8, 38, 69, .94) 42%,
            rgba(13, 67, 108, .55) 100%
        );
    color: #fff;
}

.weather-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(33, 150, 243, .16),
        transparent 55%
    );
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 48px 0;
}

.location-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 32px;
    font-weight: 700;
}

.location-country {
    color: #b8cadc;
    font-size: 14px;
}

.current-date {
    margin-top: 20px;
    color: #c3d5e7;
    font-size: 15px;
}

.current-weather {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 25px;
}

.weather-icon-large {
    color: #ffd34d;
    font-size: 105px;
    line-height: 1;
}

.weather-icon-large svg {
    width: 105px;
    height: 105px;
    overflow: visible;
}

.temperature {
    font-size: 82px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -3px;
}

.weather-state {
    margin-top: 12px;
    font-size: 22px;
    font-weight: 600;
}

.feels-like {
    margin-top: 8px;
    color: #b9cde1;
    font-size: 14px;
}

.weather-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    gap: 16px 28px;
    margin-top: 28px;
    padding-left: 30px;
    border-left: 1px solid rgba(255, 255, 255, .24);
}

.weather-detail {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-detail i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #72c8ff;
    font-size: 23px;
}

.weather-detail svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.weather-detail-label {
    color: #a8bfd5;
    font-size: 12px;
    margin-bottom: 3px;
}

.weather-detail-value {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.favorite-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, .97);
    color: var(--weather-text);
    border-radius: 16px;
    padding: 23px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, .13);
}

.favorite-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
}

.favorite-edit {
    float: right;
    color: #2196f3;
    font-size: 12px;
}

.favorite-city {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #e7edf4;
    color: var(--weather-text);
    cursor: pointer;
}

.favorite-city:hover { background: var(--weather-blue-light); }

.favorite-city:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.favorite-city:first-of-type {
    padding-top: 8px;
}

.favorite-city-icon {
    width: 35px;
    color: #f8b900;
    font-size: 23px;
    text-align: center;
}

.favorite-city-name {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
}

.favorite-city-temp {
    font-size: 14px;
    font-weight: 700;
}

.favorite-city-arrow {
    color: #8a9bad;
    font-size: 13px;
}

.section-space {
    padding: 22px 0;
}

.weather-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--weather-border);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(24, 52, 84, .035);
}

.weather-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 20px 14px;
}

.weather-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.weather-card-link {
    color: var(--weather-blue);
    font-size: 12px;
    font-weight: 600;
}

.hourly-scroll {
    display: flex;
    overflow-x: auto;
    padding: 8px 15px 20px;
}

.hour-item {
    min-width: 110px;
    flex: 1;
    padding: 14px 10px;
    text-align: center;
    border-right: 1px solid #e8eef5;
    flex-shrink: 0;
}

.hour-item:hover { background: var(--weather-blue-light); }

.hour-item:last-child {
    border-right: 0;
}

.hour-time {
    color: #5e7187;
    font-size: 13px;
    font-weight: 700;
}

.hour-icon {
    margin: 18px 0 14px;
    font-size: 30px;
}

.hour-icon svg {
    width: 44px;
    height: 44px;
    overflow: visible;
}

/* Цвета иконок по типу погоды */
.hour-icon.wi-sun { color: #ffb300; }
.hour-icon.wi-partly { color: #f5a623; }
.hour-icon.wi-cloudy { color: #8ba3c7; }
.hour-icon.wi-fog { color: #9fb0c4; }
.hour-icon.wi-rain { color: #2f80ed; }
.hour-icon.wi-snow { color: #5b8dd9; }
.hour-icon.wi-thunder { color: #7c5cd6; }

/* Разделитель дня в почасовой шкале */
.hour-day-sep {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    padding: 6px 12px;
    margin: 0 2px;
    background: var(--weather-blue-light);
    border-radius: 12px;
    text-align: center;
}

.hour-day-sep .hds-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--weather-text);
}

.hour-day-sep .hds-weekday {
    margin-top: 3px;
    font-size: 11px;
    color: var(--weather-muted);
    text-transform: capitalize;
}

.hour-temp {
    font-size: 19px;
    font-weight: 700;
}

.hour-rain {
    margin-top: 12px;
    color: #2499ee;
    font-size: 12px;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    padding: 8px 12px 18px;
}

.forecast-day {
    min-width: 0;
    padding: 18px 10px;
    border: 1px solid #e5edf5;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.forecast-day:hover {
    border-color: var(--weather-blue);
    transform: translateY(-2px);
}

.forecast-day.today {
    background: #edf7ff;
    border-color: #b9e0ff;
}

.forecast-day.selected {
    background: #dceeff;
    border-color: var(--weather-blue);
    box-shadow: 0 4px 14px rgba(33, 150, 243, .22);
}

.forecast-name {
    font-size: 13px;
    font-weight: 700;
}

.forecast-date {
    margin-top: 5px;
    color: #91a0b1;
    font-size: 11px;
}

.forecast-icon {
    margin: 18px 0;
    font-size: 34px;
}

.forecast-icon svg {
    width: 48px;
    height: 48px;
    overflow: visible;
}

.forecast-temp-day {
    font-size: 20px;
    font-weight: 700;
}

.forecast-temp-night {
    margin-top: 4px;
    color: #8798aa;
    font-size: 13px;
}

.forecast-rain {
    margin-top: 18px;
    color: #2196f3;
    font-size: 12px;
}

.forecast-wind {
    margin-top: 13px;
    color: #60768c;
    font-size: 11px;
}

.sun-card {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    height: 100%;
    border-radius: 14px;
    padding: 24px;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            rgba(10, 28, 53, .55),
            rgba(11, 53, 87, .78)
        ),
        url("https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?auto=format&fit=crop&w=900&q=85")
        center / cover;
}

.sun-card h3 {
    margin: 0 0 26px;
    font-size: 18px;
    font-weight: 700;
}

.sun-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.sun-row i {
    color: #ffd34d;
    font-size: 30px;
}

.sun-row .sun-svg svg {
    width: 58px;
    height: 58px;
    display: block;
}

.sun-label {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

.sun-value {
    margin-top: 4px;
    font-size: 17px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

.sun-day-length {
    position: absolute;
    right: 20px;
    bottom: 22px;
    color: #eef4fb;
    font-size: 13px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

.sun-extra {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.sun-extra-row {
    margin-bottom: 12px;
}

.sun-extra-row .sun-svg svg {
    width: 46px;
    height: 46px;
}

.sun-extra-row .sun-svg.sun-records {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffd34d;
    font-size: 26px;
}

.sun-extra-row .sun-label.sun-sub {
    font-size: 12px;
    color: #d9e6f2;
    margin-top: 2px;
}

.details-card {
    background: var(--weather-dark-light);
    border-radius: 14px;
    padding: 20px;
    color: #fff;
    height: 100%;
}

.details-card h3 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 700;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-row i {
    width: 24px;
    color: #7acbff;
    font-size: 19px;
}

.detail-row svg {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.detail-row span {
    flex: 1;
    color: #a9bfd5;
    font-size: 12px;
}

.detail-row strong {
    color: #fff;
    font-size: 12px;
}

.map-card {
    min-height: 275px;
    height: 520px;
    overflow: hidden;
    position: relative;
    border-radius: 14px;
    background:
        linear-gradient(
            rgba(7, 38, 62, .25),
            rgba(7, 38, 62, .5)
        ),
        url("https://images.unsplash.com/photo-1524666041070-9b8769b3f7c5?auto=format&fit=crop&w=1300&q=85")
        center / cover;
}

.map-card .radar-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-card-title {
    position: absolute;
    top: 20px;
    left: 22px;
    color: #d7eaff;
    font-size: 18px;
    font-weight: 700;
    z-index: 400;
    background: rgba(12, 43, 72, .88);
    border-radius: 10px;
    padding: 6px 12px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* Кнопки-вкладки (шаблон WeatherPro) */
.map-control {
    position: absolute;
    top: 52px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    z-index: 3;
}

.map-control button {
    min-width: 135px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 20px;
    background: rgba(12, 43, 72, .88);
    color: #d7eaff;
    font-size: 12px;
    text-align: left;
    cursor: pointer;
    transition: background .15s;
}

.map-control button:hover {
    background: rgba(12, 43, 72, .97);
}

.map-control button.active {
    background: #2196f3;
    color: #fff;
}

.radar-map {
    height: 520px;
}

.radar-timeline-wrap {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 18px;
    z-index: 2;
    background: rgba(12, 43, 72, .85);
    border-radius: 12px;
    padding: 10px 14px 8px;
}

.radar-timeline-wrap .d-flex {
    color: #d7eaff;
    font-size: 12px;
}

.radar-time {
    color: #43b8ff;
    font-weight: 700;
}

.map-time {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    background: rgba(12, 43, 72, .8);
    color: #d7eaff;
    border-radius: 8px;
    padding: 3px 10px;
}

.map-note {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 2;
    background: rgba(12, 43, 72, .85);
    color: #ffd76a;
    border-radius: 8px;
    padding: 4px 10px;
}

.news-list {
    padding: 0 20px 15px;
}

.news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e6edf4;
}

.news-item:last-child {
    border-bottom: 0;
}

.news-image {
    width: 82px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 9px;
    object-fit: cover;
}

.news-title {
    color: #25384e;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.news-date {
    margin-top: 6px;
    color: #9aa8b7;
    font-size: 10px;
}

.site-footer {
    margin-top: 30px;
    padding: 28px 0;
    background: var(--weather-dark);
    color: #a8bad0;
}

.footer-brand {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.footer-text {
    margin-top: 7px;
    font-size: 12px;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 22px;
}

.footer-links a {
    color: #a8bad0;
    font-size: 12px;
}

.footer-links a:hover {
    color: #fff;
}

.search-message {
    display: none;
    margin-top: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    background: #fff3cd;
    color: #856404;
    font-size: 13px;
}

/* ===== Дополнительно к шаблону (данные из API) ===== */

/* Дневная температура с плюсом/минусом */
.temp-sign-pos { color: #e53935; }
.temp-sign-neg { color: #1e88e5; }

/* Заголовок города + кнопка геолокации */
.location-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.geo-btn-template {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 10px;
    color: #fff;
    padding: 7px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}

.geo-btn-template:hover { background: rgba(255, 255, 255, .28); }

/* Избранные города — динамические */
.favorite-city .favorite-city-temp {
    min-width: 44px;
    text-align: right;
}

/* Пустые/загрузочные состояния */
.dim { opacity: .5; }

/* Секции (для скролл-якорей) */
section[id] { scroll-margin-top: 90px; }

@media (max-width: 1199px) {
    .main-nav .nav-link {
        padding-left: 9px !important;
        padding-right: 9px !important;
    }

    .city-search {
        width: 220px;
    }

    .temperature {
        font-size: 65px;
    }

    .weather-icon-large {
        font-size: 82px;
    }

    .weather-details {
        padding-left: 20px;
        gap: 14px;
    }
}

@media (max-width: 991px) {
    .main-nav .nav-link {
        padding: 12px 0 !important;
        border-bottom: 0;
    }

    .city-search {
        width: 100%;
        margin-top: 15px;
    }

    .navbar {
        padding: 14px 0;
    }

    .hero-content {
        padding: 35px 0;
    }

    .favorite-card {
        margin-top: 25px;
    }

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

    .weather-details {
        margin-top: 30px;
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 575px) {
    .location-title {
        font-size: 27px;
    }

    .current-weather {
        gap: 14px;
    }

    .weather-icon-large {
        font-size: 65px;
    }

    .temperature {
        font-size: 52px;
        letter-spacing: -1px;
    }

    .weather-state {
        font-size: 17px;
    }

    .weather-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px 10px;
    }

    .weather-detail {
        gap: 8px;
    }

    .weather-detail i {
        font-size: 20px;
    }

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

    .forecast-day {
        padding: 16px 10px;
    }

    .footer-links {
        justify-content: flex-start;
        margin-top: 20px;
    }
}

/* ============================================================
   ABOUT BLOCK (О Погода.ВебКросс)
   ============================================================ */

.about-stats { margin-bottom: 1rem; }

.about-stat {
    background: #f6f9ff;
    border: 1px solid var(--weather-border);
    border-radius: 12px;
    padding: .7rem .8rem;
    text-align: center;
    height: 100%;
}

.about-stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--weather-blue);
}

.about-stat-label {
    font-size: .7rem;
    color: var(--weather-muted);
    margin-top: 2px;
}

.about-sources { margin-bottom: 1rem; }
.about-sources-title {
    font-size: .72rem;
    font-weight: 600;
    color: var(--weather-muted);
    margin-bottom: .4rem;
}

.about-source {
    background: var(--weather-blue-light);
    color: var(--weather-blue);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: .72rem;
    font-weight: 600;
}
