/* ==========================================
   VSU-WAIS VERSION 1
========================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    font-family:"Montserrat",sans-serif;
    background:#F5F7F4;
    color:#17321A;
    display:flex;
    justify-content:center;
    align-items:center;
}

.dashboard{
    width:1080px;
    height:1920px;
    background-image: url("../assets/backgrounds/DRM-WAIS.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display:grid;
    grid-template-rows:
        140px
        562px
        190px
        300px
        500px
        70px;
    gap:20px;
    padding:30px;
}

header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:12px 22px;
    background:transparent;
    border-bottom:5px solid #00954f;
}
.branding{
    display:flex;
    align-items:center;
    gap:18px;
}
.logo{
    width:96px;
}
.title h1{
    font-family:"Montserrat",sans-serif;
    font-weight:700;
    font-size:28px;
    color:white;
}
.title h2{
    font-family:"Montserrat",sans-serif;
    font-weight:400;
    font-size:28px;
    color:white;
    margin-top:2px;
}
.datetime{
    display:flex;
    flex-direction:column;
    gap:4px;
    align-items:flex-end;
}
.time-row,
.date-row{
    display:flex;
    align-items:center;
    gap:8px;
}
.time-row img,
.date-row img{
    width:20px;
    height:20px;
}
#clock{
    font-family:"Montserrat",sans-serif;
    font-size:40px;
    font-weight:600;
    color:white;
}
#date{
    font-family:"Montserrat",sans-serif;
    font-size:18px;
    font-weight:400;
    color:white;
}

.top-section{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:25px;
}


.card-title{
    background:#146939;
    color:white;
    width:260px;
    margin:auto;
    margin-top:-26px;
    text-align:center;
    padding:12px;
    border-radius:
        0
        0
        20px
        20px;
    font-size:26px;
    font-weight:600;
}


.weather-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:20px 20px 20px 20px;
}
.weather-card,
.heat-card{
    background:#FFFFFF;
    border-radius:24px;
    border:8px solid #146939;
    box-shadow:0 6px 16px rgba(0,0,0,.12);
}
#weatherIcon{
    width:220px;
    height:220px;
    object-fit:contain;
    display:block;
    transform:translateY(-5px);
    margin-top:10px;
}
#weatherText{
    font-size:64px;
    font-weight:700;
    margin-top:-1px;
    color:#146939;
}


.weather-details{
    width:100%;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:22px;
    margin-top:auto;
    padding-bottom:10px;
}
.detail-box{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:8px;
}
.detail-box h3{
    font-size:48px;
    font-weight:700;
    color:#146939;
}
.temp-box{
    background:#FFFFFF;
    border:2px solid #17321A;
    border-radius:18px;
    display:flex;
    align-items:center;
    gap:16px;
    padding:16px 20px;
    width:170px;
    height:110px;
}
.temp-content{
    display:flex;
    flex-direction:column;
    justify-content:center;
    width:100%;
    gap:4px;
}
.temp-row{
    display:flex;
    justify-content:center;
    align-items:center;
}
.temp-row:first-child{
    padding-bottom:3px;
    border-bottom:2px solid #146939;
}
.temp-content .temp-row span{
    font-size:36px;
    font-weight:700;
    color:#146939;
    line-height:1.1;
}
.rain-box{
    background:#FFFFFF;
    border:2px solid #17321A;
    border-radius:18px;
    display:flex;
    align-items:center;
    gap:16px;
    padding:18px 20px;
    min-width:240px;
}
.rain-content{
    display:flex;
    flex-direction:column;
    justify-content:center;
}
#chanceRain{
    font-size:40px;
    font-weight:700;
    color:#146939;
    line-height:1;
}
.rain-label{
    font-size:26px;
    font-weight:600;
    color:#146939;
    margin-top:4px;
    white-space:nowrap;
}
.detail-top{
    display:flex;
    align-items:center;
    gap:5px;
}
.temp-icon{
    width:40px;
    height:50px;
    flex-shrink:1;
}
.rain-icon{
    width:46px;
    height:46px;
    flex-shrink:0;
}
.detail-top h3{
    font-size:56px;
    color:#146939;
    font-weight:700;
}
.detail-box span{
    font-size:16px;
    text-align:center;
}
.weather-details span{
    display:block;
    margin-top:0;
    text-align:center;
}


.heat-card{
    display:flex;
    flex-direction:column;
    align-items:center;
    padding:20px 20px 30px;
}
#heatValue{
    margin-top:1px;
    font-size:140px;
    font-weight:700;
    color:#FDC530;
    text-align:center;
}
.heat-level{
    margin-top:1px;
    padding:
        10px
        30px;
    border-radius:15px;
    background:#17321a;
    color:white;
    font-size:28px;
    font-weight:600;
}
.heat-icon{
    width:100px;
    height:auto;
    margin-top:10px;
    margin-bottom:10px;
    transform:translateY(-10px);
    object-fit:contain;
}
#heatAdvice{
    margin-top:1px;
    width:90%;
    text-align:center;
    font-size:25px;
    font-weight:600;
    line-height:1;
}
.heat-value{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
}
.heat-value img{
    width:55px;
    height:55px;
}


.weather-advisory{
    display:flex;
    align-items:center;
    background:#FFFFFF;
    border:8px solid #146939;
    border-radius:24px;
    padding:28px;
    box-shadow:0 6px 16px rgba(0,0,0,.12);
}
.advisory-content{
    width:100%;
}
#advisoryTitle{
    font-size:34px;
    font-weight:700;
    color:#146939;
    margin-bottom:12px;
    text-transform:uppercase;
    letter-spacing:1px;
}
#advisoryText{
    font-size:26px;
    line-height:1.6;
    font-weight:600;
    text-align:left;
    color:#17321A;
    margin-top:10px;
}


.section-title{
    font-size:36px;
    font-weight:600;
    color:#FFFFFF;
    text-align:center;
    margin-bottom:10px;
}
#hourlyCards{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    align-items:stretch;
    gap:12px;
}
.hour-card{
    background:white;
    border-radius:18px;
    padding:14px 8px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px; 
}
.hour-card h3{
    font-size:26px;
    font-weight:600;
    color:#146939;
}
.hour-card > img{
    width:50px;
    height:50px;
    object-fit:contain;
    display:block;
}
.hour-card p{
    font-size:26px;
    font-weight:600;
}
.hour-card span{
    color:#146939;
    font-weight:600;
}
.hour-heat,
.hour-rain{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:20px;
    font-weight:600;
}

.hour-heat img,
.hour-rain img{
    width:14px;
    height:18px;
}
.hour-heat span,
.hour-rain span{
    font-size:22px;
    font-weight:600;
    color:#146939;
}
.hour-rain{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:6px;
}
.hour-rain img{
    width:24px;
    height:24px;
}
.hour-info{
    display:flex;
    justify-content:center;
    gap:18px;
    margin-top:8px;
}


#forecastCards{
    display:flex;
    flex-direction:column;
    gap:15px;
}
.forecast-row{
    display:grid;
    grid-template-columns:
        1.6fr
        1.6fr
        1fr
        1fr;
    align-items:center;
    padding:12px 18px;
    border-radius:18px;
    background:white;
}
.forecast-day{
    font-size:28px;
    font-weight:600;
}
.forecast-weather{
    display:flex;
    align-items:center;
    gap:15px;
    font-size:30px;
    font-weight:550;
}
.forecast-weather img{
    width:38px;
}
.forecast-temp,
.forecast-rain{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}
.forecast-temp img{
    width:28px;
    height:28px;
    object-fit:scale-down;
}
.forecast-rain img{
    width:22px;
    height:22px;
}
.forecast-temp span,
.forecast-rain span{
    font-size:28px;
    font-weight:600;
}
.hourly-section{
    background:rgba(0, 149, 79, 0.65);
    border:8px solid #17321A;
    border-radius:24px;
    backdrop-filter: blur(3px);
    box-shadow:0 6px 16px rgba(0, 0, 0, 0.50);
    padding:20px;
}
.forecast-section{
    background:rgba(20, 105, 57, 0.65);
    border:8px solid #17321A;
    border-radius:24px;
    backdrop-filter: blur(4px);
    box-shadow:0 6px 16px rgba(0, 0, 0, 0.50);
    padding:20px;
}


footer{
    display:flex;
    justify-content:center;
    align-items:center;
    background:rgba(23, 50, 26, 0.65);
    backdrop-filter: blur(4px);
    color:white;
    border-radius:20px;
    font-size:26px;
    font-weight:500;
    position: relative;
    overflow: hidden;
}
footer span{
    position: relative;
    z-index: 1;
}


#weatherIcon{
    animation:float 5s ease-in-out infinite;
    }
    @keyframes float{    
    0%{    
    transform:translateY(-5px);    
    }   
    50%{    
    transform:translateY(-11px);   
    }   
    100%{   
    transform:translateY(-5px);   
    }   
    }
    .heat-icon{
        animation:pulseHeat 2.5s infinite;      
        }       
        @keyframes pulseHeat{    
        0%{     
        transform:scale(1);     
        }    
        50%{     
        transform:scale(1.05);    
        }    
        100%{    
        transform:scale(1);    
        }    
    }


@keyframes cardRefresh {

    0%{
        opacity:0;
        transform:translateY(20px) scale(.97);
        filter:blur(4px);
    }

    60%{
        opacity:1;
        transform:translateY(-4px) scale(1.01);
        filter:blur(0);
    }

    100%{
        opacity:1;
        transform:translateY(0) scale(1);
        filter:blur(0);
    }

}

.refresh-card{
    animation:cardRefresh .65s ease forwards;
}

/* =========================================================
   RESPONSIVE OVERRIDES
   These rules must remain at the END of WAIS2.0.css
========================================================= */

html,
body {
    width: 100%;
    min-height: 100%;
    height: auto;
}

body {
    display: block;
    overflow-x: hidden;
}

.dashboard {
    width: min(100%, 1080px);
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    margin: 0 auto;
    grid-template-rows: auto;
    padding: clamp(12px, 2.8vw, 30px);
    gap: clamp(12px, 2vw, 20px);
    background-attachment: scroll;
}

header,
.top-section,
.weather-card,
.heat-card,
.weather-advisory,
.hourly-section,
.forecast-section,
footer,
#hourlyCards,
#forecastCards,
.forecast-row {
    min-width: 0;
}

.title {
    min-width: 0;
}

.title h1,
.title h2,
#weatherText,
#advisoryTitle,
#advisoryText,
.forecast-day,
.forecast-weather {
    overflow-wrap: anywhere;
}

.logo {
    width: clamp(64px, 9vw, 96px);
    height: auto;
}

.title h1 {
    font-size: clamp(1rem, 2.6vw, 1.75rem);
}

.title h2 {
    font-size: clamp(0.9rem, 2.5vw, 1.75rem);
}

#clock {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

#date {
    font-size: clamp(0.8rem, 1.8vw, 1.125rem);
}

.top-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2.3vw, 25px);
}

.card-title {
    width: min(260px, calc(100% - 24px));
    font-size: clamp(1rem, 2.4vw, 1.625rem);
}

#weatherIcon {
    width: clamp(120px, 21vw, 220px);
    height: clamp(120px, 21vw, 220px);
}

#weatherText {
    max-width: 100%;
    font-size: clamp(2rem, 5.8vw, 4rem);
    text-align: center;
}

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

.temp-box,
.rain-box {
    width: 100%;
    min-width: 0;
    height: auto;
}

.temp-content .temp-row span {
    font-size: clamp(1.5rem, 3.3vw, 2.25rem);
}

#chanceRain {
    font-size: clamp(1.8rem, 3.7vw, 2.5rem);
}

.rain-label {
    font-size: clamp(0.9rem, 2.2vw, 1.625rem);
    white-space: normal;
    text-align: center;
}

#heatValue {
    font-size: clamp(4.5rem, 13vw, 8.75rem);
}

.heat-level {
    max-width: 100%;
    font-size: clamp(1rem, 2.6vw, 1.75rem);
    text-align: center;
    overflow-wrap: anywhere;
}

#heatAdvice {
    width: min(100%, 500px);
    font-size: clamp(0.95rem, 2.3vw, 1.5625rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#advisoryTitle {
    font-size: clamp(1.25rem, 3vw, 2.125rem);
}

#advisoryText {
    font-size: clamp(0.95rem, 2.4vw, 1.625rem);
    line-height: 1.5;
}

.section-title {
    font-size: clamp(1.4rem, 3.2vw, 2.25rem);
}

#hourlyCards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(8px, 1.4vw, 12px);
}

.hour-card {
    min-width: 0;
}

.hour-card h3,
.hour-card p {
    font-size: clamp(1rem, 2.3vw, 1.625rem);
}

.hour-heat span,
.hour-rain span {
    font-size: clamp(0.85rem, 2vw, 1.375rem);
}

.forecast-row {
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(0, 1.6fr)
        minmax(0, 1fr)
        minmax(0, 1fr);
    gap: 10px;
}

.forecast-day {
    font-size: clamp(1rem, 2.4vw, 1.75rem);
}

.forecast-weather {
    font-size: clamp(0.95rem, 2.5vw, 1.875rem);
}

.forecast-temp span,
.forecast-rain span {
    font-size: clamp(1rem, 2.4vw, 1.75rem);
}

footer {
    min-height: 60px;
    padding: 14px 18px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: clamp(0.9rem, 2.2vw, 1.625rem);
    text-align: center;
}

/* Tablet */
@media (max-width: 800px) {
    header {
        align-items: flex-start;
        gap: 18px;
    }

    .top-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .weather-card,
    .heat-card {
        min-height: 430px;
    }

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

    .hour-card:last-child {
        grid-column: 1 / -1;
    }

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

    .forecast-temp,
    .forecast-rain {
        justify-content: flex-start;
    }
}

/* Mobile */
@media (max-width: 560px) {
    .dashboard {
        width: 100%;
        padding: 10px;
        gap: 12px;
    }

    header {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 10px;
    }

    .branding {
        align-items: flex-start;
    }

    .datetime {
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,.35);
        flex-direction: row;
        justify-content: space-between;
        align-items: baseline;
        white-space: normal;
    }

    .weather-card,
    .heat-card {
        min-height: auto;
    }

    .weather-details {
        grid-template-columns: minmax(0, 1fr);
    }

    .temp-box,
    .rain-box {
        max-width: 100%;
    }

    #hourlyCards {
        grid-template-columns: minmax(0, 1fr);
    }

    .hour-card:last-child {
        grid-column: auto;
    }

    .hour-card {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 10px;
    }

    .hour-card > img {
        grid-row: span 2;
    }

    .forecast-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px 12px;
    }

    .forecast-weather {
        justify-self: end;
        text-align: right;
    }

    .forecast-temp,
    .forecast-rain {
        justify-content: flex-start;
    }

    footer .divider {
        display: none;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .branding {
        flex-direction: column;
    }

    .datetime {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .forecast-weather {
        justify-self: start;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
