/* ==========================================================================
   Digital Services Guide
   ========================================================================== */

.services-guide-page {
    --guide-border: var(--site-border);
    --guide-muted: var(--site-muted);
    --guide-primary: var(--site-primary);
    --guide-surface: var(--site-surface);
    color: var(--site-text);
}

.guide-hero {
    padding: clamp(1.5rem, 4vw, 3rem);
    border: 1px solid var(--guide-border);
    border-radius: 1.25rem;
    background:
        radial-gradient(ellipse at top right, rgb(37 99 235 / 8%), transparent 55%),
        var(--guide-surface);
}

.guide-title {
    max-width: 850px;
    color: #111827;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.12;
}

.guide-lead {
    max-width: 760px;
    color: #475569;
    font-size: 1.15rem;
    line-height: 1.8;
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    color: var(--guide-muted);
    font-size: 0.875rem;
}

.guide-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.guide-text-link,
.guide-inline-cta {
    color: var(--guide-primary);
    font-weight: 650;
    text-underline-offset: 4px;
}

.guide-introduction {
    max-width: 850px;
    padding-top: 1.25rem;
    border-top: 1px solid var(--guide-border);
    color: var(--guide-muted);
    line-height: 1.85;
}

/* Table of contents */

.guide-toc {
    position: sticky;
    top: 0.75rem;
    z-index: 100;
    padding: 1.25rem;
    border: 1px solid var(--guide-border);
    border-radius: 1rem;
    background: rgb(255 255 255 / 97%);
    box-shadow: 0 6px 20px rgb(15 23 42 / 4%);
    backdrop-filter: blur(12px);
}

.guide-toc-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.guide-toc-heading h2 {
    margin: 0;
    color: #111827;
    font-size: 1rem;
    font-weight: 700;
}

.guide-toc-heading > a {
    color: var(--guide-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.guide-toc-groups {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1.5rem;
}

.guide-toc-group {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 0.5rem;
}

.guide-toc-group h3 {
    flex-basis: 100%;
    margin: 0 0 0.25rem;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.guide-toc-group a {
    display: inline-block;
    padding: 0.3rem 0.55rem;
    border-radius: 0.4rem;
    color: #334155;
    font-size: 0.85rem;
    line-height: 1.5;
    text-decoration: none;
}

.guide-toc-group a:hover {
    background: #eff6ff;
    color: var(--guide-primary);
    text-decoration: underline;
}

/* Sections and headings */

.guide-section {
    scroll-margin-top: 15rem;
}

.guide-section-heading {
    max-width: 820px;
    margin-bottom: 1.5rem;
}

.guide-section-heading h2 {
    margin-bottom: 0.75rem;
    color: #111827;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.guide-section-heading > p:not(.section-eyebrow) {
    color: var(--guide-muted);
    line-height: 1.85;
}

.guide-subheading {
    margin: 1.5rem 0 0.8rem;
    color: #172033;
    font-size: 1.12rem;
    font-weight: 700;
}

.guide-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding-left: 1.25rem;
    color: #475569;
    line-height: 1.75;
}

.guide-list li::marker {
    color: var(--guide-primary);
}

.guide-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.8fr);
    gap: 2rem;
    align-items: start;
    color: #475569;
}

.guide-content {
    max-width: 820px;
    align-items: start;
    color: #475569;
}

.guide-content p, .guide-content-grid p {
    line-height: 1.85;
}

.guide-side-note {
    padding: 1.35rem;
    border: 1px solid var(--guide-border);
    border-radius: 0.9rem;
    background: var(--guide-surface);
}

.guide-side-note h3 {
    margin-bottom: 0.7rem;
    color: #172033;
    font-size: 1.05rem;
    font-weight: 700;
}

.guide-side-note p {
    color: var(--guide-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Pricing tables */

.guide-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--guide-border);
    border-radius: 0.8rem;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.guide-table {
    width: 100%;
    min-width: 650px;
    margin: 0;
    border-collapse: collapse;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.65;
}

.guide-table th,
.guide-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #edf0f5;
    text-align: left;
    vertical-align: top;
}

.guide-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.guide-table tbody th {
    min-width: 145px;
    color: #172033;
    font-weight: 650;
}

.guide-table tbody tr:last-child th,
.guide-table tbody tr:last-child td {
    border-bottom: 0;
}

.guide-table tbody tr:hover {
    background: #fbfdff;
}

.guide-note {
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border: 1px solid #dbe6fb;
    border-left: 4px solid var(--guide-primary);
    border-radius: 0.6rem;
    background: #f8fbff;
    color: #475569;
    line-height: 1.8;
}

.guide-note strong {
    color: #172033;
}

.guide-footnote {
    margin-top: 1rem;
    color: var(--guide-muted);
    font-size: 0.88rem;
    line-height: 1.75;
}

.guide-next-step {
    margin-top: 1.5rem;
    color: #475569;
    line-height: 1.8;
}

.guide-inline-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.2rem;
}

/* Package cards */

.guide-package-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.guide-package {
    min-width: 0;
    padding: 1.35rem;
    border: 1px solid var(--guide-border);
    border-radius: 0.9rem;
    background: #fff;
}

.guide-package-featured {
    border-color: #b9cdf8;
    background: linear-gradient(180deg, #f8fbff, #fff 55%);
    box-shadow: 0 8px 24px rgb(37 99 235 / 5%);
}

.guide-package-label {
    margin-bottom: 0.65rem;
    color: var(--guide-primary);
    font-size: 0.72rem !important;
    font-weight: 750;
    letter-spacing: 0.09em;
}

.guide-package h3 {
    min-height: 2.8em;
    margin-bottom: 0.8rem;
    color: #172033;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.guide-package-price {
    margin-bottom: 0.2rem;
    color: #111827;
    font-size: clamp(1.15rem, 2vw, 1.45rem) !important;
    font-weight: 750;
    line-height: 1.4 !important;
    text-align: left;
}

.guide-package-timeline {
    margin-bottom: 1rem;
    color: var(--guide-muted);
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
    text-align: left;
}

.guide-package .guide-list {
    font-size: 0.9rem;
    gap: 0.45rem;
}

/* Project process and engagement cards */

.guide-process-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.guide-process-step,
.guide-detail-card {
    padding: 1.35rem;
    border: 1px solid var(--guide-border);
    border-radius: 0.85rem;
    background: #fff;
}

.guide-process-step > span {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--guide-primary);
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.08em;
}

.guide-process-step h3,
.guide-detail-card h3 {
    margin-bottom: 0.55rem;
    color: #172033;
    font-size: 1.05rem;
    font-weight: 700;
}

.guide-process-step p,
.guide-detail-card p {
    margin-bottom: 0;
    color: var(--guide-muted);
    font-size: 0.92rem;
    line-height: 1.8;
}

.guide-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

/* FAQ */

.guide-faq {
    display: grid;
    gap: 0.75rem;
}

.guide-faq details {
    padding: 1rem 1.15rem;
    border: 1px solid var(--guide-border);
    border-radius: 0.75rem;
    background: #fff;
}

.guide-faq summary {
    position: relative;
    padding-right: 1.5rem;
    color: #172033;
    font-weight: 650;
    line-height: 1.6;
    cursor: pointer;
}

.guide-faq summary::marker {
    color: var(--guide-primary);
}

.guide-faq details[open] summary {
    margin-bottom: 0.75rem;
}

.guide-faq details p {
    margin-bottom: 0;
    color: var(--guide-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Final CTA */

.guide-final-cta {
    padding: clamp(2rem, 5vw, 3.25rem) 1.5rem;
    border: 1px solid #dbe6fb;
    border-radius: 1.25rem;
    background:
        radial-gradient(ellipse at top, rgb(37 99 235 / 8%), transparent 65%),
        var(--guide-surface);
}

.guide-final-cta h2 {
    color: #111827;
    font-size: clamp(1.6rem, 3.5vw, 2.3rem);
    font-weight: 730;
    letter-spacing: -0.035em;
    line-height: 1.3;
}

.guide-final-cta-copy {
    max-width: 650px;
    color: var(--guide-muted);
    line-height: 1.8;
}

.services-guide-page a:focus-visible,
.guide-faq summary:focus-visible {
    border-radius: 3px;
    outline: 3px solid rgb(37 99 235 / 40%);
    outline-offset: 3px;
}

.breadcrumb-divider {
    display: none;
}

@media (max-width: 991.98px) {
    .guide-toc {
        position: static;
    }

    .guide-toc-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .guide-package-grid {
        grid-template-columns: 1fr;
    }

    .guide-package h3 {
        min-height: 0;
    }

    .guide-process-grid,
    .guide-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .guide-content-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .guide-section {
        scroll-margin-top: 1.5rem;
    }

    .guide-table {
        font-size: 0.88rem;
    }

    .guide-table th,
    .guide-table td {
        padding: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .guide-hero {
        border-radius: 1rem;
    }

    .guide-lead {
        font-size: 1rem;
    }

    .guide-toc {
        padding: 1rem;
    }

    .guide-toc-groups,
    .guide-process-grid,
    .guide-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .guide-toc-group {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--guide-border);
    }

    .guide-toc-group:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .guide-hero-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .guide-package,
    .guide-process-step,
    .guide-detail-card {
        padding: 1.1rem;
    }

    .guide-note {
        padding: 0.9rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guide-toc {
        scroll-behavior: auto;
    }
}
