/* Magazine Hub — unified landing */
.mag-hub {
    --mag-hub-primary: #1e3a8a;
    --mag-hub-accent: #2563eb;
    --mag-hub-sky: #38bdf8;
    --mag-hub-ink: #0f172a;
    --mag-hub-muted: #64748b;
    --mag-hub-border: #e2e8f0;
    --mag-hub-bg: #f8fafc;
    --mag-hub-radius: 16px;
    color: var(--mag-hub-ink);
}

.mag-hub-hero {
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(56, 189, 248, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 100% 20%, rgba(37, 99, 235, 0.14) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #1e3a8a 45%, #1d4ed8 100%);
    color: #fff;
    padding: 3rem 0 3.5rem;
    margin-top: -20px;
}

.mag-hub-hero__inner {
    max-width: 920px;
    margin: 0 auto;
    text-align: center;
}

.mag-hub-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.mag-hub-hero h1 {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.mag-hub-hero__lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(226, 232, 240, 0.92);
    max-width: 680px;
    margin: 0 auto 1.75rem;
}

.mag-hub-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.mag-hub-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mag-hub-pill:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    transform: translateY(-1px);
}

.mag-hub-body {
    padding: 2.5rem 0 4rem;
    background: var(--mag-hub-bg);
}

.mag-hub-section {
    margin-bottom: 3.5rem;
}

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

.mag-hub-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.mag-hub-section__title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.mag-hub-section__sub {
    margin: 0;
    color: var(--mag-hub-muted);
    font-size: 0.9375rem;
    max-width: 560px;
}

.mag-hub-link-all {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--mag-hub-accent);
    text-decoration: none;
    white-space: nowrap;
}

.mag-hub-link-all:hover {
    color: var(--mag-hub-primary);
}

/* Upcoming — Jan–Dec month carousel */
.mag-hub-upcoming-calendar {
    background: #fff;
    border: 1px solid var(--mag-hub-border);
    border-radius: var(--mag-hub-radius);
    padding: 1.25rem 1.25rem 1.5rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
}

.mag-hub-upcoming-calendar__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--mag-hub-border);
}

.mag-hub-upcoming-calendar__year-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.mag-hub-upcoming-calendar__year-label {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--mag-hub-primary);
    min-width: 3.5rem;
    text-align: center;
}

.mag-hub-upcoming-calendar__year-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--mag-hub-border);
    background: var(--mag-hub-bg);
    color: var(--mag-hub-primary);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.mag-hub-upcoming-calendar__year-btn:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--mag-hub-primary);
}

.mag-hub-upcoming-calendar__year-btn--disabled {
    opacity: 0.35;
    pointer-events: none;
}

.mag-hub-upcoming-calendar__hint {
    font-size: 0.875rem;
    color: var(--mag-hub-muted);
}

.mag-hub-month-strip-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.35rem;
    margin-bottom: 1.25rem;
}

.mag-hub-month-strip-nav {
    flex-shrink: 0;
    width: 36px;
    border: 1px solid var(--mag-hub-border);
    border-radius: 10px;
    background: var(--mag-hub-bg);
    color: var(--mag-hub-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mag-hub-month-strip-nav:hover {
    background: #eff6ff;
}

.mag-hub-month-strip {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    padding: 0.15rem 0.1rem;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

.mag-hub-month-strip::-webkit-scrollbar {
    height: 6px;
}

.mag-hub-month-tab {
    flex: 0 0 auto;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 4.25rem;
    padding: 0.55rem 0.65rem 0.5rem;
    border: 2px solid var(--mag-hub-border);
    border-radius: 12px;
    background: #fff;
    color: var(--mag-hub-muted);
    font: inherit;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.mag-hub-month-tab__short {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--mag-hub-ink);
    line-height: 1;
}

.mag-hub-month-tab__full {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
}

.mag-hub-month-tab__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mag-hub-accent);
}

.mag-hub-month-tab--has-issue:not(.mag-hub-month-tab--active) {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.mag-hub-month-tab:hover {
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.mag-hub-month-tab--active {
    border-color: var(--mag-hub-accent);
    background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
    color: var(--mag-hub-primary);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.mag-hub-month-tab--active .mag-hub-month-tab__short {
    color: var(--mag-hub-primary);
}

.mag-hub-upcoming-calendar .mag-hub-upcoming {
    border: none;
    box-shadow: none;
}

.mag-hub-upcoming-panels {
    min-height: 200px;
}

.mag-hub-upcoming-panel {
    animation: magHubFadeIn 0.25s ease;
}

@keyframes magHubFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mag-hub-upcoming--empty .mag-hub-upcoming__media--placeholder {
    background: linear-gradient(145deg, #f1f5f9 0%, #e2e8f0 100%);
}

.mag-hub-upcoming__placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--mag-hub-muted);
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    padding: 1rem;
}

.mag-hub-upcoming__placeholder-inner .bi {
    font-size: 2.5rem;
    opacity: 0.45;
}

.mag-hub-tag--muted {
    background: #f1f5f9;
    color: #64748b;
}

.mag-hub-upcoming-calendar__empty-note {
    font-size: 0.875rem;
    color: var(--mag-hub-muted);
}

@media (max-width: 575.98px) {
    .mag-hub-month-tab {
        min-width: 3.5rem;
        padding: 0.5rem 0.45rem;
    }

    .mag-hub-month-tab__full {
        display: none;
    }

    .mag-hub-upcoming-calendar {
        padding: 1rem;
    }
}

/* Upcoming featured card */
.mag-hub-upcoming {
    background: #fff;
    border: 1px solid var(--mag-hub-border);
    border-radius: var(--mag-hub-radius);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.06);
    display: grid;
    grid-template-columns: 1fr 1.1fr;
}

@media (max-width: 991.98px) {
    .mag-hub-upcoming {
        grid-template-columns: 1fr;
    }
}

.mag-hub-upcoming__media {
    background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

.mag-hub-upcoming__media img {
    max-height: 380px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(15, 23, 42, 0.18));
}

.mag-hub-upcoming__body {
    padding: 2rem 2rem 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 992px) {
    .mag-hub-upcoming__body {
        padding: 2.5rem 2.5rem 2.5rem 1rem;
    }
}

.mag-hub-tag {
    display: inline-block;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.mag-hub-upcoming__title {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.2;
}

.mag-hub-upcoming__text {
    color: var(--mag-hub-muted);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.mag-hub-upcoming__meta {
    font-size: 0.875rem;
    color: var(--mag-hub-muted);
    margin-bottom: 1.25rem;
}

.mag-hub-upcoming__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.mag-hub-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mag-hub-btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.mag-hub-btn--primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff !important;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
}

.mag-hub-btn--ghost {
    background: #fff;
    color: var(--mag-hub-accent) !important;
    border: 1px solid #bfdbfe;
}

.mag-hub-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.mag-hub-mini-card {
    background: #fff;
    border: 1px solid var(--mag-hub-border);
    border-radius: 12px;
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.mag-hub-mini-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
    color: inherit;
}

.mag-hub-mini-card__label {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.mag-hub-mini-card__date {
    font-size: 0.78rem;
    color: var(--mag-hub-muted);
}

/* Subscription */
.mag-hub-subscribe {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #0ea5e9 100%);
    border-radius: var(--mag-hub-radius);
    padding: 2rem;
    color: #fff;
    box-shadow: 0 12px 40px rgba(30, 58, 138, 0.22);
}

.mag-hub-subscribe__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 991.98px) {
    .mag-hub-subscribe__grid {
        grid-template-columns: 1fr;
    }
}

.mag-hub-subscribe h2 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 800;
    margin: 0 0 0.75rem;
}

.mag-hub-subscribe p {
    margin: 0 0 1.25rem;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.6;
}

.mag-hub-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

@media (max-width: 767.98px) {
    .mag-hub-plans {
        grid-template-columns: 1fr;
    }
}

.mag-hub-plan {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 1.1rem;
    text-align: center;
    backdrop-filter: blur(4px);
}

.mag-hub-plan__years {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.mag-hub-plan__price {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.mag-hub-plan__note {
    font-size: 0.72rem;
    opacity: 0.75;
}

.mag-hub-btn--light {
    background: #fff;
    color: var(--mag-hub-primary) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

/* Story & e-PDF cards */
.mag-hub-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.mag-hub-card {
    background: #fff;
    border: 1px solid var(--mag-hub-border);
    border-radius: var(--mag-hub-radius);
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.mag-hub-card:hover {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    transform: translateY(-3px);
}

.mag-hub-card__cover {
    aspect-ratio: 3 / 4;
    background: #f1f5f9;
    overflow: hidden;
    position: relative;
}

.mag-hub-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mag-hub-card__badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}

.mag-hub-card__body {
    padding: 1.1rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mag-hub-card__title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 0.5rem;
}

.mag-hub-card__title a {
    color: inherit;
    text-decoration: none;
}

.mag-hub-card__title a:hover {
    color: var(--mag-hub-accent);
}

.mag-hub-card__desc {
    font-size: 0.8125rem;
    color: var(--mag-hub-muted);
    line-height: 1.55;
    margin: 0 0 1rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mag-hub-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
}

.mag-hub-card__meta {
    font-size: 0.75rem;
    color: var(--mag-hub-muted);
    font-weight: 600;
}

.mag-hub-card__cta {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--mag-hub-accent);
    text-decoration: none;
    white-space: nowrap;
}

.mag-hub-card__cta:hover {
    color: var(--mag-hub-primary);
}

.mag-hub-empty {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: #fff;
    border: 1px dashed var(--mag-hub-border);
    border-radius: var(--mag-hub-radius);
    color: var(--mag-hub-muted);
}

.mag-hub-cta-band {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--mag-hub-border);
    border-radius: var(--mag-hub-radius);
}

.mag-hub-cta-band h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.mag-hub-cta-band p {
    color: var(--mag-hub-muted);
    margin: 0 0 1.25rem;
}

.mag-hub-cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}
