/* --- SEÇÃO DE BUSCA E FILTROS --- */
.section-tagindex-search {
    min-height: 160px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Container da Barra de Busca */
.search-bar-box {
    background-color: var(--elements-color);
    width: 40%; 
    height: 50px; 
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border: 1px solid var(--border-smooth);
    border-radius: 10px;
    padding: 0 15px;
    margin-top: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.search-bar-box:focus-within {
    border-color: var(--h1-color);
    box-shadow: 0 0 18px 1px rgba(250, 200, 20, 0.31);
}

.search-bar-box:hover {
    border-color: var(--h1-color);
    box-shadow: 0 0 18px 1px rgba(250, 200, 20, 0.31);
}

#search-icon {
    width: 20px;
    filter: brightness(0) invert(1);
    transform: scaleX(-1);
    rotate: 10deg;
    opacity: 0.5;
    transition: 0.3s;
}

#search-bar {
    background-color: transparent;
    width: 100%;
    height: 100%;
    padding-left: 15px;
    font-size: 18px; 
    color: var(--p-color);
    border: none;
    outline: none;
}

/* --- TAGS (TAMANHO ORIGINAL) --- */
.indexed-tags {
    width: 70%;
    min-height: 100px;
    padding: 15px;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px; 
}

.tags, .tag-all {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--elements-color);
    padding: 5px 15px; 
    border-radius: 30px;
    color: var(--p2-color);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    margin: 2px;
    cursor: pointer;
    border: 1px solid transparent; 
}

.tags:hover, .tag-all:hover {
    border: 1px solid var(--h1-color);
    box-shadow: 0 0 10px 0.1px var(--h1-color);
    transform: translateY(-2px);
}

.tags.active, .tag-all.active {
    background-color: var(--h1-color);
    color: var(--bg-color);
}

/* Contador de Libs */
.how-many-libs {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 40px;
    padding-left: 10%; 
}

.how-many-libs span { color: var(--h1-color); margin: 0 5px; }
.how-many-libs p { color: var(--p2-color); }

/* --- GRID DE CONTEÚDO --- */
.content {
    width: 90%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding-bottom: 50px;
}

.card-container {
    background-color: var(--elements-color);
    height: 220px;
    width: 360px;
    margin: 5px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    border-radius: 10px;
    border: 1px solid var(--border-smooth);
    transition: all 0.3s ease;
    cursor: pointer;
    padding: 20px;
    text-decoration: none;
}

.card-container:hover {
    border: 1px solid var(--h1-color);
    box-shadow: 0 0 10px 0.1px var(--h1-color);
    transform: translateY(-5px);
}

.card-img { font-size: 35px; margin-bottom: 10px; }

.card-name{
    color: var(--p-color);
    font-size: 18px;
    font-weight: 800;
}

.card-description {
    width: 100%;
    height: 6rem;
    margin: 10px 0;
}

.card-description p {
    color: var(--p2-color);
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.card-tag-category {
    padding: 5px 15px;
    border-radius: 30px;
    color: var(--p2-color);
    font-size: 14px;
    border: 1px solid var(--p2-color);
    transition: 0.3s;
}

/* --- OTIMIZAÇÃO MOBILE (MEDIA QUERIES) --- */
@media (max-width: 768px) {
    h2{
        font-size: 13px;
        width: 70%;
    }
    .search-bar-box {
        width: 90%; 
    }

    .indexed-tags {
        width: 95%;
        margin: 10px auto;
    }

    .how-many-libs {
        padding-left: 20px;
        justify-content: center;
    }

    .card-container {
        width: 100%; 
        max-width: 350px;
        height: auto;
        min-height: 200px;
    }

    .content {
        width: 100%;
        padding: 0 15px;
    }
}