.cp-hub-page {
    --hub-red: #e53935;
    --hub-red-dark: #c62828;
    --hub-orange: #ff9800;
    --hub-blue-dark: #0c6b94;
    --hub-border: #e8e8e8;
    --hub-bg: #f7f7f7;
    --hub-text-primary: #111111;
    --hub-text-muted: #595959;
    --hub-radius: 0.75rem;
    --hub-touch: 44px;
    --hub-card-color: #e8f0fe;
    --hub-card-icon-color: rgba(255, 255, 255, 0.92);
}

.cp-hub-header {
    padding: 1.5rem 0 1.35rem;
    border-bottom: 2px dashed var(--hub-border);
    margin-bottom: 1.8rem;
}

.cp-hub-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
    color: var(--hub-text-primary);
}

.cp-hub-subtitle {
    font-size: 1rem;
    color: var(--hub-text-muted);
    margin: 0.4rem 0 0;
    max-width: 35rem;
}

.cp-hub-section {
    margin-bottom: 2.75rem;
    animation: cp-hub-fade-up 0.35s ease both;
}

.cp-hub-section:last-child {
    margin-bottom: 0;
}

.cp-hub-section:nth-of-type(2) {
    animation-delay: 0.05s;
}

.cp-hub-section:nth-of-type(3) {
    animation-delay: 0.1s;
}

.cp-hub-section:nth-of-type(4) {
    animation-delay: 0.15s;
}

.cp-hub-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.cp-hub-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
}

.cp-hub-section-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2b2520;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    line-height: 1.2;
    padding-bottom: 0.05rem;
    border-bottom: 1.5px solid #2b2520;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.cp-hub-section-link i.bi {
    font-size: 13px;
    line-height: 1;
}

.cp-hub-section-link:hover,
.cp-hub-section-link:focus-visible {
    color: #c93a4d;
    border-bottom-color: #c93a4d;
}

.cp-hub-section-link:focus-visible {
    outline: 0;
}

.cp-hub-card {
    background: #fff;
    border: 2px dashed var(--hub-border);
    border-radius: var(--hub-radius);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    height: 100%;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.cp-hub-card:hover,
.cp-hub-card:focus {
    border-color: var(--hub-red-dark);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    color: inherit;
}

.cp-hub-card.is-featured {
    border-style: solid;
    border-color: var(--hub-red);
}

.cp-hub-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--hub-radius) - 4px);
    background: var(--hub-card-color, #e8f0fe);
    border: 1px solid var(--hub-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.cp-hub-card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 65%);
    pointer-events: none;
}

.cp-hub-card-image.has-media::before {
    display: none;
}

.cp-hub-card-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

.cp-hub-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.5rem;
}

.cp-hub-card-badge {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.18rem 0.58rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, var(--hub-red), var(--hub-orange));
    color: #fff;
    align-self: flex-start;
    white-space: nowrap;
}

.cp-hub-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--hub-text-primary);
}

.cp-hub-card.is-featured .cp-hub-card-title {
    font-size: 1rem;
}

.cp-hub-card-desc {
    font-size: 0.9rem;
    color: var(--hub-text-muted);
    line-height: 1.6;
    flex: 1;
}

.cp-hub-card-dest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.2rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--hub-border);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--hub-red-dark);
}

.cp-hub-card-dest i.bi {
    font-size: 13px;
    line-height: 1;
}

/* -- Swiper integration ---------------------------------------- */
.cp-hub-swiper.swiper-initialized {
    padding: 4px 0 12px;
    margin: -4px 0 -12px;
}

.cp-hub-swiper .swiper-slide {
    height: auto;
}

.cp-hub-pagination {
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    .cp-hub-section {
        margin-bottom: 3.5rem;
    }

    .cp-hub-pagination {
        display: none;
    }
}

/* -- Grid fallback (tablet+) ---------------------------------- */
@media (min-width: 768px) {
    .cp-hub-swiper:not(.swiper-initialized) {
        overflow: visible;
    }

    .cp-hub-swiper:not(.swiper-initialized) .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@media (min-width: 900px) {
    .cp-hub-swiper[data-cols="3"]:not(.swiper-initialized) .swiper-wrapper,
    .cp-hub-swiper[data-cols="4"]:not(.swiper-initialized) .swiper-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .cp-hub-swiper[data-cols="4"]:not(.swiper-initialized) .swiper-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

@keyframes cp-hub-fade-up {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
