/* ============================================================
   Shared full-width page heroes & finale CTAs (site-wide)
   ============================================================ */

.gen-hero {
    position: relative;
    min-height: clamp(420px, 52vh, 620px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.gen-hero--centered {
    align-items: center;
}

.gen-hero--centered .gen-hero-content {
    padding: clamp(48px, 8vw, 64px) var(--site-page-pad, 24px);
}

.gen-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.gen-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(23, 15, 13, .88) 0%, rgba(112, 57, 9, .8) 52%, rgba(164, 92, 42, .68) 100%);
}

.gen-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: clamp(36px, 6vw, 48px) var(--site-page-pad, 24px) clamp(44px, 7vw, 64px);
    box-sizing: border-box;
    color: #fff;
}

.gen-hero-content--center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gen-hero-content--center p {
    margin-left: auto;
    margin-right: auto;
}

.gen-hero-content--center .gen-hero-actions {
    justify-content: center;
}

.gen-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .1);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gen-hero h1 {
    margin: 18px 0 14px;
    font-family: "Space Grotesk", "Manrope", system-ui, sans-serif !important;
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.06;
    color: #fff !important;
}

.gen-hero p {
    max-width: 640px;
    font-size: clamp(16px, 2vw, 18px);
    line-height: 1.65;
    color: rgba(255, 255, 255, .92) !important;
}

.gen-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0 0;
}

.seo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none !important;
    border: 2px solid transparent;
    transition: .2s ease;
}

.seo-btn-primary {
    background: #703909;
    color: #fff !important;
}

.seo-btn-primary:hover {
    background: #5a2e07;
}

.seo-btn-ghost,
.seo-btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, .45);
    color: #fff !important;
}

.seo-btn-ghost:hover,
.seo-btn-outline-light:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .65);
    color: #fff !important;
}

.seo-finale {
    position: relative;
    overflow: hidden;
    margin-top: 48px;
    padding: clamp(64px, 8vw, 96px) 20px;
    background: transparent;
}

.seo-finale-bg {
    position: absolute;
    inset: 0;
    background-image: var(--seo-banner-image);
    background-size: cover;
    background-position: center;
    transform: scale(1.04);
}

.seo-finale-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(23, 15, 13, .9) 0%, rgba(112, 57, 9, .82) 52%, rgba(164, 92, 42, .72) 100%);
}

.seo-finale-inner {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}

.seo-finale-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .32);
    background: rgba(255, 255, 255, .1);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    font-family: var(--app-heading-font, var(--heading-font)) !important;
}

.seo-finale h2 {
    margin: 12px 0 14px;
    font-family: var(--app-heading-font, var(--heading-font)) !important;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    color: #fff !important;
}

.seo-finale p {
    color: rgba(255, 255, 255, .88);
    font-size: 16px;
    line-height: 1.65;
}

.seo-finale-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.seo-finale .seo-btn-primary {
    background: #703909;
    border-color: #703909;
    color: #fff !important;
}

.seo-finale .seo-btn-primary:hover {
    background: #5a2e07;
    border-color: #5a2e07;
}

.seo-finale .seo-btn-ghost,
.seo-finale .seo-btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, .45);
    color: #fff !important;
}

.seo-finale .seo-btn-ghost:hover,
.seo-finale .seo-btn-outline-light:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .65);
    color: #fff !important;
}

/* Toolbar cards below full-width heroes (pricing, popular books) */
.page-hero-toolbar {
    width: 100%;
    max-width: 1220px;
    margin: clamp(24px, 4vw, 36px) auto clamp(28px, 4vw, 36px);
    padding: clamp(20px, 3vw, 28px) var(--site-page-pad, 24px);
    box-sizing: border-box;
    border-radius: 18px;
    border: 1px solid #e4ddd3;
    background: linear-gradient(160deg, #faf8f4 0%, #ffffff 52%, #f4f0e9 100%);
    box-shadow: 0 18px 42px rgba(112, 57, 9, .06);
}

.page-hero-toolbar--pricing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
    gap: 24px;
    align-items: stretch;
}

.page-hero-toolbar--pricing .pkg-trust {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
    align-content: center;
}

.page-hero-toolbar--pricing .pkg-trust li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b5d52;
    font-size: 14px;
    font-weight: 600;
}

.page-hero-toolbar--pricing .pkg-trust i {
    color: #703909;
    width: 18px;
    text-align: center;
}

.page-hero-toolbar--pricing .pkg-balance,
.page-hero-toolbar--pricing .pkg-bonus {
    height: 100%;
}

.page-hero-toolbar--search {
    padding: 20px 22px;
}

.page-hero-toolbar .authors-search {
    display: flex;
    gap: 12px;
    width: 100%;
    margin: 0;
}

.page-hero-toolbar .authors-search input {
    flex: 1;
    min-width: 0;
}

/* Pages with content below hero */
.contact-page,
.legal-page {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 48px) var(--site-page-pad, 24px) 48px;
    box-sizing: border-box;
}

.legal-page {
    max-width: 980px;
}

/* Nested toolbars already sit inside a content shell — avoid double side gutters */
.pkg-page > .page-hero-toolbar,
.popular-books-page > .page-hero-toolbar,
.authors-container > .page-hero-toolbar,
.authors-page .page-hero-toolbar {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 991px) {
    .gen-hero {
        min-height: clamp(380px, 48vh, 520px);
    }

    .gen-hero-content {
        width: 100%;
        max-width: 1220px;
        padding-left: var(--site-page-pad-md, 20px);
        padding-right: var(--site-page-pad-md, 20px);
    }

    .page-hero-toolbar--pricing {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .gen-hero h1 {
        font-size: clamp(28px, 8vw, 36px);
    }

    .gen-hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .gen-hero-actions .seo-btn {
        width: 100%;
        justify-content: center;
    }

    .seo-finale {
        padding: clamp(48px, 10vw, 72px) 16px;
    }

    .seo-finale-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .seo-finale-actions .seo-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .page-hero-toolbar .authors-search {
        flex-direction: column;
    }

    .page-hero-toolbar .authors-search button {
        width: 100%;
        justify-content: center;
    }

    .gen-hero {
        min-height: clamp(340px, 62vh, 460px);
        align-items: flex-end;
    }

    .gen-hero--centered {
        align-items: center;
    }

    .gen-hero-content {
        padding-bottom: 40px;
    }

    .page-hero-toolbar {
        width: 100%;
        max-width: 1220px;
        padding: 18px var(--site-page-pad-sm, 16px);
        border-radius: 14px;
    }

    .page-hero-toolbar .pb-search.popular-search {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}
