 :root {
    --primary: #2ecc71;
    --bg: #d9d9d9; /* Nuevo fondo claro, suave y elegante (Gris Humo) */
    --card-bg: #ffffff;
    --text: #1a1d21;
    --text-dim: #7f8c8d; /* Volvemos a un gris medio para textos secundarios */
    --primary-rgb: 46, 204, 113;
    --accent-warm: #e67e22;
    --accent-gold: #f39c12;
    --card-border: rgba(0, 0, 0, 0.05);
    --shadow-cold: rgba(0, 0, 0, 0.08);
    --shadow-warm: rgba(230, 126, 34, 0.06);
}

* { box-sizing: border-box; }

body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg) !important;
    color: #c7c11d; 
    margin: 0; 
    padding: 20px; 
    min-height: 100vh;
}

/* --- CABECERA --- */
header { text-align: center; padding: 30px 0; }
h1 { 
    font-size: 2.4rem; font-weight: 800; 
    background: linear-gradient(135deg, #1a1d21 0%, var(--primary) 50%, var(--accent-gold) 100%); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; 
    margin: 0; 
}
.subtitle { color: var(--text-dim); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 8px; }
.intro-text { max-width: 600px; margin: 20px auto 0 auto; font-size: 0.95rem; line-height: 1.6; color: var(--text-dim); font-weight: 400; padding: 0 20px; }

/* --- AJUSTE DE LA INTRO Y SUBTÍTULO --- */
.intro-text, .subtitle {
    color: var(--text) !important; /* Volvemos a color oscuro para fondo claro */
    opacity: 0.8;
}

/* --- SELECTOR IDIOMAS --- */
.lang-selector { display: flex; justify-content: center; gap: 10px; margin: 15px 0; }
.lang-btn { background: #ffffff; border: 1.5px solid #f0f0f0; padding: 6px 12px; border-radius: 12px; font-size: 0.7rem; font-weight: 800; color: var(--text-dim); cursor: pointer; transition: all 0.2s ease; min-width: 50px; text-align: center; }
.lang-btn.active { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 12px rgba(46, 204, 113, 0.2); }

/* --- CLIMA --- */
.weather-widget { display: inline-flex; flex-direction: column; align-items: center; background: var(--card-bg); padding: 18px 28px; border-radius: 28px; border: 1px solid var(--card-border); margin-top: 25px; box-shadow: 0 10px 30px var(--shadow-cold); }
.weather-temp { font-size: 1.6rem; font-weight: 800; }
.weather-details { display: flex; gap: 20px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #eee; font-size: 0.8rem; font-weight: 700; color: var(--text-dim); }
.detail-item svg { width: 16px; height: 16px; stroke: var(--primary); vertical-align: middle; margin-right: 4px; }
#smart-advice { margin-top: 15px; padding: 8px 16px; border-radius: 14px; font-size: 0.75rem; font-weight: 800; display: none; align-items: center; gap: 8px; }
.advice-good { background: #eafff2; color: #27ae60; border: 1px solid #2ecc71; }
.advice-mid { background: #fff9e6; color: #f39c12; border: 1px solid #f1c40f; }
.advice-bad { background: #feebeb; color: #c0392b; border: 1px solid #e74c3c; }

/* --- TARJETAS --- */
.lista-monumentos { display: grid; gap: 10px; max-width: 500px; margin: 20px auto; }
.tarjeta { background: var(--card-bg); border-radius: 32px; overflow: hidden; border: 1px solid var(--card-border); box-shadow: 0 15px 40px var(--shadow-cold); transition: transform 0.3s ease; }
.tarjeta:hover { transform: translateY(-6px); }

/* --- CONTENEDOR DE IMAGEN (CRÍTICO) --- */
.imagen-container { 
    position: relative; 
    width: 100%; 
    height: 260px; 
    perspective: 1200px; 
    cursor: pointer;
    overflow: visible !important; /* Permite que los badges se vean */
}

/* Modo Scroll (Anula el giro) */
.imagen-container.modo-scroll {
    perspective: none !important;
    cursor: grab;
}
.imagen-container.modo-scroll:active { cursor: grabbing; }

/* Capas de información (Siempre arriba) */
.badge { 
    position: absolute; top: 18px; left: 18px; background: white; padding: 7px 15px; 
    border-radius: 14px; font-size: 0.65rem; font-weight: 800; color: var(--accent-warm); 
    z-index: 100 !important; border: 1px solid var(--accent-gold); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.status-indicator { 
    position: absolute; bottom: 18px; right: 18px; background: rgba(255,255,255,0.96); 
    padding: 10px 15px; border-radius: 18px; z-index: 100 !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); border: 1px solid var(--card-border); 
}

/* --- SISTEMA FLIP (NORMAL) --- */
.photo-wrapper { position: absolute; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); z-index: 1; }
.imagen-container.flipped .photo-wrapper { transform: rotateY(-180deg); }
.stack-photo { position: absolute; width: 100%; height: 100%; background-size: cover; background-position: center; backface-visibility: hidden; }
.photo-back { transform: rotateY(180deg); }

/* --- SISTEMA PARALLAX (4 FOTOS) --- */
.parallax-container {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 10px;
    height: 100%;
    align-items: center;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 10; /* Por debajo de badges */
    touch-action: pan-x;
}
.parallax-container::-webkit-scrollbar { display: none; }

.card-parallax {
    flex: 0 0 85%;
    height: 90%;
    scroll-snap-align: center;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    background: #eee;
}
.card-parallax img { width: 100%; height: 100%; object-fit: cover; }

/* --- INFO TEXTOS --- */
.info { padding: 28px; }
.nombre { font-size: 1.6rem; margin: 0; font-weight: 800; letter-spacing: -0.5px; }
.descripcion { font-size: 0.95rem; color: var(--text-dim); line-height: 1.6; margin: 18px 0; }
.leer-mas { color: var(--accent-warm); font-weight: 800; cursor: pointer; text-decoration: underline; margin-left: 5px; font-size: 0.85rem; }

.leer-mas-discreto {
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.leer-mas-discreto .arrow {
    transition: transform 0.3s ease;
}

.leer-mas-discreto:hover {
    color: var(--accent-warm);
}

.leer-mas-discreto:hover .arrow {
    transform: translateX(5px);
}

.leer-mas-container {
    margin: 0 0 20px 0;
    display: flex;
}

.btn-leer-pill {
    background: #ffffff;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-leer-pill:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

.btn-leer-pill:active {
    background-color: var(--primary);
    color: white;
    transform: scale(0.98);
}

/* --- GRID SERVICIOS --- */
.servicios-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    margin: 20px 0 10px 0; /* Reducimos margen inferior para acercar el compartir */
}

.boton-servicio { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    padding: 12px 5px; 
    background: #ffffff; 
    border-radius: 20px; 
    border: 1.5px solid #f0f0f0; 
    text-decoration: none; 
    color: var(--text); 
    font-size: 0.65rem; 
    font-weight: 800; 
    height: 85px; 
    transition: all 0.2s ease; 
    cursor: pointer !important;
}

.boton-servicio:hover { 
    border-color: var(--accent-gold); 
    color: var(--accent-warm); 
    background: #fffcf5; 
    transform: translateY(-2px); 
}

/* --- EL NUEVO BOTÓN GPS CENTRADO --- */
.flex-center {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 15px 0;
}

.boton-guiar-moderno {
    background: #1a1d21; 
    color: white;
    border: none;
    padding: 10px 24px; /* Altura estilizada y PRO */
    border-radius: 30px; 
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.boton-guiar-moderno:hover {
    transform: translateY(-2px);
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3);
}

/* Eliminamos o anulamos el botón viejo para que no interfiera */
.boton-guiar { display: none !important; }

/* --- MODALES --- */
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.3); display: none; align-items: center; justify-content: center; z-index: 2000; backdrop-filter: blur(12px); }
.modal-content { background: white; padding: 35px; border-radius: 35px; max-width: 440px; width: 92%; position: relative; box-shadow: 0 25px 60px rgba(0,0,0,0.2); }
.close-btn { position: absolute; top: 22px; right: 22px; font-size: 2.2rem; cursor: pointer; color: #ddd; border: none; background: none; }

.modal-overlay-lectura { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 3000; display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-dialog-lectura { background-color: #ffffff; width: 95%; max-width: 800px; height: 90vh; border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; }
/* --- MAQUETACIÓN PARA BOTÓN CERRAR COMPACTO --- */

/* --- ARREGLO CABECERA MODAL --- */

.lectura-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between; /* Separa los bloques de botones */
    padding: 15px 20px;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    min-height: 70px;
}

/* Forzamos que los controles de fuente se vean bien */
.lectura-header .accesibilidad-controles {
    display: flex !important; /* Ahora sí se verá al abrir */
    margin: 0 auto 0 15px; /* Los separa del título "ARTÍCULO HISTÓRICO" */
}

/* Botón de cerrar circular y compacto */
.btn-cerrar-compacto {
    background: #f8fafc !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important; /* Evita que el móvil lo aplaste */
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem !important;
    color: #333 !important;
    line-height: 1 !important;
    cursor: pointer;
    margin-left: 10px;
    padding: 0 !important; /* Limpia rellenos internos */
}

/* Efecto visual al pulsar */
.btn-cerrar-compacto:active {
    background: #eee !important;
    transform: scale(0.95);
}

.btn-cerrar-compacto:hover {
    background: white;
    color: var(--accent-gold); /* Efecto dorado al pasar por encima */
}
.btn-cerrar-compacto {
    flex-shrink: 0; /* Evita que se aplaste si hay mucho texto en el audio */
    z-index: 5;
}
/* Sustituye la parte final de tu style.css con esto para evitar duplicados */

/* --- AUDIO PRO --- */
.btn-audio-pwa {
    background: var(--card-bg);
    border: 1.5 solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* Estado activo cuando la guía habla */
.btn-audio-pwa.audio-active {
    color: #27ae60 !important;
    background: #eafff2 !important;
    animation: pulse-audio-pro 1.5s infinite;
}

.btn-audio-pwa.audio-active span {
    animation: speaker-vibrate 0.3s infinite;
    display: inline-block;
}

@keyframes pulse-audio-pro {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

@keyframes speaker-vibrate {
    0% { transform: rotate(0); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0); }
}

/* Corrección de color de texto global */
body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg);
    color: var(--text); /* Antes tenías un amarillo ilegible */
    margin: 0; 
    padding: 20px; 
    min-height: 100vh;
}
/* --- AJUSTE DEL CUERPO DEL ARTÍCULO --- */
.lectura-cuerpo {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden; /* Evita el desplazamiento horizontal */
    -webkit-overflow-scrolling: touch;
}

/* REGLA MAESTRA: Forzar que las imágenes se adapten al modal */
.lectura-cuerpo img {
    max-width: 100% !important; /* No puede ser más ancha que el modal */
    height: auto !important;    /* Mantiene la proporción original */
    display: block;
    margin: 20px auto;          /* Las centra y les da aire */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Ajuste adicional para el texto, para que no toque los bordes */
.lectura-cuerpo p {
    font-size: inherit !important; /* <--- Esto es la clave */
    line-height: 1.7;
    color: #333;
    word-wrap: break-word;
    margin-bottom: 15px;
}

/* --- FOOTER --- */
.main-footer {
    padding: 30px 20px;
    text-align: center;
    background: transparent; /* Se adapta al fondo de la página */
    border-top: 1px dashed #ccc; /* Una línea discontinua queda más ligera que una sólida */
    margin: 0 20px; /* Margen lateral para que la línea no toque los bordes */
}

.footer-credits p {
    margin: 4px 0;
}

.footer-link {
    color: #27ae60;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #1e8449;
}

.footer-dev {
    margin-top: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
}
/* Estados Colores */
.status-main span { width: 8px; height: 8px; border-radius: 50%; }
.estado-abierto { color: #27ae60; }
.estado-abierto span { background: #2ecc71; box-shadow: 0 0 8px #2ecc71; animation: pulse 2s infinite; }
.estado-cerrado { color: #c0392b; }
.estado-cerrado span { background: #e74c3c; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* Estilo para el contenedor de la dirección */
.direccion-contenedor {
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #f8fafc; /* Gris azulado muy suave */
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: background 0.3s ease;
}

.direccion-contenedor:hover {
    background: #f1f5f9;
}

.enlace-direccion {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
}

.emoji-calle {
    font-size: 1.1rem;
}

.texto-direccion {
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Mantiene la dirección en una línea para no romper el diseño */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- MAQUETACIÓN DE HORARIOS (CORRECCIÓN) --- */

/* Título y nombre del monumento dentro del modal */
.modal-title {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-monumento-name {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filas de datos (Apertura, Misas, etc.) */
#modal-body .data-row-pro {
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.4;
}

/* Etiquetas en negrita (Apertura, Misas...) */
#modal-body b {
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    display: block;
}

/* Texto de los horarios */
#modal-body span {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Ocultar etiquetas <br> antiguas para que no metan saltos extra */
#modal-body br {
    display: none;
}

/* Contenedor Grande (La Super-tarjeta) */
.seccion-destacada {
    background: linear-gradient(145deg, #2c3e50, #34495e); /* Azul oscuro elegante */
    border-radius: 35px;
    padding: 30px 20px;
    margin-top: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
}

.titulo-destacado {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    margin: 0 0 20px 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Matriz de 2 columnas */
.grid-sitios {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mantiene las 2 columnas */
    gap: 12px;
    margin-top: 10px;
}

/* Tarjetas Pequeñas */
.mini-tarjeta {
    background: rgba(255, 255, 255, 0.08); /* Blanco translúcido */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: center;
}

.mini-tarjeta:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.mini-icono {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.mini-nombre {
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
}
.subtitulo-destacado {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    margin: -15px 0 20px 10px;
    font-style: italic;
}

/* --- UNIFICACIÓN DE INTERACCIÓN (PUNTERO DE MANO) --- */

/* Tarjetas principales y elementos interactivos internos */
.tarjeta, 
.imagen-container, 
.boton-servicio, 
.leer-mas, 
.enlace-direccion, 
.direccion-contenedor,
.mini-tarjeta,
.lang-btn,
.btn-audio-pwa,
.btn-cerrar-lectura,
.close-btn {
    cursor: pointer !important;
}

/* Asegurar que los botones de navegación también lo tengan (por si acaso) */
.boton-guiar {
    cursor: pointer;
}

/* Evitar que el puntero cambie en el texto descriptivo normal */
.descripcion, .nombre, .intro-text {
    cursor: default;
}

/* Efecto de iluminación suave para las mini-tarjetas azules */
.mini-tarjeta:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-3px);
}

/* Efecto para los botones de servicio (Bus, Taxi, etc.) */
.boton-servicio:hover {
    background-color: #fdfaf3 !important;
    border-color: var(--accent-gold) !important;
}

/* Efecto para la dirección */
.direccion-contenedor:hover {
    background-color: #f1f5f9 !important;
}
/* --- MAQUETACIÓN TARJETA DE TAXI (REUPERADA) --- */

.taxi-card {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-warm)); /* Degradado naranja/dorado */
    padding: 25px;
    border-radius: 25px;
    text-align: center;
    margin: 15px 0;
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.2);
    transition: transform 0.3s ease;
}

.taxi-card:hover {
    transform: scale(1.02);
    cursor: default; /* El contenedor no es el link, lo es el número */
}

.taxi-phone {
    font-size: 2.2rem;
    font-weight: 900;
    color: #ffffff !important; /* Blanco siempre para contraste */
    text-decoration: none;
    display: block;
    letter-spacing: 1px;
    margin-bottom: 5px;
    cursor: pointer !important;
}

.taxi-card p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* --- SKELETON LOADING EFFECT --- */
.skeleton-card {
    background: var(--card-bg);
    border-radius: 32px;
    height: 500px; /* Altura aproximada de tus tarjetas actuales */
    overflow: hidden;
    position: relative;
    border: 1px solid var(--card-border);
}

.skeleton-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(90deg, 
                rgba(255,255,255,0) 0%, 
                rgba(255,255,255,0.6) 50%, 
                rgba(255,255,255,0) 100%);
    animation: Shimmer 1.5s infinite;
}

@keyframes Shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Animación de entrada para las tarjetas reales */
.tarjeta-animada {
    animation: FadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes FadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Controles de accesibilidad en el modal */
.accesibilidad-controles {
    display: none !important;
    gap: 8px;
    align-items: center;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 10px;
}

.btn-font {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-font:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* El cuerpo del artículo ahora tiene una transición suave */
#cuerpo-lectura {
    font-size: 1.05rem; 
    transition: font-size 0.2s ease-out;
}

/* Mejora la visibilidad del foco para accesibilidad */
:focus {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Pero escóndelo si el usuario usa el ratón para no ensuciar el diseño */
:focus:not(:focus-visible) {
    outline: none;
}

/* --- AJUSTE DE USABILIDAD TÁCTIL (VERSIÓN 2.0) --- */

/* 1. Las fotos individuales permiten scroll vertical (para no bloquear la página) */
.stack-photo, .photo-wrapper {
    touch-action: pan-y;
    -webkit-user-drag: none;
}

/* 2. Los contenedores de varias fotos (Parallax/Scroll) NECESITAN ambos ejes */
/* pan-x permite el carrusel y pan-y permite seguir bajando por la página */
.imagen-container.modo-scroll, 
.parallax-container {
    touch-action: pan-x pan-y !important; 
    overflow-x: auto;
    overscroll-behavior-x: contain; /* Evita que al terminar el carrusel se mueva toda la web */
    -webkit-overflow-scrolling: touch;
}

/* 3. Aseguramos que las imágenes dentro del scroll no bloqueen nada */
.card-parallax img {
    touch-action: auto; /* Deja que el navegador decida según el gesto */
    pointer-events: auto;
}
/* --- MEJORA DEL CONTENEDOR DE DIRECCIÓN --- */

.direccion-columna {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.texto-hint {
    font-size: 0.65rem;
    color: var(--primary); /* O un color que resalte como el verde de tu root */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

/* Animación sutil para invitar al clic */
.direccion-contenedor:hover .texto-hint {
    opacity: 1;
    transform: translateX(3px);
    transition: all 0.2s ease;
}

/* --- TARJERTA OFICINA DE TURISMO --- */
.oficina-turismo-card {
    background: #ffffff;
    border: 1.5px solid var(--primary); /* Usamos el verde de Elche */
    border-radius: 20px;
    padding: 15px 20px;
    margin: 20px auto;
    max-width: 500px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.1);
    transition: all 0.3s ease;
}

.oficina-turismo-card:hover {
    transform: translateY(-2px);
    background: #f0fff4;
}

.txt-ayuda {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.oficina-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oficina-icon {
    font-size: 1.4rem;
    background: var(--primary);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.oficina-texto {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.oficina-nombre {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text);
}

.oficina-ubicacion {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.oficina-flecha {
    color: var(--primary);
    font-weight: bold;
}
/* --- TARJETA DE PROXIMIDAD --- */
.tarjeta-proximidad {
    background: #ffffff;
    border: 2px solid #eee;
    border-radius: 25px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.4s ease;
}


.tarjeta-proximidad.cerca {
    border-color: var(--accent-gold) !important;
    background: linear-gradient(135deg, #fffcf5, #fff5e6) !important;
    box-shadow: 0 10px 25px rgba(243, 156, 18, 0.2) !important;
}

.prox-icon { font-size: 2rem; }
.prox-info { display: flex; flex-direction: column; flex: 1; }
.prox-label { font-size: 0.7rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; }
.prox-nombre { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.prox-distancia { font-size: 0.85rem; margin: 4px 0 0 0; color: var(--text-dim); }
.prox-distancia strong { color: var(--accent-warm); }
.prox-flecha { color: var(--accent-gold); font-size: 1.2rem; }

.distancia-titulo {
    font-size: 0.85rem;
    color: var(--primary); /* Asegúrate de usar --primary o un color hex */
    font-weight: 600;
    margin-left: 8px;
    display: inline-block; /* Asegura que ocupe espacio */
}

/* --- BARRA DE COMPARTIR PRO --- */
.share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 20px 0;
    padding: 12px 18px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.04);
}

.btn-share-native {
    background: linear-gradient(135deg, var(--primary), #27ae60);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
    transition: transform 0.2s;
}

.btn-share-native:active { transform: scale(0.95); }

/* Iconos Sociales SVG */
/* BARRA DE COMPARTIR VERTICAL */
.share-bar-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.share-top-row {
    display: flex;
    gap: 10px;
}

.btn-share-native, .btn-install-pwa {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: white;
}

.btn-share-native { background: var(--primary); }
.btn-install-pwa { background: var(--accent-gold); }

.share-icons-row {
    display: flex;
    justify-content: space-around;
    padding-top: 10px;
    border-top: 1px dashed #eee;
}

.share-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.share-icon svg { width: 22px; height: 22px; fill: currentColor; }

.wa { color: #25D366; background: #eafff2; }
.ig { color: #E1306C; background: #fff0f5; } /* Color Instagram */
.fb { color: #1877F2; background: #f0f7ff; }

/* Efecto Hover Pro */
.share-icon:hover {
    transform: translateY(-4px) rotate(5deg);
    background: white;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.wa:hover { color: white; background: #25D366; }
.tg:hover { color: white; background: #0088cc; }
.fb:hover { color: white; background: #1877F2; }

/* Forzar puntero de mano en botones y elementos clicables */
.btn-leer-pill, 
.btn-share-native, 
.share-icon, 
.boton-guiar {
    cursor: pointer !important;
}

/* Mejora para el botón Pill */
.btn-leer-pill {
    /* ... tus estilos anteriores ... */
    cursor: pointer;
    user-select: none; /* Evita que se seleccione el texto al hacer clic rápido */
}

/* Animación sutil de entrada */
.share-bar {
    animation: slideIn 0.5s ease-out forwards;
}

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

/* Contenedor de ayuda para centrar */
.flex-center {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 15px;
}

/* Botón GPS Estilizado */
.boton-guiar-moderno {
    background: #1a1d21; /* Negro elegante o puedes usar var(--primary) */
    color: white;
    border: none;
    padding: 8px 24px; /* Menos altura (8px) y más ancho (24px) */
    border-radius: 30px; /* Muy redondeado */
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.boton-guiar-moderno:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    background: var(--primary); /* Cambia a verde al pasar el ratón */
}

/* Icono SVG modernizado (Antes .icon-gps) */
.icon-nav-pro {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0; /* Evita que el texto lo aplaste */
    transform: rotate(45deg); /* Inclinación de brújula */
    transition: transform 0.3s ease;
    margin-right: 8px;
}

/* Animación: se pone recto al pasar el ratón */
.boton-guiar-moderno:hover .icon-nav-pro {
    transform: rotate(0deg) scale(1.1);
}

/* Contenedor del mapa para que se vea mejor con el botón */
.mapa-container-pro {
    width: 100%; 
    height: 250px; 
    border-radius: 20px; 
    overflow: hidden; 
    border: 1px solid rgba(0,0,0,0.05);
}


/* 1. ELIMINAMOS EL DISEÑO ANTIGUO QUE BLOQUEA EL CENTRADO */
.boton-guiar { 
    display: none !important; 
}

/* 2. CONTENEDOR PARA CENTRAR (Asegura que el botón no sea ancho total) */
.flex-center {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
    margin: 15px 0 !important;
}

/* 3. DISEÑO PRO DEL BOTÓN (Estilizado y Negro) */
.boton-guiar-moderno {
    background: #1a1d21 !important; /* Negro elegante */
    color: white !important;
    border: none !important;
    padding: 10px 24px !important; /* Altura reducida */
    border-radius: 30px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important; /* RECUPERAMOS LA MANO */
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
    width: auto !important; /* Importante para que se centre bien */
}

.boton-guiar-moderno:hover {
    background: var(--primary) !important; /* Cambia a verde al pasar el ratón */
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.3) !important;
}

/* 4. RECUPERAMOS LA MANO EN TODO LO DEMÁS */
.boton-guiar-moderno,
.boton-guiar-moderno *,
.btn-leer-pill,
.share-icon,
.btn-share-native,
.btn-install-pwa,
.boton-servicio {
    cursor: pointer !important;
}

/* Nuevo contenedor flex para el header de la tarjeta */
.oficina-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* El botón PRO: Integrado, sin bordes feos */
.btn-refresh-pro {
    background: rgba(0,0,0,0.03); /* Fondo casi invisible */
    border: none;
    color: #888; /* Color de texto suave */
    padding: 6px 14px;
    border-radius: 50px; /* Forma de píldora */
    font-size: 0.7rem; /* Texto muy pequeño */
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent; /* Quita el flash de color en móvil */
}

/* Icono SVG de actualización */
.icon-refresh-svg {
    width: 13px;
    height: 13px;
    transition: transform 0.6s ease;
}

/* Efectos al pasar el ratón o pulsar (Hover/Active) */
.btn-refresh-pro:hover {
    background: #e6f7ed; /* Verde muy pálido de feedback */
    color: var(--primary); /* Cambia al verde corporativo */
}

/* Animación: El icono da una vuelta completa al pulsar o pasar el ratón */
.btn-refresh-pro:hover .icon-refresh-svg,
.btn-refresh-pro:active .icon-refresh-svg {
    transform: rotate(360deg);
}

/* Feedback táctil en móvil */
.btn-refresh-pro:active {
    transform: scale(0.96);
    background: #d1f2e1;
}

/* Añade esto al final de style.css */
@keyframes spin-fast {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Asegura que el color del texto sea legible */
body {
    color: var(--text); /* Corregido: antes tenía un amarillo poco legible */
}

/* Ocultar contenido extra por defecto */
.contenido-expandible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1); /* Efecto slide */
}

/* Clase para expandir (se añade por JS) */
.tarjeta.expandida .contenido-expandible {
    max-height: 2000px; /* Un valor alto para que quepa todo */
    transition: max-height 0.8s ease-in;
    margin-top: 15px;
}

.header-expandible {
    padding: 5px 0;
}

.flecha-expandir {
    font-size: 1.2rem;
    color: var(--primary);
    transition: transform 0.3s ease;
    padding-left: 10px;
}

.tarjeta.expandida .flecha-expandir {
    transform: rotate(180deg);
}

/* Ajuste para que el nombre no se pegue al borde */
.nombre {
    flex: 1;
}

/* Contenedor del disparador */
.trigger-desplegable {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Un pelín más de espacio para el texto nuevo */
    margin-top: 15px;
    padding: 12px; /* Más área de clic */
    cursor: pointer;
    background-color: rgba(var(--primary-rgb), 0.05); /* Un fondo sutil al pasar */
    border-radius: 20px;
    transition: background-color 0.3s ease;
}

.trigger-desplegable:hover {
    background-color: rgba(var(--primary-rgb), 0.1);
}

.txt-ver-mas {
    display: inline-block; /* Se ve por defecto */
}

.flecha-verde {
    color: var(--primary);
    font-size: 1.1rem; /* Tamaño base más grande */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Cuando se expande, ocultamos el preview de 50 caracteres para mostrar el texto completo */
.tarjeta.expandida .descripcion-preview {
    display: none;
}

.tarjeta.expandida .flecha-verde {
    transform: rotate(180deg) scale(1.4);
}

.tarjeta.expandida .txt-cerrar {
    display: inline-block !important; /* Mostramos el cerrar */
}
.contenido-expandible {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s ease-out;
}

.tarjeta.expandida .contenido-expandible {
    max-height: 1500px;
}
/* Mostramos el texto "CERRAR" (que añadiremos en el HTML) */
.tarjeta.expandida .txt-cerrar {
    display: inline-block;
    color: var(--primary);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Ocultamos "CERRAR" cuando la tarjeta está plegada */
.txt-cerrar {
    display: none; /* Oculto por defecto */
}

/* Contenedor de la flecha de ruta */
.separador-ruta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0; /* Espaciado ajustado */
    margin: -5px 0; /* Acercamos las tarjetas un poco más */
}

.flecha-ruta-svg {
    width: 22px;  /* Antes era demasiado grande. 22px es discreto. */
    height: 22px;
    fill: none;
    stroke: var(--primary); /* El verde de Elche */
    stroke-width: 2.2; /* Un trazo más fino y elegante */
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Efecto mucho más sutil */
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); 
    animation: flotarFlecha 2.5s ease-in-out infinite;
}
@keyframes flotarFlecha {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50% { transform: translateY(8px); opacity: 1; }
}

/* Estado base de todas las tarjetas */
.tarjeta {
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: grayscale(0.2); /* Un pelín apagadas por defecto */
    opacity: 0.85;
    transform: scale(0.96);
}

/* --- MEJORA DEL FOCO ACTIVO --- */
.tarjeta.tarjeta-activa {
    filter: grayscale(0) !important;
    opacity: 1 !important;
    transform: scale(1.02) !important; /* Escala muy suave */
    border-color: var(--primary) !important;
    /* Sombra verde muy difusa y elegante sobre fondo claro */
    box-shadow: 0 15px 40px rgba(var(--primary-rgb), 0.15) !important; 
    z-index: 10;
}

/* Opcional: Iluminación también para las tarjetas tipo Oficina/Tren */
.oficina-turismo-card.tarjeta-activa {
    border-color: var(--primary) !important;
    transform: scale(1.02) !important;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.15) !important;
}

/* Efecto extra: Que el título brille un poco más en la activa */
.tarjeta.tarjeta-activa .nombre {
    color: var(--text);
    text-shadow: 0 0 1px rgba(46, 204, 113, 0.1);
}

/* Estilo para el botón cuando ya está actualizado */
.lang-btn.actualizado {
    background-color: #27ae60 !important; /* Verde éxito */
    color: white !important;
    border: none;
    pointer-events: none; /* Evita que sigan pinchando */
    opacity: 0.9;
}

.btn-update-style {
    background-color: var(--accent-warm);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* --- DISEÑO ESPECIAL PALMERAL (UNESCO) --- */

/* Contenedor principal con brillo dorado sutil */
#tarjeta-palmeral {
    border: 2px solid var(--accent-gold);
    box-shadow: 0 20px 50px rgba(243, 156, 18, 0.15);
    background: linear-gradient(to bottom, #ffffff, #fffdfa);
}

/* Badge UNESCO destacado */
#tarjeta-palmeral .badge {
    background: var(--accent-gold);
    color: white;
    border: none;
    font-size: 0.75rem;
    padding: 10px 20px;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

/* Título con gradiente dorado */
#tarjeta-palmeral .nombre {
    background: linear-gradient(135deg, #b8860b 0%, var(--accent-gold) 50%, #b8860b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
}

/* El botón de navegación del Palmeral será diferente */
#tarjeta-palmeral .boton-guiar-moderno {
    background: linear-gradient(135deg, var(--accent-gold), #e67e22);
    border: none;
    transform: scale(1.05);
}

/* Efecto de borde animado para destacar su importancia */
#tarjeta-palmeral::before {
    content: '';
    position: absolute;
    top: -5px; left: -5px; right: -5px; bottom: -5px;
    border-radius: 35px;
    background: linear-gradient(45deg, transparent, rgba(243, 156, 18, 0.2), transparent);
    z-index: -1;
    pointer-events: none;
}

/* Estilo Tarjeta Museo */
.tarjeta-museo {
    border-left: 8px solid #e74c3c !important; /* Rojo Museo */
}

.image-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.museo-header {
    padding: 25px 25px 10px 25px;
    position: relative;
}

.museo-titulo-cont {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.museo-icon-main {
    font-size: 2.5rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.badge-museo {
    background: var(--accent-gold);
    color: white;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Fila única de 3 botones */
.museo-servicios-compacto {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.btn-museo {
    background: white;
    border: 1px solid #eee;
    padding: 12px 5px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-museo span { font-size: 1.4rem; margin-bottom: 4px; }
.btn-museo label { font-size: 0.6rem; font-weight: 800; color: var(--text-dim); text-transform: uppercase; }
.btn-museo:hover { border-color: var(--accent-gold); background: #fffdf5; }

// --- MUSEO DE LA FESTA ---
/* Efecto opcional para destacar el título sobre fondo */
.tarjeta[data-id="museofesta"] .nombre {
    position: relative;
    padding: 10px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 12px;
}
/* Estilo específico para la cabecera del Museo de la Festa */
.tarjeta[data-id="museofesta"] .card-header {
    position: relative;
    overflow: hidden;
}

.tarjeta[data-id="museofesta"] .nombre-monumento {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 15px;
    border-radius: 0 0 15px 0;
    display: inline-block;
}

/* --- DISEÑO IDENTIDAD DUAL (MERCED + BAÑOS) --- */

/* 1. Estilo general de la tarjeta "histórica" */
.tarjeta-dual-historica {
    background: #fdfaf4 !important; 
    border: 2px solid #d4a373 !important;
    position: relative;
    box-shadow: 0 12px 30px rgba(139, 69, 19, 0.15) !important;
}

/* 2. Cenefa superior de ladrillo/piedra */
.tarjeta-dual-historica::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 8px;
    background: repeating-linear-gradient(90deg, #b89356 0 25px, #8b4513 25px 50px);
    z-index: 10;
    border-radius: 32px 32px 0 0;
}

/* 3. El SELLO DE IDENTIDAD (Los dos iconos juntos) */
/* Lo inyectamos sobre el contenedor de la imagen */
.tarjeta-dual-historica .imagen-container::after {
    content: "✝️ ☪️";
    position: absolute;
    top: 18px;
    right: 18px;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 50px; /* Forma de cápsula */
    font-size: 1.4rem;
    z-index: 110; /* Por encima de todo, incluso de las fotos en scroll */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    border: 1px solid #d4a373;
    letter-spacing: 4px; /* Espacio entre los dos símbolos */
    pointer-events: none;
}

/* Ajuste para que los textos combinen con el diseño */
.tarjeta-dual-historica .nombre { color: #5d4037 !important; }


/* ============================================================
   NUEVO DISEÑO PREMIUM OFICINA DE TURISMO
   Garantiza que no deforme el scroll de monumentos
   ============================================================ */

/* 1. Contenedor Principal: Independiente y no deformable */
.tarjeta-oficina-premium {
    width: 100%;
    /* Altura total fija para evitar empujar el scroll verticalmente */
    height: 250px; 
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    
    /* MÁGENES CRÍTICOS: Para separarla del Tren/Espai superior y del scroll inferior */
    margin: 20px auto; 
    
    /* Aseguramos que nada de lo de dentro "rompa" el borde */
    overflow: hidden; 
    
    /* Importante para no heredar flex del contenedor padre */
    flex: 0 0 auto !important; 
    display: block !important;
}

/* 2. La Foto Superior: Proporción perfecta */
.oficina-foto-header {
    width: 100%;
    /* La foto ocupa el 65% de la tarjeta */
    height: 165px; 
    position: relative;
    overflow: hidden;
}

.oficina-img-portada {
    width: 100%;
    height: 100%;
    /* CRÍTICO: Mantiene la proporción de la foto sin estirarla */
    object-fit: cover; 
    object-position: center;
}

/* 3. Overlay y Texto de Ayuda */
.oficina-foto-overlay {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 25px 15px 10px 15px;
    /* Degradado sutil para legibilidad */
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    z-index: 10;
}

.txt-ayuda-foto {
    color: white !important;
    font-size: 0.85rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- NUEVA TARJETA OFICINA DE TURISMO (Full Image + Blur) --- */

.oficina-turismo-card {
    position: relative;
    width: 100%;
    margin: 15px 0;
    border-radius: 20px;
    overflow: hidden;
    min-height: 110px; /* Altura similar a tus 85px + padding */
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: pointer;
    border: none;
}

/* Capa de la imagen de fondo con el desenfoque */
.ofi-bg-blur {
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px; /* Margen para que el blur no deje bordes blancos */
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.9); /* Aquí el desenfoque gaussiano */
    z-index: 1;
}

/* Capa oscura para que el texto resalte (Overlay) */
.ofi-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 2;
}

/* --- NUEVA TARJETA OFICINA DE TURISMO (Fondo Oscuro + Legibilidad Total) --- */

.oficina-turismo-card {
    position: relative;
    width: 100%;
    margin: 15px 0;
    border-radius: 20px;
    overflow: hidden; /* Importante para que el desenfoque no se salga */
    min-height: 120px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Sombra más fuerte */
    cursor: pointer;
    border: none;
}

/* Capa 1: Imagen de fondo con desenfoque gaussiano SEGURO */
.ofi-bg-blur {
    position: absolute;
    /* --- EL TRUCO PARA MÓVIL: Un margen negativo para ocultar bordes del blur --- */
    top: -15px; left: -15px; right: -15px; bottom: -15px;
    background-size: cover;
    background-position: center;
    /* --- AQUÍ ESTÁ EL TRUCO DEL DESENFOQUE GAUSSIANO --- */
    filter: blur(1px); /* Desenfoque sutil, reduce carga en móvil */
    z-index: 1;
}

/* Capa 2: Superposición oscura (Overlay) */
/* Oscurecemos la imagen para que el texto blanco y dorado resalte */
.ofi-overlay-dark {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Degradado oscuro para que el texto resalte mejor a la izquierda */
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

/* Capa 3: Contenido (Texto e Iconos) */
.oficina-content-info {
    position: relative;
    z-index: 3; /* Capa superior, por encima del blur y el overlay */
    width: 100%;
    padding: 20px;
    color: white; /* Texto blanco por defecto */
    display: flex;
    align-items: center;
    gap: 15px;
}

.oficina-texto-block {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Estilos específicos para los textos sobre fondo oscuro */
.txt-ruta-inicio-blur {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    color: #ffd700; /* Dorado brillante para contrastar */
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Sombra para legibilidad extra */
}

.txt-ayuda-oficina-blur {
    font-size: 0.8rem;
    margin: 0 0 12px 0;
    color: rgba(255,255,255,0.9); /* Blanco translúcido */
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.oficina-header-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.oficina-icon-main-blur {
    font-size: 1.8rem;
    /* Fondo circular sutil para el icono */
    background: rgba(255,255,255,0.2);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.oficina-title-fixed-blur {
    color: white; /* Blanco nítido */
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.oficina-subtitle-fixed-blur {
    color: rgba(255,255,255,0.8); /* Blanco translúcido */
    font-size: 0.85rem;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.oficina-flecha-go-blur {
    font-size: 1.2rem;
    color: #ffd700; /* Dorado brillante */
}

/* Ajuste del botón Más Info para fondo oscuro */
.btn-ofi-more-blur {
    margin-top: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15); /* Blanco muy translúcido */
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: white; /* Texto blanco */
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    backdrop-filter: blur(10px); /* Efecto cristal oscuro */
    transition: all 0.3s ease;
    align-self: flex-start;
}

.btn-ofi-more-blur:hover {
    background: white;
    color: #003876;
}

/* Estilo del botón de subir */
#btn-subir {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background-color: var(--primary, #2c3e50); /* Usa tu color corporativo */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#btn-subir svg {
    width: 24px;
    height: 24px;
}

/* Estados de visibilidad */
.btn-subir-oculto {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.btn-subir-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#btn-subir:active {
    transform: scale(0.9);
}

/* Estilos exclusivos para los botones del Hort dels Pontos */
.pontos-btn-container {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    padding: 10px 15px 15px 15px;
}

.btn-pontos {
    cursor: pointer !important; /* Fuerza la aparición de la mano */
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent; /* Quita el cuadro azul en móviles */
}

/* Efectos de interacción */
.btn-pontos:hover {
    background-color: #f8f9fa;
    border-color: #2ecc71;
    transform: translateY(-1px);
}

.btn-pontos:active {
    transform: scale(0.96);
    background-color: #f0f0f0;
}

/* --- BANNER INSTALACIÓN PWA INLINE --- */
.install-banner-inline {
    background: linear-gradient(135deg, #1a1d21, #2c3e50);
    color: white;
    padding: 12px 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    margin: 10px auto 10px auto;
    width: 92%;
    max-width: 400px;
    animation: slideDownFade 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.install-info { display: flex; align-items: center; gap: 12px; }
.install-icon { font-size: 1.8rem; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.install-texts { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.install-texts strong { font-size: 0.85rem; letter-spacing: 0.5px; }
.install-texts span { font-size: 0.7rem; color: #aab7c4; }

.install-actions { display: flex; align-items: center; gap: 8px; }

.btn-instalar {
    background: linear-gradient(135deg, var(--primary), #27ae60);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.75rem;
    cursor: pointer !important;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.2);
    transition: transform 0.2s;
}
.btn-instalar:active { transform: scale(0.95); }

.btn-cerrar-install {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
}

/* Animación suave para imágenes con Lazy Loading */
img[loading="lazy"] {
    animation: fadeInLazy 0.5s ease-out forwards;
}

@keyframes fadeInLazy {
    from { opacity: 0; filter: blur(4px); }
    to { opacity: 1; filter: blur(0); }
}
