/* ==========================================================================
   Single Blog Article Template
   ========================================================================== */

/* ---------- Shared Container (matches Wrapper component) ---------- */

.hero-post-tile-wrapper,
.post-wrapper {
    width: 100%;
    max-width: var(--max-w-wrapper);
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

@media (min-width: 1024px) {
    .hero-post-tile-wrapper,
    .post-wrapper {
        padding-left: 80px;
        padding-right: 80px;
    }
}

/* ---------- Hero Post Tile ---------- */

.hero-post-tile-wrapper {
    position: relative;
    min-height: 400px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .hero-post-tile-wrapper {
        min-height: 616px;
    }
}

@media (min-width: 1280px) {
    .hero-post-tile-wrapper {
        min-height: 77vh;
    }
}

.hpt-bg-image {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 24px;
    right: 24px;
    z-index: -1;
}

@media (min-width: 1024px) {
    .hpt-bg-image {
        left: 80px;
        right: 80px;
    }
}

.hpt-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hpt-tile-wrapper {
    position: relative;
    height: 100%;
}

.hpt-tile-container {
    width: 100%;
    height: 100%;
}

.hpt-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: calc(100% - 24px);
    margin: 8px 0 0 8px;
    padding: 16px 16px 24px;
    background: var(--bg, #000);
    color: var(--color-white);
    z-index: 0;
    clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 24px), calc(100% - 24px) 100%, 0% 100%, 0% 0%);
    transition: all 0.25s;
}

@media (min-width: 1024px) {
    .hpt-tile {
        gap: 24px;
        margin: 40px 0 0 40px;
        padding: 40px 80px 40px 56px;
        width: min(45%, 548px);
        clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0% 100%, 0% 0%);
    }
}

.hpt-texts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hpt-category {
    font-size: 1.6rem;
    line-height: 1.3;
    letter-spacing: normal;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--color-white);
    text-decoration: none;
    width: fit-content;
}

.hpt-category:hover {
    text-decoration: underline;
}

.hpt-title {
    font-size: var(--font-h3-size);
    line-height: var(--font-h3-line);
    letter-spacing: var(--font-h3-letter);
    font-weight: var(--font-h3-weight);
    color: var(--color-white);
}

@media (min-width: 1024px) {
	.hpt-title {
		font-size: var(--font-h2-size);
        line-height: var(--font-h2-line);
        letter-spacing: var(--font-h2-letter);
        font-weight: var(--font-h2-weight);
	}
}

.hpt-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 1024px) {
    .hpt-details {
        align-items: flex-start;
    }
}

.hpt-author {
    display: flex;
    align-items: center;
    width: max-content;
    border: 1px solid currentColor;
    text-decoration: none;
    color: var(--color-white);
}

.hpt-author-img-wrap {
    position: relative;
    min-width: 24px;
    min-height: 24px;
    flex-shrink: 0;
}

@media (min-width: 1024px) {
    .hpt-author-img-wrap {
        min-width: 32px;
        min-height: 32px;
    }
}

.hpt-author-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hpt-author-text {
    display: flex;
    align-items: center;
    padding: 1px 8px 1px 4px;
    font-size: 1.3rem;
}

.hpt-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-p0-size);
    letter-spacing: var(--font-p0-letter);
    font-weight: var(--font-p0-weight);
}

.hpt-reading-time::before {
    content: "|";
    margin: 0 0.5em;
}

/* ---------- Sticky Jump-To Nav (Desktop) ---------- */

.nav-desktop {
    position: relative;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-black);
    opacity: 0;
    transition: opacity 0.25s ease-out;
    display: none;
}

.nav-desktop.is-visible {
    opacity: 1;
}

@media (min-width: 1024px) {
    .nav-desktop {
        display: block;
        position: sticky;
        top: var(--sticky-top);
        left: 0;
        width: 100%;
        z-index: 997;
    }

    .nav-desktop.is-fixed {
        position: fixed;
    }
}

.nd-content {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: safe center;
    gap: 24px;
    padding: 16px 80px;
    overflow-x: auto;
    touch-action: none;
	scrollbar-width: none;
    -ms-overflow-style: none;
}

.nd-content::-webkit-scrollbar {
    display: none;
}

.nd-text {
    flex-shrink: 0;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-gray-dark);
	margin: 0;
}

.nd-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nd-links a {
    display: inline-block;
    padding: 8px 16px;
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--color-black);
    white-space: nowrap;
}

.nd-links a:hover {
    background: var(--color-secondary-gray-light, #f1f1f1);
}

.nd-overflow {
    position: absolute;
    top: 0;
    height: 100%;
    display: flex;
    align-items: center;
    pointer-events: none;
    width: 4.8rem;
}

.nd-overflow-left {
    left: 0;
    background: linear-gradient(to right, var(--color-white) 60%, transparent);
}

.nd-overflow-right {
    right: 0;
    background: linear-gradient(to left, var(--color-white) 60%, transparent);
}

.nd-button-chevrons {
    pointer-events: all;
    width: 3.2rem;
    height: 3.2rem;
    background: var(--color-white);
    border: 1px solid var(--color-gray-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-black);
}

.nd-button-chevrons svg {
    width: 1.8rem;
    height: 1.8rem;
    fill: currentColor;
}

.nd-overflow-left .nd-button-chevrons svg {
    transform: rotate(180deg);
}

/* ---------- Post Wrapper / Two-Column Layout ---------- */

.post-wrapper {
    padding-top: 8px;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .post-wrapper {
        padding-top: 40px;
        margin-bottom: 80px;
    }
}

.post-container {
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .post-container {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 0 24px;
    }
}

/* ---------- Sidebar (Aside) ---------- */

.post-aside {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 40px;
}

@media (min-width: 1024px) {
    .post-aside {
        grid-column: span 3;
        padding: 8px;
        margin-bottom: 0;
    }
}

.nav-simple {
    position: relative;
}

.ns-trigger {
    display: flex;
    width: 100%;
    padding: 16px 8px 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.25s ease-out;
}

.ns-trigger[aria-expanded="true"] {
    color: var(--color-gray-medium);
}

.nav-simple:has(.ns-trigger[aria-expanded="true"]) {
    box-shadow: 0px 16px 24px 0px rgba(0, 0, 0, 0.12);
}

.ns-trigger[aria-expanded="true"] .ns-trigger-icon {
    transform: rotate(-90deg);
}

.ns-trigger-inner {
    display: flex;
    align-items: center;
    column-gap: 8px;
    border-bottom-width: 4px;
    border-bottom-style: solid;
    border-bottom-color: var(--color-coral);
    padding-bottom: 8px;
    text-align: left;
    font-size: var(--font-h6-size);
    line-height: var(--font-h6-line);
    letter-spacing: var(--font-h6-letter);
    font-weight: 500;
    text-transform: uppercase;
}

.ns-trigger-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    transform: rotate(90deg);
    transition: transform 0.2s ease-out;
    flex-shrink: 0;
}

.ns-content {
    display: none;
    width: 100%;
    padding: 8px;
}

.ns-content.is-open {
    display: block;
}

@media (min-width: 1024px) {
    .ns-content {
        display: block;
    }

    .ns-trigger {
        cursor: default;
        pointer-events: none;
    }

    .ns-trigger-icon {
        display: none;
    }
}

.ns-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ns-link {
    display: block;
    width: 100%;
    padding: 12px 8px;
    font-size: 1.6rem;
    text-decoration: none;
    color: var(--color-black);
    transition: background-color 0.25s ease-out;
}

@media (min-width: 1024px) {
    .ns-link {
        padding: 8px;
    }
}

.ns-link:hover {
    background: color-mix(in srgb, var(--color-purple-light) 40%, transparent);
}

/* ---------- Main Content ---------- */

.post-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .post-main {
        grid-column: 4 / span 9;
    }
}

.post-content {
    display: flex;
    flex-direction: column;
	font-size: var(--font-p1-size);
    line-height: var(--font-p1-line);
    letter-spacing: var(--font-p1-letter);
    font-weight: var(--font-p1-weight);
}

.post-content > h1,
.post-content > h2,
.post-content > h3,
.post-content > h4,
.post-content > h5 {
    margin-bottom: .7em;
}

.post-content > hr {
    height: 1px;
    margin-top: 24px;
    margin-bottom: 32px;
    background: var(--color-gray-light, #f1f1f1);
    border: none;
}

.post-separator {
    width: 100%;
    height: 1px;
    background: var(--color-black);
    border: none;
    margin: 0;
}

/* ---------- Author Bio Card ---------- */

.post-author-card {
    width: 100%;
    border: 1px solid var(--color-border, #a0a0a0);
    text-decoration: none;
    color: inherit;
}

@media (min-width: 1024px) {
    .post-author-card {
        grid-template-columns: repeat(9, 1fr);
        gap: 24px;
		display: grid;
    }
}

.pac-image {
    grid-column: span 1;
    height: 100%;
}

@media (min-width: 1024px) {
    .pac-image {
        grid-column: span 3;
    }
}

.pac-image img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.pac-content {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 1.6rem;
}

@media (min-width: 1024px) {
    .pac-content {
        grid-column: span 6;
        gap: 24px;
        padding: 24px 24px 24px 0;
    }
}

.pac-texts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pac-texts p,
.pac-text p {
    margin: 0;
}

.pac-text p:not(:last-child) {
    margin-bottom: 1em;
}

.pac-title {
    font-weight: 700;
    font-size: var(--font-p0-size);
    order: 2;
}

.pac-subtitle {
    font-size: var(--font-p1-size);
    color: var(--color-black);
    order: 1;
}

.pac-text {
    font-size: var(--font-p1-size);
	line-height: var(--font-p1-line);
    letter-spacing: var(--font-p1-letter);
    font-weight: var(--font-p1-weight);
    order: 3;
}

.pac-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 12px 16px;
    background: var(--color-coral);
    color: var(--color-white);
    font-size: 1.4rem;
    line-height: 1.3;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.25s ease-out, color 0.25s ease-out;
}

.pac-link:hover {
    background: var(--color-white);
    color: var(--color-coral);
}

.pac-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

@media (min-width: 1024px) {
    .pac-link svg {
        width: 20px;
        height: 20px;
    }
}

.post-content .core-block-wrapper {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
	margin: 0;
}

.blog-latest{
	background: var(--color-gray-light);
}

.post-aside-related-title {
    font-size: var(--font-p2-size);
    font-weight: var(--font-h5-weight);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0;
    border-bottom: 5px solid var(--color-coral);
    margin: 0 0 2.4rem;
	display: inline-block;
}

.post-aside-related .bl-list{
	display: block;
}

.post-aside-related .bl-list .bl-item{
	margin-bottom: 20px;
}

.post-aside-related .bl-card-title{
	font-size: var(--font-h5-size);
    font-weight: var(--font-h5-weight);
    line-height: var(--font-h5-line);
    letter-spacing: var(--font-h5-letter);
}