/* LANDINGS SEO - ONLINE VALLES */

/* CABECERA */
.ccm-seo-hero .contenedor {
    position: relative;
    z-index: 1;
    padding-block: clamp(2.5rem, 5vw, 5rem);
}

.ccm-seo-hero .encabezado-seccion {
    max-width: 100%;
    margin-bottom: 0;
}

.ccm-seo-hero h1 {
    overflow-wrap: break-word;
}

/* CONTENIDO PRINCIPAL */
.ccm-seo-content {
    padding-block: clamp(3rem, 5vw, 5rem);
}

.ccm-seo-body {
    min-width: 0;
    width: 100%;
    overflow-wrap: break-word;
}

.ccm-seo-body .ccm-seo-editorial {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(3.5rem, 6vw, 5.5rem) !important;
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
}

/* MISMA ANCHURA EN TODAS LAS SECCIONES */
.ccm-seo-body .ccm-seo-editorial > * {
    width: 100%;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
}

.ccm-seo-body .ccm-seo-copy {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
}

/* TEXTO E IMAGEN */
.ccm-seo-body .ccm-seo-columns {
    display: grid !important;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center !important;
    gap: clamp(2rem, 4vw, 4rem) !important;
}

.ccm-seo-body .ccm-seo-image-left {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.ccm-seo-body .ccm-seo-columns > .wp-block-column {
    min-width: 0;
    max-width: none;
    margin: 0 !important;
    align-self: center;
}

/* TIPOGRAFIA ORIGINAL */
.ccm-seo-body h2 {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    line-height: 1.12;
    margin-block: 2rem 1.25rem;
}

.ccm-seo-body h3 {
    font-family: var(--font-heading);
    font-size: var(--fs-h3);
    margin-block: 1.75rem .8rem;
}

.ccm-seo-body p {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.65;
    margin: 0 0 1.1rem;
}

.ccm-seo-body .wp-block-column > :first-child,
.ccm-seo-body .ccm-seo-copy > :first-child {
    margin-top: 0 !important;
}

.ccm-seo-body .wp-block-column > :last-child,
.ccm-seo-body .ccm-seo-copy > :last-child {
    margin-bottom: 0 !important;
}

.ccm-seo-body a {
    text-decoration: underline;
}

/* FOTOGRAFIAS */
.ccm-seo-body .wp-block-image {
    margin: 0;
}

.ccm-seo-body .wp-block-image img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.ccm-seo-body .ccm-seo-columns .wp-block-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

/* FORMULARIO ORIGINAL */
.ccm-seo-form {
    padding-block: clamp(3rem, 5vw, 4.5rem);
    scroll-margin-top: 100px;
}

.ccm-seo-form .hero-portada__form {
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
}

.ccm-seo-form .campo {
    min-width: 0;
}

/* TABLET Y MOVIL */
@media (max-width: 980px) {
    .ccm-seo-body .ccm-seo-columns,
    .ccm-seo-body .ccm-seo-image-left {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.75rem !important;
    }

    .ccm-seo-body .ccm-seo-image-left > .wp-block-column:first-child {
        order: 2;
    }

    .ccm-seo-body .ccm-seo-image-left > .wp-block-column:last-child {
        order: 1;
    }

    .ccm-seo-body .ccm-seo-editorial {
        gap: 3rem !important;
    }
}

@media (max-width: 760px) {
    .ccm-seo-form .grid-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .ccm-seo-content {
        padding-block: 2.5rem 3rem;
    }

    .ccm-seo-body .ccm-seo-editorial {
        gap: 2.75rem !important;
    }
}

/* CCM SEO V3 - Espaciado editorial y formulario */

/* Separacion real entre secciones de Gutenberg */
.ccm-seo-body .ccm-seo-editorial,
.ccm-seo-body .ccm-seo-editorial > .wp-block-group__inner-container {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(5rem, 6vw, 6rem) !important;
    width: 100%;
    max-width: none !important;
}

.ccm-seo-body .ccm-seo-editorial > *,
.ccm-seo-body .ccm-seo-editorial > .wp-block-group__inner-container > * {
    margin: 0 !important;
    width: 100%;
    max-width: none !important;
    min-width: 0;
}

/* Alineacion del bloque central */
.ccm-seo-body .ccm-seo-copy > .wp-block-group__inner-container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.ccm-seo-body .ccm-seo-copy > .wp-block-group__inner-container > :first-child {
    margin-top: 0 !important;
}

.ccm-seo-content {
    padding-top: clamp(3rem, 5vw, 5rem);
    padding-bottom: clamp(2rem, 3vw, 3rem);
}

/* Formulario sobre fondo blanco */
.ccm-seo-form.seccion--alt {
    background: var(--color-bg);
    padding-top: clamp(2rem, 3vw, 3rem);
    padding-bottom: clamp(3.5rem, 5vw, 5rem);
}

.ccm-seo-form .hero-portada__form {
    border: 1px solid var(--color-border);
}

/* Tablet */
@media (max-width: 980px) {
    .ccm-seo-body .ccm-seo-editorial,
    .ccm-seo-body .ccm-seo-editorial > .wp-block-group__inner-container {
        gap: 4rem !important;
    }
}

/* Movil */
@media (max-width: 760px) {
    .ccm-seo-body .ccm-seo-editorial,
    .ccm-seo-body .ccm-seo-editorial > .wp-block-group__inner-container {
        gap: 3.25rem !important;
    }

    .ccm-seo-content {
        padding-top: 2.5rem;
        padding-bottom: 1.75rem;
    }

    .ccm-seo-form.seccion--alt {
        padding-top: 1.75rem;
        padding-bottom: 3rem;
    }
}
