/**
 * FILE: assets/css/frontend.css
 * Frontend Styles - OPTIMIZED VERSION
 * Đã loại bỏ các styles trùng lặp và tối ưu cấu trúc
 */

/* ===== GLOBAL OVERRIDES ===== */
.site-content {
    display: block !important;
}

.entry-title {
    font-size: 28px !important;
}

/* ===== BADGES & NOTICES ===== */
.location-info-badge {
    margin: 10px 0 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #46b450;
    color: white;
}

.badge-info {
    background-color: #0073aa;
    color: white;
}

.badge-warning {
    background-color: #ffb900;
    color: #333;
}

.badge-primary {
    background-color: #667eea;
    color: white;
}

.notice {
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notice-info {
    border-left-color: #0073aa;
    background-color: #e5f5fa;
}

.notice-warning {
    border-left-color: #ffb900;
    background-color: #fff8e5;
}

.notice-success {
    border-left-color: #46b450;
    background-color: #ecf7ed;
}

.notice p {
    margin: 0;
}

.notice ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.notice li {
    margin: 5px 0;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumb a {
    color: #df7e6d;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #333;
}

/* ===== FORECAST NAVIGATION ===== */
.forecast-navigation {
    display: flex;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.forecast-nav-item {
    padding: 5px 20px;
    background: #f5f5f5;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.forecast-nav-item:hover {
    background: #e0e0e0;
    color: #000;
    transform: translateY(-2px);
}

.forecast-nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* ===== WEATHER SECTIONS ===== */
.weather-section {
    margin: 40px 0;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.weather-section h2 {
    font-size: 28px;
    margin: 0 0 10px 0;
    color: #333;
}

.weather-section h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #444;
}

.weather-section .section-desc,
.section-desc {
    color: #666;
    font-size: 15px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ===== CURRENT WEATHER ===== */
.vn-weather-current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.vn-weather-icon img {
    width: 150px;
    height: 150px;
}

.vn-weather-temp {
    font-size: 72px;
    font-weight: bold;
    line-height: 1;
    margin: 20px 0;
}

.temp-value {
    font-size: 64px;
    font-weight: bold;
    color: #fff;
}

.temp-unit {
    font-size: 36px;
    vertical-align: top;
    color: #fff;
}

.vn-weather-desc {
    font-size: 24px;
    text-transform: capitalize;
    margin-bottom: 30px;
    color: #fff;
}

.vn-weather-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.detail-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.detail-item .label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    color: #fff;
}

.detail-item .value {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #fff;
}

.vn-weather-updated {
    margin-top: 20px;
    font-size: 12px;
    opacity: 0.8;
    color: #fff;
}

/* ===== HOURLY FORECAST ===== */
.vn-weather-hourly-forecast,
.vn-weather-three-hour-forecast {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    margin: 20px 0;
}

.hourly-scroll-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.hourly-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.hourly-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.hourly-scroll-container::-webkit-scrollbar-thumb {
    background: #dddddd;
    border-radius: 10px;
}

.hourly-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #c8c8c8;
}

.forecast-hour {
    min-width: 100px;
    flex: 0 0 120px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

.forecast-hour:hover {
    background: #e9ecef;
    transform: translateY(-3px);
}

.hour-time {
    margin-bottom: 10px;
}

.hour-time strong {
    display: block;
    font-size: 16px;
    color: #333;
}

.hour-time small {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.hour-icon img {
    width: 60px;
    height: 60px;
}

.hour-temp {
    font-size: 18px;
    font-weight: bold;
    color: #df7e6d;
    margin: 8px 0;
}

.hour-rain {
    font-size: 12px;
    color: #4a90e2;
    margin-top: 5px;
}

.hour-desc {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    text-transform: capitalize;
}

/* ===== HOURLY BY DAY ===== */
.vn-weather-hourly-by-day {
    margin-top: 30px;
}

.hourly-day-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.hourly-day-section .day-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #df7e6d;
}

.hourly-detail-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px dashed #eee;
}

.hourly-detail-section h3 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #333;
}

/* ===== DAILY FORECAST ===== */
.vn-weather-daily-forecast {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.forecast-day {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.forecast-day:hover {
    background: #e8e8e8;
    transform: translateY(-5px);
}

.day-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 14px;
}

.day-icon img {
    width: 80px;
    height: 80px;
}

.day-temp {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    margin: 15px 0;
}

.temp-max {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 22px;
}

.temp-min {
    color: #4ecdc4;
    font-size: 18px;
}

.day-desc {
    font-size: 13px;
    color: #666;
    text-transform: capitalize;
    margin: 8px 0;
}

.day-rain {
    margin: 10px 0;
    color: #df7e6d;
    font-size: 12px;
}

.day-extra {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.day-extra small {
    font-size: 11px;
    color: #999;
}

/* ===== PROVINCES GRID ===== */
.vn-weather-provinces-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.vn-weather-provinces-grid.columns-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.vn-weather-provinces-grid.columns-3 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.vn-weather-provinces-grid.columns-4 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.province-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.province-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.province-item a {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: inherit;
}

.province-weather {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.province-weather img {
    width: 48px;
    height: 48px;
}

.province-temp {
    font-size: 24px;
    font-weight: bold;
    color: #df7e6d;
}

.province-name {
    margin: 0;
    font-size: 18px;
    text-align: center;
    color: #333;
}

/* ===== CHILD LOCATIONS ===== */
.child-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.child-location-item {
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.child-location-item:hover {
    background: #e9ecef;
}

.child-location-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    text-decoration: none;
    color: #333;
}

.child-temp {
    font-weight: bold;
    color: #df7e6d;
}

/* ===== LOCATION STATS ===== */
.location-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.stat-item strong {
    color: #df7e6d;
}

/* ===== SEO CONTENT ===== */
.seo-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-top: 40px;
}

.seo-content h3 {
    color: #333;
    margin-bottom: 15px;
}

.seo-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
}


/* ===== HIGHLIGHT CURRENT HOUR ===== */
.forecast-hour.current-hour {
    background: linear-gradient(135deg, #d96369 0%, #f2ca77 100%);
    color: white;
    position: relative;
}

.forecast-hour.current-hour:hover {
    background: linear-gradient(135deg, #d96369 0%, #f6dda6 100%);
    transform: scale(1.05);
}

.forecast-hour.current-hour .hour-time strong,
.forecast-hour.current-hour .hour-time small,
.forecast-hour.current-hour .hour-temp,
.forecast-hour.current-hour .hour-rain {
    color: white;
}

.forecast-hour.current-hour .hour-rain {
    color: rgba(255, 255, 255, 0.9);
}


/* ===== DAILY WEATHER LIST VERTICAL ===== */
.weather-item {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.weather-item:hover {
    background-color: #fafafa;
}

.weather-item:last-child {
    border-bottom: none;
}

.date-col {
    min-width: 70px;
}

.date-label {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    display: block;
    margin-bottom: 2px;
}

.date-number {
    font-size: 13px;
    color: #666;
}

.icon-col {
    min-width: 30px;
    max-width: 50px;
    text-align: center;
    font-size: 32px;
}

.temp-col {
    min-width: 100px;
}

.temp-high {
    font-size: 32px;
    font-weight: 600;
    color: #df7e6d;
}

.temp-low {
    font-size: 18px;
    color: #999;
    margin-left: 4px;
}

.description-col {
    flex: 1;
    padding: 0 20px;
}

.description-main {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.description-sub {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
}

.description-sub i {
    margin-right: 6px;
    font-size: 14px;
}

.humidity-col {
    min-width: 60px;
    text-align: right;
    color: #666;
    font-size: 13px;
}

.humidity-col i {
    margin-right: 4px;
    color: #4a90e2;
}

/* Weather icons colors */
.icon-rain {
    color: #5b9bd5;
}

.icon-sun {
    color: #ffa726;
}

.icon-partly-cloudy {
    color: #ffa726;
}

.icon-cloudy {
    color: #90a4ae;
}

.icon-warm {
    color: #ff7043;
}

@media (max-width: 768px) {
    .description-col {
        display: none;
    }
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .vn-weather-current {
        padding: 25px;
    }

    .vn-weather-temp,
    .temp-value {
        font-size: 48px;
    }

    .vn-weather-desc {
        font-size: 18px;
    }

    .vn-weather-details {
        grid-template-columns: repeat(2, 1fr);
    }

    .forecast-navigation {
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .forecast-nav-item {
        padding: 5px 15px;
        font-size: 14px;
    }

    .vn-weather-daily-forecast {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .forecast-hour {
        min-width: 80px;
        flex: 0 0 100px;
    }

    .vn-weather-provinces-grid.columns-3,
    .vn-weather-provinces-grid.columns-4 {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .weather-section {
        padding: 20px;
    }

    .location-info-badge {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .vn-weather-current {
        padding: 20px;
    }

    .vn-weather-temp,
    .temp-value {
        font-size: 36px;
    }

    .vn-weather-desc {
        font-size: 16px;
    }

    .forecast-navigation {
        gap: 10px;
        padding: 10px;
    }

    .forecast-nav-item {
        padding: 5px 10px;
        font-size: 16px;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .forecast-navigation,
    .breadcrumb {
        display: none;
    }
}