/**
 * Homepage — Explore AI Collections
 *
 * Tabbed section whose panels render entries as wrapped pill links.
 * Tab buttons reuse the .explore-tools-tab styling from explore-tools.css.
 */

.explore-collections-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Tab row sits beside the heading (same as Explore AI Tools) */
.explore-collections-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Panels ── */
.explore-collections-panels {
    position: relative;
    transition: min-height 0.2s ease;
}

.explore-collections-panel[hidden] {
    display: none;
}

/* Off-flow measurement state — keep real content height (no inset:0, which
   would stretch the panel to its parent and inflate the measured height). */
.explore-collections-panel.is-measuring {
    display: block !important;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
}

/* ── Pills ── */
.explore-collections-pills {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

/* Best Lists & Use Cases have longer titles → 3 per row looks cleaner.
   Desktop-only; below 993px the shared responsive rules take over. */
@media (min-width: 993px) {
    [data-explore-tools-panel="best_list"] .explore-collections-pills,
    [data-explore-tools-panel="use_cases"] .explore-collections-pills {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.explore-collections-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--surface-card);
    border: 1px solid var(--border-default);
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.explore-collections-pill:hover {
    color: var(--color-text-primary);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.explore-collections-pill__label {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tool-count badge (Best Lists tab) */
.explore-collections-pill__count {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(0, 180, 216, 0.12);
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
}

/* Emphasised "vs" separator inside comparison pills */
.explore-collections-pill__vs {
    color: var(--color-accent);
    font-weight: 700;
    margin: 0 2px;
}

/* ── CTA below the pills ── */
.explore-collections-cta {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .explore-collections-pills {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .explore-collections-section {
        padding: 64px 0;
    }

    .explore-collections-tabs {
        width: 100%;
    }

    .explore-collections-pills {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .explore-collections-pill {
        padding: 10px 14px;
        font-size: var(--font-size-xs);
    }
}

@media (max-width: 460px) {
    .explore-collections-pills {
        grid-template-columns: 1fr;
    }
}
