.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* filtros de categoria */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.category-btn {
    padding: 0.5rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.category-btn.active {
    background: var(--blue);
    border-color: var(--blue);
    color: white;
}

/* busca */
.search-container {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#glossary-search {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

#glossary-search:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* grid de termos */
.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.glossary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.2s;
}

.glossary-card:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.glossary-card.hidden {
    display: none;
}

.glossary-term-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--blue);
    margin-bottom: 0.5rem;
    text-transform: capitalize;
}

.glossary-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.glossary-explanation {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* tooltip global */
.glossary-term {
    font-weight: 700;
    color: var(--blue);
    cursor: help;
    position: relative;
    border-bottom: 1px dashed var(--blue);
}

.glossary-tooltip {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    font-size: 0.8125rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    max-width: 300px;
    width: max-content;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    pointer-events: none;
    font-weight: 400;
}

.glossary-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.glossary-term:hover .glossary-tooltip,
.glossary-term.active .glossary-tooltip {
    display: block;
}

/* responsive */
@media (max-width: 768px) {
    .glossary-grid {
        grid-template-columns: 1fr;
    }

    .category-filters {
        justify-content: flex-start;
    }

    .glossary-tooltip {
        position: fixed;
        left: 1rem !important;
        right: 1rem !important;
        bottom: 1rem !important;
        top: auto !important;
        transform: none !important;
        max-width: none;
        width: auto;
    }

    .glossary-tooltip::after {
        display: none;
    }
}

/* empty state */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-tertiary);
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9375rem;
}
