/* Inner pages (page.php), homepage in-content images and the shared nav tweaks */

:root {
    --s2b-green: var(--highlight-color, #10c767);
    --s2b-green-soft: rgba(16, 199, 103, 0.12);
    --s2b-green-line: rgba(16, 199, 103, 0.35);
    --s2b-card: rgba(255, 255, 255, 0.035);
    --s2b-line: rgba(255, 255, 255, 0.08);
    --s2b-text: rgba(255, 255, 255, 0.82);
    --s2b-muted: rgba(255, 255, 255, 0.55);
    --s2b-radius: 16px;
    --s2b-display: 'Poppins', Arial, sans-serif;
}

/* =========================================================
   Homepage
   ========================================================= */
.content-text .content-figure {
    margin: 10px 0 30px;
}

.content-text .content-figure img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid var(--s2b-line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.content-text .content-figure--narrow {
    max-width: 560px;
}

.home .content-block .content-text > p:first-child {
    font-size: 19px;
    color: #fff;
}

.nav-link.is-current {
    color: var(--s2b-green);
}

/* =========================================================
   Reading progress bar
   ========================================================= */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1002;
    pointer-events: none;
}

.reading-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #0b9f52, var(--s2b-green), #7df0b2);
    box-shadow: 0 0 12px rgba(16, 199, 103, 0.6);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.admin-bar .reading-progress {
    top: 32px;
}

/* =========================================================
   Hero
   ========================================================= */
.inner-page .page-hero {
    position: relative;
    padding: 150px 0 70px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 70% at 85% 10%, rgba(16, 199, 103, 0.14) 0%, transparent 70%),
        radial-gradient(ellipse 40% 50% at 0% 100%, rgba(26, 34, 48, 0.9) 0%, transparent 70%),
        var(--dark-bg);
    border-bottom: 1px solid var(--s2b-line);
}

/* faint grid texture */
.inner-page .page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.9), transparent 85%);
    pointer-events: none;
}

.inner-page .page-hero .container {
    position: relative;
}

.inner-page .page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

.inner-page .page-hero-grid.no-image {
    grid-template-columns: minmax(0, 860px);
}

.inner-page .page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 22px;
    font-family: var(--s2b-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--s2b-green);
    background: var(--s2b-green-soft);
    border: 1px solid var(--s2b-green-line);
    border-radius: 999px;
}

.inner-page .page-eyebrow::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--s2b-green);
    box-shadow: 0 0 10px var(--s2b-green);
}

.inner-page .page-title {
    font-family: var(--s2b-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.3px;
    color: #fff;
    margin: 0 0 24px;
}

.inner-page .page-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 0;
    font-size: 14px;
    color: var(--s2b-muted);
}

.inner-page .page-meta span + span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    margin: 0 14px 2px;
    border-radius: 50%;
    background: var(--s2b-green);
    vertical-align: middle;
}

.inner-page .page-hero-image {
    position: relative;
}

.inner-page .page-hero-image::before {
    content: '';
    position: absolute;
    inset: 12% -4% -6% 10%;
    background: radial-gradient(circle, rgba(16, 199, 103, 0.35), transparent 70%);
    filter: blur(40px);
    z-index: 0;
}

.inner-page .page-hero-image img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--s2b-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

/* =========================================================
   Layout: article + "On this page"
   ========================================================= */
.inner-page .page-content {
    padding: 70px 0 110px;
}

.inner-page .page-layout {
    display: grid;
    grid-template-columns: minmax(0, 780px) 260px;
    justify-content: space-between;
    gap: 64px;
    align-items: start;
}

.inner-page .page-layout.no-toc {
    grid-template-columns: minmax(0, 820px);
}

.inner-page .page-body {
    max-width: none;
    counter-reset: s2b-section;
}

.inner-page .page-aside {
    position: sticky;
    top: 120px;
}

.admin-bar .inner-page .page-aside {
    top: 152px;
}

.inner-page .page-toc {
    padding: 22px 22px 18px;
    background: var(--s2b-card);
    border: 1px solid var(--s2b-line);
    border-radius: var(--s2b-radius);
}

.inner-page .page-toc__title {
    margin: 0 0 14px;
    font-family: var(--s2b-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--s2b-muted);
}

.inner-page .page-toc ol {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: s2b-toc;
}

.inner-page .page-toc li {
    counter-increment: s2b-toc;
}

.inner-page .page-toc a {
    display: grid;
    grid-template-columns: 26px 1fr;
    padding: 8px 0 8px 12px;
    margin-left: -12px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--s2b-muted);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.inner-page .page-toc a::before {
    content: counter(s2b-toc, decimal-leading-zero);
    font-family: var(--s2b-display);
    font-size: 11px;
    font-weight: 600;
    padding-top: 2px;
    color: rgba(255, 255, 255, 0.3);
}

.inner-page .page-toc a:hover {
    color: #fff;
}

.inner-page .page-toc a.is-active {
    color: #fff;
    border-left-color: var(--s2b-green);
}

.inner-page .page-toc a.is-active::before {
    color: var(--s2b-green);
}

/* =========================================================
   Typography
   ========================================================= */
.inner-page .content-text p {
    font-size: 17px;
    line-height: 1.85;
    color: var(--s2b-text);
    margin-bottom: 22px;
}

/* lead paragraph */
.inner-page .page-body > p:first-child {
    font-size: 20px;
    line-height: 1.75;
    color: #fff;
    padding-left: 22px;
    border-left: 3px solid var(--s2b-green);
    margin-bottom: 34px;
}

.inner-page .content-text strong {
    color: #fff;
    font-weight: 600;
}

/* numbered section headings */
.inner-page .content-text h2 {
    clear: both;
    position: relative;
    font-family: var(--s2b-display);
    font-size: 1.85rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.2px;
    color: #fff;
    margin: 64px 0 22px;
    padding-top: 40px;
    border-top: 1px solid var(--s2b-line);
    scroll-margin-top: 110px;
}

.inner-page .page-body h2 {
    counter-increment: s2b-section;
}

.inner-page .page-body h2::before {
    content: counter(s2b-section, decimal-leading-zero);
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--s2b-green);
}

.inner-page .content-text h3 {
    font-family: var(--s2b-display);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    margin: 36px 0 14px;
}

/* in-content links (one per paragraph, pointing to other pages) */
.inner-page .content-text p a,
.content-text p a.text-link {
    color: var(--s2b-green);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--s2b-green-line);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.inner-page .content-text p a:hover,
.content-text p a.text-link:hover {
    color: #7df0b2;
    text-decoration-color: currentColor;
}

.content-text p a.text-link::after {
    display: none;
}

/* =========================================================
   Lists
   ========================================================= */
.inner-page .content-text ul,
.inner-page .content-text ol {
    list-style: none;
    margin: 6px 0 30px;
    padding: 0;
}

.inner-page .content-text li {
    position: relative;
    font-size: 17px;
    line-height: 1.75;
    color: var(--s2b-text);
}

/* default + "checks": green check badges */
.inner-page .content-text ul:not(.is-style-cards):not(.is-style-steps):not(.is-style-timeline) > li {
    padding: 12px 0 12px 44px;
    border-bottom: 1px dashed var(--s2b-line);
}

.inner-page .content-text ul:not(.is-style-cards):not(.is-style-steps):not(.is-style-timeline) > li:last-child {
    border-bottom: 0;
}

.inner-page .content-text ul:not(.is-style-cards):not(.is-style-steps):not(.is-style-timeline) > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--s2b-green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2310c767' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat;
    border: 1px solid var(--s2b-green-line);
}

/* "cards": two-column feature cards, bold label on its own line */
.inner-page .content-text .is-style-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.inner-page .content-text .is-style-cards > li {
    padding: 24px 24px 22px;
    font-size: 15.5px;
    line-height: 1.65;
    background: linear-gradient(160deg, rgba(16, 199, 103, 0.07), rgba(255, 255, 255, 0.02) 55%);
    border: 1px solid var(--s2b-line);
    border-radius: var(--s2b-radius);
    transition: border-color 0.25s ease, transform 0.25s ease;
}

.inner-page .content-text .is-style-cards > li::before {
    content: '';
    display: block;
    width: 36px;
    height: 3px;
    margin-bottom: 18px;
    border-radius: 3px;
    background: var(--s2b-green);
    box-shadow: 0 0 14px rgba(16, 199, 103, 0.6);
}

.inner-page .content-text .is-style-cards > li:hover {
    border-color: var(--s2b-green-line);
    transform: translateY(-3px);
}

.inner-page .content-text .is-style-cards > li strong {
    display: block;
    margin-bottom: 8px;
    font-family: var(--s2b-display);
    font-size: 17px;
    color: #fff;
}

/* "steps": numbered process */
.inner-page .content-text .is-style-steps {
    counter-reset: s2b-step;
    display: grid;
    gap: 14px;
}

.inner-page .content-text .is-style-steps > li {
    counter-increment: s2b-step;
    display: flex;
    align-items: center;
    min-height: 68px;
    padding: 18px 22px 18px 76px;
    background: var(--s2b-card);
    border: 1px solid var(--s2b-line);
    border-radius: var(--s2b-radius);
}

.inner-page .content-text .is-style-steps > li::before {
    content: counter(s2b-step, decimal-leading-zero);
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    font-family: var(--s2b-display);
    font-size: 14px;
    font-weight: 700;
    color: #0b0f0d;
    background: var(--s2b-green);
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(16, 199, 103, 0.35);
}

/* "timeline": dated milestones */
.inner-page .content-text .is-style-timeline {
    position: relative;
    padding-left: 34px;
}

.inner-page .content-text .is-style-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: linear-gradient(180deg, var(--s2b-green), rgba(16, 199, 103, 0.1));
}

.inner-page .content-text .is-style-timeline > li {
    padding: 0 0 26px;
}

.inner-page .content-text .is-style-timeline > li:last-child {
    padding-bottom: 0;
}

.inner-page .content-text .is-style-timeline > li::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--dark-bg);
    border: 3px solid var(--s2b-green);
    box-shadow: 0 0 0 4px rgba(16, 199, 103, 0.15);
}

.inner-page .content-text .is-style-timeline > li strong {
    display: block;
    font-family: var(--s2b-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--s2b-green);
}

/* =========================================================
   Stat row
   ========================================================= */
.inner-page .s2b-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 8px 0 36px;
}

.inner-page .s2b-stat {
    position: relative;
    padding: 24px 20px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
    border: 1px solid var(--s2b-line);
    border-radius: var(--s2b-radius);
    overflow: hidden;
}

.inner-page .s2b-stat::after {
    content: '';
    position: absolute;
    left: 20px;
    right: 20px;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--s2b-green), transparent);
}

.inner-page .s2b-stat__value {
    display: block;
    font-family: var(--s2b-display);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 10%, var(--s2b-green) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.inner-page .s2b-stat__label {
    display: block;
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--s2b-muted);
}

/* =========================================================
   Quotes
   ========================================================= */
.inner-page .wp-block-quote {
    position: relative;
    margin: 12px 0 34px;
    padding: 34px 34px 30px 92px;
    background: linear-gradient(135deg, rgba(16, 199, 103, 0.1), rgba(255, 255, 255, 0.02) 60%);
    border: 1px solid var(--s2b-green-line);
    border-radius: var(--s2b-radius);
}

.inner-page .wp-block-quote::before {
    content: '\201C';
    position: absolute;
    left: 26px;
    top: 14px;
    font-family: Georgia, serif;
    font-size: 96px;
    line-height: 1;
    color: var(--s2b-green);
    opacity: 0.85;
}

.inner-page .content-text .wp-block-quote p {
    font-family: var(--s2b-display);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.6;
    color: #fff;
    margin: 0 0 16px;
}

.inner-page .wp-block-quote cite {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--s2b-green);
}

.inner-page .wp-block-quote cite::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--s2b-green);
}

/* =========================================================
   Summary panel (closing section)
   ========================================================= */
.inner-page .is-style-summary {
    clear: both;
    position: relative;
    margin: 64px 0 0;
    padding: 8px 40px 18px;
    background:
        radial-gradient(ellipse 70% 60% at 100% 0%, rgba(16, 199, 103, 0.14), transparent 70%),
        linear-gradient(180deg, #172019, #121614);
    border: 1px solid var(--s2b-green-line);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.inner-page .content-text .is-style-summary h2 {
    border-top: 0;
    margin-top: 28px;
    padding-top: 0;
}

.inner-page .is-style-summary > p:last-child {
    margin-bottom: 18px;
}

/* =========================================================
   Images
   ========================================================= */
.inner-page .wp-block-image {
    margin: 14px 0 34px;
}

.inner-page .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--s2b-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

/* Classic themes render aligned images as <div class="wp-block-image"><figure class="alignright">,
   the editor markup is <figure class="wp-block-image alignright"> – cover both. */
.inner-page .wp-block-image.alignright,
.inner-page .wp-block-image .alignright {
    display: block; /* core sets display:table, which lets the image ignore max-width */
    float: right;
    width: 38%;
    max-width: 300px;
    margin: 6px 0 20px 32px;
}

.inner-page .wp-block-image.alignright img,
.inner-page .wp-block-image .alignright img {
    width: 100%;
}

.inner-page .wp-block-image figcaption {
    font-size: 14px;
    color: var(--s2b-muted);
    margin-top: 12px;
    text-align: center;
}

/* =========================================================
   Responsive
   ========================================================= */
/* Nine menu items: tighten spacing on small desktops so the nav stays on one line */
@media (min-width: 993px) and (max-width: 1280px) {
    .header-inner {
        padding: 0 24px;
    }

    .main-navigation {
        margin-left: 24px;
    }

    .nav-menu {
        gap: 16px;
    }

    .nav-link {
        font-size: 12.5px;
        letter-spacing: 0.2px;
    }
}

@media (max-width: 1140px) {
    .inner-page .page-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .inner-page .page-aside {
        display: none;
    }
}

@media (max-width: 992px) {
    .inner-page .page-hero {
        padding: 120px 0 50px;
    }

    .inner-page .page-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .inner-page .page-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 782px) {
    .admin-bar .reading-progress {
        top: 46px;
    }
}

@media (max-width: 768px) {
    .inner-page .page-hero {
        padding: 104px 0 40px;
    }

    .inner-page .page-title {
        font-size: 1.8rem;
        margin-bottom: 18px;
    }

    .inner-page .page-content {
        padding: 44px 0 70px;
    }

    .inner-page .page-body > p:first-child {
        font-size: 18px;
        padding-left: 16px;
    }

    .inner-page .content-text h2 {
        font-size: 1.5rem;
        margin-top: 48px;
        padding-top: 32px;
    }

    .inner-page .content-text li {
        font-size: 16px;
    }

    .inner-page .content-text .is-style-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .inner-page .s2b-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .inner-page .s2b-stat__value {
        font-size: 1.8rem;
    }

    .inner-page .wp-block-quote {
        padding: 70px 22px 24px;
    }

    .inner-page .wp-block-quote::before {
        left: 20px;
        top: 6px;
        font-size: 80px;
    }

    .inner-page .content-text .wp-block-quote p {
        font-size: 18px;
    }

    .inner-page .is-style-summary {
        padding: 4px 22px 12px;
    }

    .inner-page .wp-block-image.alignright,
    .inner-page .wp-block-image .alignright {
        float: none;
        width: 100%;
        max-width: 300px;
        margin: 10px auto 30px;
    }
}

@media (max-width: 576px) {
    .inner-page .page-title {
        font-size: 1.55rem;
    }

    .inner-page .s2b-stat {
        padding: 18px 14px 16px;
    }

    .inner-page .s2b-stat__value {
        font-size: 1.55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .inner-page .content-text .is-style-cards > li {
        transition: none;
    }

    .inner-page .content-text .is-style-cards > li:hover {
        transform: none;
    }
}
