/* =====================================================================
   HAYAT — WEATHER MODULE CSS
   Version: 2.0 (Hayat adapted — weather only)
   ===================================================================== */

/* ===================================
   PAGE WRAPPER
=================================== */

.weather-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 12px 30px;
    direction: rtl;
    font-family: 'JameelNoori', 'Noto Nastaliq Urdu', serif;
    box-sizing: border-box;
}

/* ===================================
   HEADER — "موسم" + Back button
=================================== */

.weather-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 4px 18px;
    border-bottom: 1px solid #e8edf2;
    margin-bottom: 16px;
}

.weather-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #dce8df;
    border-radius: 12px;
    background: #fff;
    color: #0B6B3A;
    font-size: 20px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
    flex-shrink: 0;
}

.weather-back:hover {
    background: #f0f8f2;
    transform: translateX(2px);
}

.weather-back:active {
    transform: scale(.96);
}

.weather-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1d2922;
    line-height: 1.3;
}

/* ===================================
   CURRENT WEATHER CARD
=================================== */

#weatherCard.weather-current {
    margin: 0 0 20px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.fk-weather-top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 22px 24px;
    min-height: 130px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #ffffff;
    border-radius: 18px;
    box-sizing: border-box;
}

#weatherLocation {
    flex: 1 1 100%;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 8px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

#weatherIcon {
    font-size: 72px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 80px;
}

#weatherTemp {
    font-size: 52px;
    font-weight: 700;
    font-family: Arial, sans-serif;
    line-height: 1;
    color: #ffffff;
    flex: 0 0 auto;
    text-align: center;
}

#weatherDesc {
    flex: 1 1 100%;
    font-size: 17px;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    margin-top: 8px;
    line-height: 1.5;
}

/* Small-screen tightening */
@media (max-width: 480px) {
    .fk-weather-top {
        padding: 18px 16px;
        min-height: 115px;
    }
    #weatherLocation { font-size: 14px; }
    #weatherIcon     { font-size: 58px; }
    #weatherTemp     { font-size: 42px; }
    #weatherDesc     { font-size: 15px; }
}

/* ===================================
   SECTION WRAPPER
=================================== */

.weather-section {
    margin: 0 0 20px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.weather-section h2 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #1d2922;
    border-bottom: 1px dashed #e0e7ea;
    line-height: 1.4;
    font-family: 'JameelNoori', 'Noto Nastaliq Urdu', serif;
}

/* ===================================
   HOURLY FORECAST — horizontal scroll
=================================== */

.hourly-forecast {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 2px 10px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.hourly-forecast::-webkit-scrollbar {
    height: 6px;
}

.hourly-forecast::-webkit-scrollbar-track {
    background: #f0f4f1;
    border-radius: 10px;
}

.hourly-forecast::-webkit-scrollbar-thumb {
    background: #c8d6cc;
    border-radius: 10px;
}

.fk-hour {
    flex: 0 0 auto;
    min-width: 78px;
    padding: 12px 8px;
    text-align: center;
    background: #f8fbf9;
    border: 1px solid #e6ece8;
    border-radius: 14px;
    transition: background .15s ease, transform .15s ease;
}

.fk-hour:hover {
    background: #eef7f1;
    transform: translateY(-2px);
}

.fk-hour small {
    display: block;
    color: #7b8a80;
    font-size: 12px;
    font-family: Arial, sans-serif;
    font-weight: 600;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}

.fk-hour div {
    font-size: 26px;
    line-height: 1;
    margin: 6px 0;
}

.fk-hour b {
    display: block;
    color: #1d2922;
    font-size: 16px;
    font-weight: 700;
    font-family: Arial, sans-serif;
}

/* ===================================
   WEEKLY FORECAST — 7 day list
=================================== */

.weekly-forecast {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.fk-day {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    padding: 12px 6px;
    border-bottom: 1px solid #eef2f0;
    font-size: 15px;
    color: #33423a;
}

.fk-day:last-child {
    border-bottom: none;
}

.fk-day span:first-child {
    font-weight: 600;
    color: #1d2922;
    font-family: 'JameelNoori', 'Noto Nastaliq Urdu', serif;
}

.fk-day span:nth-child(2) {
    font-size: 26px;
    line-height: 1;
    text-align: center;
}

.fk-day span:last-child {
    text-align: left;
    font-weight: 600;
    font-family: Arial, sans-serif;
    color: #263238;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ===================================
   DETAILS — feels/humidity/wind/...
=================================== */

.weather-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 4px;
}

@media (max-width: 700px) {
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 420px) {
    .weather-details {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

.weather-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 14px 8px;
    min-height: 82px;
    text-align: center;
    background: #f8fbf9;
    border: 1px solid #e6ece8;
    border-radius: 14px;
    font-size: 15px;
    color: #1d2922;
    line-height: 1.4;
    box-sizing: border-box;
    transition: background .15s ease;
}

.weather-detail:hover {
    background: #eef7f1;
}

.weather-detail::before {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #7b8a80;
    font-family: 'JameelNoori', 'Noto Nastaliq Urdu', serif;
}

/* per-detail labels via ::before */
#weatherFeels::before       { content: "محسوس"; }
#weatherHumidity::before    { content: "نمی"; }
#weatherWind::before        { content: "ہوا"; }
#weatherDirection::before   { content: "سمت"; }
#weatherRain::before        { content: "بارش"; }
#weatherSunrise::before     { content: "طلوع"; }
#weatherSunset::before      { content: "غروب"; }

/* value styling */
.weather-detail > * {
    font-family: Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #1d2922;
    direction: ltr;
    unicode-bidi: isolate;
}

/* ===================================
   MOBILE — full width, tighter padding
=================================== */

@media (max-width: 600px) {
    .weather-page {
        padding: 0 8px 24px;
    }

    .weather-header {
        padding: 12px 2px 14px;
    }

    .weather-header h1 {
        font-size: 20px;
    }

    .weather-back {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .weather-section {
        padding: 14px 14px;
        border-radius: 14px;
    }

    .weather-section h2 {
        font-size: 16px;
    }

    .fk-day {
        padding: 11px 4px;
        font-size: 14px;
    }

    .fk-day span:nth-child(2) {
        font-size: 24px;
    }

    .weather-detail {
        padding: 12px 6px;
        min-height: 74px;
    }

    .weather-detail > * {
        font-size: 15px;
    }
}

/* ===================================
   DARK MODE
=================================== */

body.dark-mode .weather-page {
    color: #e5e7eb;
}

body.dark-mode .weather-header {
    border-bottom-color: #374151;
}

body.dark-mode .weather-header h1 {
    color: #e5e7eb;
}

body.dark-mode .weather-back {
    background: #1f2937;
    border-color: #374151;
    color: #a7f3d0;
}

body.dark-mode .weather-back:hover {
    background: #374151;
}

body.dark-mode .weather-section {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

body.dark-mode .weather-section h2 {
    color: #e5e7eb;
    border-bottom-color: #374151;
}

body.dark-mode .fk-hour {
    background: #111827;
    border-color: #374151;
}

body.dark-mode .fk-hour:hover {
    background: #1f2937;
}

body.dark-mode .fk-hour small {
    color: #9ca3af;
}

body.dark-mode .fk-hour b {
    color: #e5e7eb;
}

body.dark-mode .fk-day {
    color: #d1d5db;
    border-bottom-color: #374151;
}

body.dark-mode .fk-day span:first-child {
    color: #e5e7eb;
}

body.dark-mode .fk-day span:last-child {
    color: #e5e7eb;
}

body.dark-mode .weather-detail {
    background: #111827;
    border-color: #374151;
    color: #e5e7eb;
}

body.dark-mode .weather-detail:hover {
    background: #1f2937;
}

body.dark-mode .weather-detail::before {
    color: #9ca3af;
}

body.dark-mode .weather-detail > * {
    color: #e5e7eb;
}

body.dark-mode .hourly-forecast::-webkit-scrollbar-track {
    background: #111827;
}

body.dark-mode .hourly-forecast::-webkit-scrollbar-thumb {
    background: #374151;
}