/* ==========================================
   EVENTOS CULTURALES
   Consulado de Mexico en Brownsville
   Joomla 3.10.11 - Phoca Gallery 4.4.3
   ========================================== */

/* CONTENEDOR PRINCIPAL */

#eventos-culturales {
    width: 100%;
    max-width: 1400px;
    margin: 25px auto;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

#eventos-culturales * {
    box-sizing: border-box;
}

/* TITULO PRINCIPAL */

#eventos-culturales .ec-titulo {
    text-align: center;
    color: #611232;
    font-size: 28px;
    line-height: 1.3;
    font-weight: bold;
    margin: 20px 0 15px;
}

/* LINEA DORADA */

#eventos-culturales .ec-linea {
    width: 100px;
    height: 3px;
    background: #A57F38;
    margin: 0 auto 25px;
}

/* PESTAÑAS POR AÑO */

#eventos-culturales .ec-anios {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

#eventos-culturales .ec-anio {
    flex: 1 1 90px;
    max-width: 180px;
    padding: 12px 20px;
    margin: 0;
    border: 1px solid #DDDDDD;
    border-radius: 5px;
    background: #F5F5F5;
    color: #611232;
    font-size: 19px;
    font-weight: bold;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

#eventos-culturales .ec-anio:hover {
    background: #E8DFE2;
}

#eventos-culturales .ec-anio.activo {
    background: #611232;
    color: #FFFFFF;
    border-color: #611232;
}

/* CONTENEDOR DE GALERIAS */

#eventos-culturales .ec-galeria {
    width: 100%;
    margin: 20px auto 40px;
    display: flow-root;
}

/* TARJETAS PHOCA GALLERY */

#eventos-culturales .phocagallery-box-file {
    float: left !important;
    width: calc(33.333% - 20px) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 10px !important;
    padding: 0 !important;
    border: 1px solid #DDDDDD !important;
    border-radius: 6px !important;
    background: #FFFFFF !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease,
                box-shadow 0.2s ease,
                border-color 0.2s ease;
}

/* EFECTO AL PASAR EL CURSOR */

#eventos-culturales .phocagallery-box-file:hover {
    transform: translateY(-4px);
    border-color: #A57F38 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* CONTENEDORES INTERNOS */

#eventos-culturales .phocagallery-box-file-first,
#eventos-culturales .phocagallery-box-file-second,
#eventos-culturales .phocagallery-box-file-third {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

#eventos-culturales .phocagallery-box-file-third > div {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ENLACE LIGHTBOX */

#eventos-culturales a.pg-modal-button {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: zoom-in;
}

/* IMAGENES RESPONSIVAS */

#eventos-culturales .phocagallery-box-file img.pg-image {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: contain !important;
    padding: 5px !important;
    margin: 0 auto !important;
    background: #F5F5F5;
    border: none !important;
    border-bottom: 3px solid #A57F38 !important;
    cursor: zoom-in;
}

/* TITULO DEL EVENTO */

#eventos-culturales .phocagallery-box-file .name,
#eventos-culturales .phocagallery-box-file .phocaname {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    color: #611232 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    text-align: center !important;
    line-height: 1.4 !important;
    padding: 15px 10px !important;
    margin: 0 !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: anywhere;
    text-overflow: clip !important;
}

/* FECHA DEL EVENTO */

#eventos-culturales .ec-fecha {
    display: block;
    color: #666666 !important;
    font-size: 14px !important;
    font-weight: normal !important;
    line-height: 1.4;
    text-align: center;
    margin-top: 7px;
}

/* TEXTO PARA AMPLIAR */

#eventos-culturales .ec-consultar {
    display: block;
    color: #777777 !important;
    font-size: 13px !important;
    font-weight: normal !important;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 3px;
}

/* ENLACES */

#eventos-culturales .ec-galeria a {
    color: #611232;
    text-decoration: none;
}

/* MENSAJES INFORMATIVOS */

#eventos-culturales .ec-mensaje {
    text-align: center;
    color: #666666;
    background: #F8F8F8;
    border: 1px solid #EEEEEE;
    border-radius: 6px;
    padding: 35px 15px;
    margin-bottom: 25px;
    font-size: 18px;
    line-height: 1.5;
}

/* OCULTAR AÑOS NO SELECCIONADOS */

#eventos-culturales [hidden] {
    display: none !important;
}

/* ACCESIBILIDAD */

#eventos-culturales button:focus-visible,
#eventos-culturales a:focus-visible {
    outline: 3px solid #A57F38;
    outline-offset: 3px;
}

/* ==========================================
   TABLETS - DOS COLUMNAS
   ========================================== */

@media (max-width: 900px) {

    #eventos-culturales .phocagallery-box-file {
        width: calc(50% - 20px) !important;
    }

    #eventos-culturales .ec-titulo {
        font-size: 25px;
    }

    #eventos-culturales .ec-anio {
        font-size: 17px;
        padding: 10px 15px;
    }

    #eventos-culturales .phocagallery-box-file .name,
    #eventos-culturales .phocagallery-box-file .phocaname {
        font-size: 17px !important;
    }

}

/* ==========================================
   CELULARES - UNA COLUMNA
   ========================================== */

@media (max-width: 550px) {

    #eventos-culturales {
        margin: 10px auto;
    }

    #eventos-culturales .phocagallery-box-file {
        float: none !important;
        width: calc(100% - 20px) !important;
        height: auto !important;
        min-height: 0 !important;
    }

    #eventos-culturales .ec-titulo {
        font-size: 23px;
    }

    #eventos-culturales .ec-anio {
        flex: 1 1 70px;
        font-size: 16px;
        padding: 10px;
    }

    #eventos-culturales .ec-galeria {
        margin: 15px auto 30px;
    }

    #eventos-culturales .phocagallery-box-file img.pg-image {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 3;
        object-fit: contain !important;
    }

    #eventos-culturales .phocagallery-box-file .name,
    #eventos-culturales .phocagallery-box-file .phocaname {
        font-size: 17px !important;
        padding: 12px 8px !important;
    }

    #eventos-culturales .ec-fecha {
        font-size: 13px !important;
    }

    #eventos-culturales .ec-consultar {
        font-size: 12px !important;
    }

    #eventos-culturales .ec-mensaje {
        font-size: 16px;
        padding: 25px 10px;
    }

}

/* REDUCIR ANIMACIONES POR ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {

    #eventos-culturales .phocagallery-box-file,
    #eventos-culturales .ec-anio {
        transition: none !important;
    }

    #eventos-culturales .phocagallery-box-file:hover {
        transform: none !important;
    }

}

/* ==========================================
   FIN DEL ESTILO EVENTOS CULTURALES
   ========================================== */

/* ==========================================
   AMPLIACION LIGHTBOX SQUEEZEBOX
   EVENTOS CULTURALES
   ========================================== */

/* VENTANA EMERGENTE CENTRADA */

body:has(#eventos-culturales) #sbox-window:has(.sbox-content-image) {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 92vw !important;
    height: 88vh !important;
    max-width: 92vw !important;
    max-height: 88vh !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
}

/* CONTENEDOR DE LA IMAGEN */

body:has(#eventos-culturales) #sbox-content.sbox-content-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    overflow: hidden !important;
}

/* IMAGEN AMPLIADA SIN DEFORMACIONES */

body:has(#eventos-culturales) #sbox-content.sbox-content-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* FONDO OSCURO */

body:has(#eventos-culturales):has(#sbox-content.sbox-content-image) #sbox-overlay {
    background-color: #000000 !important;
    opacity: 0.85 !important;
}

/* BOTON DE CERRAR */

body:has(#eventos-culturales) #sbox-window:has(.sbox-content-image) #sbox-btn-close {
    position: absolute !important;
    top: -20px !important;
    right: 0 !important;
    width: 36px !important;
    height: 36px !important;
    background: #611232 !important;
    border: 2px solid #FFFFFF !important;
    border-radius: 50% !important;
    z-index: 99999 !important;
    cursor: pointer !important;
}

/* SIMBOLO X */

body:has(#eventos-culturales) #sbox-window:has(.sbox-content-image) #sbox-btn-close::after {
    content: "\00D7";
    display: block;
    color: #FFFFFF;
    font-size: 28px;
    font-weight: bold;
    line-height: 32px;
    text-align: center;
}

/* ADAPTACION A CELULARES */

@media (max-width: 550px) {

    body:has(#eventos-culturales) #sbox-window:has(.sbox-content-image) {
        width: 94vw !important;
        height: 84vh !important;
        max-width: 94vw !important;
        max-height: 84vh !important;
    }

}

/* ==========================================
   FIN AMPLIACION LIGHTBOX
   ========================================== */

/* ==========================================
   CORRECCION DE DISTRIBUCION DE TARJETAS
   CSS GRID RESPONSIVO
   ========================================== */

/* CONTENEDOR DIRECTO DE LAS TARJETAS */

#eventos-culturales .ec-galeria div:has(> .phocagallery-box-file) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
    width: 100% !important;
    box-sizing: border-box;
}

/* TARJETAS UNIFORMES */

#eventos-culturales .phocagallery-box-file {
    float: none !important;
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* ELIMINAR SEPARADORES DEL SISTEMA FLOAT */

#eventos-culturales .ec-galeria div:has(> .phocagallery-box-file) > div[style*="clear"] {
    display: none !important;
}

/* DIMENSIONES UNIFORMES DE IMAGENES */

#eventos-culturales .phocagallery-box-file img.pg-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
    object-fit: contain !important;
}

/* TITULOS Y FECHAS ALINEADOS */

#eventos-culturales .phocagallery-box-file .name,
#eventos-culturales .phocagallery-box-file .phocaname {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-height: 120px !important;
}

/* TEXTO PARA AMPLIAR ALINEADO */

#eventos-culturales .ec-consultar {
    padding-top: 10px;
    margin-top: auto !important;
}

/* TABLETS - DOS COLUMNAS */

@media (max-width: 900px) {

    #eventos-culturales .ec-galeria div:has(> .phocagallery-box-file) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

}

/* CELULARES - UNA COLUMNA */

@media (max-width: 550px) {

    #eventos-culturales .ec-galeria div:has(> .phocagallery-box-file) {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    #eventos-culturales .phocagallery-box-file .name,
    #eventos-culturales .phocagallery-box-file .phocaname {
        min-height: 100px !important;
    }

}

/* ==========================================
   FIN CORRECCION CSS GRID
   ========================================== */

