/* ==================================== */
/* IMÁGENES DESTACADAS Y EFECTOS HOVER */
/* ==================================== */

/* Contenedor de imagen (GLOBAL para módulos de imagen) */
.post-image,
.gb-element-137168bb figure.wp-block-image {
    position: relative;
    overflow: hidden;
}

/* 1. Definimos el enlace como el contenedor de efectos (BASE MOBILE) */
.inside-article .post-image a,
.gb-element-137168bb figure.wp-block-image>a:first-of-type {
    line-height: 0;
    /* Elimina el espacio blanco debajo de la imagen */
    position: relative;
    /* Necesario para posicionar el overlay (::after) */
    overflow: hidden;
    /* Oculta la parte de la imagen que se agranda con el zoom */
    display: block;
    /* Los enlaces son inline por defecto, deben ser block para width/height */
}

/* 2. El overlay oscuro (capa semi-transparente) */
.inside-article .post-image a:after,
.gp-ranking-item .post-image a:after,
.gb-element-137168bb figure.wp-block-image>a:first-of-type::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.2s;
}

/* 3. El efecto al pasar el ratón por el enlace: hace visible el overlay */
.inside-article .post-image a:hover:after,
.gp-ranking-item .post-image a:hover:after,
.gb-element-137168bb figure.wp-block-image>a:first-of-type:hover::after {
    opacity: 1;
}

/* 4. La imagen dentro del enlace (le damos transición) */
.inside-article .post-image a img,
.gp-ranking-item .post-image a img,
.gb-element-137168bb figure.wp-block-image>a:first-of-type img {
    transition: transform 300ms ease-out;
}

/* 5. El efecto al pasar el ratón por el enlace: hace zoom a la imagen */
.inside-article .post-image a:hover img,
.gp-ranking-item .post-image a:hover img,
.gb-element-137168bb figure.wp-block-image>a:first-of-type:hover img {
    transform: scale(1.1);
}

/* Duración de video overlay (BASE MOBILE) */
.video-duration-overlay {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1.1rem;
    font-weight: 500;
    padding: 0 4px;
    border-radius: 2px;
    z-index: 10;
}

/* Padding y Margenes de Imagenes Destacadas */
.no-featured-image-padding .post-image {
    margin-left: -6px;
    /* MOBILE */
    margin-right: -6px;
    /* MOBILE */
}

.inside-article .featured-image,
.inside-article .post-image {
    /*Sobrescribe css del plugin blog de GP*/
    margin-bottom: 1em !important;
}

.post-image-above-header .no-featured-image-padding .inside-article .post-image {
    margin-top: -10px;
    /* MOBILE */
}


/* RESPONSIVE TABLET */
@media (min-width: 769px) {

    /* Padding y Margenes de Imagenes Destacadas (Ajuste) */
    .no-featured-image-padding .post-image {
        margin-left: -15px;
        margin-right: -15px;
    }

    .post-image-above-header .no-featured-image-padding .inside-article .post-image {
        margin-top: -20px;
    }

    /* Ajuste de Video Overlay */
    .video-duration-overlay {
        bottom: 4px;
        right: 6px;
        font-size: 0.75rem;
        line-height: 1.2rem;
        padding: 0 5px;
    }
}

/* RESPONSIVE DESKTOP */
@media (min-width: 1025px) {

    /* Padding y Margenes de Imagenes Destacadas (Ajuste) */
    .no-featured-image-padding .post-image {
        margin-left: -20px;
        margin-right: -20px;
    }
}