:root {
    --primary-color: #27ae60; /* Verde Esmeralda más profundo */
    --secondary-color: #f1c40f; /* Amarillo Girasol */
    --accent-color: #e67e22; /* Naranja Atardecer */
    --bg-light: #f4f9f4; /* Fondo verde muy pálido, casi blanco, para frescura */
    --text-dark: #1e272e; /* Color de texto más moderno */
    --white: #ffffff;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.25);
}

/* Estilo para marcadores numerados personalizados */
.custom-number-marker {
    background: transparent !important;
    border: none !important;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: rgba(39, 174, 96, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Widget de Clima */
.weather-widget {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 20px;
    padding: 15px !important;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

#weather-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.weather-temp {
    font-size: 1.8rem;
    font-weight: 800;
}

.weather-desc {
    font-size: 0.8rem;
    text-transform: capitalize;
    font-weight: 400;
    opacity: 0.9;
}

/* Botones de Acción en Punto Seleccionado */
.point-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 120px;
}

.whatsapp-btn {
    background: #25D366;
    color: white !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
     background: #128C7E;
     transform: translateY(-2px);
 }

 .nav-btn {
    background: #4285F4;
    color: white !important;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.nav-btn:hover {
    background: #357ae8;
    transform: translateY(-2px);
}

/* Badges de Estado Abierto/Cerrado */
.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 8px;
    text-transform: uppercase;
}

.status-badge.open {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-badge.closed {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* Animaciones Globales */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Header más compacto y profesional */
header {
    background: white;
    color: var(--text-dark);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1100;
    height: 60px;
    flex-shrink: 0;
}

.title-container {
    text-align: center;
}

.title-container h1 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
}

.title-container p {
    font-size: 0.6rem;
    font-weight: 600;
    color: #666;
    margin: 0;
}

#main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    height: calc(100vh - 60px); /* Restar altura del header */
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
}

#map-container {
    flex: 1;
    position: relative;
    background-color: #e5e9e7;
    height: 100%;
    min-width: 0;
    z-index: 1;
    overflow: hidden;
}

#map {
    height: 100%;
    width: 100%;
    display: block;
    background-color: #e5e9e7;
    z-index: 1;
}

/* Ocultar indicador de carga si existiera */
#map::after {
    display: none;
}

/* Pautas publicitarias - Siempre al lado derecho y sin cortes */
.ads-banner {
    background: #ffffff;
    width: 280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 0px;
    padding: 0px;
    z-index: 1050;
    box-shadow: -2px 0 15px rgba(0,0,0,0.06);
    flex-shrink: 0;
    border-left: 1px solid #eee;
}

.ads-banner-toggle {
    position: sticky;
    top: 0;
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 10px;
}

.ads-banner.minimized {
    width: 70px;
    padding: 20px 10px;
}

.ads-banner.minimized .ad-item {
    display: none;
}

.banner-guide-text {
    color: var(--text-dark);
    font-size: 0.85rem;
    margin-top: 20px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: 600;
    letter-spacing: 2px;
}

.ad-item {
    width: 100%;
    min-height: 250px;
    height: auto;
    border-radius: 0px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    overflow: hidden;
    background: white;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 100 !important;
    pointer-events: auto !important;
}

.ad-item img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: top;
    padding: 0;
    display: block;
    pointer-events: none;
}

/* En móviles, diseño VERTICAL perfecto */
@media (max-width: 1023px) {
    #main-content {
        flex-direction: column; /* CAMBIADO: vertical en móviles */
        height: 100%;
        overflow: hidden;
    }
    
    #map-container {
        flex: 1; /* Mapa ocupa el espacio principal */
        height: 60vh;
        min-height: 0;
    }
    
    .ads-banner {
        width: 100%;
        height: auto;
        min-height: 40vh;
        flex-direction: row;
        overflow-x: scroll !important;
        overflow-y: hidden;
        border-left: none;
        border-top: 2px solid #eee;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        padding: 20px 15px;
        gap: 20px;
        flex-shrink: 0;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .ad-item {
        min-width: 90%;
        width: 90%;
        min-height: 450px;
        height: 450px;
        flex-shrink: 0;
        scroll-snap-align: center;
    }
    
    .ads-banner-toggle {
        display: none; /* Ocultar botón de toggle en móviles */
    }
}

/* Sidebar Estilo Profesional y Estático */
#ads-sidebar {
    width: 350px;
    background: #ffffff;
    height: 100%;
    position: relative; /* Cambiado de absolute a relative */
    left: 0; /* Siempre visible en PC */
    transition: all 0.4s ease;
    z-index: 2000;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05);
    overflow-y: auto;
    padding: 0;
    flex-shrink: 0; /* No se encoge */
    border-right: 1px solid #eee;
}

/* Ocultar el overlay en PC */
.sidebar-overlay {
    display: none !important;
}

/* Ajustes para móviles */
@media (max-width: 1023px) {
    #ads-sidebar {
        position: fixed;
        left: -100%;
        width: 85%;
        max-width: 320px;
    }

    #ads-sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 1500;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
}

.sidebar-section {
    padding: 25px;
    border-bottom: 1px solid #f5f5f5;
    background: white;
}

.sidebar-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Diseño elaborado para los filtros (Casillas de Información) */
.filter-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Cuadrícula de 2 columnas */
    gap: 10px;
}

.filter-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
}

.filter-btn::before {
    content: '';
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    margin-bottom: 10px;
    border-radius: 12px;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Asignación de imágenes a los botones de filtro */
.filter-btn[data-category="todos"]::before { background-image: url('imagenes/LOGO CALARCA 2026.jpg'); }
.filter-btn[data-category="Cultura"]::before { background-image: url('imagenes/casillas_info/casillas_atractivos.jpg'); }
.filter-btn[data-category="Naturaleza"]::before { background-image: url('imagenes/casillas_info/casillas_atractivos.jpg'); }
.filter-btn[data-category="Aventura"]::before { background-image: url('imagenes/casillas_info/casillas_agencias.jpg'); }
.filter-btn[data-category="Hospedaje Rural"]::before { background-image: url('imagenes/casillas_info/casillas_alojamiento.jpg'); }
.filter-btn[data-category="Hospedaje Urbano"]::before { background-image: url('imagenes/casillas_info/casillas_alojamiento.jpg'); }
.filter-btn[data-category="Gastronomía Local"]::before { background-image: url('imagenes/casillas_info/casillas_restaurantes.jpg'); }
.filter-btn[data-category="Gastronomía Internacional"]::before { background-image: url('imagenes/casillas_info/casillas_pizeria.jpg'); }
.filter-btn[data-category="Gastronomía de Mar"]::before { background-image: url('imagenes/casillas_info/casillas_restaurantes.jpg'); }
.filter-btn[data-category="Comercio"]::before { background-image: url('imagenes/casillas_info/casillas_tiendas_de_cafe.jpg'); }
.filter-btn[data-category="Transporte"]::before { background-image: url('imagenes/casillas_info/casillas_taxis.jpg'); }
.filter-btn[data-category="Centros Comerciales"]::before { background-image: url('imagenes/casillas_info/casillas_tiendas_de_cafe.jpg'); }
.filter-btn[data-category="Servicios"]::before { background-image: url('imagenes/casillas_info/casillas_alcaldia.jpg'); }

.filter-btn:hover {
    background: #ffffff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.filter-btn:hover::before {
    filter: grayscale(0);
    transform: scale(1.1);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.2);
}

.filter-btn.active::before {
    filter: grayscale(0) brightness(1.2);
}

/* Buscador Elaborado */
#search-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #f0f0f0;
    border-radius: 15px;
    background: #fdfdfd;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.1);
}

/* Pasaporte (Favoritos) Elaborado */
.favorites-bar {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 5px 5px 15px 5px;
    scrollbar-width: none;
}

.fav-item {
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fav-item img {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    border: 3px solid #f0f0f0;
    object-fit: cover;
    transition: all 0.3s ease;
}

.fav-item:hover img {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* Información Destacada Elaborada */
#selected-info {
    border-radius: 20px;
    background: #fcfcfc;
    border: 1px solid #eee;
    overflow: hidden;
}

.selected-point h4 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

/* Botones de acción elaborados */
.point-actions-elaborated {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.nav-btn-full {
    background: var(--primary-color);
    color: white;
}

.action-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 10px;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.call-btn {
    background: #3498db;
    color: white;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

.point-content {
    padding: 20px;
}

.point-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.category-badge {
    background: #f0f0f0;
    color: #555;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.status-badge.open { background: #e8f5e9; color: #2e7d32; }
.status-badge.closed { background: #ffebee; color: #c62828; }

.fav-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.fav-btn:hover { transform: scale(1.2); }

/* Banner de Publicidad Lateral Estático en PC */
@media (min-width: 1024px) {
    .ads-banner {
        width: 300px;
        height: 100%;
        background: #fcfcfc;
        border-left: 1px solid #eee;
        border-top: none;
        flex-direction: column;
        padding: 25px;
        overflow-y: auto;
    }

    .ad-item {
        width: 100%;
        height: 150px;
        margin-bottom: 20px;
        border-radius: 15px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
}

/* Botón de menú solo visible en móvil */
@media (min-width: 1024px) {
    #menu-toggle {
        display: none !important;
    }
}

#ads-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.75); /* Aumentada la opacidad para mejor lectura */
    z-index: 1;
}

/* El logo se queda fijo arriba con un diseño tipo tarjeta */
.sidebar-logo {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    z-index: 10;
    position: sticky;
    top: 0;
    animation: slideInLeft 0.6s ease-out;
    border: 1px solid rgba(255,255,255,0.5);
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
}

.sidebar-section {
    position: relative;
    z-index: 2;
    animation: fadeIn 0.8s ease-out backwards;
}

.sidebar-section:nth-child(1) { animation-delay: 0.2s; }
.sidebar-section:nth-child(2) { animation-delay: 0.4s; }
.sidebar-section:nth-child(3) { animation-delay: 0.6s; }

.sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section h3::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), transparent);
    opacity: 0.3;
}

/* Buscador */
.search-container {
    position: relative;
    z-index: 2;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid rgba(39, 174, 96, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.1);
}

/* Filtros con diseño de cristal y colores vivos */
.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.4);
    color: var(--text-dark);
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.3);
    transform: scale(1.05);
}

/* Vitrina Comercial de Puntos Seleccionados */
#selected-info {
    min-height: 250px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    border: 1px solid rgba(39, 174, 96, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 0; /* Quitamos padding para que la imagen cubra arriba si queremos */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.selected-point {
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.point-header-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-bottom: 4px solid var(--primary-color);
}

.point-content {
    padding: 20px;
}

.point-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.fav-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
    padding: 5px;
}

.fav-btn:hover {
    transform: scale(1.2);
}

.fav-btn.active {
    color: #e74c3c;
    filter: drop-shadow(0 0 5px rgba(231, 76, 60, 0.4));
}

/* Sección de Favoritos en el Sidebar */
.favorites-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    margin-bottom: 20px;
}

.fav-item {
    min-width: 80px;
    text-align: center;
    cursor: pointer;
}

.fav-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

.fav-item p {
    font-size: 0.7rem;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Controles Flotantes */
/* Language Picker en Header */
.language-picker {
    display: flex;
    gap: 5px;
}

.lang-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive */
.category-badge {
    background: var(--secondary-color);
    color: var(--text-dark);
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.3);
}

/* Compartir Mapa - MUCHO MÁS LLAMATIVO */
.share-container {
    background: var(--white); /* Fondo sólido para máximo contraste */
    border-radius: 25px;
    padding: 30px 20px;
    text-align: center;
    border: 3px solid var(--primary-color); /* Borde vibrante */
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    transform: scale(1.02); /* Ligeramente más grande */
}

#qrcode {
    background: white;
    padding: 15px;
    border-radius: 15px;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

#qrcode img {
    display: block;
    width: 220px; /* QR MUCHO MÁS GRANDE */
    height: 220px;
    margin: 0 auto;
}

.share-text {
    font-size: 1rem; /* Texto más grande */
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.share-btn.secondary {
    background: var(--accent-color);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
}

.share-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.share-btn:active {
    transform: translateY(0);
}

/* Publicidad con Colores Vivos */
.ad-slot {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    height: auto;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ad-slot:hover {
    transform: translateY(-5px) scale(1.02);
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.install-container {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.2);
}

.install-text {
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-weight: 500;
    line-height: 1.4;
}

.install-btn {
    background: white !important;
    color: var(--primary-color) !important;
}

/* Modal para información de pautas */
.pauta-modal {
    display: none;
    position: fixed;
    z-index: 5000 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.pauta-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 5001;
}

.pauta-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    padding: 15px 20px;
    line-height: 1;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.pauta-modal-close:hover,
.pauta-modal-close:focus {
    color: black;
    text-decoration: none;
}

.pauta-modal-body {
    padding: 0 25px 25px 25px;
}

.pauta-modal-image {
    width: 100%;
    border-radius: 15px 15px 0 0;
    margin-bottom: 20px;
}

.pauta-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pauta-modal-info {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.pauta-modal-info-label {
    font-weight: 700;
    color: var(--text-dark);
    min-width: 90px;
}

.pauta-modal-info-value {
    color: #555;
    flex: 1;
}

.pauta-modal-descripcion {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 1rem;
    color: #444;
    line-height: 1.6;
}

/* Botón Mi Ubicación */
.location-control {
    background: white;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    font-size: 1.2rem;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.location-control:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: white;
}



/* Ajustar el padding del mapa para que el contenido central no quede bajo la UI */
.leaflet-container {
    cursor: grab !important;
}

.leaflet-container:active {
    cursor: grabbing !important;
}

/* Mejora de renderizado de imagen para máxima nitidez sin pixelado hard */
.leaflet-image-layer, .high-res-layer {
    image-rendering: -webkit-optimize-contrast; 
    image-rendering: smooth;
    image-rendering: high-quality;
    
    /* Forzar el uso de la GPU para mantener la nitidez en transformaciones de escala */
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* Suavizado general del contenedor */
.leaflet-container {
    background: #f0f0f0;
    outline: none;
}

.coordinate-helper {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    z-index: 1000;
    border: 1px solid rgba(0,0,0,0.05);
}

.sidebar-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
    text-align: center;
    font-size: 0.75rem;
    color: #888;
    font-weight: 500;
}

/* Barra de Casillas de Información en la parte inferior */
.casillas-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(to top, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.98));
    backdrop-filter: blur(15px);
    border-top: 4px solid var(--primary-color);
    box-shadow: 0 -15px 60px rgba(0,0,0,0.3);
    padding: 25px 20px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    display: block !important;
    visibility: visible !important;
}

.casillas-bottom-container {
    display: flex;
    gap: 20px;
    align-items: stretch;
    min-width: max-content;
    justify-content: center;
}

.casilla-bottom-item {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid rgba(39, 174, 96, 0.15);
    background: white;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    flex-shrink: 0;
    width: 160px;
}

.casilla-bottom-item:hover {
    transform: translateY(-12px) scale(1.08);
    box-shadow: 0 15px 40px rgba(39, 174, 96, 0.4);
    border-color: var(--primary-color);
}

.casilla-bottom-item:active {
    transform: translateY(-6px) scale(1.04);
}

.casilla-bottom-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid var(--primary-color);
}

.casilla-bottom-item p {
    padding: 12px 10px;
    font-size: 0.85rem;
    font-weight: 900;
    text-align: center;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(to right, #f8fff8, #ffffff);
}

/* Ajustar el main-content para que no quede tapado por la barra inferior */
#main-content {
    padding-bottom: 200px !important;
}

/* Responsive para la barra de casillas */
@media (max-width: 768px) {
    .casillas-bottom-bar {
        padding: 10px 8px;
    }
    
    .casillas-bottom-container {
        gap: 10px;
    }
    
    .casilla-bottom-item {
        width: 120px;
    }
    
    .casilla-bottom-item img {
        height: 80px;
    }
    
    .casilla-bottom-item p {
        font-size: 0.7rem;
        padding: 8px 6px;
    }

    #main-content {
        padding-bottom: 170px !important;
    }
}

/* Marcadores Elaborados */
.elaborated-marker {
    position: relative;
    width: 50px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
}

.marker-id {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--accent-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.marker-thumb {
    width: 45px;
    height: 45px;
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    border: 3px solid white;
    background-color: white;
    z-index: 5;
}

.marker-pin {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid white;
    margin-top: -5px;
    z-index: 4;
}

/* Popup Elaborado */
.modern-popup {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    padding: 5px;
}

.popup-thumb {
    width: 60px;
    height: 60px;
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.popup-info b {
    display: block;
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 2px;
}

.popup-info p {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
}

.leaflet-custom-popup .leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Quitar clases antiguas si existen */
.marker-number-container, .marker-number-container::after { display: none; }

/* Responsive */
@media (max-width: 1100px) {
    #ads-sidebar {
        width: 340px;
    }
}

/* Botón de menú más discreto */
#menu-toggle {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid #ddd;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#menu-toggle:hover {
    background: #eee;
}

/* Bottom Sheet - Estilo profesional tipo Google Maps */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -10px 50px rgba(0,0,0,0.2);
    z-index: 99998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 50px;
    height: 5px;
    background: #ddd;
    border-radius: 10px;
    margin: 15px auto;
    cursor: grab;
}

.bottom-sheet-handle:active {
    cursor: grabbing;
}

.bottom-sheet-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99997;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Imagen del punto en el Bottom Sheet */
.point-image {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Media Queries para Mobile Ghost UI */
@media (max-width: 768px) {
    header {
        height: 55px;
        top: 0;
        width: 100%;
        padding: 5px 10px;
    }

    .title-container h1 {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .title-container p {
        font-size: 0.6rem;
    }

    .ads-banner {
        top: 65px;
        height: 140px;
        width: calc(100% - 20px);
        padding: 10px;
    }

    #ads-sidebar {
        width: 100%;
        left: -100%;
    }

    .language-picker {
        left: 10px;
    }

    #menu-toggle {
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
}

@media (max-width: 900px) {
    #menu-toggle {
        display: block;
    }
    
    #ads-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 85%;
        max-width: 360px;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        background: var(--white);
    }

    #ads-sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.6);
        z-index: 1500;
        backdrop-filter: blur(4px);
    }

    .sidebar-overlay.active {
        display: block;
    }

    header {
        height: 55px;
        padding: 0 10px;
    }

    .title-container h1 {
        font-size: 1rem;
        letter-spacing: 1px;
    }

    .title-container p {
        font-size: 0.6rem;
    }

    #main-layout {
        height: calc(100vh - 55px);
    }

    #map-container {
        padding: 0;
    }

    #map {
        border-radius: 0;
        border-width: 0;
    }
}
