/* NakhonSiWarning.com */
:root {
    --nsw-navy: #0b1f3a;
    --nsw-blue: #1565c0;
    --nsw-sky: #29b6f6;
    --nsw-bg: #f2f6fb;
    --nsw-card: #ffffff;
    --nsw-text: #1d2a3a;
}

html { scroll-padding-top: 80px; scroll-behavior: smooth; }

body {
    font-family: 'Prompt', sans-serif;
    background: var(--nsw-bg);
    color: var(--nsw-text);
    padding-top: 66px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.nsw-main { flex: 1; }

/* Header */
.nsw-navbar {
    background: rgba(11, 31, 58, .95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.nsw-navbar .brand-text { font-weight: 600; letter-spacing: .3px; }
.nsw-navbar .nav-link { font-weight: 400; white-space: nowrap; border-radius: .5rem; padding: .45rem .8rem !important; }
.nsw-navbar .nav-link:hover,
.nsw-navbar .nav-link.active { background: rgba(255, 255, 255, .1); color: #fff; }

/* Hero / current conditions */
.nsw-hero {
    background: linear-gradient(135deg, #0b1f3a 0%, #1565c0 60%, #29b6f6 100%);
    color: #fff;
    padding: 2rem 0 2.5rem;
    margin-bottom: 1.5rem;
}
.nsw-select { min-width: 190px; background-color: rgba(255,255,255,.95); }
.nsw-now {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 1.25rem;
    padding: 1.5rem;
}
.nsw-now-icon { font-size: 4.5rem; line-height: 1; }
.nsw-now-temp { font-size: 3.6rem; font-weight: 600; line-height: 1; }
.nsw-now-temp small { font-size: 1.4rem; font-weight: 400; margin-left: .2rem; }

.nsw-stat {
    background: rgba(255, 255, 255, .96);
    color: var(--nsw-text);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    height: 100%;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
}
.nsw-stat > i { position: absolute; right: 1rem; top: .8rem; font-size: 1.6rem; }
.nsw-stat .label { font-size: .85rem; color: #6b7a8c; }
.nsw-stat .value { font-size: 1.9rem; font-weight: 600; }
.nsw-stat .value small { font-size: .85rem; font-weight: 400; color: #6b7a8c; margin-left: .25rem; }
.nsw-stat .sub { font-size: .8rem; color: #6b7a8c; }
.nsw-bar { height: 6px; margin-top: .35rem; }
#sWindArrow { transition: transform .4s; }

.nsw-alert {
    border-radius: .75rem;
    padding: .6rem .9rem;
    font-size: .9rem;
    margin-bottom: .4rem;
    background: rgba(255,255,255,.92);
    color: var(--nsw-text);
    border-left: 5px solid #2e7d32;
}
.nsw-alert.warn { border-left-color: #f9a825; }
.nsw-alert.danger { border-left-color: #c62828; }

/* Sections & cards */
.nsw-section { margin-bottom: 2rem; }
.nsw-title { font-weight: 600; margin-bottom: 1rem; color: var(--nsw-navy); }
.nsw-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 4px 16px rgba(16, 42, 80, .08);
    overflow: hidden;
}
.nsw-card .card-header {
    background: #fff;
    font-weight: 500;
    border-bottom: 1px solid #e8eef5;
    padding: .8rem 1rem;
}
.nsw-map { height: 460px; width: 100%; }
.nsw-scroll { max-height: 460px; overflow-y: auto; }
.nsw-chart { position: relative; height: 300px; }

/* Daily forecast */
.nsw-day {
    background: #fff;
    border-radius: 1rem;
    text-align: center;
    padding: .9rem .5rem;
    box-shadow: 0 4px 16px rgba(16, 42, 80, .08);
    height: 100%;
}
.nsw-day.today { background: linear-gradient(160deg, #1565c0, #29b6f6); color: #fff; }
.nsw-day.today .muted { color: rgba(255,255,255,.8) !important; }
.nsw-day i { font-size: 2rem; }
.nsw-day .muted { color: #6b7a8c; font-size: .8rem; }
.nsw-day .t-max { font-weight: 600; font-size: 1.1rem; }
.nsw-day .range { font-size: .72rem; }
.nsw-day .heavy { font-size: .72rem; color: #c62828; font-weight: 500; }
.nsw-day.today .heavy { color: #ffe082; }
.nsw-day { position: relative; }
.nsw-day .nsw-agree { position: absolute; top: .45rem; right: .55rem; font-size: .85rem; }
.nsw-day .nsw-agree i { font-size: .85rem; }
.nsw-agree.agree { color: #2e7d32; }
.nsw-agree.partial { color: #f9a825; }
.nsw-agree.disagree { color: #c62828; }
.nsw-day.today .nsw-agree { color: #fff; }

/* Status badges */
.lv-1 { background: #8d6e63; }
.lv-2 { background: #fbc02d; color: #222; }
.lv-3 { background: #43a047; }
.lv-4 { background: #1e88e5; }
.lv-5 { background: #e53935; }

/* Dam cards */
.nsw-dam .progress { height: 14px; border-radius: 7px; }
.nsw-dam .pct { font-size: 2rem; font-weight: 600; }

/* Wave forecast */
.nsw-wave { display: inline-block; padding: 0 .4rem; border-radius: 4px; color: #222; }
.nsw-wave.w1 { background: #c8e6c9; }
.nsw-wave.w2 { background: #fff59d; }
.nsw-wave.w3 { background: #ffb74d; }
.nsw-wave.w4 { background: #e57373; color: #fff; }
.nsw-wave-chart { height: 340px; }
.nsw-wave-now { border-left: 4px solid var(--c); border-radius: 10px; background: #f6f9fc; padding: .75rem 1rem; }
.nsw-wave-now .hs { font-size: 2rem; font-weight: 600; line-height: 1.1; color: var(--c); }
.nsw-wave-now .hs small { font-size: .9rem; color: #6c757d; font-weight: 400; }

/* Flash-flood warning per basin */
.nsw-flood { border-top: 5px solid #43a047; }
.nsw-flood.watch { border-top-color: #f9a825; }
.nsw-flood.warning { border-top-color: #c62828; }
.nsw-flood .nsw-alert { background: #f6f9fc; }
.nsw-flood-badge { white-space: nowrap; font-size: .8rem; padding: .15rem .55rem; border-radius: 2rem; background: #e8f5e9; color: #2e7d32; }
.nsw-flood-badge.watch { background: #fff8e1; color: #b26a00; }
.nsw-flood-badge.warning { background: #c62828; color: #fff; }
.nsw-flood-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .25rem; }
.nsw-flood-dot.watch { background: #f9a825; }
.nsw-flood-dot.warning { background: #c62828; }

/* Rain gauge markers */
.rain-dot { border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 3px rgba(0,0,0,.4); }

/* About page */
.nsw-prose p { line-height: 1.9; text-indent: 2.5rem; }
.nsw-num {
    flex: 0 0 2.4rem; height: 2.4rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--nsw-blue), var(--nsw-sky));
    color: #fff; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.nsw-partner { transition: transform .2s, box-shadow .2s; }
.nsw-partner:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(16, 42, 80, .14); }
.nsw-partner img { max-height: 110px; object-fit: contain; }

/* Footer */
.nsw-footer { background: var(--nsw-navy); color: #fff; }
.nsw-footer a { color: #81d4fa; text-decoration: none; }
.nsw-footer a:hover { text-decoration: underline; }
.nsw-footer .nsw-stats-link { color: rgba(255, 255, 255, .5); font-size: .95rem; }
.nsw-footer .nsw-stats-link:hover { color: #81d4fa; text-decoration: none; }

@media (max-width: 576px) {
    .nsw-now-temp { font-size: 3rem; }
    .nsw-stat .value { font-size: 1.5rem; }
    .nsw-map, .nsw-scroll { height: 340px; max-height: 340px; }
}
