/* 1. ESTILOS GLOBAIS */
@font-face {
    font-family: 'RoundsNeueBlack';
    src: url('assets/fonts/TT\ Rounds\ Neue\ Trial\ Black.ttf');
}

@font-face {
    font-family: 'HelveticaRound';
    src: url('assets/fonts/helveticaRound.otf');
}

* {
    box-sizing: border-box;
}

:root {
    --primary-color: #6E85B7; 
    --secondary-color: #91b3d6;
    --tertiary-color: #C4D7E0;
    --bg-color: #fffff5;
    --title-font: 'RoundsNeueBlack';
    --body-font: 'HelveticaRound'
}

body {
    margin: 0;
    background: var(--bg-color);
    color: var(--secondary-color);
    font-family: var(--body-font);
}


/* 2 - HEADER E BUSCA */

header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
    position: sticky;
    top: 0;
    background: var(--bg-color);
    z-index: 10;
    border-bottom: 1px solid var(--bg-color);
    gap: 1rem;
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

header h1 {
    font-family: var(--title-font);
    font-size: 2.5rem;
    margin: 0;
    font-weight: 500;
    white-space: nowrap;
}

div input, .filter-select {
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--tertiary-color);
    background: var(--bg-color);
    font-family: inherit;
    font-size: 1.5rem;
    transition: all 0.2s ease;
    height: 40px;
    color: var(--secondary-color);
    margin-right: .5rem;
}

div input::placeholder {
    font-size: 1.2rem;
    color: var(--tertiary-color);
}

div input:focus {
    outline: none;
    border-color: var(--bg-color);
    box-shadow: 0 0 0 0.1rem var(--tertiary-color);
}

div input {
    width: 20rem;
}


/* 3 - BOTÃO E PAINEL DE FILTROS */

.filter-wrapper {
    position: relative;
    display: inline-block;
}

#filtro-btn {
    padding: 0.375rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--tertiary-color);
    background: var(--bg-color);
    font-family: inherit;
    font-size: 1.15rem;
    height: 40px;
    color: var(--secondary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#filtro-btn:hover {
    border-color: var(--primary-color);
}

.filter-panel {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    right: 0; 
    background-color: var(--bg-color);
    border: 1px solid var(--tertiary-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 1rem;
    max-width: 700px;
    width: 90vw; 
}

.filter-panel.show {
    display: block;
}

.filter-panel-content {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group-title {
    font-family: var(--title-font);
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--tertiary-color);
    padding-bottom: 0.25rem;
}

.filter-option {
    display: block;
    margin-bottom: 0.5rem;
}

.filter-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--secondary-color);
}

/* checkbox customizado */
.filter-option input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    width: 1.25em;
    height: 1.25em;
    border: 1px solid var(--tertiary-color);
    border-radius: 4px;
    position: relative;
    top: -1px;
}

.filter-option input[type="checkbox"]:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.filter-option input[type="checkbox"]:checked::after {
    content: '\f1b0'; /* código do ícone fa-paw */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--bg-color);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8em;
}

/* ações do painel de filtro */
.filter-actions {
    margin-top: 1rem;
    text-align: center;
    border-top: 1px solid var(--tertiary-color);
    padding-top: 1rem;
}

#limpar-filtros-btn {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    border: 1px solid var(--tertiary-color);
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

#limpar-filtros-btn:hover {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}


/* 4 - MAIN E CARDS */

main {
    overflow-x: hidden;
    scrollbar-color: var(--secondary-color);
    max-width: 80rem;
    margin: 0 auto;
    margin-top: 1rem;
    padding-bottom: 8rem;
}

/* card */
article {
    display: flex;
    background: none;
    border-radius: 0;
    padding: 0 1rem;
    margin-bottom: 4rem;
    box-shadow: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 1px solid var(--bg-color);
    padding-bottom: 1.5rem;
}

article:hover {
    transform: translateY(-5px);
    cursor: pointer;
}

article img{
    height: 100%;
    width: 350px;
    max-width: 40%;
    object-fit: cover;
    border-radius: 8px;
}

.card-content{
    padding: 0 1.5rem;
}

article h2 {
    font-family: var(--title-font);
    margin-top: 0;
    font-weight: 600;
    font-size: 2rem;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

article p {
    margin: 0.5rem 0;
    line-height: 1.6;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

article p strong {
    color: var(--primary-color);
    font-weight: bold;
}

/* barra de estatísticas (nível de energia) */
.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0; 
    line-height: 1.6;
}

.stat-info {
    flex-grow: 1;
    margin-right: 1.5rem;
}

.stat-label {
    display: block;
    font-size: 1.15rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.stat-bar {
    display: flex;
    gap: 4px;
    width: 100%;
}

.segment {
    height: 10px;
    flex-grow: 1;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.segment.active {
    background-color: var(--primary-color);
}

.segment.inactive {
    background-color: var(--tertiary-color);
    opacity: 0.5;
}

.stat-value {
    text-align: right;
    flex-shrink: 0;
}

.stat-value .text-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--secondary-color);
    white-space: nowrap;
}

/* tela de 'sem resultados' */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--secondary-color);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--tertiary-color);
}

.no-results p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin: 0;
}


/* 5 - BOTÔES DE PAGINAÇÃO */

.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pagination-button, .pagination-arrow {
    margin: 0 5px;
    padding: 8px 16px;
    border: 1px solid var(--tertiary-color);
    background-color: var(--bg-color);
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 1rem;
    font-family: var(--body-font);
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}

.pagination-button:hover, .pagination-button.active {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
}

.pagination-arrow {
    border: none;
}


/* 6 - MODAL */

.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); 
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    position: relative;
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 600px;
    text-align: left;
}

.modal-content .close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: var(--secondary-color);
}

.modal-content img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
}


/* 7 - Efeitos de Hover (hvr-shrink do hover.css) */

.hvr-shrink {
    display: inline-block;
    vertical-align: middle;
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    -webkit-transition-duration: 0.3s;
    transition-duration: 0.3s;
    -webkit-transition-property: transform;
    transition-property: transform;
}
.hvr-shrink:active {
    -webkit-transform: scale(0.9);
    transform: scale(0.9);
}


/* 8 -  RODAPÉ */

.footer {
    position: relative;
    left: 0;
    width: 100%;
    color: var(--tertiary-color);
    background-color: var(--bg-color);
    padding: 15px 20px;
    border-top: 1px solid var(--primary-color);
    font-size: 0.9rem;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-direction: row;
    padding: 0;
    gap: 25px;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer p{
    color: var(--secondary-color);
}


/* 9 - MEDIA QUERIES */

@media (max-width: 850px) {
    article {
        flex-direction: column;
        align-items: center;
    }

    article img {
        width: 100%;
        max-width: 450px;
        margin-bottom: 1.5rem;
    }

    .card-content {
        padding: 0;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        padding: 1rem;
    }

    header h1 {
        text-align: center;
        margin-bottom: 1rem;
    }

    div input {
        width: 90vw;
        font-size: 1.2rem;
    }

    main {
        padding: 0 1rem;
    }

    .filter-panel {
        max-height: 80vh;
        overflow-y: auto; 
        -webkit-overflow-scrolling: touch;
    }

    .filter-panel-content {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
        max-width: 70%;
        word-wrap: break-word;
    }

    div input, .filter-select,
    div input::placeholder {
        font-size: 1rem;
    }

    article h2 {
        font-size: 1.3rem;
    }

    .search-container {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .filter-panel {
        width: 90vw;
        left: 50%;
        transform: translateX(-50%);
    }

    .modal-content {
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
        padding: 15px;
    }

}