/* Hub pages — category landings with tagged product cards */

/* Split category hero (matches marketing-hero on software page) */
.hub-hero {
    background: var(--bg-charcoal);
    color: #fff;
    padding: 36px 0 32px;
}

.hub-hero--indigo {
    background: var(--color-indigo);
}

.hub-hero__flex {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hub-hero__content {
    flex: 1;
    min-width: 0;
}

.hub-hero__content .h1,
.hub-hero__content .dark-h1 {
    color: #fff;
    margin-bottom: 12px;
    text-align: left;
}

.hub-hero__sub {
    font-size: clamp(1rem, 1.5vw + 0.85rem, 1.2rem);
    font-weight: 700;
    color: var(--text-dark-body);
    margin: 0 0 12px;
    line-height: 1.35;
}

.hub-hero__content .body-lg,
.hub-hero__content .dark-body {
    color: var(--text-dark-muted);
    margin-bottom: 20px;
    max-width: 520px;
    text-align: left;
}

.hub-hero__content .overline,
.hub-hero__content .dark-overline {
    text-align: left;
    display: block;
    margin-bottom: 10px;
}

.hub-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.hub-hero__media {
    flex: 0 1 420px;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 1 / 1;
    background: var(--bg-charcoal-card);
    border: 1px solid var(--bg-charcoal-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: hidden;
}

.hub-hero--indigo .hub-hero__media {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.hub-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.35));
}

.hub-page-main {
    padding: 28px 0 56px;
}

@media (max-width: 900px) {
    .hub-hero {
        padding: 28px 0 24px;
    }

    .hub-hero__flex {
        flex-direction: column;
        gap: 24px;
    }

    .hub-hero__media {
        display: none;
    }

    .hub-hero__content .h1,
    .hub-hero__content .dark-h1,
    .hub-hero__content .body-lg,
    .hub-hero__content .dark-body,
    .hub-hero__content .overline,
    .hub-hero__content .dark-overline {
        text-align: center;
    }

    .hub-hero__sub {
        text-align: center;
    }

    .hub-hero__ctas {
        justify-content: center;
    }

    .hub-page-main {
        padding: 20px 0 48px;
    }

    .hub-hero__sub {
        font-size: 1.05rem;
    }
}

/* Category blocks inside one catalog grid — cards flow in row order across sections */
.hub-grid[data-hub-grid] .hub-section {
    display: contents;
}

.hub-grid[data-hub-grid] .hub-section.is-hidden {
    display: none;
}

.hub-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--bg-sand-border);
}

/* Catalog hubs (photo-booth, gaming-arcades, all-machines): pills + category pages — no per-group title rows */
.hub-grid[data-hub-grid] .hub-section-head {
    display: none;
}

.hub-section--no-head .hub-section-head {
    display: none;
}

.hub-section-title {
    font-size: clamp(1.15rem, 1.5vw + 0.9rem, 1.35rem);
    font-weight: 800;
    color: var(--text-heading);
    margin: 0;
    letter-spacing: -0.02em;
}

.hub-section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 4px 0 0;
    max-width: 520px;
}

.hub-section-link {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-indigo);
    text-decoration: none;
    white-space: nowrap;
}

.hub-section-link:hover {
    text-decoration: underline;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.hub-grid--single {
    grid-template-columns: 1fr;
}

.hub-card.is-hidden,
.hub-card[hidden] {
    display: none !important;
}

.hub-filter-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: none;
    margin-bottom: 24px;
}

.hub-filter-empty:not([hidden]) {
    display: block;
}

@media (max-width: 1200px) {
    .hub-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .hub-grid:not(.hub-grid--single) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hub-grid:not(.hub-grid--single) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .hub-section-title {
        font-size: 1.15rem;
    }

    .hub-section-head {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    /* Compact cards — 3 per row (matches homepage solution grid) */
    .hub-card .hub-card-img {
        padding: 8px;
    }

    .hub-card .hub-card-body {
        padding: 10px 8px 12px;
    }

    .hub-card .hub-card-tags {
        gap: 4px;
        margin-bottom: 6px;
    }

    .hub-card .hub-tag {
        font-size: 0.5rem;
        padding: 2px 5px;
        letter-spacing: 0.04em;
    }

    .hub-card-title {
        font-size: 0.68rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .hub-card-text {
        font-size: 0.58rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hub-cluster-pill {
        font-size: 0.78rem;
        padding: 8px 14px;
    }

    .hub-cta-bar p {
        font-size: 0.88rem;
    }
}

.hub-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--bg-sand-border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
}

.hub-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-indigo-light);
}

.hub-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-sand-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow: hidden;
}

.hub-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.hub-card-body {
    padding: 20px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hub-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.hub-tag {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(124, 124, 240, 0.1);
    color: var(--color-indigo-deep);
    border: 1px solid rgba(124, 124, 240, 0.18);
}

.hub-tag--sand {
    background: var(--bg-sand-light);
    color: var(--text-muted);
    border-color: var(--bg-sand-border);
}

.hub-tag--green {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.2);
}

.hub-tag--amber {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border-color: rgba(245, 158, 11, 0.2);
}

.hub-card-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: var(--text-heading);
}

.hub-card-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.55;
    flex: 1;
}

.hub-by-category-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.hub-cluster-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.hub-cluster-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--color-indigo-deep);
    background: #fff;
    border: 1.5px solid var(--bg-sand-border);
    transition: all 0.2s ease;
}

.hub-cluster-pill:hover {
    border-color: var(--color-indigo);
    background: rgba(124, 124, 240, 0.06);
}

.hub-cluster-pill.is-active,
button.hub-cluster-pill.is-active {
    border-color: var(--color-indigo);
    background: rgba(124, 124, 240, 0.08);
}

button.hub-cluster-pill {
    cursor: pointer;
    font-family: inherit;
}

.hub-cta-bar {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-sand-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--bg-sand-border);
    margin-top: 28px;
}

.hub-cta-bar p {
    color: var(--text-muted);
    margin: 0 0 16px;
    font-size: 0.95rem;
}
