/* ==========================================================================
   CTA Book Component
   --------------------------------------------------------------------------
   Baseline layout + responsive rules for the tol/cta-book block, loaded
   globally so the section renders correctly anywhere it is inserted
   (single posts, archives, pages, patterns).

   Page-specific overrides in front-page.css / reviews.css still cascade
   on top of these defaults for fine-tuned looks.
   ========================================================================== */

.section--cta .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3xl);
}

.cta__content {
    max-width: 768px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
}

.cta__title {
    font-size: var(--fs-3xl);
    line-height: var(--lh-snug);
    color: var(--color-text-dark);
    margin: 0;
}

.cta__description {
    font-family: var(--font-body);
    font-size: var(--fs-lg);
    font-weight: var(--fw-regular);
    line-height: var(--lh-normal);
    color: var(--color-text-dark);
    margin: 0;
}

.cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

/* Buttons inside CTA must always honour .btn styling — counters any
   contextual `.entry-content a` rules from blog/post content. */
.cta__actions .btn,
.section--cta .btn,
.section--cta a.btn {
    text-decoration: none;
}

.cta__actions .btn--primary,
.section--cta .btn--primary {
    color: var(--color-white);
}

.cta__actions .btn--secondary-light,
.section--cta .btn--secondary-light {
    color: var(--color-white);
}

.cta__actions .btn--secondary,
.section--cta .btn--secondary {
    color: var(--color-text-dark);
}

.cta__image {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.cta__image img {
    width: 100%;
    height: auto;
    max-height: 738px;
    object-fit: cover;
    display: block;
    border-radius: var(--border-radius);
}

/* ---- Full-bleed background variant ---- */
.section--cta-bg {
    position: relative;
    overflow: hidden;
}

.cta__background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(3px);
    transform: scale(1.02);
}

.cta__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.section--cta-bg .container {
    position: relative;
    z-index: 2;
}

.section--cta-bg .cta__title {
    color: var(--color-white);
}

.section--cta-bg .cta__description {
    color: rgba(255, 255, 255, 0.85);
}

/* ---- Tablet ---- */
@media (min-width: 768px) {
    .cta__title {
        font-size: var(--fs-4xl);
    }
}

/* ---- Desktop ---- */
@media (min-width: 1024px) {
    .section--cta .container {
        gap: var(--space-4xl);
    }

    .cta__title {
        font-size: clamp(4rem, 5vw, 6rem);
        line-height: 1.2;
    }
}

/* ---- Mobile guard ---- */
@media (max-width: 639px) {
    .section--cta .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .cta__title {
        font-size: var(--fs-2xl);
    }

    .cta__description {
        font-size: var(--fs-base);
    }

    .cta__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .cta__actions .btn {
        width: 100%;
    }

    .cta__image img {
        max-height: 400px;
    }
}
