/**
 * Widget: Sección CTA — BajoNalón
 * Layout 2 columnas: visual + contenido, invertible.
 */

/* ============================================================
   CONTENEDOR
   ============================================================ */

.bn-cta-section {
    background-color: #fdfdfd;
    padding: 100px 5%;
    overflow: hidden;
}

/* ============================================================
   GRID
   ============================================================ */

.bn-cta-grid {
    display: grid;
    /* grid-template-columns se inyecta vía inline style desde PHP */
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
}

/* Columnas invertidas: texto izquierda, visual derecha */
.bn-cta-grid--reversed .bn-cta-visual  { order: 2; }
.bn-cta-grid--reversed .bn-cta-content { order: 1; }

/* ============================================================
   COLUMNA VISUAL
   ============================================================ */

.bn-cta-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* ── Texto decorativo ── */

.bn-cta-deco-words {
    display: flex;
    flex-direction: column;
    line-height: 0.88;
}

.bn-cta-deco-word {
    display: block;
    font-weight: 900;
    color: #E74F08;
    line-height: 0.9;
    /* font-size, color, font-weight, margin-left y letter-spacing
       se aplican con inline style desde PHP                        */
}

/* ── Forma SVG decorativa ── */

.bn-cta-wave {
    width: 110%;
    height: auto;
    max-height: 220px;
    margin-top: -24px;
    filter: drop-shadow(0 5px 15px rgba(29, 95, 135, 0.16));
    flex-shrink: 0;
    overflow: visible;
}

/* Círculos y espiral: centrar en lugar de estirar */
.bn-cta-deco-words ~ .bn-cta-wave[viewBox] {
    align-self: center;
}

/* ── Imagen ── */

.bn-cta-visual--image {
    align-items: stretch;
}

.bn-cta-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;  /* sobreescrito por Elementor */
    display: block;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

/* ── Icono grande ── */

.bn-cta-visual--icon {
    align-items: center;
    gap: 20px;
}

.bn-cta-big-icon {
    font-size: 140px;   /* sobreescrito por Elementor */
    color: #E74F08;     /* sobreescrito por Elementor */
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bn-cta-big-icon svg {
    width: 140px;
    height: 140px;
    fill: #E74F08;
}

.bn-cta-icon-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    text-align: center;
}

/* ============================================================
   COLUMNA DE CONTENIDO
   ============================================================ */

.bn-cta-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Etiqueta pequeña ── */

.bn-cta-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #E74F08;       /* sobreescrito por Elementor */
    margin-bottom: 12px;
}

/* ── Título ── */

.bn-cta-title {
    font-size: 2.75rem;   /* sobreescrito por Elementor responsive */
    font-weight: 800;     /* sobreescrito por Elementor */
    color: #222;          /* sobreescrito por Elementor */
    margin: 0 0 22px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* ── Texto descriptivo ── */

.bn-cta-text {
    font-size: 1.06rem;   /* sobreescrito por Elementor */
    color: #666;          /* sobreescrito por Elementor */
    line-height: 1.7;
    margin: 0 0 36px;
    max-width: 520px;
}

/* ============================================================
   BOTONES
   ============================================================ */

.bn-cta-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

/* Base compartida */
.bn-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease,
                border-color 0.3s ease, transform 0.25s ease,
                box-shadow 0.3s ease;
    white-space: nowrap;
    line-height: 1;
    border: 2px solid transparent;
}

/* ── Relleno naranja ── */

.bn-cta-btn--primary {
    background-color: #E74F08;  /* sobreescrito por Elementor */
    color: #fff;                 /* sobreescrito por Elementor */
    padding: 15px 36px;
    border-radius: 50px;         /* sobreescrito por Elementor */
}

.bn-cta-btn--primary:hover {
    background-color: #c5430a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(231, 79, 8, 0.3);
}

/* ── Relleno azul ── */

.bn-cta-btn--blue {
    background-color: #1d5f87;
    color: #fff;
    padding: 15px 36px;
    border-radius: 50px;
}

.bn-cta-btn--blue:hover {
    background-color: #154563;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 95, 135, 0.3);
}

/* ── Contorno ── */

.bn-cta-btn--outline {
    background-color: transparent;
    border-color: #ddd;         /* sobreescrito por Elementor */
    color: #222;                 /* sobreescrito por Elementor */
    padding: 13px 34px;
    border-radius: 50px;
}

.bn-cta-btn--outline:hover {
    border-color: #1d5f87;
    color: #1d5f87;
    background-color: #fff;
}

/* ── Texto + flecha ── */

.bn-cta-btn--ghost {
    background: transparent;
    color: #222;                 /* sobreescrito por Elementor */
    padding: 0;
    border: none;
    font-weight: 700;
}

.bn-cta-btn--ghost:hover {
    color: #E74F08;
}

.bn-cta-btn--ghost:hover .bn-cta-btn__arrow,
.bn-cta-btn--ghost:hover .bn-cta-btn__icon--after i {
    transform: translateX(5px);
}

.bn-cta-btn__arrow {
    transition: transform 0.3s ease;
}

.bn-cta-btn__icon--before,
.bn-cta-btn__icon--after {
    display: inline-flex;
    align-items: center;
}

.bn-cta-btn__icon--after i {
    transition: transform 0.3s ease;
}

/* ── Focus visible (accesibilidad) ── */

.bn-cta-btn:focus-visible {
    outline: 3px solid #E74F08;
    outline-offset: 3px;
    border-radius: 4px;
}

/* ============================================================
   RESPONSIVE — tablet  ≤ 1024px
   ============================================================ */

@media (max-width: 1024px) {
    .bn-cta-section {
        padding: 80px 5%;
    }

    .bn-cta-grid {
        gap: 50px;
    }

    .bn-cta-title {
        font-size: 2.2rem;
    }
}

/* ============================================================
   RESPONSIVE — móvil  ≤ 768px
   ============================================================ */

@media (max-width: 768px) {
    .bn-cta-section {
        padding: 60px 5%;
    }

    .bn-cta-grid,
    .bn-cta-grid--reversed {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    /* En móvil el visual siempre va arriba */
    .bn-cta-grid--reversed .bn-cta-visual  { order: 1; }
    .bn-cta-grid--reversed .bn-cta-content { order: 2; }

    .bn-cta-title {
        font-size: 1.9rem;
    }

    .bn-cta-deco-words {
        align-items: flex-start;
    }

    .bn-cta-wave {
        width: 100%;
        margin-top: -15px;
    }

    .bn-cta-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .bn-cta-btn--outline,
    .bn-cta-btn--primary,
    .bn-cta-btn--blue {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   ACCESIBILIDAD — reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    .bn-cta-btn,
    .bn-cta-btn__arrow,
    .bn-cta-btn__icon--after i {
        transition: none;
    }

    .bn-cta-btn--primary:hover,
    .bn-cta-btn--blue:hover,
    .bn-cta-btn--outline:hover {
        transform: none;
        box-shadow: none;
    }
}
