/**
 * Bloques del sitio — estilos de los tipos 0..7.
 * ---------------------------------------------------------------------
 * Se cargan desde displayblock() (assets/mods/block/view.php) mediante
 * la variable $css, que index.php imprime en el <head>. El archivo se
 * carga antes de css.min.css, por lo que los selectores se mantienen
 * específicos bajo .block para no chocar con el tema existente.
 */

.block .block-heading {
    margin-bottom: 2.25rem;
}

.block .block-heading.text-center {
    max-width: 860px;
    margin-right: auto;
    margin-left: auto;
}

.block .block-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .85rem;
    padding: .35rem .9rem;
    border-radius: 999px;
    background: rgba(13, 110, 253, .08);
    color: #0d6efd;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.block .block-title {
    margin-bottom: .75rem;
    color: #1f2937;
    font-family: "Palanquin Dark", sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    font-weight: 700;
    line-height: 1.2;
}

.block .block-subtitle {
    margin-bottom: 1.25rem;
    color: #6b7280;
    font-size: 1.1rem;
    line-height: 1.6;
}

.block .block-description {
    color: #374151;
    font-size: 1rem;
    line-height: 1.8;
}

.block .block-description > :last-child {
    margin-bottom: 0;
}

.block .block-cta {
    margin-top: 1.75rem;
    color: #fff;
    font-weight: 500;
}

.block .block-cta:hover,
.block .block-cta:focus {
    color: #fff;
}

/* ── Imagen principal, secundaria y tarjeta flotante ─────────────── */

.block .block-media {
    position: relative;
}

.block .block-media-main {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    background: #f3f4f6;
    box-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

.block .block-media-main > img:first-child {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.block .block-media-secondary {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    width: 40%;
    max-width: 230px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 5px solid #fff;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .2);
}

.block .block-floating-card,
.block .block-floating-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .6rem 1rem;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
}

.block .block-floating-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    max-width: calc(100% - 2rem);
}

.block .block-floating-card i,
.block .block-floating-badge i {
    color: #0d6efd;
    font-size: .95rem;
}

.block .block-floating-badge {
    margin-bottom: 1.25rem;
}

/* ── Video ────────────────────────────────────────────────────────── */

.block .block-video-wrapper {
    max-width: 960px;
    margin: 2.5rem auto 0;
}

.block .block-video-wrapper iframe,
.block .block-video-wrapper video {
    border-radius: 1rem;
}

.block .block-video {
    display: block;
    width: 100%;
}

/* ── Ajustes por tipo ─────────────────────────────────────────────── */

.block-type-5 .block-media {
    max-width: 960px;
    margin: 0 auto 2rem;
}

.block-type-5 .block-heading.text-center,
.block-type-5 .block-body {
    max-width: 860px;
    margin-right: auto;
    margin-left: auto;
}

.block-type-2 .block-body,
.block-type-5 .block-body {
    text-align: center;
}

/* En los tipos con imagen+texto, la imagen se separa del texto en móvil */
@media (max-width: 991.98px) {
    .block .block-media {
        margin-bottom: 2rem;
    }

    .block .block-media-secondary {
        width: 34%;
        max-width: 180px;
    }

    .block-type-5 .block-media {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .block .block-media-secondary {
        width: 42%;
        max-width: 150px;
    }

    .block .block-floating-card {
        top: .75rem;
        right: .75rem;
        padding: .45rem .75rem;
        font-size: .72rem;
    }
}
