/* Forum is the canonical desktop rail and hero rhythm for primary product pages. */
body.mk-page-blog .site-main > .classic-forum-wrapper.forum-reference-wrapper,
body.mk-page-tools .site-main > .tools-page.classic-forum-wrapper.forum-reference-wrapper {
    width: min(calc(100% - (var(--mk-gutter, 24px) * 2)), var(--pm-rail, 1220px)) !important;
    max-width: var(--pm-rail, 1220px) !important;
    margin: clamp(1.25rem, 3vw, 2.25rem) auto 3rem !important;
    padding: 1.25rem 0 2.5rem !important;
    box-sizing: border-box !important;
}

.forum-reference-wrapper > .blog-hero,
.forum-reference-wrapper > .tools-hero {
    width: 100% !important;
    max-width: none !important;
    min-height: 220px !important;
    height: auto !important;
    margin: 0 0 1rem !important;
    padding: clamp(1.5rem, 3.2vw, 2.35rem) !important;
    box-sizing: border-box !important;
    display: grid !important;
    align-items: center !important;
}

.blog-reference-wrapper .blog-hero-inner,
.tools-page.forum-reference-wrapper .hero-content {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    align-items: center !important;
}

.blog-reference-wrapper .blog-page-hero .blog-hero-inner {
    display: grid !important;
    align-content: center !important;
    gap: .45rem !important;
}

.blog-reference-wrapper .blog-page-hero :is(h1, p),
.tools-page.forum-reference-wrapper :is(.hero-title, .hero-subtitle) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.blog-reference-wrapper .blog-page-hero .blog-search,
.tools-page.forum-reference-wrapper .hero-actions {
    margin-top: .55rem !important;
}

body.mk-product-editorial .blog-reference-wrapper :is(
    main,
    .blog-category-page,
    .blog-tag-page,
    .blog-search-page,
    .page-shell,
    .blog-main-layout,
    .blog-section-wrap,
    .blog-category-layout
),
.forum-reference-wrapper > .blog-main-layout,
.forum-reference-wrapper > .blog-section-wrap,
.forum-reference-wrapper > main,
.forum-reference-wrapper > main > .blog-main-layout,
.forum-reference-wrapper > main > .blog-section-wrap {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
}

.forum-reference-wrapper > main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
}

body.mk-product-editorial .blog-reference-wrapper .blog-main-layout {
    grid-template-columns: minmax(0, 1fr) 320px !important;
    gap: 1.5rem !important;
    margin-top: 1.25rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
}

body.mk-product-editorial .blog-reference-wrapper :is(
    .blog-list,
    .blog-list-inline,
    section.blog-list,
    .post-grid
),
.blog-reference-wrapper .blog-main-layout > section,
.blog-reference-wrapper .blog-main-layout > aside,
.blog-reference-wrapper .blog-main-layout > main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
}

.blog-reference-wrapper .blog-main-layout > main.page-shell {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
}

.blog-reference-wrapper .post-grid,
.blog-reference-wrapper .blog-main-layout > main.page-shell > .post-grid {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
}

.blog-reference-wrapper .post-card {
    margin-left: 0 !important;
    margin-inline-start: 0 !important;
}

.tools-page.forum-reference-wrapper {
    display: flex !important;
    flex-direction: column !important;
}

@media (max-width: 1040px) {
    .forum-reference-wrapper > .blog-hero,
    .forum-reference-wrapper > .tools-hero {
        height: auto !important;
        min-height: 220px !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .blog-hero-inner {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .hero-right {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        justify-self: start !important;
        width: auto !important;
    }

    body.mk-product-editorial .blog-reference-wrapper .blog-main-layout,
    .blog-reference-wrapper .blog-main-layout,
    .blog-post-layout {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }

    body.mk-product-editorial .blog-reference-wrapper .blog-main-layout > aside,
    body.mk-product-editorial .blog-reference-wrapper .blog-main-layout > .blog-sidebar,
    .blog-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-top: 2rem !important;
    }

    body.mk-product-editorial .blog-reference-wrapper .blog-main-layout > main,
    body.mk-product-editorial .blog-reference-wrapper .blog-main-layout > .blog-post-wrap,
    .blog-post-wrap,
    .blog-post {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }
}

@media (max-width: 720px) {
    body.mk-page-blog .site-main > .classic-forum-wrapper.forum-reference-wrapper,
    body.mk-page-tools .site-main > .tools-page.classic-forum-wrapper.forum-reference-wrapper {
        width: min(calc(100% - 1rem), var(--pm-rail, 1220px)) !important;
        margin-top: .75rem !important;
        padding-top: 1rem !important;
    }

    .forum-reference-wrapper > .blog-hero,
    .forum-reference-wrapper > .tools-hero {
        min-height: 0 !important;
        padding: 1.25rem !important;
    }
}
@media (max-width: 720px) {
    .blog-reference-wrapper .blog-hero-inner,
    .tools-page.forum-reference-wrapper .hero-content {
        min-height: 0 !important;
    }
}

/* Forum-matched internal hero composition. */
.forum-reference-wrapper > .blog-featured-section,
.forum-reference-wrapper > .blog-featured-section > .blog-section-wrap {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

@media (min-width: 1041px) {
    .blog-reference-wrapper .blog-page-hero .blog-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(360px, 480px) !important;
        grid-template-areas:
            "eyebrow search"
            "title search"
            "summary search" !important;
        column-gap: 2rem !important;
        row-gap: .25rem !important;
    }

    .blog-reference-wrapper .blog-page-hero .blog-eyebrow {
        grid-area: eyebrow !important;
        justify-self: start !important;
    }

    .blog-reference-wrapper .blog-page-hero h1 {
        grid-area: title !important;
        align-self: end !important;
    }

    .blog-reference-wrapper .blog-page-hero p {
        grid-area: summary !important;
        align-self: start !important;
    }

    .blog-reference-wrapper .blog-page-hero .blog-search {
        grid-area: search !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        align-self: center !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .blog-hero-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        column-gap: 2rem !important;
        row-gap: 1rem !important;
        align-items: center !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .hero-left {
        min-width: 0 !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .breadcrumb {
        margin: 0 0 .5rem;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .hero-title {
        display: flex !important;
        align-items: center !important;
        gap: .85rem !important;
        margin: 0 !important;
        font-size: clamp(1.85rem, 3.2vw, 2.5rem) !important;
        line-height: 1.15 !important;
        color: #fff !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .cat-hero-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        flex-shrink: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .22);
        color: #fbbf24;
        box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .cat-hero-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .hero-subtitle {
        margin: .6rem 0 0 !important;
        color: rgba(255, 255, 255, .82);
        font-size: .98rem;
        line-height: 1.55;
        max-width: 780px !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) .hero-right {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        justify-self: end !important;
        width: auto !important;
        margin: 0 !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) :is(.cat-stat-badge, .cat-stats) {
        position: static !important;
        transform: none !important;
        right: auto !important;
        top: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: .55rem !important;
        padding: .5rem 1.15rem !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, .10) !important;
        border: 1px solid rgba(255, 255, 255, .20) !important;
        color: #fff !important;
        font-size: .92rem !important;
        font-weight: 700 !important;
        white-space: nowrap !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, .12) !important;
    }

    .blog-reference-wrapper :is(.cat-hero, .tag-hero) :is(.cat-stat-badge, .cat-stats) svg {
        width: 17px !important;
        height: 17px !important;
        color: #fbbf24;
    }

    .blog-reference-wrapper .blog-post-hero .blog-hero-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(260px, auto) !important;
        grid-template-rows: auto auto auto !important;
        column-gap: 2rem !important;
        row-gap: .2rem !important;
        align-content: center !important;
    }

    .blog-reference-wrapper .blog-post-hero .breadcrumb {
        grid-column: 1;
        grid-row: 1;
        margin: 0;
    }

    .blog-reference-wrapper .blog-post-hero .post-title {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
    }

    .blog-reference-wrapper .blog-post-hero .post-lede {
        grid-column: 1;
        grid-row: 3;
        margin: 0 !important;
    }

    .blog-reference-wrapper .blog-post-hero .post-byline {
        grid-column: 2;
        grid-row: 1 / 4;
        align-self: center;
        justify-self: end;
        margin: 0;
    }

    .blog-reference-wrapper .blog-post-hero .byline-author-link,
    .blog-reference-wrapper .blog-post-hero .byline-author strong {
        color: var(--rank-color, #ffffff);
        font-weight: 800;
        text-decoration: none;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini {
        display: inline-flex;
        align-items: center;
        gap: 0.28rem;
        min-height: 22px;
        height: 22px;
        padding: 0 0.5rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1;
        vertical-align: middle;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
        text-decoration: none;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini:not(.rank-special-package) {
        background: #ffffff;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini .user-rank-badge-label {
        font-size: 0.72rem;
        font-weight: 800;
        line-height: 1;
        white-space: nowrap;
        color: inherit;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini .user-rank-badge-icon,
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini svg {
        width: 13px;
        height: 13px;
        display: inline-block;
        vertical-align: middle;
        color: inherit;
        stroke: currentColor;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.role-admin {
        --rank-color: #dc2626;
        border: 1.5px solid #dc2626;
        color: #dc2626;
        background: #ffffff;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.role-admin .user-rank-badge-label,
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.role-admin .user-rank-badge-icon,
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.role-admin svg {
        color: #dc2626;
        stroke: #dc2626;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini:is(.role-mod, .role-moderator) {
        --rank-color: #10b981 !important;
        border: 1.5px solid #10b981 !important;
        color: #10b981 !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini:is(.role-mod, .role-moderator) .user-rank-badge-label,
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini:is(.role-mod, .role-moderator) .user-rank-badge-icon,
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini:is(.role-mod, .role-moderator) svg {
        color: #10b981 !important;
        stroke: #10b981 !important;
    }

    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-yeni-memur {
        --rank-color: #64748b !important;
        border: 1.5px solid #cbd5e1 !important;
        color: #64748b !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-yardimsever {
        --rank-color: #92400e !important;
        border: 1.5px solid #92400e !important;
        color: #92400e !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-tecrubeli {
        --rank-color: #2563eb !important;
        border: 1.5px solid #3b82f6 !important;
        color: #2563eb !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-saygin {
        --rank-color: #7c3aed !important;
        border: 1.5px solid #8b5cf6 !important;
        color: #7c3aed !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-kidemli {
        --rank-color: #d97706 !important;
        border: 1.5px solid #f59e0b !important;
        color: #d97706 !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-mentor {
        --rank-color: #c026d3 !important;
        border: 1.5px solid #c026d3 !important;
        color: #c026d3 !important;
        background: #ffffff !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-special-package {
        border: 1.5px solid var(--special-badge-border, var(--rank-color, #dc2626)) !important;
        color: var(--special-badge-color, #ffffff) !important;
        background: var(--special-badge-bg, #7f1d1d) !important;
        background-color: var(--special-badge-bg, #7f1d1d) !important;
    }
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-special-package .user-rank-badge-label,
    .blog-reference-wrapper .blog-post-hero .user-rank-badge-mini.rank-special-package svg {
        color: var(--special-badge-color, #ffffff) !important;
        stroke: var(--special-badge-color, #ffffff) !important;
    }


    .tools-page.forum-reference-wrapper > .tools-hero .hero-content {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 1.5rem !important;
        align-items: center !important;
    }

    .tools-page.forum-reference-wrapper > .tools-hero .hero-left {
        min-width: 0 !important;
        max-width: none !important;
    }

    .tools-page.forum-reference-wrapper > .tools-hero .hero-title {
        font-size: clamp(1.75rem, 2.4vw, 2.15rem) !important;
        line-height: 1.08 !important;
    }

    .tools-page.forum-reference-wrapper > .tools-hero .hero-stats-grid {
        flex: 0 0 auto;
        margin: 0 !important;
    }
}
/* Exact forum-reference alignment: blog and tools. */
.blog-reference-wrapper :is(
    .blog-section-wrap,
    .blog-featured-section,
    .blog-category-page,
    .blog-tag-page,
    .blog-search-page,
    .blog-post-wrap,
    .blog-main-layout,
    .blog-category-layout,
    .blog-list,
    .blog-list-inline,
    .post-grid
) {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-inline: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
}

.tools-page.forum-reference-wrapper > .tools-summary-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-height: 60px !important;
    margin: 0 0 .75rem !important;
    gap: 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--border-color, #e4e7ec) !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06) !important;
}

.tools-page.forum-reference-wrapper > .tools-summary-bar .hero-stat-card {
    min-width: 0 !important;
    min-height: 60px !important;
    padding: .7rem 1rem !important;
    border: 0 !important;
    border-right: 1px solid var(--border-color, #e4e7ec) !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--text-color, #172033) !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .65rem !important;
}

.tools-page.forum-reference-wrapper > .tools-summary-bar .hero-stat-card:last-child {
    border-right: 0 !important;
}

.tools-page.forum-reference-wrapper > .tools-summary-bar :is(.stat-value, .stat-label, .stat-icon) {
    color: inherit !important;
}

.tools-page.forum-reference-wrapper > .tools-summary-bar .stat-value {
    font-size: 1rem !important;
    line-height: 1 !important;
}

.tools-page.forum-reference-wrapper > .tools-summary-bar .stat-label {
    margin-top: .2rem !important;
    font-size: .72rem !important;
    line-height: 1.15 !important;
}

@media (min-width: 1041px) {
    .tools-page.forum-reference-wrapper > .tools-hero .hero-title {
        max-width: none !important;
        font-size: clamp(1.65rem, 2vw, 2rem) !important;
        line-height: 1.08 !important;
        white-space: nowrap !important;
    }

    .tools-page.forum-reference-wrapper > .tools-hero .hero-actions--reference {
        margin: 0 !important;
        align-self: center;
        justify-content: flex-end;
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 1180px) and (min-width: 1041px) {
    .tools-page.forum-reference-wrapper > .tools-hero .hero-title {
        font-size: 1.55rem !important;
    }
}

@media (max-width: 720px) {
    .tools-page.forum-reference-wrapper > .tools-summary-bar {
        grid-template-columns: 1fr !important;
    }

    .tools-page.forum-reference-wrapper > .tools-summary-bar .hero-stat-card {
        border-right: 0 !important;
        border-bottom: 1px solid var(--border-color, #e4e7ec) !important;
    }

    .tools-page.forum-reference-wrapper > .tools-summary-bar .hero-stat-card:last-child {
        border-bottom: 0 !important;
    }
}

/* Editorial & Blog Content Blockquote Alignment Overrides */
.post-content blockquote.blog-align-center,
.post-content blockquote.forum-text-center,
.post-content blockquote[style*="text-align: center"],
.post-content blockquote[style*="text-align:center"],
.post-content .blog-align-center blockquote,
.post-content .forum-text-center blockquote,
.post-content div[style*="text-align: center"] blockquote,
.post-content div[style*="text-align:center"] blockquote {
    text-align: center !important;
}

.post-content blockquote.blog-align-center *,
.post-content blockquote.forum-text-center *,
.post-content blockquote[style*="text-align: center"] *,
.post-content blockquote[style*="text-align:center"] *,
.post-content .blog-align-center blockquote *,
.post-content .forum-text-center blockquote *,
.post-content div[style*="text-align: center"] blockquote *,
.post-content div[style*="text-align:center"] blockquote *,
.post-content blockquote div[style*="text-align: center"],
.post-content blockquote div[style*="text-align:center"],
.post-content blockquote p[style*="text-align: center"],
.post-content blockquote p[style*="text-align:center"] {
    text-align: center !important;
}

.post-content blockquote.blog-align-right,
.post-content blockquote.forum-text-right,
.post-content blockquote[style*="text-align: right"],
.post-content blockquote[style*="text-align:right"],
.post-content .blog-align-right blockquote,
.post-content .forum-text-right blockquote {
    text-align: right !important;
}

.post-content blockquote.blog-align-right *,
.post-content blockquote.forum-text-right *,
.post-content blockquote[style*="text-align: right"] *,
.post-content blockquote[style*="text-align:right"] *,
.post-content .blog-align-right blockquote *,
.post-content .forum-text-right blockquote *,
.post-content blockquote div[style*="text-align: right"],
.post-content blockquote div[style*="text-align:right"],
.post-content blockquote p[style*="text-align: right"],
.post-content blockquote p[style*="text-align:right"] {
    text-align: right !important;
}