/* ============================================================
   tags.css — Tags / Browse Categories Page Styles
   ============================================================ */

.tags-hero {
    background: linear-gradient(135deg, var(--secondary-green), #4caf50);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
    border-radius: 0 0 20px 20px;
}

.tag-category-section {
    margin-bottom: 3rem;
}

.tag-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}

.category-icon {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-right: 1rem;
}

.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tag-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tag-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    color: inherit;
    text-decoration: none;
}

.tag-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.tag-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
    flex: 1;
}

.tag-count {
    background: var(--secondary-green);
    color: white;
    border-radius: 20px;
    padding: 0.3rem 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.tag-description {
    color: var(--dark-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.tag-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.tag-icon {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-right: 0.5rem;
}

.alphabet-nav {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    margin-bottom: 2rem;
    position: sticky;
    top: 100px;
    z-index: 10;
}

.alphabet-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.alphabet-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: var(--light-gray);
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.alphabet-link:hover,
.alphabet-link.active {
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.search-tags {
    max-width: 400px;
    margin: 0 auto 2rem;
}

.stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-gray);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.tag-preview {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 1rem;
}

.preview-docs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.preview-doc {
    background: white;
    padding: 0.75rem;
    border-radius: 16px;
    font-size: 0.9rem;
    border-left: 3px solid var(--primary-blue);
}

@media (max-width: 768px) {
    .tags-grid {
        grid-template-columns: 1fr;
    }

    .alphabet-links {
        gap: 0.3rem;
    }

    .alphabet-link {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .stats-bar {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .tag-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .tag-count {
        align-self: flex-start;
    }
}
