/* ===========================================================
   Editorial long-form content styles
   Applied to .post-content--editorial (page.php wrapper)
   =========================================================== */

.container.container--narrow {
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1.25rem, 4vw, 2rem);
    padding-right: clamp(1.25rem, 4vw, 2rem);
}

.post-content--editorial {
    font-family: 'DM Sans', -apple-system, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.75;
    color: #3d4b5c;
    max-width: 100%;
}

.post-content--editorial > *:first-child { margin-top: 0; }
.post-content--editorial > *:last-child  { margin-bottom: 0; }

.post-content--editorial h2 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #0b1d2f;
    margin: 3.5rem 0 1rem;
    padding-top: 2rem;
    border-top: 1px solid #e6e9ec;
}
.post-content--editorial > h2:first-child {
    margin-top: 0.5rem;
    padding-top: 0;
    border-top: 0;
}

.post-content--editorial h3 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(1.2rem, 1.75vw, 1.35rem);
    line-height: 1.35;
    letter-spacing: -0.01em;
    color: #0b1d2f;
    margin: 2.25rem 0 0.75rem;
}

.post-content--editorial h4 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 500;
    font-size: 1.05rem;
    color: #0b1d2f;
    margin: 1.75rem 0 0.5rem;
}

.post-content--editorial p {
    margin: 0 0 1.25rem;
    color: #3d4b5c;
}

.post-content--editorial a {
    color: #0d96b6;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(13,150,182,0.4);
    transition: text-decoration-color 0.2s ease;
}
.post-content--editorial a:hover { text-decoration-color: currentColor; }

.post-content--editorial strong { color: #0b1d2f; font-weight: 600; }
.post-content--editorial em { font-style: italic; color: #0d96b6; }

.post-content--editorial ul,
.post-content--editorial ol {
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
}
.post-content--editorial li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}
.post-content--editorial ul li::marker { color: #10b5db; }
.post-content--editorial ol li::marker { color: #0d96b6; font-weight: 600; }

.post-content--editorial blockquote {
    border-left: 3px solid #10b5db;
    background: #fafaf8;
    margin: 2rem 0;
    padding: 1.25rem 1.5rem 1.25rem 1.75rem;
    border-radius: 0 14px 14px 0;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 1.15rem;
    line-height: 1.55;
    color: #0b1d2f;
    font-style: italic;
}
.post-content--editorial blockquote p:last-child { margin-bottom: 0; }

.post-content--editorial figure,
.post-content--editorial img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 2rem auto;
    display: block;
}

.post-content--editorial hr {
    border: 0;
    border-top: 1px solid #e6e9ec;
    margin: 3rem 0;
}

.post-content--editorial code {
    background: #f3efe6;
    color: #0b1d2f;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    font-size: 0.9em;
}

/* Emphasised "Key Takeaways" pattern used on CP content pages */
.post-content--editorial h2 + ol,
.post-content--editorial h3 + ol,
.post-content--editorial h2 + ul,
.post-content--editorial h3 + ul {
    background: linear-gradient(180deg, #ffffff 0%, #fafaf8 100%);
    border: 1px solid #e6e9ec;
    border-radius: 16px;
    padding: 1.5rem 1.5rem 1.5rem 3rem;
    margin-top: 0.5rem;
}

/* =====  CTA block polish (beautify the closing CTA) ===== */
.cta-block {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(16,181,219,0.35), transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(13,150,182,0.4), transparent 55%),
        linear-gradient(135deg, #0b1d2f 0%, #0f3246 60%, #0d96b6 100%);
    color: #ffffff;
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(11,29,47,0.15);
    position: relative;
    overflow: hidden;
}
.cta-block::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    pointer-events: none;
}
.cta-block > * { position: relative; }
.cta-block h2 {
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    letter-spacing: -0.02em;
    color: #ffffff;
    margin: 0 0 0.75rem;
}
.cta-block p {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
    max-width: 560px;
    margin: 0 auto 2rem;
}
.cta-block .cta-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.cta-block .btn-white {
    background: #ffffff;
    color: #0d96b6;
    border: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-block .btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(255,255,255,0.2);
}

@media (max-width: 640px) {
    .cta-block { border-radius: 20px; }
    .cta-block .cta-actions .btn { width: 100%; }
    .post-content--editorial h2 + ol,
    .post-content--editorial h3 + ol,
    .post-content--editorial h2 + ul,
    .post-content--editorial h3 + ul { padding-left: 2.25rem; }
}
