/**
 * "CASABLANCA - Rich Text" — full-width editorial text band.
 *
 * Every size is a Customizer value printed as a custom property on the section
 * (template-parts/sections/rich-text.php).
 *
 * Typography follows the home page scale rather than the reference image: the
 * heading uses the same fluid curve and floor as the Categories title
 * (categories.css), the body the same as the Services description
 * (services.css). The Customizer sizes are the DESKTOP ceiling of that curve,
 * so tablet and mobile scale down on their own with no breakpoint overrides.
 * min() keeps the floor from overtaking a ceiling set below it.
 */

.casablanca-rich-text {
    width: 100%;
    padding: var(--rt-pt, 80px) 32px var(--rt-pb, 80px);
    background: var(--rt-bg, #0C424F);
    color: var(--rt-color, #fff);
    font-family: var(--casablanca-font-primary);
    overflow-wrap: break-word;
}

.casablanca-rich-text-inner {
    max-width: var(--rt-max-w, 960px);
    margin: 0 auto;
}

.casablanca-rich-text.is-align-start  { text-align: start; }
.casablanca-rich-text.is-align-center { text-align: center; }
.casablanca-rich-text.is-align-end    { text-align: end; }

.casablanca-rich-text-heading {
    margin: 0 0 clamp(14px, 1.9vw, 28px);
    padding: 0;
    color: inherit;
    font-family: var(--casablanca-font-secondary, var(--casablanca-font-primary));
    font-size: clamp(min(16px, var(--rt-heading-size, 24px)), 0.6vw + 0.78rem, var(--rt-heading-size, 24px));
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.casablanca-rich-text-body {
    font-size: clamp(min(12px, var(--rt-body-size, 14px)), 0.95vw, var(--rt-body-size, 14px));
    font-weight: 400;
    line-height: 1.7;
}

.casablanca-rich-text-body + .casablanca-rich-text-body {
    margin-top: clamp(14px, 1.7vw, 24px);
}

.casablanca-rich-text-body p {
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.casablanca-rich-text-body p + p {
    margin-top: 1em;
}

.casablanca-rich-text-body strong,
.casablanca-rich-text-body b {
    font-weight: 600;
}

.casablanca-rich-text-body a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

@media (max-width: 1023px) {
    .casablanca-rich-text {
        padding: calc(var(--rt-pt, 80px) * 0.8) 28px calc(var(--rt-pb, 80px) * 0.8);
    }

}

@media (max-width: 767px) {
    .casablanca-rich-text {
        padding: calc(var(--rt-pt, 80px) * 0.6) 20px calc(var(--rt-pb, 80px) * 0.6);
    }

    .casablanca-rich-text-heading {
        letter-spacing: 0.08em;
    }

    .casablanca-rich-text-body {
        line-height: 1.65;
    }
}
