.template-user-story {
    max-width: 1920px;
    margin: 0 auto;
    background:
        radial-gradient(circle at top left, rgba(103, 152, 173, 0.18), transparent 32%),
        linear-gradient(180deg, #f6fafb 0, #ffffff 240px);
}

.template-user-story .header-component {
    width: 100%;
    max-width: 1920px;
    margin-left: 0;
    margin-right: 0;
}

.user-story-page-wrapper {
    width: 100%;
    margin-top: var(--header-height);
    overflow: clip;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 8px;
}

.user-story-page-wrapper > .story-page-hero,
.user-story-page-wrapper > .user-story-page,
.user-story-page-wrapper > .story-more-section {
    padding-left: 0;
    padding-right: 0;
}

.user-story-page-wrapper > [class^="wp-block-headless-"],
.user-story-page-wrapper > .section-bg-wrapper [class^="wp-block-headless-"] {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

.story-page-shell {
    width: min(var(--container-width, 1920px), calc(100% - 120px));
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .story-page-shell {
        width: min(var(--container-width, 1920px), calc(100% - 48px));
    }
}

@media (max-width: 768px) {
    .story-page-shell {
        width: min(var(--container-width, 1920px), calc(100% - 32px));
    }
}

.story-page-hero {
    padding: 32px 0 40px;
}

.user-story-page {
    padding: 0 0 24px;
}

.story-more-section {
    padding: 28px 0 0;
}

.story-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--brand-blue, #3c8dc7);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0;
    padding: 12px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(103, 152, 173, 0.16);
    box-shadow: 0 10px 30px rgba(20, 34, 44, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.story-back-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(20, 34, 44, 0.09);
    border-color: rgba(103, 152, 173, 0.28);
}

.story-header {
    width: 100%;
    margin: 28px 0 0;
}

.story-eyebrow {
    margin: 0 0 18px;
    color: var(--brand-blue, #3c8dc7);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.story-page-title {
    max-width: 14ch;
    font-size: clamp(3rem, 6vw, 5.25rem);
    line-height: 0.96;
    margin: 0;
    color: var(--text-primary, #1d1d1f);
    letter-spacing: 0;
    text-wrap: balance;
}

.story-hero {
    margin-top: 36px;
}

.story-hero-image {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-large);
    background: #dfe8ec;
    box-shadow:
        0 20px 50px rgba(18, 33, 43, 0.08),
        0 2px 8px rgba(18, 33, 43, 0.04);
}

@media (max-width: 768px) {
    .story-hero-image {
        border-radius: 20px;
    }
}

.story-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.story-full-content {
    width: 100%;
    margin: 0;
    padding: 56px 56px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-large);
    box-shadow: 0 16px 40px rgba(18, 33, 43, 0.06);
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-primary, #1d1d1f);
}

@media (max-width: 1024px) {
    .story-full-content {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .story-full-content {
        padding: 32px 24px;
        font-size: 1.05rem;
        border-radius: 20px;
    }
}

.story-full-content > :first-child {
    margin-top: 0;
}

.story-full-content > p:first-child {
    font-size: 1.28em;
    line-height: 1.65;
    color: #3a4d58;
}

.story-full-content p,
.story-full-content ul,
.story-full-content ol,
.story-full-content blockquote,
.story-full-content figure {
    margin-bottom: 1.5em;
}

.story-full-content h2,
.story-full-content h3,
.story-full-content h4 {
    color: var(--text-primary, #1d1d1f);
    letter-spacing: 0;
}

.story-full-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.story-full-content h3 {
    font-size: clamp(1.45rem, 3vw, 2rem);
    margin-top: 1.4em;
    margin-bottom: 0.5em;
}

.story-full-content a {
    color: var(--brand-blue, #3c8dc7);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.story-full-content blockquote {
    margin-left: 0;
    padding: 24px 28px;
    border-left: 4px solid var(--brand-blue, #3c8dc7);
    background: #f5f8fa;
    border-radius: 0 20px 20px 0;
    color: #36505d;
}

.story-full-content img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    display: block;
    box-shadow: 0 14px 30px rgba(18, 33, 43, 0.1);
}

.story-full-content figure {
    margin-left: 0;
    margin-right: 0;
}

.story-full-content figcaption {
    margin-top: 12px;
    color: var(--text-secondary, #86868b);
    font-size: 0.92rem;
}

.story-site-footer {
    width: 100%;
    margin-top: auto;
    margin-bottom: 0;
    padding: 0;
}

.template-user-story .footer-component {
    margin-top: 48px;
}

.story-more-section .story-page-shell {
    width: min(var(--container-width, 1920px), calc(100% - 0px));
}

.story-more-section .stories-block-component {
    margin: 0;
}

.story-more-section .stories-grid {
    padding: 0;
    gap: 32px;
}

@media (max-width: 1024px) {
    .story-page-shell {
        width: min(var(--container-width, 1920px), calc(100% - 60px));
    }

    .story-full-content {
        padding: 44px 40px;
    }

    .story-more-section .stories-grid {
        gap: 24px;
    }
}

@media (max-width: 800px) {
    .user-story-page-wrapper {
        padding-top: 20px;
    }

    .story-page-shell {
        width: min(var(--container-width, 1920px), calc(100% - 40px));
    }

    .story-page-hero {
        padding-top: 20px;
        padding-bottom: 28px;
    }

    .story-more-section {
        padding-top: 20px;
    }

    .story-header {
        margin-top: 22px;
    }

    .story-hero {
        margin-top: 28px;
    }

    .story-hero-image,
    .story-full-content {
        border-radius: 24px;
    }

    .story-full-content {
        padding: 32px 24px;
        font-size: 1.03rem;
        line-height: 1.75;
    }

    .story-full-content > p:first-child {
        font-size: 1.14em;
    }
}

@media (max-width: 480px) {
    .story-back-link {
        width: 100%;
        justify-content: center;
    }

    .story-eyebrow {
        margin-bottom: 14px;
    }

    .story-full-content {
        padding: 28px 20px;
        border-radius: 20px;
    }

    .story-full-content blockquote {
        padding: 18px 20px;
        border-radius: 0 16px 16px 0;
    }
}
