/**
 * Cryptmano shared layout system
 * One container width + gutter for header, sections, and footer.
 * Also owns section spacing so headings never sit on section seams.
 */
:root {
    --site-max-width: 1120px;
    --site-gutter: clamp(16px, 4vw, 24px);
    /* Clear top/bottom breathing room inside every section */
    --site-section-y: clamp(5.5rem, 10vw, 8.5rem);
    --site-section-y-sm: clamp(3.25rem, 6vw, 5rem);
    --site-section-header-gap: clamp(2.25rem, 4vw, 3.5rem);
    --site-header-h: 58px;
    /* Space between main content and footer */
    --site-main-gap-bottom: clamp(2rem, 5vw, 3.25rem);

    /* Cryptmano brand — lime on dark green */
    --brand-blue: #b4ff38;
    --brand-blue-dark: #8fbf2a;
    --brand-cyan: #b4ff38;
    --brand-green: #b4ff38;
    --text-muted: #b7c5be;
    --text-body: #f3f7f4;
    --surface: rgba(10, 32, 25, 0.96);
    --border-subtle: rgba(174, 222, 132, 0.28);

    /* Override bit_gold defaults → brand lime */
    --base-h: 78;
    --base-s: 100%;
    --base-l: 61%;
    --base: var(--base-h) var(--base-s) var(--base-l);
    --base-hover: var(--base-h) var(--base-s) calc(var(--base-l) - 10%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100vw;
    color: var(--text-body);
}

img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

/* Unified page shell — NO outer horizontal padding on wrappers */
.header,
.site-main,
main.site-main,
.site-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100%;
    max-width: 100%;
}

/* Clear vertical gap between top bar ↔ content ↔ footer */
.site-main,
main.site-main {
    padding-bottom: var(--site-main-gap-bottom) !important;
    min-height: 40vh;
}

/**
 * Single source of truth for horizontal alignment.
 */
.site-container,
.header .container,
.site-main .container,
main .container,
.site-footer .container,
.page-wrapper .container,
.section-wrapper .container,
.support-page .container,
.blog-show-page .container,
.main-content .container {
    width: 100% !important;
    max-width: var(--site-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: var(--site-gutter) !important;
    padding-right: var(--site-gutter) !important;
}

/* ==========================================================================
   Section containment (fixes headings sitting on background seams)
   Root causes addressed:
   1) theme .section-header { margin-top: -8px } pulled titles into the seam
   2) reduced .pt-120 padding left too little space above headings
   3) .overlay--radial { z-index: 9 } let section layers visually bleed
   ========================================================================== */

.site-section,
section.pt-120,
section.pb-120,
section.pt-60,
section.pb-60,
.about-section,
.why-section,
.stories-section,
.support-page,
.blog-show-page {
    position: relative;
    z-index: auto;
    /* Avoid isolation here — it traps nested Bootstrap modals under the backdrop */
    overflow-x: clip;
    background-clip: padding-box;
}

.site-section,
.pt-120,
.section-wrapper.pt-120 {
    padding-top: var(--site-section-y) !important;
}

.pb-120,
.section-wrapper.pb-120 {
    padding-bottom: var(--site-section-y) !important;
}

/* Extra separation after hero before the next section heading */
.hero {
    padding-bottom: calc(var(--site-section-y) * 0.85) !important;
}

.hero + section,
.hero + .pt-120,
section + section.pt-120 {
    scroll-margin-top: 1rem;
}

.pt-60 {
    padding-top: var(--site-section-y-sm) !important;
}

.pb-60 {
    padding-bottom: var(--site-section-y-sm) !important;
}

.site-section--tight {
    padding-top: var(--site-section-y-sm) !important;
    padding-bottom: var(--site-section-y-sm) !important;
}

/* Kill theme negative margin that pulled headings onto section boundaries */
.section-header {
    margin-top: 0 !important;
    margin-bottom: var(--site-section-header-gap) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    text-align: center;
    width: 100%;
    max-width: 44rem;
    margin-left: auto !important;
    margin-right: auto !important;
}

.section-header .section-title,
.section-header h1,
.section-header h2,
.section-header h3 {
    margin-top: 0 !important;
    margin-bottom: 0.75rem;
    letter-spacing: 0.3px;
    overflow-wrap: break-word;
    word-break: normal;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    text-align: center;
}

.section-header p {
    color: var(--text-muted);
    max-width: 38rem;
    margin: 0 auto;
    line-height: 1.7;
    overflow-wrap: break-word;
    text-align: center;
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
}

/* Prevent overlay layers from stacking above neighboring sections */
.overlay--radial {
    position: relative !important;
    z-index: auto !important;
}

.overlay--radial::before {
    z-index: -1 !important;
    pointer-events: none;
}

/* Theme utility negative margins — neutralize when used on section wrappers */
section.mt-minus-100,
.site-main .mt-minus-100,
.page-wrapper .mt-minus-100 {
    margin-top: 0 !important;
}

section.mb-none-30,
section.mb-none-40,
section.mb-none-50,
section.mb-none-115,
.site-main .mb-none-30,
.site-main .mb-none-40,
.site-main .mb-none-50,
.site-main .mb-none-115 {
    margin-bottom: 0 !important;
}

/* Typography helpers */
.site-section-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 0.75rem;
    overflow-wrap: anywhere;
}

.site-section-lead {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 auto 1.5rem;
    max-width: 40rem;
    overflow-wrap: anywhere;
}

.site-card {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Prevent fixed star overlays covering UI */
.full-wh,
.bg-animation {
    pointer-events: none !important;
    z-index: 0 !important;
}

.bg-animation {
    opacity: 0.22 !important;
}

.site-main,
.page-wrapper,
.section-wrapper,
.main-content,
.auth-card,
.support-card,
.contact-wrapper,
.hero,
.site-footer {
    position: relative;
    /* Do NOT set z-index here — it traps Bootstrap modals under .modal-backdrop */
}

/* Modals must sit above page chrome; keep backdrop just under the dialog */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1055 !important;
}

.modal .modal-dialog {
    pointer-events: auto;
}

.modal .modal-content,
.modal .modal-content a,
.modal .modal-content button,
.modal .modal-content .close {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

/* Stable hovers */
.footer-links a:hover,
.auth-links a:hover,
.blog-back:hover,
.navbar-nav .nav-link:hover {
    transform: none !important;
}

.hero,
.page-wrapper,
.section-wrapper {
    overflow-x: clip;
}

/* ==========================================================================
   Unified page organization — readable rhythm across all public pages
   ========================================================================== */

.page-wrapper {
    background: radial-gradient(circle at top left, #0a2019 0, #10130f 40%, #10130f 100%);
    color: var(--text-body);
    width: 100%;
    min-height: 50vh;
}

.section-wrapper {
    display: flex;
    flex-direction: column;
}

.page-hero {
    padding: clamp(2.25rem, 5.5vw, 3.75rem) 0 clamp(1.25rem, 3vw, 2rem);
    text-align: center;
    background: linear-gradient(180deg, rgba(6, 23, 18, 0.55) 0%, transparent 100%);
    border-bottom: 1px solid rgba(174, 222, 132, 0.12);
}

.page-hero h1 {
    font-size: clamp(1.65rem, 3.5vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 0.65rem;
    color: #fff;
    letter-spacing: 0.3px;
    line-height: 1.25;
}

.page-hero p {
    color: var(--text-muted);
    max-width: 42rem;
    margin: 0 auto;
    line-height: 1.7;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

.page-section {
    padding-top: var(--site-section-y-sm);
    padding-bottom: var(--site-section-y);
}

.page-section--compact-top {
    padding-top: clamp(2rem, 4vw, 3rem);
}

.page-section--alt {
    background: rgba(6, 23, 18, 0.42);
    border-top: 1px solid rgba(174, 222, 132, 0.1);
    border-bottom: 1px solid rgba(174, 222, 132, 0.1);
}

.page-section .section-header {
    margin-bottom: clamp(2rem, 4vw, 2.75rem) !important;
}

.content-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3rem);
}

.content-panel {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: clamp(1.35rem, 3vw, 2rem);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    overflow-wrap: anywhere;
}

.content-panel--wide {
    max-width: 840px;
}

.content-prose {
    max-width: 42rem;
    line-height: 1.75;
    color: #d1d5db;
}

.content-prose p:last-child {
    margin-bottom: 0;
}

.content-block-title {
    font-size: clamp(1.35rem, 2.2vw, 1.65rem);
    font-weight: 700;
    margin: 0 0 0.85rem;
    color: #fff;
    line-height: 1.3;
}

.page-wrapper .row {
    --bs-gutter-x: clamp(1rem, 3vw, 1.75rem);
    --bs-gutter-y: clamp(1.25rem, 3vw, 1.75rem);
}

.cta-wrapper {
    border-radius: 18px;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    overflow-wrap: anywhere;
}

.cta-wrapper .title {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    margin-bottom: 0.75rem;
    color: #fff;
}

.cta-wrapper p {
    color: #f3f7f4;
    line-height: 1.7;
    max-width: 38rem;
    margin: 0 auto;
}

/* ==========================================================================
   Alignment polish — even columns, cards, FAQ, and typography
   ========================================================================== */

/* Bootstrap card rows: equal-height columns */
.page-wrapper .row.gy-4 > [class*="col-"],
.page-wrapper .row.g-4 > [class*="col-"],
.page-wrapper .row.gy-5 > [class*="col-"],
.site-main .row.gy-4 > [class*="col-"],
.site-main .row.g-4 > [class*="col-"],
.site-main .row.gy-5 > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

.content-stack {
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 3rem);
}

/* Cards fill column height and align content cleanly */
.page-wrapper .choose-card,
.page-wrapper .work-card,
.page-wrapper .package-card,
.page-wrapper .blog-card,
.site-main .choose-card,
.site-main .work-card,
.site-main .package-card,
.site-main .blog-card {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
}

.page-wrapper .choose-card p,
.page-wrapper .work-card p,
.page-wrapper .package-card p,
.site-main .choose-card p {
    margin-left: auto;
    margin-right: auto;
    max-width: 28rem;
    line-height: 1.65;
    text-align: center;
}

.page-wrapper .choose-card__header,
.site-main .choose-card__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 0.65rem;
}

.page-wrapper .choose-card__title,
.page-wrapper .package-card__title,
.page-wrapper .work-card__content h4,
.site-main .choose-card__title,
.site-main .package-card__title {
    margin: 0;
    line-height: 1.35;
    text-align: center;
}

.page-wrapper .package-card__features,
.site-main .package-card__features {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    list-style: none;
    text-align: center;
}

.page-wrapper .package-card__features li,
.site-main .package-card__features li {
    text-align: center;
    line-height: 1.55;
}

.page-wrapper .package-card .btn--base,
.page-wrapper .blog-card .btn--base,
.site-main .package-card .btn--base {
    margin-top: auto;
    align-self: center;
}

.page-wrapper .blog-card,
.site-main .blog-card {
    align-items: stretch;
    text-align: left;
}

.page-wrapper .blog-card__content,
.site-main .blog-card__content {
    width: 100%;
    text-align: left;
    align-items: flex-start;
}

.page-wrapper .plan-info-panel,
.site-main .plan-info-panel {
    height: 100%;
    width: 100%;
    text-align: left;
    align-items: stretch;
}

.page-wrapper .plan-info-panel__content,
.site-main .plan-info-panel__content {
    width: 100%;
    text-align: left;
}

.page-wrapper .plan-info-panel .package-card__features,
.page-wrapper .plan-info-panel .package-card__features li,
.site-main .plan-info-panel .package-card__features,
.site-main .plan-info-panel .package-card__features li {
    text-align: left;
}

/* Hero: keep columns aligned on one baseline */
.hero-grid {
    align-items: center;
}

.hero__content,
.hero-visual {
    width: 100%;
    max-width: 100%;
}

.hero__content > p {
    max-width: 36rem;
}

/* FAQ accordion alignment */
.cmn-accordion {
    width: 100%;
}

.cmn-accordion .card {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.cmn-accordion .card-header {
    padding: 0;
}

.cmn-accordion .card-header .btn {
    display: flex !important;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.65rem;
    width: 100%;
    text-align: left !important;
    white-space: normal;
    line-height: 1.45;
    padding: 1rem 1.1rem;
}

.cmn-accordion .card-header .btn i {
    flex: 0 0 auto;
    margin-top: 0.15rem;
}

.cmn-accordion .card-header .btn span {
    flex: 1 1 auto;
    text-align: left;
    overflow-wrap: break-word;
}

.cmn-accordion .card-body {
    text-align: left;
    line-height: 1.7;
    padding: 0.85rem 1.15rem 1.15rem;
    overflow-wrap: break-word;
}

/* Prose / panels */
.content-prose {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.content-prose.text-center,
.content-prose.text-center p,
.content-prose.text-center .content-block-title {
    text-align: center;
}

@media (min-width: 992px) {
    .content-prose.text-lg-start,
    .content-prose.text-lg-start p,
    .content-prose.text-lg-start .content-block-title {
        text-align: left;
    }
}

.content-panel {
    text-align: left;
}

.content-panel.text-center {
    text-align: center;
}

.content-panel.text-center .content-block-title,
.content-panel.text-center p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* Avoid ragged mid-word breaks from theme overflow-wrap:anywhere */
.page-wrapper p,
.page-wrapper li,
.page-wrapper h1,
.page-wrapper h2,
.page-wrapper h3,
.page-wrapper h4,
.site-main p,
.site-main li {
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

/* Footer columns: consistent top alignment */
.site-footer .row {
    align-items: flex-start;
}

.site-footer .footer-widget {
    height: 100%;
}

.site-footer .footer-title {
    margin-top: 0;
}

.site-footer .footer-links,
.site-footer .footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer .footer-links li,
.site-footer .footer-contact li {
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    :root {
        --site-section-y: clamp(4.5rem, 11vw, 6.5rem);
        --site-section-header-gap: 2rem;
        --site-header-h: 56px;
        --site-main-gap-bottom: clamp(1.75rem, 4.5vw, 2.75rem);
    }

    .section-header .section-title,
    .section-header h1,
    .section-header h2,
    .section-header h3 {
        letter-spacing: 0.25px;
    }
}

@media (max-width: 575.98px) {
    :root {
        --site-gutter: 16px;
        --site-header-h: 52px;
        --site-section-y: 4.25rem;
        --site-section-y-sm: 3rem;
        --site-section-header-gap: 1.75rem;
        --site-main-gap-bottom: 1.75rem;
    }

    .section-header .section-title,
    .section-header h1,
    .section-header h2,
    .section-header h3 {
        letter-spacing: 0.2px;
    }

    .cmn-accordion .card-header .btn {
        padding: 0.9rem 0.95rem;
        font-size: 0.95rem;
    }
}
