/* ==========================================
   RESET
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* ==========================================
   BODY
========================================== */

body {
    font-family: Arial, sans-serif;

    background-color: #f5f7fa;

    color: #1f2937;
}


/* ==========================================
   CABEÇALHO
========================================== */

header {
    background-color: #ffffff;

    padding: 30px 20px;

    text-align: center;

    border-bottom: 3px solid #0057b8;

    position: relative;
}

.botao-admin {
    position: absolute;

    top: 50%;

    right: 8%;

    transform: translateY(-50%);

    text-decoration: none;

    background-color: #0057b8;

    color: #ffffff;

    padding: 10px 14px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: bold;

    transition: 0.2s;
}

.botao-admin:hover {
    background-color: #00458f;

    transform: translateY(calc(-50% - 1px));
}

.botao-admin:focus-visible {
    outline: 3px solid rgba(0, 87, 184, 0.35);

    outline-offset: 3px;
}

.logo-vexnet {
    display: block;

    width: 260px;

    max-width: 100%;

    height: auto;

    margin: 0 auto 6px;
}

header p {
    color: #6b7280;

    font-size: 16px;
}

/* ==========================================
   CONTEÚDO PRINCIPAL
========================================== */

main {
    max-width: 1100px;

    margin: 40px auto;

    padding: 0 20px;
}


/* ==========================================
   PESQUISA
========================================== */

.pesquisa {
    margin-bottom: 30px;
}

.pesquisa input {
    width: 100%;

    padding: 16px 18px;

    background-color: #ffffff;

    border: 1px solid #d9dee5;

    border-radius: 10px;

    font-size: 16px;

    outline: none;

    transition: 0.2s;
}

.pesquisa input:focus {
    border-color: #0057b8;

    box-shadow:
        0 0 0 3px
        rgba(0, 87, 184, 0.10);
}


/* ==========================================
   LISTA DE FERRAMENTAS
========================================== */

#listaFerramentas {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


/* ==========================================
   CARD
========================================== */

.card {
    position: relative;

    background-color: #ffffff;

    padding: 20px;

    border-radius: 12px;

    border: 1px solid #e1e5ea;

    min-height: 180px;

    display: flex;

    flex-direction: row;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    transition: 0.2s;

    overflow: hidden;
}


/* ==========================================
   EFEITO DO CARD
========================================== */

.card:hover {
    transform: translateY(-3px);

    border-color: #0057b8;

    box-shadow:
        0 8px 20px
        rgba(0, 0, 0, 0.07);
}


/* ==========================================
   CONTEÚDO DO CARD
========================================== */

.conteudo-card {
    flex: 1;

    min-width: 0;

    display: flex;

    flex-direction: column;

    justify-content: center;

    order: 1;
}


/* ==========================================
   TÍTULO DA FERRAMENTA
========================================== */

.card h2 {
    color: #0057b8;

    font-size: 21px;

    margin-bottom: 8px;

    word-break: break-word;
}


/* ==========================================
   DESCRIÇÃO
========================================== */

.card p {
    color: #6b7280;

    line-height: 1.4;

    font-size: 14px;

    margin-bottom: 16px;

    word-break: break-word;
}

/* ==========================================
   IMAGEM DA FERRAMENTA
========================================== */

.imagem-ferramenta {
    width: 80px;

    height: 80px;

    min-width: 80px;

    object-fit: contain;

    display: block;

    flex-shrink: 0;

    order: 2;
}


/* ==========================================
   BOTÃO ACESSAR
========================================== */

.card a {
    display: inline-block;

    width: fit-content;

    text-decoration: none;

    background-color: #0057b8;

    color: #ffffff;

    padding: 10px 18px;

    border-radius: 8px;

    font-size: 14px;

    font-weight: bold;

    transition: 0.2s;
}

.card a:hover {
    background-color: #00458f;

    transform: translateY(-1px);
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 900px) {

    #listaFerramentas {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* ==========================================
   CELULAR
========================================== */

@media (max-width: 600px) {

    header {
        padding: 20px 15px 25px;

        display: flex;

        align-items: center;

        justify-content: flex-start;

        gap: 10px;
    }


    .botao-admin {
        position: static;

        display: block;

        width: auto;

        max-width: 42%;

        margin: 0;

        transform: none;

        padding: 8px 6px;

        font-size: 12px;

        text-align: center;

        order: 2;
    }


    .botao-admin:hover {
        transform: translateY(-1px);
    }


    .logo-vexnet {
        width: 56%;

        margin: 0;

        flex-shrink: 1;

        order: 1;
    }


    main {
        margin-top: 25px;

        padding: 0 15px;
    }


    #listaFerramentas {
        grid-template-columns: 1fr;
    }


    .card {
        min-height: 160px;

        padding: 18px;

        gap: 15px;
    }


    .imagem-ferramenta {
        width: 65px;

        height: 65px;

        min-width: 65px;
    }


    .card h2 {
        font-size: 18px;
    }


    .card p {
        font-size: 14px;

        margin-bottom: 12px;
    }


    .card a {
        padding: 8px 14px;
    }

}


/* ==========================================
   CELULARES MUITO PEQUENOS
========================================== */

@media (max-width: 380px) {

    .card {
        padding: 15px;

        gap: 10px;
    }


    .imagem-ferramenta {
        width: 55px;

        height: 55px;

        min-width: 55px;
    }


    .card h2 {
        font-size: 17px;
    }


    .card p {
        font-size: 13px;
    }

}

.botao-descricao {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 0;
    border-radius: 50%;
    background: #0057b8;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.acoes-card {
    display: flex;
    align-items: center;
    gap: 10px;
}

.janela-descricao {
    position: fixed;
    inset: 0;
    width: min(400px, calc(100% - 32px));
    max-width: 400px;
    max-height: calc(100% - 32px);
    margin: auto;
    padding: 20px;
    border: 0;
    border-radius: 12px;
    color: #374151;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.janela-descricao::backdrop {
    background: rgba(17, 24, 39, 0.48);
}

.cabecalho-descricao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cabecalho-descricao h3 {
    margin: 0;
    color: #0057b8;
}

.janela-descricao p {
    margin: 14px 0 0;
    white-space: pre-wrap;
}

.fechar-descricao {
    border: 0;
    background: transparent;
    color: #4b5563;
    font-size: 24px;
    cursor: pointer;
}
