.next-magazine {
    --next-content-gutter: 12px;
    color: var(--next-ink, #172326);
}

.next-magazine-content {
    width: calc(100% - (var(--next-content-gutter) * 2));
    max-width: 1320px;
    margin-inline: auto;
    box-sizing: border-box;
}

.next-magazine-content > .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.next-magazine-section,
.next-magazine-article {
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--next-border, #e9eff0);
    border-radius: var(--next-radius, 16px);
    background: var(--next-surface, #fff);
    box-shadow: var(--next-shadow, 0 10px 30px rgba(23,35,38,.06));
}

/* Section header — same visual language as Homepage sections */

.next-magazine-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 16px;
    border-bottom: 1px solid var(--next-border, #e9eff0);
}

.next-magazine-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.next-magazine-icon,
.next-magazine-side-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 10px;
    background: rgba(0,186,186,.10);
    color: var(--next-primary, #00baba);
}

.next-magazine-icon i,
.next-magazine-side-icon i {
    font-size: 13px;
}

.next-magazine-title {
    margin: 0;
    color: var(--next-ink, #172326);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.5;
}

.next-magazine-subtitle {
    display: block;
    margin-top: 2px;
    color: #9aa5a7;
    font-size: 9px;
}

/* Archive cards */

.next-magazine-grid {
    --mag-card-border: var(--next-border, #e9eff0);
}

.next-magazine-col {
    border-left: 1px solid var(--mag-card-border);
    border-bottom: 1px solid var(--mag-card-border);
}

.next-mag-card {
    overflow: hidden;
    background: #fff;
    transition: background .2s ease, box-shadow .2s ease;
}

.next-mag-card:hover {
    background: #fcfefe;
}

.next-mag-card a {
    color: inherit;
    text-decoration: none;
}

.next-mag-card-image {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--next-surface-soft, #f7fafb);
}

.next-mag-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .25s ease;
}

.next-mag-card:hover .next-mag-card-image img {
    transform: scale(1.035);
}

.next-mag-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--next-primary, #00baba);
    background: #f7fafa;
}

.next-mag-placeholder i {
    font-size: 28px;
}

.next-mag-card-body {
    min-height: 112px;
    padding: 11px 12px 10px;
}

.next-mag-card-title {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--next-ink, #172326);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.next-mag-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 8px;
    color: #9aa5a7;
    font-size: 9px;
}

.next-mag-card-meta i {
    margin-left: 3px;
}

.next-mag-card-arrow {
    color: var(--next-primary, #00baba);
}

/* Pagination */

.next-magazine-pagination {
    padding: 16px;
    border-top: 1px solid var(--next-border, #e9eff0);
    text-align: center;
}

.next-magazine-pagination ul {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.next-magazine-pagination li {
    display: inline-flex;
}

.next-magazine-pagination a,
.next-magazine-pagination span {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid var(--next-border, #e9eff0);
    border-radius: 9px;
    color: var(--next-ink, #172326);
    background: #fff;
    text-decoration: none;
    font-size: 10px;
}

.next-magazine-pagination .current {
    border-color: var(--next-primary, #00baba);
    background: var(--next-primary, #00baba);
    color: #fff;
}

.next-magazine-empty {
    padding: 32px 16px;
    color: var(--next-muted, #6f7d80);
    text-align: center;
}

/* Single */

.next-magazine-article {
    padding: 20px;
}

.next-magazine-article-head {
    margin-bottom: 18px;
}

.next-magazine-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    color: var(--next-primary, #00baba);
    font-size: 10px;
    font-weight: 800;
}

.next-magazine-article-title {
    position: relative;
    margin: 0;
    padding-bottom: 14px;
    color: var(--next-ink, #172326);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.65;
}

.next-magazine-article-title::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 58px;
    height: 3px;
    border-radius: 999px;
    background: var(--next-primary, #00baba);
}

.next-magazine-article-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--next-muted, #6f7d80);
    font-size: 10px;
}

.next-magazine-featured {
    margin: 0 0 22px;
    overflow: hidden;
    border-radius: 12px;
    background: #f7fafb;
}

.next-magazine-featured img {
    display: block;
}

.next-magazine-content-body {
    color: #465457;
    font-size: 14px;
    line-height: 2.15;
}

.next-magazine-content-body p {
    margin-bottom: 1rem;
}

.next-magazine-content-body h2,
.next-magazine-content-body h3,
.next-magazine-content-body h4 {
    margin-top: 26px;
    color: var(--next-ink, #172326);
    font-weight: 900;
    line-height: 1.7;
}

.next-magazine-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.next-magazine-content-body a {
    color: var(--next-primary-dark, #008f91);
}

.next-magazine-content-body blockquote {
    margin: 22px 0;
    padding: 12px 16px;
    border: 1px solid rgba(0,186,186,.15);
    border-right: 3px solid var(--next-primary, #00baba);
    border-radius: 10px;
    background: #f7fdfd;
}

/* Sidebar */

.next-magazine-sidebar {
    top: 16px;
}

.next-magazine-side-box {
    overflow: hidden;
    border: 1px solid var(--next-border, #e9eff0);
    border-radius: var(--next-radius, 16px);
    background: #fff;
    box-shadow: var(--next-shadow, 0 10px 30px rgba(23,35,38,.06));
}

.next-magazine-side-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 0 12px;
    color: var(--next-ink, #172326);
    font-size: 12px;
    font-weight: 900;
}

.next-magazine-ad {
    overflow: hidden;
    border-radius: var(--next-radius, 16px);
    box-shadow: var(--next-shadow, 0 10px 30px rgba(23,35,38,.06));
}

.next-magazine-ad img {
    display: block;
    transition: transform .25s ease;
}

.next-magazine-ad:hover img {
    transform: scale(1.025);
}

.next-magazine-side-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: var(--next-ink, #172326);
    font-size: 12px;
    font-weight: 900;
}

.next-magazine-side-heading .next-magazine-side-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 9px;
}

.next-magazine-related-card {
    min-height: 72px;
    overflow: hidden;
    border: 1px solid var(--next-border, #e9eff0);
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.next-magazine-related-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0,186,186,.28);
    box-shadow: var(--next-shadow, 0 10px 30px rgba(23,35,38,.06));
}

.next-magazine-related-image {
    width: 86px;
    height: 72px;
    object-fit: cover;
}

.next-magazine-related-title {
    display: -webkit-box;
    padding: 8px 10px;
    overflow: hidden;
    color: var(--next-ink, #172326);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* Exact Homepage container breakpoints */

@media (min-width: 576px) {
    .next-magazine-content {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .next-magazine-content {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .next-magazine-content {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .next-magazine-content {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .next-magazine-content {
        max-width: 1320px;
    }
}

@media (max-width: 767.98px) {
    .next-magazine {
        --next-content-gutter: 10px;
    }

    .next-magazine-head {
        min-height: 54px;
        padding: 0 12px;
    }

    .next-magazine-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
        border-radius: 9px;
    }

    .next-magazine-title {
        font-size: 13px;
    }

    .next-magazine-subtitle {
        font-size: 8px;
    }

    .next-magazine-article {
        padding: 14px;
    }

    .next-magazine-article-title {
        font-size: 20px;
    }

    .next-magazine-content-body {
        font-size: 13px;
        line-height: 2;
    }

    .next-magazine-card-body {
        min-height: 104px;
        padding: 9px 10px;
    }

    .next-magazine-card-title {
        font-size: 11px;
    }

    .next-magazine-card-meta {
        font-size: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .next-magazine *,
    .next-magazine *::before,
    .next-magazine *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}