/**
 * Single Post Styles
 */

/* Hero Section */
.single-post__hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 90px 30px;
}

.single-post__hero-inner {
    display: flex;
    width: 1405px;
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 41px;
    margin: 0 auto;
}

/* Breadcrumbs */
.single-post__breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: wrap;
}

.single-post__breadcrumbs a,
.single-post__breadcrumbs span {
    color: var(--Primary-colors-White, #FFF);
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 30px;
    text-decoration: none;
}

.single-post__breadcrumbs a:hover {
    text-decoration: underline;
}

.single-post__breadcrumb-sep {
    opacity: 0.7;
}

.single-post__breadcrumb-current {
    opacity: 0.7;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .single-post__breadcrumbs {
        flex-wrap: nowrap;
        overflow: hidden;
        white-space: nowrap;
    }

    .single-post__breadcrumb-current {
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
        flex-shrink: 1;
    }
}

/* Hero Content — single column, no image */

/* Tags + Reading Time Row */
.single-post__meta-row {
    display: flex;
    align-items: center;
    gap: 24px;
}

.single-post__tags {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tag pill - same as blog hero */
.single-post__tag {
    display: flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    border-radius: 60px;
    background: var(--Purple-Tints-1, #F0EDFF);
    color: var(--primary-colors-7336-e-3, #7336E3);
    font-family: "Funnel Sans", sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 120%;
}

/* Reading Time */
.single-post__reading-time {
    color: var(--Purple-Tints-3, #D7C6F7);
    font-family: "Funnel Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 140%;
    text-transform: capitalize;
}

/* Title - Desktop/H1 */
.single-post__title {
    color: var(--Primary-colors-White, #FFF);
    font-family: "Funnel Sans", sans-serif;
    font-size: 60px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.3px;
    margin: -30px 0 0; /* 10px below meta row (40px gap - 30px = 10px effective) */
}

/* Author & Date */
.single-post__author-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--Primary-colors-White, #FFF);
    font-family: "Funnel Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 140%;
}

.single-post__author-sep {
    opacity: 0.7;
}

/* Post Content */
.single-post__content {
    padding: 80px 0 80px;
    background: var(--bg-light-gray, #F7F6F8);
}

/* Content Row — TOC + Body (socials hidden) */
.single-post__row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 1440px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    gap: 80px;
}

/* No TOC — center body */
.single-post__row--no-toc {
    justify-content: center;
}

.single-post__row--no-toc .single-post__body {
    margin: 0 auto;
}

/* Table of Contents — Figma: 286px, pad 16/0, radius 6 */
.single-post__toc {
    display: flex;
    width: 286px;
    padding: 16px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    flex-shrink: 0;
    position: sticky;
    top: 120px;
    align-self: flex-start;
    border-radius: 6px;
    background: #FFF;
    box-shadow: 0 4px 15px 3px rgba(39, 43, 43, 0.08);
}

.single-post__toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    padding: 0 16px 10px;
    position: relative;
}

/* Separator line — Figma: 254px (inset 16px each side) */
.single-post__toc-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 1px;
    background: #AAA5BA;
}

.single-post__toc-title {
    color: var(--Primary-colors-Text, #000);
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 140%;
    margin: 0;
}

.single-post__toc-toggle {
    display: none;
}

.single-post__toc-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    align-self: stretch;
}

.single-post__toc-links a {
    display: flex;
    padding: 4px 18px;
    margin: 0;
    align-items: center;
    color: var(--Primary-colors-Text, #000);
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    text-decoration: none;
    box-shadow: none;
    transition: color 0.2s ease, box-shadow 0.25s ease;
}

.single-post__toc-links a:hover {
    color: var(--primary-colors-7336-e-3, #7336E3);
}

/* Active: inset box-shadow simulates left border without layout shift */
.single-post__toc-links a.is-active {
    box-shadow: inset 2px 0 0 0 #7336E3;
    color: var(--primary-colors-7336-e-3, #7336E3);
}

/* Content Body - Center Column */
.single-post__body {
    width: 800px;
    max-width: 100%;
    flex-shrink: 0;
}

.single-post__featured-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 32px;
}

.single-post__featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.single-post__body p {
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    color: var(--Primary-colors-Text, #000);
    margin: 0 0 12px;
}

.single-post__body h2 {
    font-family: "Funnel Sans", sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.16px;
    color: var(--primary-colors-7336-e-3, #7336E3);
    margin: 48px 0 16px;
}

.single-post__body h2:first-child {
    margin-top: 0;
}

.single-post__body h3 {
    font-family: "Funnel Sans", sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.11px;
    color: var(--primary-colors-7336-e-3, #7336E3);
    margin: 24px 0 8px;
}

.single-post__body ul,
.single-post__body ol {
    margin: 0 0 24px;
    padding-left: 24px;
}

.single-post__body li {
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    color: var(--Primary-colors-Text, #000);
    margin-bottom: 8px;
}

.single-post__body b,
.single-post__body strong {
    font-weight: 600;
}

.single-post__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0;
}

.single-post__body blockquote {
    border-left: 4px solid var(--color-primary, #7336E3);
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
}

.single-post__body pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 16px;
    background: #f5f5f6;
    border-radius: 8px;
    margin: 24px 0;
}

.single-post__body code {
    font-family: monospace;
    font-size: 14px;
}

/* Social Sharing — hidden on desktop per design */
.single-post__socials--desktop {
    display: none;
}

.single-post__socials {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 120px;
    align-self: flex-start;
}

.single-post__social-btn {
    display: flex;
    width: 56px;
    height: 56px;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: #FFF;
    border: 1px solid #CDC6D7;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.single-post__social-btn:hover {
    background: var(--Purple-Tints-1, #F0EDFF);
    transform: translateY(-2px);
}

.single-post__social-btn svg {
    width: 22px;
    height: 22px;
}

.single-post__copy-link.copied {
    background: var(--Purple-Tints-1, #F0EDFF);
}

/* Author Box */
.single-post__author-box {
    display: flex;
    padding: 32px 24px;
    align-items: flex-start;
    gap: 32px;
    align-self: stretch;
    border-radius: 16px;
    border: 1px solid var(--Grey-1, #E6E3EB);
    background: var(--Light-purple, #FAF8FD);
    margin-top: 48px;
}

.single-post__author-avatar {
    display: flex;
    width: 140px;
    height: 140px;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    border-radius: 100px;
    background: var(--Grey-1, #E6E3EB);
    overflow: hidden;
}

.single-post__author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post__author-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
    flex: 1 0 0;
}

.single-post__author-name {
    color: var(--primary-colors-7336-e-3, #7336E3);
    font-family: "Funnel Sans", sans-serif;
    font-size: 32px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.16px;
    margin: 0;
}

.single-post__author-title {
    color: var(--Primary-colors-Text, #000);
    font-family: "Funnel Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
    margin-top: -8px;
}

.single-post__author-bio {
    color: var(--Primary-colors-Text, #000);
    font-family: "Funnel Sans", sans-serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 140%;
    margin: 0;
}

/* You Might Also Like */
.single-post__related {
    display: flex;
    padding: 89px 30px;
    justify-content: center;
    align-items: center;
    background: var(--Purple-Tints-1, #F0EDFF);
}

.single-post__related-inner {
    width: 100%;
    max-width: 1440px;
    padding: 0;
}

.single-post__related-title {
    color: var(--Primary-colors-Purple-Dark, #1D004B);
    font-family: "Funnel Sans", sans-serif;
    font-size: 38px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0.19px;
    margin: 0 0 40px;
    text-align: left;
}

.single-post__related-grid {
    display: flex;
    align-items: stretch;
    gap: 24px;
    align-self: stretch;
}

.single-post__related-grid .blog-card {
    flex: 1 0 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
}

.single-post__related-grid .blog-card__link {
    display: flex;
    align-items: center;
}

.single-post__related-grid .blog-card__link svg {
    transition: transform 0.2s ease;
}

.single-post__related-grid .blog-card__link:hover svg {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 1280px) {
    .single-post__row {
        width: 100%;
        gap: 40px;
    }

    .single-post__toc {
        width: 240px;
    }

    .single-post__body {
        width: auto;
        flex: 1;
    }

    .single-post__related-inner {
        padding: 0 80px;
    }
}

@media (max-width: 1024px) {
    .single-post__hero {
        padding: 90px 24px;
    }

    .single-post__hero-inner {
        width: 100%;
    }

    .single-post__title {
        font-size: 48px;
    }

    .single-post__row {
        flex-direction: column;
        align-items: center;
    }

    .single-post__toc {
        position: static;
        width: 100%;
        max-width: 600px;
    }

    .single-post__body {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }

    .single-post__related-inner {
        padding: 0 40px;
    }

    .single-post__related-grid .blog-card {
        flex: 0 0 calc(50% - 12px);
        max-width: calc(50% - 12px);
    }
}

@media (max-width: 768px) {
    .single-post__hero {
        padding: 60px 16px 30px;
    }

    .single-post__hero-inner {
        gap: 41px;
    }

    .single-post__hero-inner {
        gap: 24px;
    }

    .single-post__meta-row {
        flex-wrap: wrap;
        gap: 16px;
    }

    .single-post__tag {
        display: flex;
        padding: 8px 16px;
        justify-content: center;
        align-items: center;
        gap: 10px;
        color: var(--primary-colors-7336-e-3, #7336E3);
        font-family: "Funnel Sans", sans-serif;
        font-size: 14px;
        font-weight: 500;
        line-height: 120%;
    }

    .single-post__reading-time {
        color: var(--Purple-Tints-3, #D7C6F7);
        font-family: "Funnel Sans", sans-serif;
        font-size: 16px;
        font-weight: 600;
        line-height: 140%;
        text-transform: capitalize;
    }

    .single-post__title {
        color: var(--Primary-colors-White, #FFF);
        font-family: "Funnel Sans", sans-serif;
        font-size: 34px;
        font-weight: 700;
        line-height: 120%;
        letter-spacing: 0.21px;
        margin: 0;
    }

    .single-post__author-date {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .single-post__author-sep {
        display: none;
    }

    .single-post__content {
        padding: 0;
    }

    .single-post__row {
        display: flex;
        padding: 40px 16px 0 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 48px;
    }

    /* TOC Mobile — Figma: pad 16px all, radius 8 */
    .single-post__toc {
        position: static;
        width: 100%;
        padding: 16px;
        border-radius: 8px;
    }

    .single-post__toc-header {
        cursor: pointer;
        width: 100%;
        padding: 0;
    }

    .single-post__toc-header::after {
        display: none;
    }

    .single-post__toc-links a {
        margin: 0;
        border-radius: 8px;
    }

    .single-post__toc-links a.is-active {
        background: var(--Purple-Tints-1, #F0EDFF);
        box-shadow: none;
    }

    .single-post__toc-toggle {
        display: flex;
        width: 24px;
        height: 24px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        transition: transform 0.3s ease;
    }

    .single-post__toc-toggle svg {
        width: 24px;
        height: 24px;
    }

    .single-post__toc.is-closed .single-post__toc-toggle {
        transform: rotate(180deg);
    }

    .single-post__toc.is-closed .single-post__toc-links {
        display: none;
    }

    .single-post__body {
        padding: 0;
        width: 100%;
    }

    .single-post__body p,
    .single-post__body li {
        font-size: 16px;
    }

    .single-post__body h2 {
        font-size: 32px;
        font-weight: 600;
        margin-top: 32px;
    }

    .single-post__body h3 {
        font-size: 20px;
    }

    /* Socials Mobile - horizontal before author box */
    .single-post__socials {
        position: static;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 16px;
        order: unset;
    }

    .single-post__socials--mobile {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-top: 48px;
    }

    .single-post__socials--desktop {
        display: none;
    }

    .single-post__social-btn {
        width: 48px;
        height: 48px;
    }

    /* Author Box Mobile */
    .single-post__author-box {
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 24px 16px;
        text-align: center;
        margin-bottom: 30px;
    }

    .single-post__author-avatar {
        width: 100px;
        height: 100px;
    }

    .single-post__author-info {
        align-items: center;
        gap: 12px;
    }

    .single-post__author-name {
        font-size: 24px;
    }

    .single-post__author-bio {
        font-size: 16px;
    }

    /* Related Posts Mobile */
    .single-post__related {
        padding: 60px 16px;
    }

    .single-post__related-inner {
        padding: 0;
    }

    .single-post__related-title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    .single-post__related-grid {
        flex-direction: column;
        gap: 24px;
    }

    .single-post__related-grid .blog-card {
        flex: 1 0 100%;
        max-width: 100%;
    }
}
