/*
 * Passatempos Portugal — Hub page styles
 * Mobile-first: horizontal swipeable carousel per category
 * Desktop: compact card rows
 */

/* Page-level */
.pt-hub-page {
    background: #f7f7f9;
}

.pt-hub-hero {
    background: linear-gradient(135deg, var(--orange-main) 0%, #e55a1b 100%);
    color: #fff;
    text-align: center;
    padding: 2.5rem 1.25rem 2rem;
}

.pt-hub-hero h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.pt-hub-hero p {
    font-size: 1.05rem;
    opacity: 0.92;
    max-width: 560px;
    margin: 0 auto;
}

/* Category row */
.pt-category-row {
    padding: 2rem 0 1.5rem;
}

.pt-category-row:nth-child(even) {
    background: #fff;
}

.pt-category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0 1.5rem;
    margin: 0 auto 1.25rem;
    max-width: 1240px;
}

.pt-category-header i {
    font-size: 1.35rem;
    color: var(--orange-main);
    width: 28px;
    text-align: center;
}

.pt-category-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--purple);
    margin: 0;
    text-align: center;
}

.pt-category-header h2::after {
    display: none; /* override .section-title pseudo */
}

.pt-category-count {
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--orange-main);
    color: #fff;
    padding: 0.15rem 0.55rem;
    border-radius: 10px;
    margin-left: 0.3rem;
}

/* Scroll track — horizontal container on mobile */
.pt-scroll-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1.5rem;
    scroll-padding-right: 1.5rem;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1.5rem 1.25rem;
    margin: 0 auto;
    max-width: 1240px;
    scrollbar-width: none; /* Firefox */
}

.pt-scroll-track::-webkit-scrollbar {
    display: none;
}

/* Mini card */
.pt-mini-card {
    flex: 0 0 260px;
    min-width: 260px;
    max-width: 260px;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.pt-mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.pt-mini-card-img {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #eee;
}

.pt-mini-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pt-mini-card-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.pt-mini-card-title {
    font-family: var(--font-headers);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--purple);
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.pt-mini-card-prize {
    font-size: 0.82rem;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.pt-mini-card-prize i {
    color: var(--orange-main);
    margin-right: 0.3rem;
}

.pt-mini-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.pt-mini-card-date {
    font-size: 0.78rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.pt-mini-card-date i {
    color: var(--orange-main);
}

.pt-mini-card-btn {
    display: inline-block;
    background: var(--orange-main);
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s;
}

.pt-mini-card-btn:hover {
    background: var(--orange-light);
    color: #fff;
}

/* "Ver todos" card */
.pt-see-all-card {
    flex: 0 0 200px;
    min-width: 200px;
    max-width: 200px;
    scroll-snap-align: start;
    background: linear-gradient(135deg, var(--purple) 0%, #7b4cbf 100%);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    transition: transform 0.2s, box-shadow 0.2s;
    padding: 1.5rem;
    text-align: center;
}

.pt-see-all-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(85, 43, 148, 0.3);
    color: #fff;
}

.pt-see-all-card i {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.pt-see-all-card span {
    font-family: var(--font-headers);
    font-size: 1.05rem;
    font-weight: 700;
}

/* CTA button below category — desktop only */
.pt-category-cta {
    display: none; /* hidden on mobile, shown on desktop */
    text-align: center;
    padding: 0.5rem 1.25rem 0.75rem;
}

.pt-category-cta a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--purple);
    color: #fff !important;
    font-family: var(--font-headers);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.55rem 1.4rem;
    border-radius: 25px;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.pt-category-cta a:hover {
    background: #7b4cbf;
    transform: translateY(-2px);
    color: #fff;
}

/* Empty state */
.pt-empty-state {
    padding: 2rem 1.25rem;
    text-align: center;
    color: #999;
    font-size: 0.95rem;
}

.pt-empty-state i {
    font-size: 1.8rem;
    display: block;
    margin-bottom: 0.5rem;
    color: #ccc;
}

/* Loading state */
.pt-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2rem 1.25rem;
    color: var(--orange-main);
    font-size: 1rem;
}

.pt-loading i {
    font-size: 1.4rem;
}

/* Expired card */
.pt-mini-card.pt-expired {
    opacity: 0.5;
    pointer-events: none;
}

/* ====== Desktop ====== */
@media (min-width: 769px) {
    .pt-hub-hero h1 {
        font-size: 2.5rem;
    }

    .pt-scroll-track {
        flex-wrap: wrap;
        overflow-x: visible;
        scroll-snap-type: none;
        padding: 0.5rem 2rem 1rem;
        gap: 1.25rem;
        justify-content: center;
    }

    .pt-mini-card {
        flex: 0 0 220px;
        min-width: 220px;
        max-width: 220px;
    }

    .pt-mini-card-img {
        height: 125px;
    }

    .pt-mini-card-body {
        padding: 0.75rem 0.9rem 0.9rem;
    }

    .pt-mini-card-title {
        font-size: 0.88rem;
    }

    .pt-mini-card-prize {
        font-size: 0.8rem;
    }

    /* Hide "Ver todos" card on desktop — use CTA button instead */
    .pt-see-all-card {
        display: none;
    }

    .pt-category-cta {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
    }

    .pt-category-header {
        padding: 0 2rem;
        justify-content: center;
    }

    .pt-category-row {
        padding: 2.5rem 0 1.75rem;
    }
}

@media (min-width: 1200px) {
    .pt-mini-card {
        flex: 0 0 230px;
        min-width: 230px;
        max-width: 230px;
    }
}

