/* --- CONFIGURACIONES ESTRUCTURALES --- */
html { scroll-behavior: smooth; }
body { background-color: #1e85ad; margin: 0; font-family: 'Poppins', sans-serif; max-width: 100%; overflow-x: hidden; position: relative;}
* { box-sizing: border-box; }
.contenedor-principal { width: 100%; max-width: 1250px; margin: 0 auto; padding: 20px 15px; overflow-x: hidden;}

/* --- BANNER Y SIDEBARS --- */
.banner-personalizado { width: 100%; min-height: 220px; border-radius: 15px; margin-bottom: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 40px; box-sizing: border-box; box-shadow: 0 10px 25px rgba(0,0,0,0.1); transition: 0.5s; scroll-margin-top: 25px; }
@media screen and (max-width: 932px) and (orientation: landscape) {
    .banner-personalizado { min-height: 140px !important; max-height: 180px !important; padding: 15px !important; background-size: cover !important; }
}

.sidebar { position: fixed; left: -340px; top: 0; width: 320px; height: 100%; background: #ffffff; z-index: 2000; transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1); padding: 0; box-shadow: 15px 0 40px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.sidebar.open { left: 0; }
.sidebar-header { padding: 30px 25px 15px; background: linear-gradient(135deg, #232f3e 0%, #3a4a5d 100%); color: white; }
.sidebar-header h2 { margin: 0; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.sidebar-content { padding: 15px 20px; flex-grow: 1; overflow-y: auto; }
.entorno-card { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; margin-bottom: 8px; border-radius: 12px; background: #f8f9fa; border: 1px solid transparent; text-decoration: none; transition: 0.2s; color: #232f3e; }
.entorno-card:hover { background: #ffffff; border-color: #febd69; transform: translateX(5px); }
.entorno-card.active { background: #eef5ff; border-color: #4da3ff; }

.sidebar-right { position: fixed; right: -320px; top: 0; width: 300px; height: 100%; background: #fff; z-index: 2000; transition: 0.4s; padding: 40px 25px; box-shadow: -10px 0 30px rgba(0,0,0,0.1); border-left: 4px solid #febd69; overflow-y: auto; }
.sidebar-right.open { right: 0; }

/* --- FILTROS Y GRID --- */
.seccion-filtros { text-align: center; margin-bottom: 40px; width: 100%; }
.grupo-botones { display: inline-flex; gap: 12px; background: #fff; padding: 10px 20px; border-radius: 50px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); flex-wrap: wrap; justify-content: center; max-width: 95%; }

.btn-filtro { text-decoration: none; padding: 10px 25px; border-radius: 30px; font-size: 14px; font-weight: 700; transition: 0.3s; border: 2px solid transparent; white-space: nowrap; color: #666; background: #f8f9fa; }
.btn-filtro.active { border-color: #febd69; background-color: #232f3e !important; color: #fff !important; transform: translateY(-3px); }

.btn-segmentar {
    white-space: normal !important; 
    height: auto !important;
    line-height: 1.4 !important;
    text-align: center;
    min-width: 150px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-segmentar span {
    display: inline-block;
    padding: 2px 0;
}

.grid-locales { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; }
.card-local { background: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; border: 1px solid #eee; }
.card-local:hover { transform: translateY(-10px); }
.img-container { height: 160px; overflow: hidden; position: relative; cursor: pointer; }
.img-card { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.card-local:hover .img-card { scale: 1.1; }
.body-card { padding: 20px; text-align: center; }
.btn-explorar { display: block; background: #1a222d; color: #fff; padding: 10px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 13px; margin-top: 15px; }
.btn-explorar:hover { background: #4da3ff; }

/* --- LOGICA LEYENDA (VERTICAL/HORIZONTAL) --- */
.leyenda-ubicacion { display: block !important; margin-top: 5px; color: #555; font-size: 11px; }

/* Por defecto: Ocultamos ambos textos para que el navegador decida */
.btn-text-desktop, .btn-text-mobile { display: none !important; }

/* MÓVIL VERTICAL (Portrait) */
@media (orientation: portrait) {
    .btn-text-mobile { display: inline !important; }
    .leyenda-ubicacion { display: block !important; }
}

/* HORIZONTAL (Landscape) Y LAPTOP */
@media (min-width: 901px), (orientation: landscape) {
    .btn-text-desktop { display: inline !important; }
    .btn-text-mobile { display: none !important; }
}

/* Ocultar leyenda específicamente en horizontal/laptop */
@media (orientation: landscape), (min-width: 901px) {
    .leyenda-ubicacion { display: none !important; }
}

/* --- OTROS --- */
.sidebar-eventos { width: 260px; background: #fff; padding: 20px; border-radius: 15px; box-shadow: 0 5px 25px rgba(0,0,0,0.1); border-top: 4px solid #e74c3c; position: sticky; top: 20px; align-self: flex-start; max-height: calc(100vh - 40px); overflow-y: auto; z-index: 100; }
.tag-vigente { font-size: 9px; background: #ff7675; color: white; padding: 2px 8px; border-radius: 4px; font-weight: 800; display: inline-block; margin-bottom: 5px; }
.paginacion-container { display: flex; justify-content: center; align-items: center; gap: 10px; margin: 40px 0; }
.pag-btn { text-decoration: none; padding: 10px 18px; border-radius: 8px; background: #fff; color: #232f3e; font-weight: 700; border: 1px solid #ddd; transition: all 0.3s ease; }
.pag-btn.active { border: 2px solid #e74c3c; color: #e74c3c; background: #fffafa; transform: scale(1.1); border-radius: 0; }

@media screen and (max-width: 600px) and (orientation: portrait) {
    .paginacion-container {
        flex-wrap: wrap;
        gap: 6px;
        padding: 0 10px;
    }
    .pag-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

.pag-btn:hover:not(.active) {
    border-color: #232f3e;
}

/* --- CLASES DE APOYO ADICIONALES PARA LIMPIAR EL PHP --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    display: none;
}

.sidebar-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    text-align: center;
}

.btn-reset-sidebar {
    display: block;
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    background: #232f3e;
    color: #fff;
    transition: 0.3s;
}

.btn-reset-sidebar:hover {
    background: #4da3ff;
}

.main-layout {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.content-area {
    flex-grow: 1;
    width: 100%;
}

.tipo-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 10px;
    font-size: 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- CLASE PARA H1 EXCLUSIVO DE SEO (OCULTO VISUALMENTE) --- */
/* --- CLASE PARA H1 EXCLUSIVO DE SEO (OCULTO 100% VISUALMENTE) --- */
.h1-seo-oculto {
    display: block !important;
    visibility: hidden !important;
    position: absolute !important;
    top: -9999px !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    z-index: -999 !important;
}