/* ==========================================================
   UnDF - Portal de Serviços Digitais
   Arquivo único HTML
========================================================== */


:root{

    --primary:#005A9C;
    --primary-dark:#003B6D;
    --secondary:#009CDE;

    --background:#f5f7fa;

    --white:#ffffff;

    --text:#333333;

    --text-light:#666666;

    --border:#dddddd;

    --shadow:
    0 5px 15px rgba(0,0,0,.08);

    --shadow-hover:
    0 12px 30px rgba(0,0,0,.15);

    --radius:12px;

    --transition:.3s ease;

}



/* RESET */

*{

    margin:0;
    padding:0;
    box-sizing:border-box;

}



html{

    scroll-behavior:smooth;

}



body{

    font-family:
    "Segoe UI",
    Arial,
    sans-serif;

    background:
    var(--background);

    color:
    var(--text);

    line-height:1.6;

}




/* ==========================================================
   CABEÇALHO
========================================================== */


header{

    background:
    var(--primary);

    color:white;

    padding:
    20px 35px;

    box-shadow:
    var(--shadow);

}



.topo{

    max-width:1300px;

    margin:auto;

}



.logo{

    display:flex;

    align-items:center;

    gap:20px;

}



.logo img{

    width:75px;

    height:75px;

    object-fit:contain;

}



.logo h1{

    font-size:1.6rem;

    font-weight:600;

}



.logo p{

    opacity:.9;

}




/* ==========================================================
   HERO
========================================================== */


.hero{


    background:

    linear-gradient(
        rgba(0,90,156,.95),
        rgba(0,59,109,.95)
    );


    color:white;

    text-align:center;

    padding:

    70px 20px;

}



.hero h2{

    font-size:2.3rem;

    margin-bottom:15px;

}



.hero p{

    max-width:900px;

    margin:auto;

    font-size:1.05rem;

}



/* ==========================================================
   CONTAINER
========================================================== */


.container{

    width:95%;

    max-width:1300px;

    margin:

    50px auto;

}



/* TITULOS */


h3{

    color:

    var(--primary);

    border-left:

    6px solid var(--secondary);

    padding-left:

    12px;

    margin-bottom:

    25px;

    font-size:

    1.5rem;

}



/* ==========================================================
   GRID
========================================================== */


.grid{


    display:grid;


    grid-template-columns:

    repeat(
        auto-fit,
        minmax(270px,1fr)
    );


    gap:25px;


    margin-bottom:50px;


}




/* ==========================================================
   CARDS
========================================================== */


.card{


    background:white;

    border:

    1px solid var(--border);


    border-radius:

    var(--radius);


    padding:

    28px;


    text-decoration:none;


    color:inherit;


    box-shadow:

    var(--shadow);


    transition:

    var(--transition);


}



.card:hover{


    transform:

    translateY(-7px);


    border-color:

    var(--secondary);


    box-shadow:

    var(--shadow-hover);


}



.card-title{
    color: black;
    font-size:1.15rem;
    font-weight:600;
    margin-bottom:10px;
}


.card p:not(.card-title){
    color: var(--text-light);
}



.icone{


    font-size:

    45px;


    margin-bottom:

    15px;


}




/* ==========================================================
   MENU PRINCIPAL
========================================================== */


.menu-card{


    background:

    linear-gradient(
        135deg,
        #ffffff,
        #eef7ff
    );


}



.menu-card{

    cursor:pointer;
    user-select:none;

}



/* ==========================================================
   ANIMAÇÃO
========================================================== */


.fade{

    animation:

    aparecer .35s ease;

}



@keyframes aparecer{


from{

opacity:0;

transform:translateY(15px);

}


to{

opacity:1;

transform:translateY(0);

}


}




/* ==========================================================
   RODAPÉ
========================================================== */


footer{


background:

var(--primary-dark);


color:white;


text-align:center;


padding:

30px;


margin-top:50px;


}





/* ==========================================================
   MOBILE
========================================================== */


@media(max-width:768px){


.logo{

flex-direction:column;

text-align:center;

}


.logo img{

width:90px;

height:90px;

}


.hero h2{

font-size:1.8rem;

}

.grid{

grid-template-columns:1fr;

}

}

/* ==========================================================
   MAPAS DOS CAMPI
========================================================== */

.mapa-card {
    cursor: pointer;
    text-align: center;
    background: linear-gradient(
        135deg,
        #ffffff,
        #eef7ff
    );
}

.mapa-card .icone {
    font-size: 45px;
}

.mapa-card:hover {
    border-color: var(--secondary);
}


/* ==========================================================
   POPUP DOS MAPAS
========================================================== */

.mapa-popup-overlay {

    position: fixed;

    inset: 0;

    background: rgba(0, 0, 0, 0.82);

    display: none;

    align-items: center;

    justify-content: center;

    padding: 20px;

    z-index: 10000;

    cursor: pointer;

}


.mapa-popup-overlay.ativo {

    display: flex;

}


.mapa-popup {

    position: relative;

    background: white;

    padding: 10px;

    border-radius: 12px;

    max-width: 95vw;

    max-height: 92vh;

    box-shadow:
        0 20px 70px rgba(0,0,0,.5);

    cursor: default;

    display: flex;

    flex-direction: column;

    align-items: center;

}


.mapa-popup-titulo {

    width: 100%;

    text-align: center;

    color: var(--primary);

    font-size: 1.15rem;

    font-weight: 600;

    padding: 8px 45px 12px 15px;

}


.mapa-popup img {

    display: block;

    max-width: 90vw;

    max-height: 82vh;

    width: auto;

    height: auto;

    object-fit: contain;

    border-radius: 8px;

}


.mapa-popup-fechar {

    position: absolute;

    top: 8px;

    right: 8px;

    width: 38px;

    height: 38px;

    border: none;

    border-radius: 50%;

    background: var(--primary);

    color: white;

    font-size: 25px;

    line-height: 38px;

    cursor: pointer;

    z-index: 2;

}


.mapa-popup-fechar:hover {

    background: var(--primary-dark);

}


@media(max-width:768px){

    .mapa-popup-overlay {

        padding: 10px;

    }

    .mapa-popup {

        max-width: 96vw;

        max-height: 94vh;

        padding: 7px;

    }

    .mapa-popup-titulo {

        font-size: .95rem;

        padding: 6px 40px 8px 8px;

    }

    .mapa-popup img {

        max-width: 92vw;

        max-height: 85vh;

    }

}

.card:active { transform: scale(.98); }
body.mapa-aberto { overflow: hidden; }
