/* SOLO PÁGINA CAC'S PRUEBA */

/* Ocultar título de la página */
body.page-id-4721 .entry-title,
body.page-id-4721 header.entry-header {
    display: none !important;
}

/* Ocultar menú/panel lateral de Blask */
body.page-id-4721 .site-header {
    display: none !important;
}

/* Dar ancho completo al contenido */
body.page-id-4721 .site-content,
body.page-id-4721 .content-area,
body.page-id-4721 .site-main,
body.page-id-4721 article#post-4721,
body.page-id-4721 .page-content {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
/* SOLO página Cabaña Comunitaria de Reuniones */

/* Ocultar panel lateral */
body.page-id-4807 .site-header {
    display: none !important;
}

/* Ocultar título automático de la página */
body.page-id-4807 .entry-title,
body.page-id-4807 header.entry-header {
    display: none !important;
}
/* --- SOLO PÁGINA CABAÑA COMUNITARIA (ID 4807) --- */

/* 1. Desbloquear ancho completo en todos los dispositivos */
body.page-id-4807 .site-content,
body.page-id-4807 .content-area,
body.page-id-4807 .site-main,
body.page-id-4807 article,
body.page-id-4807 .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* 2. Eliminar franja blanca superior en la Cabaña (ID 4807) y en la Página Madre (ID 4721) */
body.page-id-4807 .site-content,
body.page-id-4807 .content-area,
body.page-id-4807 main#main,
body.page-id-4807 article,
body.page-id-4807 .entry-content,
body.page-id-4807 .wp-block-cover,
body.page-id-4721 .site-content,
body.page-id-4721 .content-area,
body.page-id-4721 main#main,
body.page-id-4721 article,
body.page-id-4721 .entry-content,
body.page-id-4721 .wp-block-cover,
body.page-id-47218 .site-content,
body.page-id-47218 .content-area,
body.page-id-47218 main#main,
body.page-id-47218 article,
body.page-id-47218 .entry-content,
body.page-id-47218 .wp-block-cover {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* --- SOLO PÁGINA CABAÑA COMUNITARIA (ID 4807) --- */

/* 1. Desbloquear ancho completo de la página */
body.page-id-4807 .site-content,
body.page-id-4807 .content-area,
body.page-id-4807 .site-main,
body.page-id-4807 article,
body.page-id-4807 .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* 2. Eliminar franja blanca superior */
body.page-id-4807 .site-content,
body.page-id-4807 .content-area,
body.page-id-4807 main#main,
body.page-id-4807 article,
body.page-id-4807 .entry-content,
body.page-id-4807 .wp-block-cover {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 3. Comportamiento en MÓVILES Y TABLETS (Pantallas de hasta 1024px) */
@media (max-width: 1024px) {
    body.page-id-4807 section:first-of-type,
    body.page-id-4807 .wp-block-cover:first-of-type {
        min-height: 38vh !important;
        height: auto !important;
    }

    body.page-id-4807 section:first-of-type img,
    body.page-id-4807 .wp-block-cover:first-of-type img {
        width: 100% !important;
        height: 100% !important;
        min-height: 38vh !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
}

/* 4. Comportamiento en ESCRITORIO / PC (Pantallas de más de 1025px) */
@media (min-width: 1025px) {
    
    /* A) SOLO LA PRIMERA FOTO (CABECERA): Se mantiene grande a pantalla completa */
    body.page-id-4807 section:first-of-type,
    body.page-id-4807 div[class*="wp-block"]:first-of-type,
    body.page-id-4807 .wp-block-cover:first-of-type {
        min-height: 55vh !important;
        height: auto !important;
    }

    body.page-id-4807 section:first-of-type img,
    body.page-id-4807 div[class*="wp-block"]:first-of-type img,
    body.page-id-4807 .wp-block-cover:first-of-type img {
        width: 100% !important;
        height: 100% !important;
        min-height: 55vh !important;
        object-fit: cover !important;
        object-position: center center !important;
    }
/* B) TODAS LAS FOTOS SECUNDARIAS Y SUS CONTENEDORES: Centrados al medio */
body.page-id-4807 .entry-content .wp-block-image,
body.page-id-4807 .entry-content .wp-block-image img,
body.page-id-4807 .entry-content img:not(:first-of-type) {
    width: 100% !important;
    max-width: 850px !important;    /* Controla el ancho idéntico para todos */
    height: auto !important;
    min-height: initial !important; /* Desactiva el estiramiento vertical */
    margin-left: auto !important;   /* Empuja la caja desde la izquierda al centro */
    margin-right: auto !important;  /* Empuja la caja desde la derecha al centro */
    display: block !important;
    object-fit: contain !important;
    float: none !important;
}

/* C) TEXTOS, COLUMNAS Y DATOS TÉCNICOS: Centrados al mismo ancho exacto */
body.page-id-4807 .entry-content p,
body.page-id-4807 .entry-content .wp-block-columns,
body.page-id-4807 .entry-content div[class*="wp-block"] {
    max-width: 850px !important;    /* Mismo ancho exacto que la imagen de arriba */
    margin-left: auto !important;   /* Centra la columna de texto */
    margin-right: auto !important;
    text-align: center !important;  /* Centra las líneas de información */
    box-sizing: border-box !important;
}
/* ===================================================
   3. TAMAÑO Y POSICIÓN DEL LOGO OPTE (CABAÑA ID 4807 Y PÁGINA MADRE ID 4721 / 47218)
   =================================================== */

/* A) COMPORTAMIENTO EN TELÉFONOS Y CELULARES (Hasta 768px) */
@media (max-width: 768px) {
    body.page-id-4807 .wp-block-cover:first-of-type .wp-block-image,
    body.page-id-4807 section:first-of-type div[class*="wp-block-image"]:first-of-type,
    body.page-id-4721 .wp-block-cover:first-of-type .wp-block-image,
    body.page-id-4721 section:first-of-type div[class*="wp-block-image"]:first-of-type,
    body.page-id-47218 .wp-block-cover:first-of-type .wp-block-image,
    body.page-id-47218 section:first-of-type div[class*="wp-block-image"]:first-of-type {
        position: absolute !important;
        top: 10px !important;
        left: 10px !important;
        z-index: 99 !important;
        width: 55px !important;            /* Mismo tamaño compacto para celulares */
        max-width: 55px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.page-id-4807 .wp-block-cover:first-of-type .wp-block-image img,
    body.page-id-4807 section:first-of-type div[class*="wp-block-image"]:first-of-type img,
    body.page-id-4721 .wp-block-cover:first-of-type .wp-block-image img,
    body.page-id-4721 section:first-of-type div[class*="wp-block-image"]:first-of-type img,
    body.page-id-47218 .wp-block-cover:first-of-type .wp-block-image img,
    body.page-id-47218 section:first-of-type div[class*="wp-block-image"]:first-of-type img {
        width: 55px !important;
        max-width: 55px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        object-fit: contain !important;
        display: block !important;
    }
}

/* B) COMPORTAMIENTO EN COMPUTADORAS Y ESCRITORIO (Más de 769px) */
@media (min-width: 769px) {
    body.page-id-4807 .wp-block-cover:first-of-type .wp-block-image,
    body.page-id-4807 section:first-of-type div[class*="wp-block-image"]:first-of-type,
    body.page-id-4721 .wp-block-cover:first-of-type .wp-block-image,
    body.page-id-4721 section:first-of-type div[class*="wp-block-image"]:first-of-type,
    body.page-id-47218 .wp-block-cover:first-of-type .wp-block-image,
    body.page-id-47218 section:first-of-type div[class*="wp-block-image"]:first-of-type {
        position: absolute !important;
        top: 25px !important;             /* Mismo margen en la esquina de la PC */
        left: 25px !important;
        z-index: 99 !important;
        width: 120px !important;          /* Mismo tamaño exacto que la Cabaña (120px) */
        max-width: 120px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.page-id-4807 .wp-block-cover:first-of-type .wp-block-image img,
    body.page-id-4807 section:first-of-type div[class*="wp-block-image"]:first-of-type img,
    body.page-id-4721 .wp-block-cover:first-of-type .wp-block-image img,
    body.page-id-4721 section:first-of-type div[class*="wp-block-image"]:first-of-type img,
    body.page-id-47218 .wp-block-cover:first-of-type .wp-block-image img,
    body.page-id-47218 section:first-of-type div[class*="wp-block-image"]:first-of-type img {
        width: 120px !important;
        max-width: 120px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        object-fit: contain !important;   /* Muestra las letras e ícono sin recortar */
        display: block !important;
    }
}
/* ===================================================
   2. POSICIÓN Y TAMAÑO DEL LOGO OPTE (SOLO PÁGINA MADRE)
   =================================================== */

/* En Computadoras y Escritorio (PC) */
@media (min-width: 769px) {
    body.page-id-4721 .entry-content > div:first-child,
    body.page-id-47218 .entry-content > div:first-child {
        position: relative !important;
    }

    body.page-id-4721 .logo-opte,
    body.page-id-47218 .logo-opte,
    body.page-id-4721 .wp-block-image:first-of-type,
    body.page-id-47218 .wp-block-image:first-of-type {
        position: absolute !important;
        top: 60px !important;              /* Aumentado de 25px a 60px para bajar el logo hacia el render */
        left: 30px !important;             /* Margen cómodo desde la izquierda */
        z-index: 999 !important;
        width: 130px !important;           /* Tamaño nítido para PC */
        max-width: 130px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.page-id-4721 .logo-opte img,
    body.page-id-47218 .logo-opte img,
    body.page-id-4721 .wp-block-image:first-of-type img,
    body.page-id-47218 .wp-block-image:first-of-type img {
        width: 130px !important;
        max-width: 130px !important;
        height: auto !important;
        min-height: 0 !important;
        object-fit: contain !important;
        display: block !important;
    }
}

/* En Celulares y Pantallas Móviles */
@media (max-width: 768px) {
    body.page-id-4721 .logo-opte,
    body.page-id-47218 .logo-opte,
    body.page-id-4721 .wp-block-image:first-of-type,
    body.page-id-47218 .wp-block-image:first-of-type {
        position: absolute !important;
        top: 35px !important;              /* Aumentado de 10px a 35px para móvil */
        left: 15px !important;
        z-index: 999 !important;
        width: 65px !important;            /* Ancho compacto para teléfono */
        max-width: 65px !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body.page-id-4721 .logo-opte img,
    body.page-id-47218 .logo-opte img,
    body.page-id-4721 .wp-block-image:first-of-type img,
    body.page-id-47218 .wp-block-image:first-of-type img {
        width: 65px !important;
        max-width: 65px !important;
        height: auto !important;
        min-height: 0 !important;
        object-fit: contain !important;
        display: block !important;
    }
}
/* --- CORRECCIÓN DEL VISOR / LIGHTBOX NATIVO --- */

.jp-carousel-overlay,
.jp-carousel-stage,
.jp-carousel-slide {
    padding: 0 !important;
    margin: 0 !important;
}

.jp-carousel-slide img,
div.jp-carousel-slide img,
.jp-carousel-container img,
div[id*="jp-carousel"] img {
    max-height: 88vh !important;
    max-width: 90vw !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    position: absolute !important;
    top: 48% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}	
	
/* ===================================================
   ELIMINAR BORDES Y LUZ INFERIOR EN PÁGINA MADRE (ID 4721)
   =================================================== */

/* 1. Teñir de negro el fondo profundo del documento solo en esta página */
body.page-id-4721,
body.page-id-47218 {
    background-color: #000000 !important;
}

/* 2. Mantener la capa de contenido superior en blanco brillante */
body.page-id-4721 #page,
body.page-id-4721 .site-content,
body.page-id-4721 article,
body.page-id-47218 #page,
body.page-id-47218 .site-content,
body.page-id-47218 article {
    background-color: #ffffff !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 3. Forzar que la última sección (CONVENIOS) selle la base sin espacio blanco */
body.page-id-4721 .entry-content > *:last-child,
body.page-id-47218 .entry-content > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    background-color: #000000 !important;
}

/* 4. Cancelar la reserva de espacio del pie de página */
body.page-id-4721 .site-footer,
body.page-id-47218 .site-footer {
    display: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}