/* ==========================================================================
   CONTENT PAGES — Guide, Comparison, AlternativeTo, HowTo
   Shared styling for all content/article pages
   ========================================================================== */


/* -------------------------------------------------------------------------
   HERO
   ------------------------------------------------------------------------- */

.cp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100svh;
    text-align: center;
}

.cp-hero .content-inner.cp-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    max-width: 900px;
}

.cp-hero .cp-hero__inner .cp-hero__badge {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 50px;
    background: var(--color-primary-50);
    color: var(--color-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cp-hero .cp-hero__inner .cp-hero__headline {
    font-size: 28px;
    color: var(--color-ink);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.cp-hero .cp-hero__inner .cp-hero__subheadline {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.7;
    margin: 0;
    max-width: 700px;
}

.cp-hero .cp-hero__inner .cp-hero__extractable {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 768px) {

    .cp-hero .cp-hero__inner .cp-hero__headline {
        font-size: 38px;
    }

    .cp-hero .cp-hero__inner .cp-hero__subheadline {
        font-size: 18px;
    }

}

@media (min-width: 1024px) {

    .cp-hero .cp-hero__inner .cp-hero__headline {
        font-size: 44px;
    }

}


/* -------------------------------------------------------------------------
   ARTICLE SECTIONS
   ------------------------------------------------------------------------- */

.cp-section {
    position: relative;
    z-index: 1;
}

.cp-section .content-inner {
    max-width: 800px;
}

.cp-section .cp-section__heading {
    font-size: 24px;
    color: var(--color-ink);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.cp-section .cp-section__lead {
    font-size: 16px;
    color: var(--color-ink);
    line-height: 1.8;
    margin: 0 0 25px 0;
    font-weight: 500;
}

.cp-section .cp-section__body {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.8;
}

.cp-section .cp-section__body p {
    margin: 0 0 25px 0;
}

.cp-section .cp-section__body ul {
    margin: 0 0 25px 0;
    padding-left: 25px;
}

.cp-section .cp-section__body ul li {
    margin: 0 0 10px 0;
    line-height: 1.7;
}

.cp-section .cp-section__body ol {
    margin: 0 0 25px 0;
    padding-left: 25px;
}

.cp-section .cp-section__body ol li {
    margin: 0 0 10px 0;
    line-height: 1.7;
}

.cp-section .cp-section__body table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 25px 0;
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cp-section .cp-section__body table th {
    text-align: left;
    padding: 10px;
    background: var(--color-background);
    color: var(--color-ink);
    font-weight: 600;
    border-bottom: 2px solid var(--color-border);
    white-space: nowrap;
}

.cp-section .cp-section__body table td {
    padding: 10px;
    color: var(--color-muted);
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
}

.cp-section .cp-section__body strong {
    color: var(--color-ink);
    font-weight: 600;
}

.cp-section .cp-section__body a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cp-section .cp-section__body a:hover {
    color: var(--color-primary-600);
}

@media (min-width: 768px) {

    .cp-section .cp-section__heading {
        font-size: 28px;
    }

}


/* -------------------------------------------------------------------------
   SECTION ALTERNATION — BACKGROUND COLORS (explicit classes from view)
   ------------------------------------------------------------------------- */

.cp-section.cp-section--white {
    background: var(--color-surface);
}

.cp-section.cp-section--alt {
    background: var(--color-background);
}


/* -------------------------------------------------------------------------
   DISTRIBUTED Q&A PAIRS
   ------------------------------------------------------------------------- */

.cp-qa {
    margin: 50px 0 0 0;
    padding: 25px 0 0 0;
    border-top: 1px solid var(--color-border);
}

.cp-qa .cp-qa__question {
    font-size: 18px;
    color: var(--color-ink);
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.cp-qa .cp-qa__answer {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.8;
    margin: 0;
}


/* -------------------------------------------------------------------------
   METRIC CALLOUT
   ------------------------------------------------------------------------- */

.cp-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 50px 25px;
    margin: 50px 0;
    background: var(--color-primary-50);
    border-radius: var(--radius-xl);
    text-align: center;
}

.cp-metric .cp-metric__value {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.cp-metric .cp-metric__label {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-ink);
}

.cp-metric .cp-metric__context {
    font-size: 14px;
    color: var(--color-muted);
    max-width: 400px;
}


/* -------------------------------------------------------------------------
   COMPARISON TABLE
   ------------------------------------------------------------------------- */

.cp-comparison {
    position: relative;
    z-index: 1;
    background: #dbeafe;
}

.cp-comparison .content-inner {
    max-width: 900px;
}

.cp-comparison .cp-comparison__title {
    font-size: 24px;
    color: var(--color-ink);
    font-weight: 700;
    text-align: center;
    margin: 0 0 10px 0;
}

.cp-comparison .cp-comparison__subtitle {
    font-size: 16px;
    color: var(--color-muted);
    text-align: center;
    margin: 0 0 50px 0;
    line-height: 1.7;
}

.cp-comparison .cp-comparison__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table .cp-comparison__feature-header {
    text-align: left;
    padding: 10px 25px;
    font-weight: 600;
    color: var(--color-ink);
    background: var(--color-background);
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table .cp-comparison__col-header {
    text-align: center;
    padding: 10px 25px;
    font-weight: 600;
    color: var(--color-ink);
    background: var(--color-background);
    white-space: nowrap;
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table .cp-comparison__col-header--highlighted {
    background: var(--color-primary);
    color: #ffffff;
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table .cp-comparison__row .cp-comparison__feature {
    text-align: left;
    padding: 10px 25px;
    font-weight: 500;
    color: var(--color-ink);
    border-top: 1px solid var(--color-border);
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table .cp-comparison__row .cp-comparison__value {
    text-align: center;
    padding: 10px 25px;
    color: var(--color-muted);
    border-top: 1px solid var(--color-border);
}

.cp-comparison .cp-comparison__table-wrap .cp-comparison__table .cp-comparison__row .cp-comparison__value--highlighted {
    background: var(--color-primary-50);
    color: var(--color-primary);
    font-weight: 600;
}

@media (min-width: 768px) {

    .cp-comparison .cp-comparison__title {
        font-size: 28px;
    }

}


/* -------------------------------------------------------------------------
   FAQ SECTION (details/summary — native HTML)
   ------------------------------------------------------------------------- */

.cp-faq {
    position: relative;
    z-index: 1;
    background: var(--color-background);
}

.cp-faq .content-inner {
    max-width: 800px;
}

.cp-faq .cp-faq__title {
    font-size: 24px;
    color: var(--color-ink);
    font-weight: 700;
    text-align: center;
    margin: 0 0 50px 0;
}

.cp-faq .cp-faq__item {
    border-bottom: 1px solid var(--color-border);
    padding: 25px 0;
}

.cp-faq .cp-faq__item summary {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-ink);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.cp-faq .cp-faq__item summary::-webkit-details-marker {
    display: none;
}

.cp-faq .cp-faq__item summary::after {
    content: "+";
    font-size: 20px;
    font-weight: 500;
    color: var(--color-primary);
    flex-shrink: 0;
}

.cp-faq .cp-faq__item[open] summary::after {
    content: "−";
}

.cp-faq .cp-faq__item summary:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 4px;
    border-radius: var(--radius-sm);
}

.cp-faq .cp-faq__item .cp-faq__answer {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.8;
    margin: 10px 0 0 0;
    padding-right: 50px;
}

@media (min-width: 768px) {

    .cp-faq .cp-faq__title {
        font-size: 28px;
    }

}


/* -------------------------------------------------------------------------
   CTA SECTION
   ------------------------------------------------------------------------- */

.cp-cta {
    position: relative;
    z-index: 2;
    background: var(--color-ink);
}

.cp-cta .content-inner.cp-cta__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
    max-width: 700px;
}

.cp-cta .cp-cta__inner .cp-cta__title {
    font-size: 28px;
    color: #ffffff;
    font-weight: 700;
    margin: 0;
}

.cp-cta .cp-cta__inner .cp-cta__subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
}

.cp-cta .cp-cta__inner .cp-cta__button {
    margin-top: 0;
}

@media (min-width: 768px) {

    .cp-cta .cp-cta__inner .cp-cta__title {
        font-size: 34px;
    }

}


/* -------------------------------------------------------------------------
   HOWTO STEPS
   ------------------------------------------------------------------------- */

.cp-howto {
    position: relative;
    z-index: 1;
    background: var(--color-surface);
}

.cp-howto .content-inner {
    max-width: 800px;
}

.cp-howto .cp-howto__title {
    font-size: 24px;
    color: var(--color-ink);
    font-weight: 700;
    text-align: center;
    margin: 0 0 10px 0;
}

.cp-howto .cp-howto__description {
    font-size: 16px;
    color: var(--color-muted);
    text-align: center;
    line-height: 1.7;
    margin: 0 0 50px 0;
}

.cp-howto .cp-howto__steps {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cp-howto .cp-howto__steps .cp-howto__step {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.cp-howto .cp-howto__steps .cp-howto__step .cp-howto__step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 16px;
}

.cp-howto .cp-howto__steps .cp-howto__step .cp-howto__step-content {
    flex: 1;
}

.cp-howto .cp-howto__steps .cp-howto__step .cp-howto__step-content .cp-howto__step-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0 0 10px 0;
}

.cp-howto .cp-howto__steps .cp-howto__step .cp-howto__step-content .cp-howto__step-desc {
    font-size: 16px;
    color: var(--color-muted);
    line-height: 1.7;
    margin: 0;
}

@media (min-width: 768px) {

    .cp-howto .cp-howto__title {
        font-size: 28px;
    }

}


/* -------------------------------------------------------------------------
   RELATED PAGES
   ------------------------------------------------------------------------- */

.cp-related {
    position: relative;
    z-index: 1;
    background: var(--color-background);
}

.cp-related .content-inner {
    max-width: 800px;
}

.cp-related .cp-related__title {
    font-size: 20px;
    color: var(--color-ink);
    font-weight: 700;
    margin: 0 0 25px 0;
}

.cp-related .cp-related__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cp-related .cp-related__list .cp-related__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 25px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.15s ease;
}

.cp-related .cp-related__list .cp-related__link:hover {
    background: var(--color-primary-50);
}


/* -------------------------------------------------------------------------
   SCROLL REVEAL ANIMATION
   ------------------------------------------------------------------------- */

.cp-reveal {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.cp-reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .cp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

}


/* -------------------------------------------------------------------------
   WAVE DIVIDER — FAQ TO CTA TRANSITION
   ------------------------------------------------------------------------- */

.cp-cta::before {
    content: "";
    position: absolute;
    top: -80px;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80'%3E%3Cpath fill='%230f172a' d='M0 40 C 360 80 720 0 1080 40 S 1440 60 1440 60 L1440 80 L0 80 Z'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}
