/* ======================================================
   SACE HIDRO
   Sistema de Monitoramento do Rio Uruguai
====================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

body{

    background:#0f172a;
    color:#FFF;

    font-family:Segoe UI,Arial,sans-serif;

}

/* ================= HEADER ================= */

header{

    background:#172554;

    padding:18px;

    border-bottom:3px solid #2563eb;

    display:flex;

    justify-content:space-between;

    align-items:center;

}

header h1{

    font-size:28px;

    font-weight:700;

    letter-spacing:1px;

}

header span{

    color:#93c5fd;

    font-size:14px;

}

/* ================= CONTAINER ================= */

.container{

    width:98%;

    margin:auto;

    margin-top:20px;

}

/* ================= GRID ================= */

.grid{

    display:grid;

    grid-template-columns:repeat(auto-fit,minmax(270px,1fr));

    gap:18px;

}

/* ================= CARD ================= */

.card{

    background:#1e293b;

    border-radius:12px;

    padding:18px;

    box-shadow:0 4px 18px rgba(0,0,0,.35);

    transition:.25s;

    border:2px solid transparent;

}

.card:hover{

    transform:translateY(-3px);

    border-color:#2563eb;

}

/* ================= CABEÇALHO ================= */

.card-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    margin-bottom:15px;

}

.card-header h2{

    font-size:21px;

    font-weight:700;

}

/* ================= STATUS ================= */

.status{

    padding:6px 12px;

    border-radius:18px;

    font-size:12px;

    font-weight:bold;

}

.success{

    background:#16a34a;

}

.warning{

    background:#ca8a04;

}

.danger{

    background:#dc2626;

}

/* ================= NÍVEL ================= */

.nivel{

    text-align:center;

    margin-top:10px;

    margin-bottom:18px;

}

.nivel h1{

    font-size:62px;

    line-height:60px;

    font-weight:bold;

}

.nivel span{

    font-size:20px;

    color:#cbd5e1;

}

/* ================= TENDÊNCIA ================= */

.tendencia{

    display:flex;

    justify-content:center;

    align-items:center;

    gap:10px;

    font-size:26px;

    font-weight:bold;

    margin-bottom:18px;

}

.subiu{

    color:#22c55e;

}

.baixou{

    color:#ef4444;

}

.estavel{

    color:#94a3b8;

}

.tendencia small{

    display:block;

    font-size:13px;

    color:#94a3b8;

    margin-top:5px;

}

/* ================= INFORMAÇÕES ================= */

.info{

    display:flex;

    justify-content:space-between;

    margin-top:10px;

    padding:10px;

    background:#0f172a;

    border-radius:8px;

    margin-bottom:8px;

}

.info strong{

    font-size:15px;

}

.info span{

    color:#f8fafc;

}

/* ================= BARRA ================= */

.barra{

    width:100%;

    height:14px;

    background:#334155;

    border-radius:20px;

    overflow:hidden;

    margin-top:12px;

    margin-bottom:12px;

}

.barra div{

    height:100%;

    border-radius:20px;

    background:#3b82f6;

}

/* ================= RODAPÉ CARD ================= */

.footer{

    margin-top:12px;

    border-top:1px solid #334155;

    padding-top:10px;

    text-align:center;

    color:#94a3b8;

    font-size:13px;

}

/* ================= PAINEL ================= */

.painel{

    margin-bottom:25px;

    background:#172554;

    border-radius:10px;

    padding:14px;

    display:flex;

    justify-content:space-between;

    align-items:center;

}

.painel h3{

    font-size:18px;

}

.painel span{

    color:#cbd5e1;

}

/* ================= LOADER ================= */

.loader{

    width:35px;

    height:35px;

    border-radius:50%;

    border:4px solid #1e40af;

    border-top:4px solid #FFF;

    animation:spin 1s linear infinite;

    margin:auto;

}

@keyframes spin{

    100%{

        transform:rotate(360deg);

    }

}

/* ================= RESPONSIVO ================= */

@media(max-width:900px){

    .grid{

        grid-template-columns:repeat(auto-fit,minmax(240px,1fr));

    }

    .nivel h1{

        font-size:48px;

    }

}

@media(max-width:600px){

    header{

        flex-direction:column;

        gap:10px;

    }

    .grid{

        grid-template-columns:1fr;

    }

    .nivel h1{

        font-size:42px;

    }

}

/* ======================================================
   NOTÍCIAS
====================================================== */

.noticias{

    width:98%;

    margin:40px auto;

}

.noticias h2{

    margin-bottom:20px;

    color:#fff;

    font-size:26px;

    border-left:5px solid #2563eb;

    padding-left:12px;

}

#listaNoticias{

    display:flex;

    flex-direction:column;

    gap:18px;

}

.card-noticia{

    display:flex;

    align-items:flex-start;

    gap:18px;

    background:#1e293b;

    border-radius:12px;

    overflow:hidden;

    text-decoration:none;

    color:#fff;

    transition:.25s;

    box-shadow:0 4px 18px rgba(0,0,0,.35);

}

.card-noticia:hover{

    transform:translateY(-2px);

    border-left:5px solid #2563eb;

}

.card-noticia img{

    width:180px;

    height:120px;

    object-fit:cover;

    flex-shrink:0;

}

.card-noticia div{

    padding:15px;

    flex:1;

}

.card-noticia h3{

    margin:0 0 10px;

    font-size:22px;

    color:#ffffff;

}

.card-noticia p{

    margin:0;

    color:#cbd5e1;

    line-height:1.5;

}

.card-noticia small{

    display:block;

    margin-top:12px;

    color:#94a3b8;

}

/* Responsivo */

@media(max-width:768px){

    .card-noticia{

        flex-direction:column;

    }

    .card-noticia img{

        width:100%;

        height:220px;

    }

}

.btn-noticias{

    display:inline-block;

    background:#2563eb;

    color:#fff;

    padding:12px 25px;

    border-radius:8px;

    text-decoration:none;

    font-weight:600;

    transition:.2s;

}

.btn-noticias:hover{

    background:#1d4ed8;

    color:#fff;

}