/************************************************************
 * SINGLE POST – MODERN CLEAN CSS
 * - Featured image ~30% desktop
 * - No useless white boxes
 * - Pills for category/tags (primary/secondary)
 * - Inline SVG icons
 ************************************************************/

body.single-post .site-main {
    max-width: 100% !important;
    width: 100%;
    margin: 0;
    padding: 0;
}

.single.single--post.single--fullwidth {
    padding-top: 7.5rem;
    scroll-margin-top: 7.5rem;
    background: #f5f5f7;
}

/* ------------------------- HERO ------------------------- */

.single-hero--fullwidth {
    padding: 1.1rem 0 0.6rem;
}

.single-hero__inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
}

.single-hero__title {
    margin: 0 0 0.6rem;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    line-height: 1.15;
    color: var(--e-global-color-text, #0f172a);
}

.single-hero__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ------------------------- PILLS ------------------------- */

.single-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    border: 1px solid transparent;
    line-height: 1;
    white-space: nowrap;
}

.single-pill--primary {
    background: rgba(79, 70, 229, 0.12);
    border-color: rgba(79, 70, 229, 0.25);
    color: var(--e-global-color-secondary, #4f46e5);
}

.single-pill--secondary {
    background: rgba(236, 72, 153, 0.10);
    border-color: rgba(236, 72, 153, 0.22);
    color: rgba(236, 72, 153, 1);
}

/* ------------------------- TOP MEDIA / META ------------------------- */

.single-top {
    padding: 0.2rem 0 1.2rem;
}

.single-top__inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
    display: grid;
    grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
    gap: 1.6rem;
    align-items: start;
}

/* Compact featured image */
.single-featured {
    width: 100%;
    aspect-ratio: 4 / 5;
    max-height: 360px;
    background: #f3f4f6;
    overflow: hidden;
    border-radius: 0;
    border: 1px solid rgba(226, 232, 240, 1);
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.06),
        0 25px 55px rgba(15, 23, 42, 0.10);
}

.single-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-featured--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        repeating-linear-gradient(
            135deg,
            rgba(226, 232, 240, 1),
            rgba(226, 232, 240, 1) 10px,
            rgba(241, 245, 249, 1) 10px,
            rgba(241, 245, 249, 1) 20px
        );
    color: rgba(100, 116, 139, 1);
    font-size: 0.85rem;
}

/* Meta without ugly borders */
.single-meta {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.single-meta-row {
    display: grid;
    grid-template-columns: 20px auto 1fr;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.95rem;
    color: rgba(75, 85, 99, 1);
}

.single-icon {
    width: 18px;
    height: 18px;
    color: var(--e-global-color-secondary, #4f46e5);
}

.single-meta-label {
    font-weight: 600;
    color: rgba(15, 23, 42, 0.9);
}

.single-meta-value {
    text-align: right;
    font-weight: 500;
}

/* Tags block */
.single-meta-tags-block {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.single-meta-tags-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.single-meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

/* ------------------------- CONTENT ------------------------- */

.single-content {
    padding: 0.4rem 0 2.2rem;
}

.single-content__inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
}

.single-article {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: 100%;
}

.single-article p,
.single-article ul,
.single-article ol {
    font-size: 1.02rem;
    line-height: 1.75;
    color: rgba(30, 41, 59, 0.98);
}

.single-article h2,
.single-article h3,
.single-article h4 {
    color: var(--e-global-color-text, #0f172a);
    margin-top: 1.6rem;
}

/* ------------------------- RELATED POSTS ------------------------- */

.single-related {
    padding: 0 0 3rem;
}

.single-related__inner {
    width: 100%;
    margin: 0 auto;
    padding: 0 4vw;
}

.single-related__head {
    margin-bottom: 1rem;
}

.single-related__title {
    margin: 0;
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    color: var(--e-global-color-text, #0f172a);
}

/* Cards grid like archive */
.single-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.single-related-card {
    background: #ffffff;
    border-radius: 0;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.06),
        0 25px 55px rgba(15, 23, 42, 0.10);
    overflow: hidden;
    min-height: 300px;
    transition:
        transform 0.25s ease-out,
        box-shadow 0.25s ease-out,
        border-color 0.25s ease-out;
}

.single-related-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.single-related-card:hover {
    transform: translate3d(0, -6px, 0);
    border-color: rgba(209, 213, 219, 1);
    box-shadow:
        0 16px 28px rgba(15, 23, 42, 0.08),
        0 30px 60px rgba(15, 23, 42, 0.18);
}

.single-related-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}

.single-related-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease-out;
}

.single-related-card:hover .single-related-card__thumb img {
    transform: scale(1.06);
}

.single-related-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(100, 116, 139, 1);
    font-size: 0.85rem;
    height: 100%;
}

.single-related-card__body {
    padding: 0.9rem 1.0rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.single-related-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 1);
}

.single-related-card__title {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.35;
    color: var(--e-global-color-text, #0f172a);
}

.single-related-card__excerpt {
    margin: 0.1rem 0 0.2rem;
    font-size: 0.92rem;
    color: rgba(75, 85, 99, 1);
}

.single-related-card__readmore {
    margin-top: auto;
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--e-global-color-secondary, #4f46e5);
}

/* ------------------------- RESPONSIVE ------------------------- */

/* Tablet: stack image above meta */
@media (max-width: 1024px) {
    .single-top__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.1rem;
    }

    .single-featured {
        aspect-ratio: 16 / 9;
        max-height: 420px;
    }

    .single-meta-row {
        grid-template-columns: 20px auto 1fr;
        font-size: 0.92rem;
    }

    .single-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 640px) {
    .single-hero__inner,
    .single-top__inner,
    .single-content__inner,
    .single-related__inner {
        padding: 0 1.1rem;
    }

    .single-related-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .single-meta-value {
        text-align: left;
    }
}
