/* ============================================================
 * hero-search.css – Módulo buscador hero
 * Mobile-first. Incluir DESPUÉS de header-v2.css
 * ============================================================ */

/* ── Contenedor principal con imagen de fondo ── */
.hero-search {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 64px 14px 12px;
    box-sizing: border-box;
    background: url('../images/backgrounds/hero-bg.jpg') center 54% / cover no-repeat;
    background-color: #2c1810;
    overflow: visible;
}

/* Overlay oscuro + desenfoque para legibilidad */
.hero-search::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(38,20,12,0.48) 0%,
        rgba(58,34,24,0.34) 40%,
        rgba(62,38,24,0.30) 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: none;
}

/* Contenido encima del overlay */
.hero-search-inner {
    position: relative;
    z-index: 1;
    max-width: 304px;
    margin: 0 auto;
}

/* La barra de búsqueda centrada dentro del hero */
.hero-search-bar-wrap {
    margin: 0;
}

/* ============================================================
 * BARRA DE BÚSQUEDA — píldora blanca con botón rojo circular
 * ============================================================ */
.hero-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow:
        0 2px 5px rgba(0,0,0,0.07),
        0 6px 14px rgba(0,0,0,0.09),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(0,0,0,0.04);
    overflow: visible;
    height: 36px;
}

.hero-search-bar:focus-within {
    box-shadow:
        0 1px 2px rgba(0,0,0,0.08),
        0 4px 12px rgba(0,0,0,0.15),
        0 8px 28px rgba(0,0,0,0.12),
        inset 0 1px 0 rgba(255,255,255,1),
        inset 0 -1px 0 rgba(0,0,0,0.04),
    0 0 0 3px var(--brand-red-ring);
}

/* Input */
.hero-search-bar input[type="text"] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 6px 0 15px;
    font-size: 12px;
    color: #333;
    line-height: 36px;
    height: 36px;
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    box-sizing: border-box;
}

.hero-search-bar input[type="text"]::placeholder {
    color: #999;
    font-size: 12px;
}

/* Botón lupa — círculo rojo con lupa blanca */
.hero-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 31px;
    height: 31px;
    min-width: 31px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    margin: 0 3px 0 0;
    padding: 0;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    transform: scale(1.08);
}

.hero-search-btn:active {
    transform: scale(0.93);
}

.hero-search-btn:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

.hero-search-btn svg {
    width: 25px;
    height: 25px;
    fill: var(--brand-red);
}

/* ============================================================
 * 3 FILTROS RÁPIDOS (Cerca de mí, Tipo Cocina, Eventos)
 * ============================================================ */
.hero-filters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
    gap: 6px;
    margin-top: 9px;
}

.hero-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 0 8px;
    min-height: 28px;
    background: rgba(255,255,255,0.96);
    border: 1px solid #dfdfdf;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.hero-filter-btn:hover {
    background: #fff;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
    transform: translateY(-1px);
    border-color: var(--brand-red);
}

.hero-filter-btn:active {
    transform: translateY(0) scale(0.97);
}

.hero-filter-btn:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

.hero-filter-btn svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    stroke: var(--brand-red);
}

.hero-filter-btn.active {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

/* ============================================================
 * BOTÓN BUSCAR GRANDE
 * ============================================================ */
.hero-buscar-wrapper {
    margin-top: 8px;
    text-align: center;
    position: relative;
    z-index: 2;
    transform: translateY(49%);
}

.hero-buscar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 214px;
    min-height: 34px;
    padding: 0 24px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(225, 17, 18, 0.28);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: 0.2px;
}

.hero-buscar-btn:hover {
    background: var(--brand-red-dark);
    box-shadow: 0 6px 20px rgba(225,17,18,0.36);
    transform: translateY(-1px);
}

.hero-buscar-btn:active {
    transform: translateY(0) scale(0.97);
    background: var(--brand-red-darker);
}

.hero-buscar-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Con el panel abierto el botón pasa a "Cerrar" en estilo fantasma: así solo
   queda una píldora roja de Buscar visible (la del propio panel). */
.hero-buscar-btn.is-close {
    background: rgba(255,255,255,0.92);
    color: #5b4430;
    box-shadow: none;
    border: 1.5px solid rgba(91,68,48,0.25);
}
.hero-buscar-btn.is-close:hover {
    background: #fff;
    color: var(--brand-red);
    border-color: var(--brand-red);
    box-shadow: none;
}

/* ============================================================
 * PANEL DESPLEGABLE — BUSCADOR AVANZADO
 * ============================================================ */
.hero-advanced-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.hero-advanced-panel.open {
    max-height: 700px;
    opacity: 1;
    margin-top: 16px;
}

.hero-advanced-inner {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-advanced-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-advanced-grid > div {
    display: flex;
    flex-direction: column;
}

.hero-advanced-inner label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: left;
}

.hero-advanced-inner label:first-child {
    margin-top: 0;
}

.hero-advanced-inner select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    cursor: pointer;
}

/* El campo de código postal del panel avanzado de la portada. Se limita a
   .hero-advanced-grid a propósito: la página del buscador reutiliza el
   contenedor .hero-advanced-inner pero con .bf-grid dentro, y sus campos ya
   tienen su propio estilo en style.css — un selector más ancho aquí ganaría
   por orden de carga y le cambiaría el aspecto al campo "Zona". */
.hero-advanced-grid input[type="text"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}
.hero-advanced-grid input[type="text"]:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(225,17,18,0.10);
    outline: none;
}

.hero-advanced-inner select:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(225,17,18,0.10);
    outline: none;
}

.hero-advanced-inner select:hover {
    border-color: #bbb;
}

.hero-advanced-input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.hero-advanced-input:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(225,17,18,0.10);
    outline: none;
}

.hero-advanced-input:hover {
    border-color: #bbb;
}

.hero-advanced-submit {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 16px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.hero-advanced-submit:hover {
    background: var(--brand-red-dark);
}

.hero-advanced-submit:active {
    transform: scale(0.98);
}

.hero-advanced-submit:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* ============================================================
 * PANEL EVENTOS DROPDOWN (buscador de eventos)
 * ============================================================ */
.hero-events-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.hero-events-panel.open {
    max-height: 700px;
    opacity: 1;
    margin-top: 14px;
}

/* ============================================================
 * Ocultar módulos legacy que se reemplazan
 * ============================================================ */
/* Ocultar smartsearch legacy */
#smartsearch-home {
    display: none !important;
}

/* Ocultar buscador/calendario sidebar de la home */
.content .izquierda > .greybox:first-child,
.content .derecha > #calBox {
    display: none !important;
}

/* Ocultar el minimapa y form legacy buscador de la home */
#minimap, #miniform {
    display: none !important;
}

/* Force .content to allow hero to overflow for Buscar button */
.content:has(.hero-search) {
    overflow: visible !important;
    padding-top: 0 !important;
}

/* ============================================================
 * RESPONSIVE
 * ============================================================ */
@media screen and (min-width: 641px) {
    .hero-search {
        padding: 66px 14px 13px !important;
    }
    .hero-search-inner {
        max-width: 310px;
    }
    .hero-search-bar-wrap {
        margin: 0;
    }
    .hero-search-bar {
        height: 36px;
    }
    .hero-search-bar input[type="text"] {
        font-size: 12px;
        padding-left: 15px;
        line-height: 36px;
        height: 36px;
    }
    .hero-search-bar input[type="text"]::placeholder {
        font-size: 12px;
    }
    .hero-search-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        margin-right: 4px;
    }
    .hero-search-btn svg {
        width: 25px;
        height: 25px;
    }
    .hero-filter-btn {
        padding: 0 8px;
        min-height: 28px;
        font-size: 10px;
    }
    /* Panel avanzado: rejilla de 12 tramos, el MISMO sistema que las cajas de
       búsqueda grandes (.bf-c6 / .bf-c12 se definen en style.css). Con dos
       columnas iguales, los siete filtros dejaban "Precio Medio" solo en la
       última fila; ahora las filas cierran exactas y el que va suelto ocupa
       todo el ancho a propósito, justo encima del botón. */
    .hero-advanced-grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 12px 14px;
    }
    .hero-advanced-grid > div {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }
}

@media screen and (min-width: 981px) {
    .hero-search {
        padding: 80px 16px 24px;
    }
    .hero-search-inner {
        max-width: 560px;
    }
    .hero-search-bar-wrap {
        margin: 0;
    }
    .hero-search-bar {
        height: 42px;
    }
    .hero-search-bar input[type="text"] {
        font-size: 14px;
        padding-left: 18px;
        line-height: 42px;
        height: 42px;
    }
    .hero-search-bar input[type="text"]::placeholder {
        font-size: 14px;
    }
    .hero-search-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        margin-right: 4px;
    }
    .hero-search-btn svg {
        width: 26px;
        height: 26px;
    }
}

/* ── Toast notification inline ── */
.hero-toast {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #fff;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    box-sizing: border-box;
    z-index: 1000;
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.hero-toast--visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.hero-toast--error {
    background: rgba(180, 40, 40, 0.92);
}
.hero-toast--success {
    background: rgba(30, 120, 50, 0.92);
}
.hero-toast-icon {
    flex-shrink: 0;
    font-size: 16px;
}
@media screen and (max-width: 480px) {
    .hero-toast {
        white-space: normal;
        font-size: 13px;
        padding: 10px 16px;
        bottom: 10px;
    }
}

/* ============================================================
 * HOME DESTACADOS — carrusel overlay premium v2
 * ============================================================ */
/* Reset overrides de style.css */
.home-featured-section ul li,
.home-featured-section p,
.home-featured-section span {
    padding: 0 !important;
    padding-bottom: 0 !important;
    font-size: inherit;
}

.home-featured-section {
    position: relative;
    margin: 54px 0 26px;
    clear: both;
    padding: 24px 0 8px;
}

/* ── Cabecera: título izq · controles der ── */
.home-featured-head {
    margin-bottom: 18px;
}

.home-featured-head h1,
.home-featured-head h2 {
    margin: 0;
    padding: 0 !important;
    min-height: 0 !important;
    background: none !important;
    border-bottom: none !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    font-size: 30px;
    line-height: 1;
    color: #19120e;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* ── Footer: fila de pills trending + cerca de mí ── */
.home-featured-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding-top: 16px;
    padding-bottom: 4px;
    border-top: 1px solid rgba(91,68,48,0.09);
    min-height: 60px;
}

/* ── Fila de pills ── */
.hfp-pills {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    overflow: hidden;
    padding: 2px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.hfp-pills::-webkit-scrollbar { display: none; }

/* Pill: ancho igual en escritorio (sin texto "cerca de mí") */
.hfp-pill {
    flex: 1;
    min-width: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 11px 10px;
    border-radius: 999px;
    border: 1px solid rgba(91,68,48,0.18);
    background: #faf8f5;
    box-shadow: 0 1px 4px rgba(46,29,16,0.06);
    cursor: pointer;
    text-decoration: none;
    transition: border-color .18s ease, box-shadow .20s ease, transform .15s ease, background .18s ease;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
}
.hfp-pill:hover {
    background: #fff;
    border-color: rgba(225,17,18,0.30);
    box-shadow: 0 3px 14px rgba(46,29,16,0.10), 0 0 0 1px rgba(225,17,18,0.11);
    transform: translateY(-2px);
    text-decoration: none;
}
.hfp-pill:active {
    transform: translateY(0) scale(0.97);
    transition-duration: .07s;
}

/* Trending: borde rojo sutil */
.hfp-pill.hfp-trending {
    border-color: rgba(225,17,18,0.26);
    background: #fdf9f8;
}

.hfp-label {
    font-size: 12px;
    font-weight: 700;
    color: #19120e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
    letter-spacing: 0.010em;
    text-align: center;
}
/* En escritorio: label + "· cerca de mí" visibles */
.hfp-sub {
    display: inline;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--brand-red);
    white-space: nowrap;
    line-height: 1;
    opacity: 0.72;
}
/* Separador · (solo visible en móvil junto a .hfp-sub) */
.hfp-sub::before {
    content: '\00B7';
    margin: 0 5px;
    color: rgba(91,68,48,0.40);
    font-size: 13px;
    font-weight: 400;
    opacity: 1;
}

/* Estado de carga */
.hfp-pill.hfp-loading { opacity: 0.50; pointer-events: none; }


/* ── Botones de navegación: círculos oscuros estilo premium ── */
.home-featured-nav {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #1c1c1e;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.22), 0 1px 4px rgba(0,0,0,0.12);
    transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s ease, background .18s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    position: static;
}
.home-featured-nav svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}
.home-featured-nav:hover {
    background: #2d2d30;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.28), 0 2px 6px rgba(0,0,0,0.14);
}
.home-featured-nav:active {
    transform: scale(0.93);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition-duration: .08s;
}
.home-featured-nav:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

/* ── Carrusel: container query para 3 tarjetas exactas ── */
.home-featured-carousel {
    position: relative;
    container-type: inline-size;
    overflow: hidden;
    border-radius: 24px;
}

.home-featured-carousel .paginador,
.home-featured-carousel #pagination {
    display: none !important;
}

/* ── Track ── */
ul.home-featured-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 4px 0 16px;
    margin: 0;
    list-style: none;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    height: auto;
    line-height: normal;
    float: none;
    clear: none;
    border: none;
    background: none;
}
ul.home-featured-track::-webkit-scrollbar { display: none; }

/* ── Tarjeta overlay — 3 exactas por fila ── */
ul.home-featured-track li {
    scroll-snap-align: start;
    flex: 0 0 calc((100cqi - 32px) / 3);
    width: calc((100cqi - 32px) / 3);
    min-width: 0;
    position: relative;
    height: 320px;
    display: block;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(14,6,3,0.22), 0 4px 10px rgba(14,6,3,0.10);
    padding: 0;
    margin: 0;
    line-height: normal;
    float: none;
    clear: none;
    background: #2c1a10;
    transition: transform .26s ease, box-shadow .26s ease;
}
ul.home-featured-track li:hover {
    transform: translateY(-5px) scale(1.016);
    box-shadow: 0 26px 50px rgba(14,6,3,0.28), 0 6px 16px rgba(14,6,3,0.12);
}

/* Imagen de fondo full-card */
ul.home-featured-track li a.thumb {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: block;
    width: 100%; height: 100%;
    overflow: hidden;
    border-radius: 0;
    float: none; clear: none;
    z-index: 0;
    background: linear-gradient(90deg, #3a2418 0%, #5c3a26 40%, #4a2e1e 60%, #3a2418 100%);
    background-size: 300% 100%;
    animation: hf-shimmer 1.8s ease-in-out infinite;
}
@keyframes hf-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
ul.home-featured-track li a.thumb::after { display: none; }

ul.home-featured-track li a.thumb img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .55s ease;
    margin: 0;
}
ul.home-featured-track li:hover a.thumb img {
    transform: scale(1.08);
    filter: saturate(1.06);
}

/* Gradiente oscuro sobre imagen */
ul.home-featured-track li::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        0deg,
        rgba(10,4,2,0.93) 0%,
        rgba(10,4,2,0.58) 36%,
        rgba(10,4,2,0.14) 64%,
        rgba(10,4,2,0.02) 100%
    );
    pointer-events: none;
    z-index: 1;
    border-radius: 22px;
}

ul.home-featured-track li div { overflow: visible; height: auto; }

/* Texto anclado al pie de la tarjeta */
ul.home-featured-track li .lista {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    display: flex;
    flex-direction: column;
    padding: 14px 13px 14px;
    z-index: 2;
    background: none;
    min-width: 0;
    width: auto;
    overflow: hidden;
    height: auto;
}
ul.home-featured-track li .lista,
ul.home-featured-track li .lista * {
    float: none !important;
    clear: none !important;
}
ul.home-featured-track li a {
    color: inherit; font-weight: inherit; display: inline; clear: none;
}
ul.home-featured-track li strong {
    display: inline; clear: none; float: none;
}
ul.home-featured-track li a.flecha {
    display: none !important;
    width: 0 !important; height: 0 !important;
    min-width: 0 !important; margin: 0 !important; padding: 0 !important;
}

/* Pills de localización */
.home-featured-place {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-bottom: 7px;
    padding: 0 !important;
    overflow: hidden;
}
.home-featured-place span {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px !important;
    border-radius: 999px;
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: rgba(255,255,255,0.92);
    font-size: 8px !important;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.20);
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 48%;
}

ul.home-featured-track li h3 {
    margin: 0 0 5px;
    padding: 0 !important;
    line-height: 1.15;
}
ul.home-featured-track li h3 a {
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.02em;
    font-family: Georgia, 'Times New Roman', serif;
    text-shadow: 0 1px 6px rgba(0,0,0,0.45);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-featured-desc {
    margin: 0 0 9px;
    padding: 0 !important;
    padding-bottom: 0 !important;
    color: rgba(255,255,255,0.68);
    font-size: 11px !important;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 3em;
}
.home-featured-desc::after { display: none; }

/* ── Pills de tags — los de categoría se truncan, el precio nunca ── */
.home-featured-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    padding: 0 !important;
    align-items: center;
    overflow: hidden;
    min-width: 0;
}
/* Tags de categoría: pueden encogerse y truncar */
.home-featured-tags span:not(.home-featured-price) {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px !important;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: rgba(255,255,255,0.88);
    font-size: 9px !important;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(255,255,255,0.16);
    /* Truncar si es demasiado largo (los nombres de tipo pueden ser largos,
       ej. "Pub - Bar de Copas": con el precio compacto hay sitio de sobra) */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
    max-width: 128px;
}
/* Precio: nunca se trunca ni encoge */
.home-featured-tags .home-featured-price {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
    min-height: 22px;
    padding: 0 10px !important;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: #fff;
    font-size: 8.5px !important;
    font-weight: 800;
    white-space: nowrap;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 8px rgba(225,17,18,0.35);
    overflow: visible;
}

.home-featured-footer-row { display: none; }

/* Hover */
ul.home-featured-track li:hover h3 a {
    color: #fff;
    text-shadow: 0 0 22px rgba(255,220,170,0.55);
}
ul.home-featured-track li:hover .home-featured-place span {
    background: rgba(255,255,255,0.26);
    border-color: rgba(255,255,255,0.35);
}

/* ════════════════════════════════════════
   MÓVIL — grid 2×2 desplazable
   ════════════════════════════════════════ */
@media screen and (max-width: 640px) {
    .home-featured-section {
        margin-top: 32px;
        padding-top: 20px;
    }
    .home-featured-head {
        margin-bottom: 14px;
    }
    .home-featured-head h1,
.home-featured-head h2 {
        font-size: 24px;
    }
    /* Flechas: posición absoluta centrada entre las 2 filas del grid */
    /* padding(20) + h1(24) + margin(14) + medio_carril(195) = 253px */
    .home-featured-nav {
        position: absolute;
        top: 253px;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background: rgba(28,28,30,0.50);
        box-shadow: 0 1px 6px rgba(0,0,0,0.18);
        z-index: 5;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    .home-featured-nav svg {
        width: 12px;
        height: 12px;
    }
    .home-featured-nav:hover {
        background: rgba(28,28,30,0.75);
        transform: translateY(-50%) scale(1.06);
        box-shadow: 0 2px 10px rgba(0,0,0,0.22);
    }
    .home-featured-prev { left: 4px; }
    .home-featured-next { right: 4px; }
    /* Footer en móvil: solo pills, sin flechas en el flujo */
    .home-featured-foot {
        margin-top: 12px;
        min-height: auto;
        padding-left: 4px;
        padding-right: 4px;
    }
    /* En móvil: grid 2×2, 2 pills arriba + 2 abajo, todo visible sin scroll */
    .hfp-pills {
        flex: none;
        width: 100%;
        flex-wrap: wrap;
        overflow: visible;
        justify-content: center;
        scroll-snap-type: none;
        gap: 8px;
        padding: 2px 0;
    }
    .hfp-pill {
        flex: 0 0 calc(50% - 4px);
        flex-direction: column;
        padding: 9px 8px;
        justify-content: center;
        gap: 2px;
    }
    /* Apiladas (label arriba, "cerca de mí" debajo): en horizontal el
       label se veía truncado porque .hfp-sub no encogía y se comía el
       espacio del pill al 50% de ancho. Verticalmente ambas líneas
       tienen el ancho completo del pill y no hace falta truncar nada. */
    .hfp-label {
        white-space: normal;
        max-width: 100%;
    }
    .hfp-sub {
        display: block;
        font-size: 10px;
        font-weight: 500;
        color: var(--brand-red);
        white-space: nowrap;
        line-height: 1;
        opacity: 0.75;
    }
    .hfp-sub::before { content: none; }
    /* Carrusel sin clip para el grid */
    .home-featured-carousel {
        overflow: visible;
        border-radius: 0;
        container-type: normal;
    }
    /* Grid 2 filas × N columnas, scroll horizontal */
    ul.home-featured-track {
        display: grid;
        grid-template-rows: repeat(2, 190px);
        grid-auto-flow: column;
        /* % del propio track (no vw): así siempre son exactas 2 columnas
           visibles sin que se cuele un trocito de la tercera por el
           padding/margen real de la página, que "50vw" no tenía en cuenta. */
        grid-auto-columns: calc(50% - 5px);
        height: calc(2 * 190px + 10px); /* 390px */
        gap: 10px;
        padding: 4px 2px 16px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        /* reset flex */
        flex-wrap: initial;
    }
    ul.home-featured-track li {
        /* reset desktop flex sizing */
        flex: none;
        width: 100%;
        min-width: 0;
        height: 190px;
    }
    ul.home-featured-track li h3 a {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    /* Descripción oculta en 2×2 para ganar espacio */
    .home-featured-desc {
        display: none;   /* movil-ok: la descripcion del destacado; en la rejilla 2x2 no cabe, y el nombre, la zona y el precio siguen ahi */
    }
    .home-featured-place {
        margin-bottom: 3px;
    }
    .home-featured-place span {
        font-size: 7px !important;
        padding: 2px 6px !important;
    }
    .home-featured-tags span:not(.home-featured-price) {
        display: none !important;   /* movil-ok: la etiqueta de cocina del destacado; el precio si se queda, y la cocina se lee entera al abrir la ficha */
    }
    /* Precio corto via data-short (ej: "€30-45") */
    .home-featured-tags .home-featured-price {
        margin-left: 0;
        font-size: 0 !important;
        padding: 0 !important;
        flex-shrink: 1;
    }
    .home-featured-tags .home-featured-price::before {
        content: attr(data-short);
        font-size: 9px;
        font-weight: 800;
        padding: 0 10px;
        line-height: 22px;
        display: block;
    }
}

/* ════════════════════════════════════════
   ESCRITORIO ≥ 641px
   ════════════════════════════════════════ */
@media screen and (min-width: 641px) {
    .home-featured-head h1,
.home-featured-head h2 { font-size: 30px; }

    /* ── Carrusel con hueco lateral para las flechas ── */
    .home-featured-carousel {
        margin-left: 44px;
        margin-right: 44px;
    }

    /* ── Flechas: salen del flujo del footer, se fijan a los lados del carrusel ── */
    .home-featured-nav {
        position: absolute;
        /* padding-top(24) + h1(30) + head-margin(18) + carousel-half(160) = 232px */
        top: 232px;
        transform: translateY(-50%);
        z-index: 5;
        width: 36px;
        height: 36px;
        background: rgba(28,28,30,0.72);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.20);
    }
    .home-featured-nav svg {
        width: 14px;
        height: 14px;
    }
    .home-featured-nav:hover {
        background: rgba(28,28,30,0.92);
        transform: translateY(-50%) scale(1.08);
        box-shadow: 0 4px 16px rgba(0,0,0,0.28);
    }
    .home-featured-nav:active {
        transform: translateY(-50%) scale(0.94);
    }
    .home-featured-prev { left: 4px; }
    .home-featured-next { right: 4px; }
}


/* ============================================================
 * HOME AGENDA DE EVENTOS
 * ============================================================ */

.home-agenda-section {
    position: relative;
    margin: 0 0 24px;
    clear: both;
    padding: 24px 0 8px;
    background: transparent;
    border-top: 1px solid rgba(91,68,48,0.10);
}

/* Section title — matches Destacados h1 */
.home-agenda-head {
    display: block;
    margin-bottom: 14px;
}

.home-agenda-head h1,
.home-agenda-head h2 {
    margin: 0;
    padding: 0 !important;
    min-height: 0 !important;
    background: none !important;
    border-bottom: none !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    font-size: 30px;
    line-height: 1;
    color: #19120e;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Reset .content overrides (ver gotcha #1: la regla legacy `.content span`) */
.home-agenda-section h2,
.home-agenda-section p,
.home-agenda-section span,
.home-agenda-section button {
    padding: 0 !important;
    padding-bottom: 0 !important;
    font-size: inherit;
}
/* ⚠ …pero el TÍTULO de la sección no. Este reinicio va después de
   `.home-agenda-head h2` y tiene su misma especificidad (0,1,1), así que ganaba
   el empate por orden y dejaba «Agenda de eventos» en 14px en vez de 30 — el
   mismo tamaño que el texto de al lado. Se ve al medirlo, no leyendo la hoja.
   Con `.home-agenda-section .home-agenda-head h2` (0,2,1) el título manda. */
.home-agenda-section .home-agenda-head h1,
.home-agenda-section .home-agenda-head h2 {
    font-size: 30px;
}
/* Y en el teléfono, los MISMOS 24px que «Destacados». La media de 640px de más
   arriba solo alcanza al título de destacados; sin esto, en un móvil un título
   quedaba en 24 y el otro en 30, que es justo el descuadre que hay que evitar
   entre dos piezas iguales. */
@media screen and (max-width: 640px) {
    .home-agenda-section .home-agenda-head h1,
    .home-agenda-section .home-agenda-head h2 {
        font-size: 24px;
    }
}

/* ---- Calendar ---- */

.home-agenda-calendar {
    max-width: 100%;
    background: transparent;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 24px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    margin-bottom: 20px;
}

.home-agenda-calendar h2 {
    display: none;
}

/* Month/year nav container */
.agenda-cal-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 12px 18px;
    background: #fff;
}

/* Each navigation row */
.agenda-cal-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.agenda-cal-month {
    font-size: 15px !important;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    flex: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.agenda-cal-month {
    font-size: 15px !important;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    flex: 1;
    min-width: 90px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.agenda-cal-year-label {
    font-size: 12px !important;
    font-weight: 600;
    color: #999;
    text-align: center;
    flex: 1;
    min-width: 40px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.04em;
}

/* Year row arrows: slightly smaller */
.agenda-cal-nav-year .agenda-cal-arrow {
    width: 22px;
    height: 22px;
    font-size: 13px;
    border-radius: 6px;
}

.agenda-cal-arrow {
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
    padding: 0 !important;
    line-height: 1;
}

.agenda-cal-arrow:hover {
    background: #e8e8e8;
    color: #333;
}

/* Calendar grid */
.agenda-cal-grid {
    padding: 14px 24px 14px;
    background: #f0f0f0;
}

.agenda-cal-dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 6px;
}

.agenda-cal-dow span {
    font-size: 11px !important;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.agenda-cal-days {
    display: flex;
    flex-direction: column;
}

.cal-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px 0;
}

.agenda-cal-days span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin: 0 auto;
    font-size: 14px !important;
    font-weight: 500;
    color: #444;
    border-radius: 50%;
    padding: 0 !important;
    transition: all .15s ease;
    cursor: default;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
}

.agenda-cal-days span.empty {
    visibility: hidden;
}

/* Event day */
.agenda-cal-days span.has-event {
    background: var(--brand-red);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.agenda-cal-days span.has-event:hover {
    background: var(--brand-red-dark);
    transform: scale(1.12);
}

/* Today (no event) */
.agenda-cal-days span.is-today:not(.has-event) {
    background: #f0f0f0;
    color: #1a1a1a;
    font-weight: 700;
}

/* Today with event */
.agenda-cal-days span.is-today.has-event {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand-red);
}

/* CTA button */
.agenda-cal-cta {
    display: inline-block;
    align-self: center;
    width: fit-content;
    margin: 14px auto 18px;
    padding: 8px 18px !important;
    text-align: center;
    background: var(--brand-red);
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 10px;
    text-decoration: none;
    transition: background .2s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--brand-red);
}

.agenda-cal-cta-wrap {
    background: #f0f0f0;
    text-align: center;
    padding: 0;
    border-radius: 0 0 16px 16px;
}

.agenda-cal-cta:hover {
    background: var(--brand-red-dark);
}

/* ---- Próximos Eventos (carousel) ---- */

.home-agenda-events {
    margin-top: 8px;
}

.agenda-events-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.home-agenda-events > .agenda-events-header > h2 {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    background: none !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    font-size: 30px;
    line-height: 1;
    color: #19120e;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: -0.03em;
}

/* Track wrapper with nav arrows */
.agenda-events-track-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.agenda-events-nav {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #666;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .18s ease;
    padding: 0 !important;
    line-height: 1;
}

.agenda-events-nav:hover {
    background: #f0f0f0;
    color: #333;
    border-color: #ccc;
}

/* Scrollable track */
.agenda-events-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    padding: 4px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.agenda-events-track::-webkit-scrollbar {
    display: none;
}

/* Tabs */
.agenda-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    align-items: center;
}

.agenda-tab {
    padding: 10px 12px !important;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 13px !important;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s ease;
    background: #fff;
    color: #555;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex: 1;
    text-align: center;
}

.agenda-tab.active {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

.agenda-tab:hover:not(.active) {
    background: #fafafa;
    border-color: #ccc;
    color: #333;
}

/* City select — inline with tabs */
.agenda-city-select.agenda-tab-style {
    padding: 10px 34px 10px 12px !important;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 13px !important;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #555;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all .18s ease;
    white-space: nowrap;
    flex: 1;
    text-align: center;
}

.agenda-city-select.agenda-tab-style:hover {
    border-color: #ccc;
    background-color: #fafafa;
}

.agenda-city-select.agenda-tab-style:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 2px rgba(201,15,7,0.12);
}

/* Footer: view all link */
.agenda-events-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    padding: 0 4px;
}

.agenda-events-viewall {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 26px;
    border: 1.5px solid var(--brand-red);
    border-radius: 20px;
    color: var(--brand-red) !important;
    font-size: 11px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.agenda-events-viewall:hover {
    background: var(--brand-red);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(225,17,18,0.28);
    text-decoration: none;
}

.agenda-events-viewall:active {
    transform: scale(0.97);
}

/* Events list (now horizontal) */
.agenda-event-card {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: all .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    flex: 0 0 calc((100% - 28px) / 3);
    min-width: 0;
    max-width: calc((100% - 28px) / 3);
}

.agenda-event-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #ddd;
    transform: translateY(-1px);
}

/* Event image */
/* ⚠ La caja lleva TAMBIÉN `.eb-foto` (la pone el JS al pintar la tarjeta) y de
   ahí sale todo lo que hace que la foto llene el recuadro. Aquí solo va lo
   propio de esta tarjeta: cuánto ocupa. Ver el contrato en `style.css`.

   `align-self:stretch` + `min-height` es la ALTURA QUE NO DEPENDE DE LA FOTO
   que exige el contrato: la caja mide lo que mida la tarjeta y, como poco, el
   mínimo. Antes medía lo que midiera el archivo del cliente. */
.agenda-event-img {
    --eb-marco-foto: 1;          /* declara la caja como marco: ver style.css */
    flex: 0 0 90px;
    width: 90px;
    align-self: stretch;
    min-height: 80px;
    background: #f0f0f0;
}

.agenda-event-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(0,0,0,0.12) 100%);
    pointer-events: none;
}

/* Medidas y encaje: los pone `.eb-foto > img` en `style.css`. Repetirlos aquí
   era justo el problema — dos sitios diciendo lo mismo hasta que uno cambia. */
.agenda-event-img img {
    transition: transform .35s ease;
}

.agenda-event-card:hover .agenda-event-img img {
    transform: scale(1.04);
}

/* Event info */
.agenda-event-info {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.agenda-event-info h3 {
    margin: 0 0 4px !important;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.agenda-event-card:hover h3 {
    color: var(--brand-red);
}

.agenda-event-date {
    margin: 0 0 2px;
    padding: 0 !important;
    font-size: 13px !important;
    font-weight: 600;
    color: var(--brand-red);
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.agenda-event-city {
    margin: 0;
    padding: 0 !important;
    font-size: 12px !important;
    font-weight: 500;
    color: #888;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* States */
.agenda-loading {
    text-align: center;
    padding: 28px 20px !important;
    color: #999;
    font-size: 13px !important;
}

.agenda-no-events {
    text-align: center;
    padding: 28px 20px !important;
    color: #999;
    font-size: 13px !important;
    font-style: italic;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid #eee;
}

/* ---- DESKTOP: nav bar + event grid (≥641px) ---- */
@media screen and (min-width: 641px) {

    /* ── Calendar bar: anclada con línea inferior, sin caja blanca ── */
    .home-agenda-calendar {
        flex-direction: row;
        align-items: stretch;
        border-radius: 0;
        padding: 0;
        margin-bottom: 32px;
        background: transparent;
        border: none;
        border-bottom: 2px solid #19120e;
        box-shadow: none;
        overflow: visible;
    }

    /* ── Nav (izquierda): jerarquía año/mes ── */
    .agenda-cal-nav {
        flex-shrink: 0;
        border-bottom: none;
        border-right: 1px solid #19120e;
        padding: 12px 24px 12px 0;
        background: transparent;
        gap: 2px;
        justify-content: center;
    }

    /* Año: etiqueta pequeña, negro, allcaps */
    .agenda-cal-year-label {
        font-size: 10px !important;
        font-weight: 700;
        color: #19120e;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        min-width: 38px;
    }
    .agenda-cal-nav-year .agenda-cal-arrow {
        width: 18px;
        height: 18px;
        font-size: 11px;
        background: transparent;
        color: #ccc;
        border-radius: 4px;
        border: none;
    }
    .agenda-cal-nav-year .agenda-cal-arrow:hover {
        background: rgba(91,68,48,0.06);
        color: #888;
    }

    /* Mes: grande, bold, protagonista */
    .agenda-cal-month {
        font-size: 20px !important;
        font-weight: 800;
        color: #19120e;
        min-width: 90px;
        letter-spacing: -0.02em;
    }
    /* Flechas de mes: outlined, giran a rojo en hover */
    .agenda-cal-nav-row:not(.agenda-cal-nav-year) .agenda-cal-arrow {
        width: 26px;
        height: 26px;
        font-size: 15px;
        background: transparent;
        border: 1.5px solid rgba(91,68,48,0.18);
        color: #888;
        border-radius: 7px;
    }
    .agenda-cal-nav-row:not(.agenda-cal-nav-year) .agenda-cal-arrow:hover {
        background: rgba(225,17,18,0.06);
        border-color: var(--brand-red);
        color: var(--brand-red);
    }

    /* ── Grid (derecha): DOW arriba + pills abajo ── */
    .agenda-cal-grid {
        flex: 1;
        padding: 10px 0 10px 24px;
        background: transparent;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
    }
    .agenda-cal-days {
        width: 100%;
    }
    /* DOW visible en desktop, alineado con los círculos */
    .agenda-cal-dow {
        display: grid;
        column-gap: 6px;
        margin-bottom: 0;
    }
    .agenda-cal-dow span {
        font-size: 11px !important;
        font-weight: 700;
        color: #666;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }
    .cal-week {
        gap: 6px;
    }
    /* Pills: todos los días visibles, no solo los rojos */
    .agenda-cal-days span {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        font-size: 13px !important;
        font-weight: 600;
        background: rgba(91,68,48,0.05);
        color: #777;
        border: 1.5px solid #19120e;
        margin: 0 auto;
        box-shadow: none;
    }
    /* Eventos: rojo con sombra pronunciada */
    .agenda-cal-days span.has-event {
        background: var(--brand-red);
        color: #fff !important;
        font-weight: 700;
        border-color: transparent;
        box-shadow: 0 3px 10px rgba(225,17,18,0.30);
    }
    /* Hoy sin evento: círculo con borde rojo */
    .agenda-cal-days span.is-today:not(.has-event) {
        background: #fff;
        border: 2px solid var(--brand-red);
        color: var(--brand-red) !important;
        font-weight: 700;
        box-shadow: 0 2px 8px rgba(225,17,18,0.12);
    }
    /* Hoy con evento */
    .agenda-cal-days span.is-today.has-event {
        box-shadow: 0 3px 10px rgba(225,17,18,0.30), 0 0 0 2px rgba(225,17,18,0.20);
    }
    .agenda-cal-days span.empty {
        visibility: hidden;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }
    .agenda-cal-cta-wrap {
        display: none;
    }

    /* ── Events header → row layout ── */
    .agenda-events-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 20px;
    }
    .agenda-events-header h2 {
        flex-shrink: 0;
    }
    .agenda-tabs {
        flex: 1;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

    /* ── Events → 3-column grid instead of carousel ── */
    .agenda-events-nav {
        display: none;
    }
    .agenda-events-track-wrap {
        display: block;
    }
    .agenda-events-track {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        overflow: visible;
    }
    /* Event cards fill their grid cell vertically */
    /* ⚠ `stretch`, NO `flex-start`. Con `flex-start` la caja de la foto se
       queda sin altura propia y vuelve la banda gris: es lo que pasó hasta el
       2026-08-22. El texto no se descoloca por esto — lo sube su propio
       `justify-content:flex-start`, unas líneas más abajo. */
    .agenda-event-card {
        flex: none;
        min-width: 0;
        max-width: none;
        width: auto;
        align-items: stretch;
    }
    .agenda-event-img {
        flex: 0 0 100px;
        width: 100px;
        min-height: 90px;
    }
    .agenda-event-info {
        padding: 12px 14px;
        text-align: left;
        justify-content: flex-start;
    }
    .agenda-event-info h3 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }
    .agenda-event-date {
        font-size: 12px !important;
    }
    /* Footer: alineado a la derecha en desktop */
    .agenda-events-footer {
        justify-content: flex-end;
    }
}

    .agenda-event-info h3 {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }
    .agenda-event-date {
        font-size: 12px !important;
    }
}

/* ================================================================
 * MÁS VISITADOS — Ranking redesign (all pages - global)
 * ================================================================ */

/* Sección: mismo separador y espaciado que el resto */
.sidebar.left .sv-section {
    padding: 20px 0 8px;
    border-top: 1px solid rgba(91,68,48,0.10);
}
.sidebar.left .sv-section-head {
    margin-bottom: 14px;
    padding-bottom: 0;
}
/* Título: estilo Georgia desktop (22px, sidebar estrecho) → 30px en móvil.
   Se aplica también a .fsb-inline-mobile (bloque de Información duplicado
   en móvil, fuera de .sidebar.left) para que use el mismo negro que en
   escritorio en vez de caer al rojo por defecto de .glass-title. */
.sidebar.left .sv-section-title,
.fsb-inline-mobile .sv-section-title {
    font-size: 22px !important;
    line-height: 1 !important;
    color: #19120e !important;
    font-family: Georgia, 'Times New Roman', serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    border-bottom: none !important;
    text-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Lista: flex column con separación entre tarjetas */
ul.populares {
    counter-reset: rank-counter;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Tarjeta contenida */
ul.populares li.sv-card {
    counter-increment: rank-counter;
    border-bottom: none !important;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
ul.populares li.sv-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.11), 0 2px 5px rgba(0,0,0,0.06);
}

/* Badge de ranking: pseudo-elemento como ítem flex antes del texto */
ul.populares li.sv-card .sv-card-inner {
    padding: 10px;
    gap: 8px;
    align-items: center;
}
ul.populares li.sv-card .sv-card-inner::before {
    content: counter(rank-counter);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    background: var(--brand-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex-shrink: 0;
    align-self: center;
    box-shadow: 0 2px 5px rgba(225,17,18,0.28);
}

/* Categoría: de texto rojo a pill sutil */
.sv-card-cat {
    display: inline-block;
    padding: 2px 7px !important;
    background: rgba(225,17,18,0.08);
    color: var(--brand-red);
    border-radius: 20px;
    font-size: 8px !important;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

/* Nombre: ligeramente más protagonismo */
.sv-card-name {
    font-size: 12px !important;
    font-weight: 700;
    color: #19120e;
    line-height: 1.3;
    margin-bottom: 3px;
    -webkit-line-clamp: 2;
}

/* Localización */
.sv-card-loc {
    font-size: 10px !important;
    color: #888;
    margin-bottom: 2px;
}

/* Meta/precio: discreto */
.sv-card-meta {
    font-size: 9px !important;
    color: #bbb;
}
.sv-price {
    color: #aaa !important;
}

/* Imagen: cuadrada, más radio de esquina */
.sv-card-right {
    flex-shrink: 0;
    width: 60px;
}
.sv-card-right a,
.sv-card-right a.sv-card-img-link {
    width: 60px !important;
    height: 60px !important;
    border-radius: 10px;
    background: #f0ece7;
}

/* Móvil: título 30px como el resto de secciones */
@media screen and (max-width: 640px) {
    .sidebar.left .sv-section-title,
    .fsb-inline-mobile .sv-section-title {
        font-size: 30px !important;
        letter-spacing: -0.03em !important;
    }
    ul.populares li.sv-card .sv-card-name {
        font-size: 13px !important;
    }
}

/* ---- Flatpickr brand override ---- */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--brand-red);
    border-color: var(--brand-red);
}
.flatpickr-day.inRange {
    background: rgba(225,17,18,0.12);
    border-color: transparent;
    box-shadow: -5px 0 0 rgba(225,17,18,0.12), 5px 0 0 rgba(225,17,18,0.12);
}
.flatpickr-day:hover {
    background: rgba(225,17,18,0.08);
    border-color: rgba(225,17,18,0.2);
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--brand-red);
}

/* ---- Botón "Buscar eventos" + panel desplegable (base = móvil) ---- */
.agenda-desktop-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    margin-top: -10px;
}
.agenda-desktop-cta {
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}
.home-agenda-section button.agenda-desktop-cta {
    padding: 10px 24px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}
.agd-arrow {
    display: inline-block;
    transition: transform .25s ease;
    font-size: 13px;
}
.agenda-desktop-cta.is-active .agd-arrow {
    transform: rotate(180deg);
}
/* Panel desplegable */
.agenda-search-panel {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height .38s ease, opacity .3s ease;
    background: rgba(91,68,48,0.04);
    border: 1px solid rgba(91,68,48,0.12);
    border-radius: 10px;
    margin-top: 10px;
}
.agenda-search-panel.is-open {
    max-height: 440px; /* suficiente para 3 filas de campos en móvil */
    opacity: 1;
}
.agenda-search-panel form {
    padding: 14px 14px 12px;
}
.asf-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas en móvil */
    gap: 10px 12px;
    margin-bottom: 12px;
}
.asf-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.asf-field label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    color: #888;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.asf-field select,
.asf-field input[type="text"] {
    width: 100%;
    padding: 7px 10px;
    border: 1.5px solid rgba(91,68,48,0.20);
    border-radius: 7px;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color .18s;
}
.asf-field select:focus,
.asf-field input[type="text"]:focus {
    border-color: #19120e;
}
/* Flatpickr añade clase .flatpickr-input que resetea estilos: revertir */
.asf-field .flatpickr-input {
    width: 100% !important;
    padding: 7px 10px !important;
    border: 1.5px solid rgba(91,68,48,0.20) !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    color: #1a1a1a !important;
    background: #fff !important;
    outline: none !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: border-color .18s !important;
    -webkit-appearance: none;
    appearance: none;
}
.asf-field .flatpickr-input:focus {
    border-color: #19120e !important;
}
.asf-submit-wrap {
    display: flex;
    justify-content: center; /* centrado en móvil */
}
.asf-submit {
    padding: 9px 28px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    cursor: pointer;
    transition: background .18s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.asf-submit:hover {
    background: #b80d0e;
}
/* Desktop: 3 columnas, panel más compacto, botón alineado a la derecha */
@media screen and (min-width: 641px) {
    .agenda-desktop-cta-wrap {
        margin-bottom: 28px;
        margin-top: -20px;
    }
    .agenda-search-panel.is-open {
        max-height: 260px;
    }
    .agenda-search-panel form {
        padding: 18px 20px 14px;
    }
    .asf-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px 16px;
        margin-bottom: 14px;
    }
    .asf-submit-wrap {
        justify-content: flex-end;
    }
}

/* ---- RESPONSIVE MÓVIL (≤640px) ---- */

@media screen and (max-width: 640px) {
    /* Calendario: mismo layout horizontal que desktop, adaptado al ancho */
    .home-agenda-calendar {
        flex-direction: row;
        align-items: stretch;
        border-radius: 0;
        padding: 0;
        background: transparent;
        border: none;
        border-bottom: 2px solid #19120e;
        box-shadow: none;
        overflow: visible;
        margin-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    /* Nav izquierda: ancho fijo para que no desplace el grid */
    .agenda-cal-nav {
        flex: 0 0 145px;
        width: 145px;
        border-bottom: none;
        border-right: 1px solid #19120e;
        padding: 8px 10px 8px 0;
        background: transparent;
        gap: 2px;
        justify-content: center;
    }
    .agenda-cal-year-label {
        font-size: 9px !important;
        font-weight: 700;
        color: #19120e;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        min-width: 0;
    }
    .agenda-cal-nav-year .agenda-cal-arrow {
        width: 16px;
        height: 16px;
        font-size: 10px;
        background: transparent;
        color: #ccc;
        border: none;
        border-radius: 4px;
    }
    .agenda-cal-nav-year .agenda-cal-arrow:hover {
        background: rgba(91,68,48,0.06);
        color: #888;
    }
    .agenda-cal-month {
        font-size: 16px !important;
        font-weight: 800;
        color: #19120e;
        min-width: 0;
        overflow: hidden;
        white-space: nowrap;
        letter-spacing: -0.02em;
    }
    .agenda-cal-nav-row:not(.agenda-cal-nav-year) .agenda-cal-arrow {
        width: 22px;
        height: 22px;
        font-size: 13px;
        background: transparent;
        border: 1.5px solid rgba(91,68,48,0.18);
        color: #888;
        border-radius: 6px;
        flex-shrink: 0;
    }
    .agenda-cal-nav-row:not(.agenda-cal-nav-year) .agenda-cal-arrow:hover {
        background: rgba(225,17,18,0.06);
        border-color: var(--brand-red);
        color: var(--brand-red);
    }
    /* Grid derecha */
    .agenda-cal-grid {
        flex: 1;
        min-width: 0;
        padding: 8px 4px 8px 10px;
        background: transparent;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
    }
    .agenda-cal-dow {
        column-gap: 2px;
    }
    .agenda-cal-dow span {
        font-size: 9px !important;
        font-weight: 700;
        color: #666;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
    /* Solo semana actual, círculos más pequeños */
    .cal-week {
        gap: 2px;
    }
    .cal-week:not(.current-week) {
        display: none;   /* movil-ok: CODIGO MUERTO: ninguna plantilla emite .cal-week desde que el calendario se rehizo el 2026-08-12 (comprobado, 0 nodos) */
    }
    .agenda-cal-days span {
        width: 26px;
        height: 26px;
        font-size: 11px !important;
        font-weight: 600;
        background: rgba(91,68,48,0.05);
        color: #777;
        border: 1.5px solid #19120e;
        border-radius: 50%;
        box-shadow: none;
    }
    .agenda-cal-days span.has-event {
        background: var(--brand-red);
        color: #fff !important;
        border-color: transparent;
        box-shadow: 0 2px 8px rgba(225,17,18,0.30);
    }
    .agenda-cal-days span.is-today:not(.has-event) {
        background: #fff;
        border: 2px solid var(--brand-red);
        color: var(--brand-red) !important;
        font-weight: 700;
    }
    .agenda-cal-days span.is-today.has-event {
        box-shadow: 0 2px 8px rgba(225,17,18,0.30), 0 0 0 2px rgba(225,17,18,0.20);
    }
    .agenda-cal-days span.empty {
        visibility: hidden;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }
    /* Ocultar el viejo botón VER MÁS EVENTOS */
    .agenda-cal-cta-wrap {
        display: none;   /* movil-ok: el boton «Ver mas eventos» viejo; hay otros dos visibles que llevan al mismo sitio (/eventos.html) */
    }

    /* Eventos */
    .agenda-events-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    /* Eventos: grid 2 columnas (igual que desktop usa 3) */
    .agenda-events-track-wrap {
        display: block;
    }
    .agenda-events-track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        overflow: visible;
    }
    /* ⚠ `stretch`, NO `flex-start`: ver la nota de la versión de escritorio. */
    .agenda-event-card {
        flex: none;
        min-width: 0;
        max-width: none;
        width: auto;
        align-items: stretch;
    }
    /* ⚠ AQUI PONIA `display:none`. Con un numero IMPAR de eventos el ultimo
       se ESCONDIA para que la rejilla quedara siempre a 2+2 — y con UN solo
       evento no se veia NINGUNO: la seccion salia vacia en el telefono
       mientras en el ordenador se veia bien. Medido el 2026-09-03: «Hoy»
       1 evento → 0 visibles, «Este fin de semana» 3 → 2, «Octubre» 5 → 4.
       Se pierde SIEMPRE el ultimo cuando son impares.
       Ahora ocupa las dos columnas: no se esconde nada y la rejilla sigue
       cerrando. Esconderle un evento al visitante para que la cuadricula
       quede bonita es cambiar contenido por estetica. */
    .agenda-events-track > .agenda-event-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
    .agenda-event-img {
        flex: 0 0 62px;
        width: 62px;
        min-height: 72px;
    }
    .agenda-event-info {
        padding: 8px 10px;
    }
    .agenda-event-info h3 {
        font-size: 12px !important;
        margin-bottom: 4px !important;
    }
    .agenda-tabs {
        flex-wrap: wrap;
        gap: 8px;
    }
    /* Select ciudad: fila propia (100% ancho) */
    .agenda-city-select.agenda-tab-style {
        flex: 0 0 100%;
        width: 100%;
    }
    /* 3 tabs: fila propia, igual ancho, texto puede envolver */
    .agenda-tab {
        flex: 1;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
        padding: 7px 8px !important;
        font-size: 11px !important;
    }
    .agenda-events-nav {
        display: none;   /* movil-ok: las flechas de «Proximos eventos»; en movil es una rejilla y no hay a donde desplazarse */
    }
}

/* ============================================================
 * TARJETAS DE LISTADO — buscador / regiones / provincias / ciudades
 * Lista vertical con scroll (mobile-first). Sustituye el listado
 * antiguo de texto plano ("Zona: ... Tel: ...") por tarjetas con
 * el mismo lenguaje visual que "Destacados" y "populares".
 * ============================================================ */
ul.bares.rc-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0 0;
    margin: 0;
    list-style: none;
    border: none;
    background: none;
    height: auto;
    line-height: normal;
    float: none;
    clear: both;
    width: 100%;
}

/* Blindaje: ".content ul li, .content p, .content span" (style.css) tiene más
   especificidad que las reglas de esta tarjeta y le pisa padding/font-size.
   Se neutraliza aquí explícitamente, igual que ya hace .home-featured-section. */
li.rc-card,
li.rc-card p,
li.rc-card span {
    padding: 0 !important;
}

li.rc-card {
    display: flex;
    flex-direction: column;
    position: relative;
    background: linear-gradient(180deg, #fffefc 0%, #f9f5ef 100%);
    border: 1px solid rgba(91,68,48,0.12);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(56,37,23,0.07), 0 1px 3px rgba(56,37,23,0.05);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    height: auto;
    line-height: normal;
    float: none;
    clear: both;
    width: 100%;
    padding: 10px !important;
    gap: 12px;
    margin: 0;
}
li.rc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(56,37,23,0.14), 0 3px 8px rgba(56,37,23,0.08);
    border-color: rgba(225,17,18,0.20);
}

/* Imagen "enmarcada": inset dentro de la tarjeta, con su propio borde/radio,
   para que se lea como una pieza delimitada dentro del conjunto */
li.rc-card a.thumb {
    display: block;
    width: 100%;
    height: 178px;
    border: 1px solid rgba(91,68,48,0.14);
    border-radius: 13px;
    margin: 0;
    overflow: hidden;
    position: relative;
    background: #f0ece7;
    float: none;
    box-shadow: inset 0 0 0 3px rgba(255,253,250,0.55);
}
li.rc-card a.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
    margin: 0;
}
li.rc-card:hover a.thumb img {
    transform: scale(1.05);
}

li.rc-card .rc-card-body {
    padding: 0 4px 2px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: auto;
    overflow: visible;
    float: none;
    min-width: 0;
}

/* Tarjeta completa clicable (patrón "stretched link"): el enlace del título
   se expande para cubrir toda la tarjeta, sin anidar <a>. Los botones de
   Llamar/Reservar quedan por encima para seguir siendo clicables aparte. */
li.rc-card h3.rc-card-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}
/* ⚠ Aquí van `a` Y `button`. Decía solo `a`, y el corazón de guardar es un
   <button>: el enlace estirado de arriba le caía encima, así que pulsarlo
   abría la ficha del establecimiento en vez de guardarlo. El manejador del
   corazón estaba bien — el clic nunca le llegaba. Cualquier control que se
   añada a esta fila tiene que quedar por encima, sea la etiqueta que sea. */
li.rc-card .rc-card-actions a,
li.rc-card .rc-card-actions button {
    position: relative;
    z-index: 2;
}

.rc-card-loc {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px !important;
    font-weight: 600;
    color: #a89880;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rc-card-loc svg {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    stroke: #c2b6a2;
}

li.rc-card h3.rc-card-title {
    margin: 1px 0 0;
    padding: 0 !important;
    min-height: 0 !important;
    background: none !important;
    float: none !important;
    clear: none !important;
    display: block !important;
    line-height: 1.22;
}
li.rc-card h3.rc-card-title a {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 21px;
    font-weight: 800;
    color: #19120e;
    letter-spacing: -0.015em;
    display: block;
    float: none;
    clear: none;
}
li.rc-card:hover h3.rc-card-title a {
    color: var(--brand-red);
}

.rc-card-desc {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1.5;
    color: #766655;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

li.rc-card .rc-card-hours {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 14px;
    font-size: 11.5px !important;
    line-height: 14px !important;
    color: #9a8c7a;
    margin: 1px 0 0 !important;
}
li.rc-card .rc-card-hours svg {
    display: block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    stroke: #c2b6a2;
}
li.rc-card .rc-card-hours span {
    display: block;
    font-size: 11.5px !important;
    line-height: 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rc-card-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 0 !important;
}
li.rc-card .rc-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px !important;
    margin: 0 !important;
    border-radius: 999px;
    background: rgba(91,68,48,0.07);
    color: #5b4430;
    font-size: 11px !important;
    line-height: 1 !important;
    font-weight: 600;
    white-space: nowrap;
}
li.rc-card .rc-tag-price {
    margin-left: auto !important;
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(225,17,18,0.28);
}

/* Chip de fechas (eventos) — icono + texto dentro del mismo tag */
li.rc-card .rc-tag-dates {
    gap: 5px;
}
li.rc-card .rc-tag-dates svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    stroke: #8a7a68;
}

.rc-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(91,68,48,0.09);
}
.rc-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px !important;
    border-radius: 999px;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .18s ease, background .18s ease;
}
.rc-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.rc-btn:active { transform: scale(0.96); }

.rc-btn-call {
    background: var(--brand-red) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(225,17,18,0.30);
}
.rc-btn-call:hover { background: var(--brand-red-dark) !important; }

.rc-btn-book {
    background: transparent !important;
    color: #5b4430 !important;
    border: 1.5px solid rgba(91,68,48,0.25);
}
.rc-btn-book:hover {
    border-color: var(--brand-red);
    color: var(--brand-red) !important;
}

/* Distancia (modo "cerca de mí") — esquina inferior derecha de la tarjeta */
li.rc-card .rc-chip-distance {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    margin: 0 0 0 auto !important;
    padding: 0 12px !important;
    height: 30px;
    border-radius: 999px;
    background: rgba(91,68,48,0.08);
    color: #5b4430;
    font-size: 11.5px !important;
    line-height: 30px !important;
    font-weight: 700;
    white-space: nowrap;
}
li.rc-card .rc-chip-distance svg {
    display: block;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    stroke: #8a7a68;
}

/* Tablet+/desktop: imagen a la izquierda, contenido a la derecha */
@media screen and (min-width: 640px) {
    li.rc-card {
        flex-direction: row;
    }
    li.rc-card a.thumb {
        width: 240px;
        min-width: 240px;
        height: auto;
    }
    li.rc-card .rc-card-body {
        flex: 1;
        justify-content: center;
    }
}

/* ---- Barra "Ordenar por" modernizada (página buscador) ---- */
.rc-sortbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.rc-sortbar label {
    font-size: 12px;
    font-weight: 600;
    color: #766655;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
/* Prefijadas con "h1 form.sorter" para ganar en especificidad a la regla
   legacy "h1 form.sorter select, h1 form.sorter input" (style.css), que
   fijaba una altura/tipografía mucho más pequeña (26px / 11px). */
h1 form.sorter .rc-sortbar select,
.rc-sortbar select {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 36px !important;
    padding: 0 30px 0 14px !important;
    border-radius: 999px;
    border: 1px solid rgba(91,68,48,0.20);
    background: #faf8f5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E") no-repeat right 12px center;
    -webkit-appearance: none;
    appearance: none;
    font-size: 13px !important;
    color: #19120e;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.rc-sortbar select:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px var(--brand-red-ring);
    outline: none;
}
h1 form.sorter .rc-sortbar button,
h1 form.sorter .rc-sortbar input[type="submit"],
.rc-sortbar button,
.rc-sortbar input[type="submit"] {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    line-height: 36px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border-radius: 999px;
    border: none;
    background: var(--brand-red);
    color: #fff;
    font-size: 13px !important;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
    position: static !important;
    top: auto !important;
    transition: background .18s ease, transform .15s ease;
}
.rc-sortbar button:hover,
.rc-sortbar input[type="submit"]:hover {
    background: var(--brand-red-dark);
}
.rc-sortbar button:active,
.rc-sortbar input[type="submit"]:active {
    transform: scale(0.97);
}

/* ---- Aviso "ubicación aproximada" — icono SVG, no emoji ---- */
.cerca-aviso {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cerca-aviso svg {
    width: 16px;
    height: 16px;
    stroke: #b58a00;
    flex-shrink: 0;
}

@media screen and (max-width: 640px) {
    li.rc-card a.thumb { height: 170px; }
    li.rc-card h3.rc-card-title a { font-size: 18px; }
    .rc-sortbar { width: 100%; justify-content: space-between; }
    .rc-sortbar select { flex: 1; min-width: 0; }
}

/* ============================================================
 * TÍTULO DE SECCIÓN (h1) — sustituye el "faldón" gris antiguo
 * (h1_bg.png) por el mismo lenguaje editorial que ya usan
 * "Destacados" y "Agenda". Afecta a todas las páginas que usan
 * <h1> como cabecera: buscador, eventos, regiones/provincias/
 * ciudades, páginas estáticas, etc.
 * ============================================================ */
h1 {
    max-width: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    row-gap: 10px;
    column-gap: 16px;
    float: none;
    clear: both;
    background: none;
    border-bottom: 1px solid rgba(91,68,48,0.14);
    padding: 0 0 14px;
    margin: 28px 0 22px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 700;
    color: #19120e;
    letter-spacing: -0.02em;
    line-height: 1.25;
    text-align: left;
    position: relative;
    box-sizing: border-box;
}

/* Icono "mostrar/ocultar mapa" (regiones/provincias/ciudades) */
h1 span {
    position: static;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: url(../images/favstar.png) center/contain no-repeat;
    text-indent: -9999px;
    overflow: hidden;
    font-size: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    order: 2;
}

/* Formulario "Ordenar por" dentro del h1 — ya no absoluto, fluye junto al título */
h1 form.sorter {
    position: static;
    top: auto;
    right: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    box-shadow: none;
    order: 3;
}

@media screen and (max-width: 640px) {
    h1 {
        font-size: 20px;
        padding-bottom: 12px;
        margin-bottom: 18px;
        flex-direction: column;
        align-items: flex-start;
    }
    h1 form.sorter {
        width: 100%;
    }
}

/* ============================================================
 * PAGINACIÓN — sustituye los botones cuadrados grises por el
 * mismo lenguaje que "Destacados" (flechas circulares oscuras)
 * y los chips de precio (círculo en rojo de marca para la página
 * activa).
 * ============================================================ */
#pagination {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 22px 0 6px;
    margin: 6px 0 0;
    border-top: 1px solid rgba(91,68,48,0.12);
    box-sizing: border-box;
}

#pagination .indicador {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-size: 11.5px !important;
    font-weight: 600;
    color: #a89880;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    background: none;
    min-width: auto;
    height: auto;
    cursor: default;
}

#pagination span,
#pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px !important;
    margin: 0 !important;
    border-radius: 999px;
    border: 1px solid rgba(91,68,48,0.16);
    background: #fffefc;
    color: #5b4430;
    font-size: 13px !important;
    font-weight: 700;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: transform .15s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
#pagination a:hover {
    background: #fff;
    border-color: rgba(225,17,18,0.35);
    color: var(--brand-red);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(56,37,23,0.12);
}
#pagination a:active {
    transform: translateY(0) scale(0.96);
}
#pagination .current {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    border-color: transparent;
    color: #fff;
    cursor: default;
    box-shadow: 0 4px 12px rgba(225,17,18,0.32);
}

/* Flechas prev/next — círculos oscuros, igual que el carrusel de Destacados */
#pagination .pg-nav {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0 !important;
    border-radius: 50%;
    background: #1c1c1e;
    border: none;
    color: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.20);
}
#pagination .pg-nav svg {
    width: 16px;
    height: 16px;
    display: block;
    pointer-events: none;
}
#pagination a.pg-nav:hover {
    background: #2d2d30;
    border-color: transparent;
    color: #fff;
    transform: translateY(0) scale(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.26);
}
#pagination .disabled.pg-nav {
    background: #f1ece5;
    color: #cabfae;
    box-shadow: none;
    cursor: default;
}

/* ⚠ EN EL MÓVIL EL PAGINADOR CRECÍA HACIA ABAJO EN VEZ DE HACIA ARRIBA.
   Los números medían 34px y las flechas 36, por debajo de los 44 que este
   proyecto exige para cualquier cosa que se pulse con el pulgar.

   Nunca se había medido, y no por descuido: **hasta el 2026-08-19 no había
   existido una segunda página**. Con menos de once establecimientos
   publicados, `paginarFront()` no pinta nada. Al pasar a 21 fichas apareció el
   paginador por primera vez en la web pública, y con él este defecto.

   En el ordenador NO se toca: allí siguen en 38 y 40. */
@media screen and (max-width: 640px) {
    #pagination span,
    #pagination a {
        min-width: 44px;
        height: 44px;
        font-size: 13px !important;
    }
    #pagination .pg-nav {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
    #pagination .pg-nav svg {
        width: 16px;
        height: 16px;
    }
}
@media screen and (max-width: 360px) {
    /* A 360 y por debajo, cinco controles de 44 más los huecos no caben en una
       fila: se deja que envuelvan en vez de encogerlos. Antes que un botón que
       se falla, dos filas. */
    #pagination { flex-wrap: wrap; row-gap: 8px; }
}

/* ── Badge Abierto/Cerrado en tarjetas del buscador (horario estructurado) ──
 *
 * ⚠ ESTE BLOQUE NO SERVÍA DE NADA, y el usuario lo vio: la píldora salía con el
 * texto pegado a los bordes, «rebasada», con la letra más grande de la cuenta.
 *
 * El motivo es de manual, y no se ve leyendo el archivo de arriba abajo: la
 * píldora vive DENTRO de `.rc-card-hours`, y unas líneas más arriba está
 *
 *     li.rc-card .rc-card-hours span { padding:0 !important; font-size:11.5px
 *                                      !important; display:block }
 *
 * que tiene especificidad **(0,2,2)** —dos clases y DOS tipos, `li` y `span`—
 * mientras que `li.rc-card .rc-open-badge` solo llega a **(0,2,1)**. Gana la
 * genérica aunque la de la píldora vaya después y aunque las dos lleven
 * `!important`: el orden solo decide cuando la especificidad EMPATA.
 *
 * Por eso el selector nombra ahora también el `span` y el contenedor: (0,3,2)
 * contra (0,2,2). Se deja el selector suelto por si algún día la píldora se
 * pinta fuera del bloque de horario.
 *
 * Es el gotcha #1 del proyecto en su versión más difícil de ver: aquí no es
 * `.content span` quien pisa, sino una regla del propio componente.
 */
li.rc-card span.rc-open-badge,
li.rc-card .rc-card-hours span.rc-open-badge {
    display: inline-flex !important;
    align-items: center;
    width: auto !important;
    height: 20px;
    padding: 0 9px !important;
    margin-left: 6px !important;
    border-radius: 999px;
    font-size: 10.5px !important;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1 !important;
    flex-shrink: 0;
    overflow: visible;
    vertical-align: middle;
}
li.rc-card span.rc-open-badge.rc-open-si,
li.rc-card .rc-card-hours span.rc-open-badge.rc-open-si {
    background: rgba(42,122,75,0.10);
    border: 1px solid rgba(42,122,75,0.28);
    color: #2a7a4b;
}
li.rc-card span.rc-open-badge.rc-open-no,
li.rc-card .rc-card-hours span.rc-open-badge.rc-open-no {
    background: rgba(150,30,30,0.08);
    border: 1px solid rgba(150,30,30,0.22);
    color: #a03030;
}


/* ---- «Guardar búsqueda» — junto al ordenar del buscador ------------------
   Va DENTRO del <h1>, que es una caja flexible: sin `order` se colocaría
   delante del formulario de ordenar, y lo que se guarda es justo lo que se
   acaba de filtrar. Misma altura (38px) y misma píldora que el resto de la
   barra; en contorno, porque la acción principal de esa fila es «Ordenar». */
h1 .rc-guardar-busqueda,
.rc-guardar-busqueda {
    order: 4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    margin: 0 0 0 8px !important;
    border: 1px solid rgba(91,68,48,0.20);
    border-radius: 999px;
    background: #faf8f5;
    color: #5b4430;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px !important;
    font-weight: 700;
    line-height: 1 !important;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    box-sizing: border-box;
    position: static !important;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
/* ⚠ `flex-shrink:0` y `nowrap` no son adorno: dentro del <h1> —que es una caja
   flexible— el rótulo se comprimía a 26px y la píldora salía con la campana y
   un trozo de palabra partida. */
.rc-guardar-busqueda { flex-shrink: 0; white-space: nowrap; }
.rc-guardar-busqueda svg { width: 15px; height: 15px; flex-shrink: 0; }
.rc-guardar-busqueda:hover { border-color: var(--brand-red); color: var(--brand-red); }
.rc-guardar-busqueda.is-on {
    border-color: var(--brand-red);
    background: #fff5f5;
    color: var(--brand-red);
}
.rc-guardar-busqueda:disabled { opacity: .55; cursor: default; }
/* ⚠ DOS reglas de 2009 se comían este rótulo, y las dos hay que desmontarlas:
   1. Gotcha #1 — `.content span` le mete 12px de relleno inferior.
   2. `h1 span` es **la estrella de «destacado»** del título: impone
      `width:26px; height:26px` y una imagen de fondo. Como este botón vive
      dentro del <h1>, su rótulo heredaba esa caja fija y salía partido en dos
      líneas de 26px — la píldora se veía con la campana y un trozo de palabra.
   El selector lleva `h1` delante para ganarle (0,1,2 contra 0,0,2). */
h1 .rc-guardar-busqueda span,
.content .rc-guardar-busqueda span,
.rc-guardar-busqueda span {
    position: static;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    background: none !important;
    text-indent: 0;
    padding: 0 !important;
    font-size: 13px !important;
    line-height: 1;
    white-space: nowrap;
}

@media screen and (max-width: 640px) {
    .rc-guardar-busqueda {
        width: 100%;
        justify-content: center;
        height: 44px !important;
        min-height: 44px !important;
        margin: 8px 0 0 !important;
    }
}

/* ============================================================
 * OBJETIVOS TÁCTILES EN EL MÓVIL (medido a 360px, un Samsung S23)
 * ============================================================
 * Estos dos controles llevaban la misma altura en el ordenador y en el
 * teléfono: el botón «Buscar» de la portada —que es LA acción del sitio— con
 * 34px, y los tres filtros rápidos con 28px y letra de 10. Con un ratón se
 * aciertan; con el pulgar, no. `responsive.css` impone 40px a `a, button,
 * input`, pero aquí lo pisa el `min-height` propio de cada clase.
 *
 * Va al final de la hoja y dentro de una media de móvil a propósito: así gana
 * a los bloques anteriores solo en el teléfono y el escritorio queda igual.
 */
@media screen and (max-width: 640px) {
    .hero-buscar-btn {
        min-height: 44px;
        font-size: 14px;
        border-radius: 12px;
    }
    /* ⚠ SOLO MÓVIL. El escritorio se queda exactamente como está (28px de alto,
       letra de 10, esquinas de 5px): todo esto vive dentro de la media.

       Dos cosas que el usuario vio en su S23 y tenía razón en las dos:

       1. «Están excesivamente cuadradas, fuera del estilo». Llevaban un radio
          de 5px, que es una esquina redondeada, no una píldora. El lenguaje del
          sitio para esta familia es `border-radius: 999px` — el mismo del banner
          de consentimiento, de la píldora Abierto/Cerrado y de los botones de
          ordenar del panel.

       2. «El texto de Tipo de cocina parece que sobresale». Y sobresalía de
          verdad: las tres se repartían el ancho A PARTES IGUALES (97,3px cada
          una a 360px) cuando lo que necesitan es muy distinto — «Eventos» 85,7
          y «Tipo de cocina» 122,8. La del medio se recortaba.

       La solución no es encoger la letra hasta que quepa: es dejar que cada
       píldora ocupe LO QUE PIDE su texto (`flex: 0 1 auto` en vez del `width:
       100%` de la regla base). Sumadas caben de sobra; lo que no cabía era el
       reparto forzado en tercios. */
    .hero-filter-btn {
        min-height: 40px;
        font-size: 11px;
        padding: 0 8px;
        gap: 4px;
        width: auto;
        flex: 0 1 auto;
        min-width: 0;
        border-radius: 999px;
        white-space: nowrap;
        letter-spacing: -0.1px;
    }
    .hero-filters {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    .hero-filter-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* ════════════════════════════════════════════════════════════════════════
 * EL CALENDARIO DE LA AGENDA A 320px (medido, no supuesto)
 * ════════════════════════════════════════════════════════════════════════
 * A 320px la portada se salía 37px de lado y toda la página se podía
 * arrastrar. El culpable es este calendario:
 *
 *   · en móvil se pone en DOS columnas (mes/año a la izquierda, días a la
 *     derecha). La de los días queda con 130px de sitio…
 *   · …y necesita 194: siete celdas de 26px más seis huecos de 2px.
 *
 * Y no se encogía por la trampa clásica de las rejillas CSS: `1fr` es en
 * realidad `minmax(auto, 1fr)`, y ese `auto` NO baja del ancho mínimo del
 * contenido — los 26px de la celda. Con `minmax(0, 1fr)` sí puede.
 *
 * Por debajo de 400px las dos columnas se ponen una encima de otra, que es
 * lo que de verdad da sitio, y las celdas pasan a ser proporcionales con un
 * tope de 26px para que en cuanto haya hueco se vean como siempre.
 */
@media screen and (max-width: 400px) {
    .agenda-cal-days span {
        width: 100%;
        max-width: 26px;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* ════════════════════════════════════════════════════════════════════════
 * EL NOMBRE DEL MES SE CORTABA EN MÓVIL — «Agos» en vez de «Agosto»
 * ════════════════════════════════════════════════════════════════════════
 * Reportado sobre un S23. Medido: la caja del mes tenía **46px** hasta 400px
 * y **38px** entre 401 y 639, y «Agosto» necesita 55 a 16px de letra. O sea
 * que se cortaban agosto, enero, marzo, abril, junio, julio… y de largo
 * septiembre, noviembre y diciembre. En escritorio la caja son 90px y cabe,
 * por eso solo se veía en el teléfono.
 *
 * La causa NO es el ancho del texto: es que el calendario se parte en DOS
 * COLUMNAS (mes a la izquierda, días a la derecha) y el mes queda encajonado
 * en la estrecha, con `min-width:0` + `overflow:hidden`, así que se recorta en
 * silencio en vez de pedir sitio.
 *
 * Apilarlo es lo que de verdad da espacio, y además deja el calendario igual a
 * 360 que a 600. El ancho del mes pasa a ser el que pide su texto.
 *
 * ⚠ Todo dentro de la media de móvil. En escritorio (≥641px) el calendario
 * sigue en dos columnas con su mes de 90px, exactamente como estaba.
 */
@media screen and (max-width: 640px) {
    .home-agenda-calendar {
        flex-direction: column;
    }
    .agenda-cal-grid {
        padding: 8px 10px 10px;
        width: 100%;
    }
    .cal-week,
    .agenda-cal-dow {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        justify-items: center;
    }
    /* El mes ocupa lo que pide, y ya no se recorta ningún nombre. */
    .agenda-cal-month {
        min-width: max-content;
        overflow: visible;
        flex: 0 1 auto;
        padding: 0 4px;
    }
    /* La fila «‹ mes ›» centrada y a lo ancho, ahora que hay sitio. */
    .agenda-cal-nav-row:not(.agenda-cal-nav-year) {
        justify-content: center;
        gap: 6px;
    }
}

/* ════════════════════════════════════════════════════════════════════════
 * LAS TRES PÍLDORAS Y SU «CERRAR», IGUALADAS EN MÓVIL (2026-08-08)
 * ════════════════════════════════════════════════════════════════════════
 * Reportado: *«el botón cerrar cuando haces clic en la píldora tipo de cocina,
 * ¿por qué no se ve bien como en cerca de mí? Estandariza el botón/píldora
 * cerrar para que en eventos, tipo de cocina y cerca de mí se vean bien,
 * mantengan el estilo de la página y sean iguales»*.
 *
 * Medido, las tres hacían cosas distintas:
 *
 *   Eventos          2º toque cierra ✔   tenía aria-expanded
 *   Tipo de cocina   2º toque NO cierra  sin estado ninguno
 *   Cerca de mí      —                   sin estado ninguno
 *
 * El comportamiento se igualó en el JS de template.php (ahora las dos que
 * abren panel alternan). Aquí va lo visual:
 *
 * 1. La píldora ABIERTA se ve encendida —fondo rojo de marca, letra blanca—,
 *    para que se entienda que volver a pulsarla la cierra. Es la misma señal
 *    que usa la barra de abajo con el menú.
 * 2. El «Cerrar» deja de ser un rectángulo suelto y pasa a ser una PÍLDORA
 *    del mismo idioma que las demás (radio 999, misma letra, mismo alto de
 *    44px que el botón Buscar al que sustituye).
 *
 * ⚠ Solo móvil. En escritorio los tres botones y el «Cerrar» se quedan
 *   exactamente como están.
 */
@media screen and (max-width: 640px) {
    .hero-filter-btn[aria-expanded="true"],
    .hero-filter-btn.active {
        background: #e11112;
        border-color: #e11112;
        color: #fff;
    }
    .hero-filter-btn[aria-expanded="true"] svg,
    .hero-filter-btn.active svg {
        stroke: #fff;
        color: #fff;
    }

    /* El «Cerrar»: píldora, no rectángulo. Mismo alto que el «Buscar» al que
       sustituye, para que la cabecera no dé un salto al abrir el panel. */
    .hero-buscar-btn.is-close {
        border-radius: 999px;
        min-height: 44px;
        font-size: 14px;
        font-weight: 700;
        background: #fff;
        color: #5b4430;
        border: 1.5px solid rgba(91,68,48,0.35);
        box-shadow: none;
    }
    /* Y el «Buscar» normal, píldora también: eran dos radios distintos (12px
       el uno, rectángulo el otro) para el mismo hueco de la pantalla. */
    .hero-buscar-btn {
        border-radius: 999px;
    }
}

/* ════════════════════════════════════════════════════════════════════════
 * LA AGENDA DE EVENTOS EN MÓVIL: el hueco muerto y la raya a ninguna parte
 * ────────────────────────────────────────────────────────────────────────
 * Lo destapó él: «tenemos tanto espacio en blanco a la derecha… y una línea
 * vertical divisoria que nos limita la parte de la izquierda con la nada
 * absoluta».
 *
 * Era un destrozo propio, del 2026-08-08. El calendario tenía en móvil la
 * MISMA disposición de dos columnas que el escritorio —navegación a la
 * izquierda con `width: 145px` y `border-right`, rejilla de días a la
 * derecha—, y esa raya vertical separaba una cosa de la otra. Al arreglar que
 * no se viera «agosto» se pasó el contenedor a `flex-direction: column`, pero
 * NO se deshizo lo de la navegación: se quedó con sus 145px fijos y su borde
 * derecho, ahora sola en su fila. Resultado medido en 360px: una caja de 145
 * con 199px muertos al lado y una raya separando de la nada.
 *
 * La lección: al cambiar un contenedor de `row` a `column` hay que repasar
 * TODOS los hijos que tuvieran anchos fijos o bordes laterales; el borde que
 * separaba dos columnas se convierte en un adorno sin sentido.
 * ════════════════════════════════════════════════════════════════════════ */
@media screen and (max-width: 640px) {
    .agenda-cal-nav {
        flex: 0 0 auto;
        width: 100%;
        /* El borde ya no separa dos columnas: separa la navegación de la
           rejilla de días, que ahora va debajo. Así que va abajo, no a un
           lado, y más suave — es una costura, no una división. */
        border-right: none;
        border-bottom: 1px solid rgba(25,18,14,0.12);
        /* Antes `8px 10px 8px 0`: sin relleno izquierdo, la flecha «‹» se
           salía 7px por la izquierda de su caja. */
        padding: 10px 12px;
        gap: 2px;
    }
    /* Con el ancho completo, año y mes se centran en vez de quedar apretados
       contra el borde de una columna de 145px que ya no existe. */
    .agenda-cal-nav-row,
    .agenda-cal-nav-row.agenda-cal-nav-year {
        justify-content: center;
        gap: 10px;
    }
}

/* ── El botón «Buscar» de los desplegables no era una píldora ──────────────
   El sitio habla en píldoras: `border-radius: 999px` en el botón Buscar del
   hero, en «Llamar» de las fichas, en las de compartir, en el consentimiento.
   Este llevaba 12px y cantaba: es el botón que cierra la búsqueda avanzada y
   el buscador de eventos, o sea el más importante de esos dos paneles.
   Cambiar el radio no mueve nada: mide igual antes y después (520×41 en
   escritorio, 264×40 en móvil). */
.hero-advanced-submit {
    border-radius: 999px;
}

/* ── Los campos de los paneles desplegables, a dedo ────────────────────────
   Medido a 320px dentro del «Buscador de eventos»: desplegables y cajas de
   texto a 38px, las de fecha a 41 y el botón Buscar a 40. Todos por debajo de
   los 44 que necesita un dedo. `.hero-advanced-inner` es el contenedor que
   comparten el buscador de eventos, la búsqueda avanzada del hero y el
   formulario de la página del buscador, así que los tres quedan igual — que
   es justo lo que se pide: que la misma cosa se vea y se use igual en todas
   partes.
   Solo móvil: en escritorio se manejan con ratón y quedan como estaban. */
@media screen and (max-width: 640px) {
    .hero-advanced-inner select,
    .hero-advanced-inner input[type="text"],
    .hero-advanced-inner input[type="date"],
    .hero-advanced-inner input[type="number"],
    .hero-advanced-inner .hero-advanced-input {
        min-height: 44px;
        box-sizing: border-box;
    }
    .hero-advanced-inner .hero-advanced-submit {
        min-height: 44px;
    }
}

/* ── La barra «Ordenar por», a dedo ────────────────────────────────────────
   El desplegable y el botón se quedaban en 38px, por debajo de los 44 del
   objetivo táctil. Va aquí y no en responsive.css porque quien fija esos 38 es
   la regla base `h1 form.sorter .rc-sortbar input[type="submit"]` de este
   mismo fichero, que carga DESPUÉS de responsive.css: desde allí no había
   manera de ganarle sin `!important`.
   La barra es la misma en el buscador de locales y en la agenda de eventos,
   así que los dos quedan igual de una vez.
   Solo móvil: en escritorio se manejan con ratón y siguen en 38. */
@media screen and (max-width: 640px) {
    h1 form.sorter .rc-sortbar input[type="submit"],
    h1 form.sorter .rc-sortbar select,
    .content form.sorter input[type="submit"],
    .content form.sorter select {
        /* `!important` porque la regla base de este mismo fichero fija los
           38px CON `!important`; con la misma especificidad y yendo después no
           bastaba. Se comprobó inyectando la regla al final en caliente: ni
           así se movía, y ahí saltó la marca. */
        height: 44px !important;
        min-height: 44px !important;
        line-height: normal !important;
    }
}

/* ════════════════════════════════════════════════════════════════════════
 * EL CALENDARIO DE LA PORTADA ENSEÑA EL MES ENTERO (2026-08-12)
 * ────────────────────────────────────────────────────────────────────────
 * Lo dijo él, y era el fallo de fondo de todo este bloque: «¿qué pasa si hay
 * un evento la segunda semana de febrero si solo se ven unos pocos días?».
 * Pues que no se veía. El calendario mostraba UNA semana, no había flechas
 * para pasar de semana, y al cambiar de mes salía la primera fila de ese mes
 * —seis días sueltos—. Con eso, un mes con 18 eventos podía aparentar estar
 * vacío.
 *
 * El mes completo se calculaba y se tiraba, en el PHP y en el JS. Ahora se
 * pinta entero y este `display: none` sobra: era el tercer sitio donde estaba
 * puesto el recorte.
 * ════════════════════════════════════════════════════════════════════════ */
.cal-week:not(.current-week) {
    display: grid;
}

/* La semana de hoy se sigue distinguiendo, ahora que hay más de una. */
.agenda-cal-days .cal-week.current-week {
    background: rgba(225,17,18,0.04);
    border-radius: 8px;
}

@media screen and (max-width: 640px) {
    /* Aire entre semanas: con una sola fila no hacía falta. */
    .agenda-cal-days {
        gap: 4px;
    }

    /* ── Las flechas del año: lejos, pequeñas y descoloridas ──────────────
       Medido a 360px: la etiqueta del año era una caja de 220px con `flex: 1`,
       así que «2026» quedaba centrado en medio y las flechas se iban a los
       extremos —a unos 90px de las cifras—, en color #ccc y con letra de 10px.
       Había que adivinarlas.
       Ahora el grupo va junto y centrado: la etiqueta ocupa lo que mide, las
       flechas quedan pegadas al año, en el marrón del sitio y con área de 44px
       para el dedo. */
    .agenda-cal-nav-row.agenda-cal-nav-year {
        justify-content: center;
        gap: 4px;
    }
    .agenda-cal-year-label {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        font-size: 12px !important;
        padding: 0 4px;
    }
    .agenda-cal-nav-year .agenda-cal-arrow {
        width: 44px;
        height: 44px;
        font-size: 20px;
        color: #19120e;
        background: transparent;
        border: none;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    /* Las de mes, al mismo tamaño de dedo y con el mismo contraste: son las
       dos parejas de flechas del mismo bloque y no pueden pedir dos pulsos
       distintos. */
    .agenda-cal-nav-row:not(.agenda-cal-nav-year) .agenda-cal-arrow {
        width: 44px;
        height: 44px;
        font-size: 18px;
        color: #19120e;
        border-color: rgba(91,68,48,0.28);
    }
}

/* ════════════════════════════════════════════════════════════════════════
 * LA TIRA DE DÍAS DE LA AGENDA (2026-08-12)
 * ────────────────────────────────────────────────────────────────────────
 * Sustituye a la rejilla de calendario. Su reacción a la rejilla fue clara:
 * «así con todo el mes a la vista queda horrible… no tiene estilo, diseño,
 * innovación». Y tenía razón: una cuadrícula de 42 casillas, la mayoría
 * vacías, ocupando 326px de portada para no decir nada.
 *
 * Esto es el patrón de las apps de eventos: una fila de fichas, una por día,
 * que se recorre con el dedo. Y era además lo que él propuso —«desplazarse
 * haciendo scroll lateral»—.
 *
 * Qué gana:
 *  · el mes entero sigue siendo alcanzable, pero en 96px en vez de 326
 *  · los días con eventos SALTAN a la vista: son los únicos con color y con
 *    un número encima diciendo cuántos hay
 *  · los días vacíos se apagan y no se pueden pulsar — no prometen nada
 *  · vuelve la barra fina en escritorio, que es lo que había antes de todo
 * ════════════════════════════════════════════════════════════════════════ */

.agenda-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 10px;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Se difumina en los bordes: es la pista de que hay más mes a los lados,
       sin tener que pintar una flecha que ocupe sitio. */
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
            mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.agenda-rail::-webkit-scrollbar { display: none; }

/* ── La ficha de un día ── */
/* ⚠ El día con eventos es un <a>, no un <button> (ver includes/index.php).
   Un enlace hereda el azul y el subrayado del navegador; un botón no. Sin
   esto la raíz de la ficha calcula `rgb(0,0,238)`. Hoy no se ve porque los
   números llevan su propio color, pero cualquier texto que se añada ahí
   saldría azul, y el `:visited` pintaría distinto el día ya pulsado. */
.agenda-rail a.agenda-dia,
.agenda-rail a.agenda-dia:visited,
.agenda-rail a.agenda-dia:hover {
    color: inherit;
    text-decoration: none;
}

.agenda-rail .agenda-dia {
    flex: 0 0 auto;
    scroll-snap-align: center;
    width: 46px;
    min-height: 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    position: relative;
    padding: 8px 0 9px;
    border: 1.5px solid rgba(91,68,48,0.14);
    border-radius: 14px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.agenda-rail .agenda-dia-ini {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #a89684;
    line-height: 1;
    padding: 0 !important;   /* la regla heredada `.content span` otra vez */
}
.agenda-rail .agenda-dia-num {
    font-size: 18px;
    font-weight: 800;
    color: #cfc4b8;
    line-height: 1.1;
    padding: 0 !important;
}

/* Fin de semana: un punto más marcado que un día laborable vacío, porque es
   cuando la gente sale. */
.agenda-rail .agenda-dia.es-finde .agenda-dia-num { color: #a9987f; }
.agenda-rail .agenda-dia.es-finde .agenda-dia-ini { color: #97836e; }

/* ── El día que TIENE eventos: es el protagonista ── */
.agenda-rail .agenda-dia.has-event {
    cursor: pointer;
    border-color: transparent;
    background: linear-gradient(160deg, #e11112 0%, #b00d0e 100%);
    box-shadow: 0 4px 14px rgba(225,17,18,0.32);
}
.agenda-rail .agenda-dia.has-event .agenda-dia-num { color: #fff; }
.agenda-rail .agenda-dia.has-event .agenda-dia-ini { color: rgba(255,255,255,0.72); }
.agenda-rail .agenda-dia.has-event:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(225,17,18,0.42);
}
.agenda-rail .agenda-dia.has-event:active { transform: translateY(-1px); }

/* El contador: cuántos eventos hay ese día */
.agenda-rail .agenda-dia-n {
    position: absolute;
    top: -6px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #19120e;
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    font-style: normal;
    line-height: 19px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.28);
    box-sizing: border-box;
}

/* ── Hoy ── */
.agenda-rail .agenda-dia.is-today {
    border-color: #19120e;
    border-width: 2px;
}
.agenda-rail .agenda-dia.is-today .agenda-dia-num { color: #19120e; }
.agenda-rail .agenda-dia.is-today.has-event {
    border-color: #19120e;
    box-shadow: 0 4px 14px rgba(225,17,18,0.32), 0 0 0 3px rgba(25,18,14,0.10);
}
.agenda-rail .agenda-dia.is-today.has-event .agenda-dia-num { color: #fff; }

@media screen and (max-width: 640px) {
    /* En el móvil la ficha crece un poco: 48px de ancho y 66 de alto la dejan
       por encima del objetivo táctil de 44 en las dos medidas. */
    .agenda-rail .agenda-dia {
        width: 48px;
        min-height: 66px;
    }
    .agenda-rail .agenda-dia-num { font-size: 19px; }
    .agenda-rail { gap: 7px; }
}

/* ⚠ `min-width: 0` — LA TRAMPA DE FLEX, otra vez.
   Un elemento flex tiene `min-width: auto` por defecto: NO encoge por debajo
   de su contenido. La tira mide 1670px (31 fichas), así que estiraba a su
   contenedor de 755 a 1694 y se salía de la pantalla por la derecha en vez de
   quedarse dentro y desplazarse. En móvil no pasaba porque ahí el contenedor
   va en columna y el ancho lo manda el bloque.
   Es la misma familia que el `minmax(0, 1fr)` de las rejillas que ya está
   documentado: cuando algo con `overflow` no se queda en su sitio, lo primero
   que hay que mirar es su `min-width`. */
.agenda-cal-grid {
    min-width: 0;
}
.agenda-cal-grid .agenda-rail {
    min-width: 0;
    max-width: 100%;
}

/* ════════════════════════════════════════════════════════════════════════
 * NAVEGACIÓN EN UNA LÍNEA + MANDOS DE RATÓN (2026-08-12)
 * ────────────────────────────────────────────────────────────────────────
 * Dos cosas que él señaló:
 *  1. «En el ordenador no hay manera de desplazarte horizontalmente» — cierto:
 *     la barra de scroll está oculta a propósito y con ratón no hay gesto.
 *  2. «Año, luego mes, luego los días: demasiado espacio blanco» — también:
 *     eran tres alturas para dos datos que se leen juntos.
 *
 * La navegación pasa a ser la fila de un selector de fechas normal,
 * «« ‹ Agosto 2026 › »», y el calendario entero se apila igual en las dos
 * vistas: una línea de navegación y debajo la tira. Se acabó la columna
 * lateral de 175px del escritorio, que era la que obligaba a partir la
 * navegación en dos filas.
 * ════════════════════════════════════════════════════════════════════════ */

/* La navegación es una LÍNEA en las dos vistas. Lo que cambia es dónde se
   pone: en escritorio, a la izquierda de la tira —hay sitio de sobra y así el
   bloque sigue siendo una barra fina—; en el móvil, encima. */
.agenda-cal-nav {
    flex: 0 0 auto;
    flex-direction: row;
    /* ⚠ `baseline`, NO `center`. El mes va a 17px y el año a 13px: centrados
       (o alineados por arriba) cada uno se apoya en una raya distinta y el año
       parece un superindice. Alineados por la LINEA BASE se leen como una sola
       palabra, «Agosto 2026», que es lo que son. */
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    padding: 6px 14px 6px 0;
    background: transparent;
    border-bottom: none;
    border-right: 1px solid rgba(25,18,14,0.12);
    white-space: nowrap;
}

/* Mes y año pegados, con jerarquía: el mes manda, el año acompaña. */
.agenda-cal-mesano {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 0 8px;
    white-space: nowrap;
}
.agenda-cal-nav .agenda-cal-month {
    font-size: 17px !important;
    font-weight: 800;
    color: #19120e;
    letter-spacing: -0.01em;
    min-width: 0;
    flex: 0 0 auto;
    padding: 0 !important;
    text-align: left;
}
.agenda-cal-nav .agenda-cal-year-label {
    font-size: 13px !important;
    font-weight: 700;
    color: #a89684;
    letter-spacing: 0.06em;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    text-transform: none;
}

/* Las cuatro flechas, iguales. Los dobles galones (año) un punto más suaves
   que los simples (mes): se usan menos y no deben competir con el mes. */
.agenda-cal-nav .agenda-cal-arrow {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: #19120e;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.agenda-cal-nav .agenda-cal-arrow:hover {
    background: rgba(225,17,18,0.07);
    color: var(--brand-red);
}
.agenda-cal-nav .agenda-cal-arrow.agenda-cal-ano {
    font-size: 15px;
    color: #9a8b7a;
}

/* ── Los mandos de la tira ── */
.agenda-rail-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    width: 100%;
}
.agenda-rail-wrap .agenda-rail { flex: 1 1 auto; min-width: 0; }
.agenda-rail-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(91,68,48,0.16);
    border-radius: 50%;
    background: #fff;
    color: #19120e;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(25,18,14,0.14);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.agenda-rail-nav:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
    box-shadow: 0 4px 14px rgba(225,17,18,0.32);
}
.agenda-rail-prev { left: -4px; }
.agenda-rail-next { right: -4px; }
.agenda-rail-nav[hidden] { display: none; }

/* Arrastrando con el ratón */
.agenda-rail.esta-arrastrando { cursor: grabbing; scroll-behavior: auto; }
.agenda-rail.esta-arrastrando .agenda-dia { pointer-events: none; }

@media screen and (max-width: 640px) {
    /* En el móvil no cabe al lado: la línea va encima y la tira debajo. */
    .home-agenda-calendar { flex-direction: column; }
    .agenda-cal-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(25,18,14,0.10);
        padding: 4px 6px 6px;
    }
    /* Con el dedo se arrastra: los mandos sobran y solo taparían la primera y
       la última ficha. */
    .agenda-rail-nav { display: none !important; }   /* movil-ok: los mandos de raton de la tira de dias; con el dedo se arrastra, y ahi taparian la primera y la ultima ficha */
    .agenda-cal-nav .agenda-cal-arrow { width: 44px; height: 44px; }
    .agenda-cal-nav .agenda-cal-month { font-size: 16px !important; }
}

/* ── En el ordenador, SIETE días exactos ──────────────────────────────────
   Él lo pidió por coherencia: siete es una semana, que es como cuenta la
   gente. Antes entraban once y pico y el número no significaba nada.
   Las fichas se reparten el ancho disponible en vez de medir fijo, así que
   siempre son siete justos sea cual sea el ancho del bloque, y cada salto de
   los mandos avanza una semana entera.
   `calc((100% - 6 huecos) / 7)`: seis huecos entre siete fichas. */
@media screen and (min-width: 641px) {
    .agenda-rail {
        gap: 6px;
        scroll-snap-type: x mandatory;
    }
    .agenda-rail .agenda-dia {
        flex: 0 0 calc((100% - 36px) / 7);
        width: auto;
        min-height: 64px;
        border-radius: 12px;
    }
    .agenda-rail .agenda-dia-num { font-size: 20px; }
    .agenda-rail .agenda-dia-ini { font-size: 9.5px; }
}

/* La costura entre meses: el día 1 lleva una línea fina a su izquierda, para
   que al recorrer la tira se vea dónde empieza cada mes sin tener que leer el
   rótulo. */
.agenda-rail .agenda-dia.abre-mes {
    box-shadow: -7px 0 0 -6px rgba(25,18,14,0.22);
}
.agenda-rail .agenda-dia.abre-mes.has-event {
    box-shadow: -7px 0 0 -6px rgba(25,18,14,0.22), 0 4px 14px rgba(225,17,18,0.32);
}

/* ════════════════════════════════════════════════════════════════════════
 * EL RÓTULO ES EL MANDO (2026-08-12)
 * ────────────────────────────────────────────────────────────────────────
 * Fuera las cuatro flechas «« ‹ › »». Se pulsa «Agosto» y salen los meses, se
 * pulsa «2026» y salen los años. Su idea, y es mejor que las tres que yo había
 * propuesto: el rótulo deja de ser un adorno y pasa a ser el control, así que
 * la fila se queda con DOS elementos en vez de seis.
 * ════════════════════════════════════════════════════════════════════════ */

/* `flex` para que la linea base del boton de dentro llegue hasta
   `.agenda-cal-nav`; siendo `block` se pierde y el año vuelve a subirse. */
.agenda-sel-wrap { position: relative; display: flex; }

.agenda-sel {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 6px 9px;
    background: transparent;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: background .15s ease;
}
.agenda-sel:hover { background: rgba(25,18,14,0.06); }
.agenda-sel[aria-expanded="true"] { background: rgba(225,17,18,0.08); }

/* El caret: la única pista de que se puede pulsar. Pequeño y apagado — que se
   note lo justo, que de eso iba «dejarlo limpio». */
.agenda-sel-caret {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    align-self: center;
    color: #b9ab9c;
    transition: transform .18s ease, color .15s ease;
}
.agenda-sel:hover .agenda-sel-caret { color: #19120e; }
.agenda-sel[aria-expanded="true"] .agenda-sel-caret { transform: rotate(180deg); color: var(--brand-red); }

/* ── El desplegable ── */
.agenda-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 40;
    margin: 0;
    padding: 6px;
    list-style: none;
    min-width: 168px;
    max-height: 268px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(25,18,14,0.10);
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(25,18,14,0.16);
}
.agenda-menu[hidden] { display: none; }
.agenda-menu-ano-lista { min-width: 108px; }

/* ⚠ `.content .agenda-menu li` y no `.agenda-menu li` a secas: la regla
   heredada `.content ul li` (0,1,2) le gana a `.agenda-menu li` (0,1,1) y le
   metía `padding: 0 0 12px`, dejando las filas en 26px de alto — la misma
   trampa de siempre, ahora en las listas. Con la clase por delante suma
   (0,2,1) y manda. */
.agenda-menu li,
.content .agenda-menu li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    color: #3d3128;
    cursor: pointer;
    white-space: nowrap;
    transition: background .12s ease, color .12s ease;
}
.agenda-menu li:hover { background: rgba(25,18,14,0.05); color: #19120e; }
.agenda-menu li.es-actual {
    background: var(--brand-red);
    color: #fff;
}
.agenda-menu li.es-actual .agenda-menu-ano { color: rgba(255,255,255,0.72); }

/* El año, al lado del mes, en pequeño: la lista cruza de un año a otro y sin
   esto no se sabría si «Enero» es de este año o del siguiente. */
.agenda-menu-ano {
    font-size: 11px;
    font-weight: 700;
    color: #a89684;
    letter-spacing: 0.04em;
}

@media screen and (max-width: 640px) {
    /* Dedo: filas más altas y el menú del año alineado a la derecha para que no
       se salga por el borde de la pantalla. */
    .agenda-menu li,
    .content .agenda-menu li { padding: 12px 13px; font-size: 15px; min-height: 44px; box-sizing: border-box; }
    .agenda-menu { max-height: 264px; }
    .agenda-menu-ano-lista { left: auto; right: 0; }
    .agenda-sel { padding: 8px 10px; min-height: 44px; }
}

/* ════════════════════════════════════════════════════════════════════════
 * LOS MANDOS, FUERA DE LA TIRA (2026-08-12)
 * ────────────────────────────────────────────────────────────────────────
 * Estaban en `position: absolute` ENCIMA de la tira, y él lo cazó en su
 * captura: si el día que caía debajo era rojo, el mando lo tapaba y ni se veía
 * el día ni quedaba bien. Ahora son hermanos de la tira, cada uno a su lado y
 * con aire, así que no pisan ninguna ficha.
 * ════════════════════════════════════════════════════════════════════════ */
.agenda-rail-wrap {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    width: 100%;
}
.agenda-rail-nav {
    position: static;
    transform: none;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
}
.agenda-rail-prev, .agenda-rail-next { left: auto; right: auto; }

/* Se DESACTIVAN en los extremos en vez de desaparecer: si se ocultaran, la
   tira daría un salto de 44px al llegar al borde. */
.agenda-rail-nav[hidden] {
    display: flex !important;
    opacity: 0.22;
    pointer-events: none;
    box-shadow: none;
}

@media screen and (min-width: 641px) {
    /* SIETE fichas exactas en el hueco que queda entre los dos mandos, con su
       propio hueco entre ellas: (100% − 6 huecos) ÷ 7. */
    .agenda-rail { gap: 10px; padding: 4px 0 10px; }
    .agenda-rail .agenda-dia {
        flex: 0 0 calc((100% - 60px) / 7);
        width: auto;
        min-height: 68px;
        border-radius: 14px;
    }
    .agenda-rail .agenda-dia-num { font-size: 21px; }
    .agenda-rail .agenda-dia-ini { font-size: 10px; }
    /* Sin el difuminado de los bordes: ya no hace falta insinuar que hay más
       —para eso están los mandos— y encima apagaba la primera y la última. */
    .agenda-rail { -webkit-mask-image: none; mask-image: none; }
}

@media screen and (max-width: 640px) {
    /* Con el dedo se arrastra: los mandos no se pintan y la tira ocupa todo. */
    .agenda-rail-wrap { gap: 0; }
}

/* ── El hueco para teclear el año ── */
.agenda-ano-escribe {
    display: flex;
    gap: 6px;
    padding: 4px 4px 8px;
    border-bottom: 1px solid rgba(25,18,14,0.08);
    margin-bottom: 4px;
}
.agenda-ano-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(91,68,48,0.22);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    color: #19120e;
    background: #fff;
    box-sizing: border-box;
}
.agenda-ano-input:focus { outline: none; border-color: var(--brand-red); }
.agenda-ano-ok {
    flex: 0 0 auto;
    height: 38px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: var(--brand-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.agenda-ano-ok:hover { background: #b00d0e; }
.agenda-ano-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 196px;
    overflow-y: auto;
}
.agenda-menu-ano-lista { min-width: 186px; padding: 6px; }

/* Mientras se pide el mes nuevo al servidor */
.agenda-rail.esta-cargando { opacity: 0.45; pointer-events: none; }

@media screen and (max-width: 640px) {
    .agenda-ano-input, .agenda-ano-ok { height: 44px; }
    .agenda-ano-lista li,
    .content .agenda-ano-lista li { min-height: 44px; }
}

/* ⚠ `position: relative` en la tira — no es adorno, es lo que hace que las
   cuentas salgan.
   El JS calcula qué día está a la vista comparando `ficha.offsetLeft` con
   `tira.scrollLeft`. Para que esa comparación signifique algo, el
   `offsetParent` de las fichas tiene que ser LA TIRA. Con la tira en `static`
   el `offsetParent` era la sección entera, así que la primera ficha empezaba
   en 190 en vez de en 0 y todo salía desplazado: el rótulo se quedaba un mes
   por detrás y el centrado en «hoy» apuntaba a otro sitio. */
.agenda-rail { position: relative; }

/* ── El buscador de la agenda, a las DOS alturas del sitio ─────────────────
   El sitio tiene dos alturas para un control de formulario: 38 en escritorio y
   44 en móvil. El buscador de la agenda de la portada NO cumplía ninguna de
   las dos, EN NINGÚN ANCHO. Medido a 1358, 1280, 360 y 320:

       desplegables (#agdRegion, #agdProvincia, #agdCiudad)   34  en los cuatro
       la caja de zona (#agdZona)                             32  en los cuatro
       las dos fechas (#agdInicio, #agdFinal)                 32 escritorio
                                                              34 móvil (*)
       el panel avanzado del hero, que es la referencia       38 / 44

   Y es la MISMA portada, con LOS MISMOS CAMPOS —comunidad, provincia,
   población, zona—, así que se veían dos formularios gemelos midiendo distinto.

   Por qué pasó: el 2026-08-12 se subieron a 44 en móvil los campos de
   `.hero-advanced-inner`, que es el contenedor que comparten el buscador de
   eventos, la búsqueda avanzada del hero y el formulario de la página del
   buscador. `#agendaSearchForm` / `.asf-grid` es OTRO formulario —el de la
   sección de agenda de la portada— y se quedó fuera de aquella tanda. Nadie lo
   notó porque hasta hace poco la agenda salía vacía.

   (*) En móvil flatpickr se aparta y deja un `input[type="date"]` nativo con
   la clase `.flatpickr-mobile`: el `.flatpickr-input` original queda en
   `display:none`. Por eso hay que nombrar los dos, o en el teléfono la fecha
   se quedaría corta mientras los demás campos suben.

   Se toca SOLO `min-height`, a propósito: el relleno, el tipo de letra, el
   borde y el radio se quedan como estaban, así que el único cambio a la vista
   es que el campo crece — no cambia el aspecto, se sincroniza la altura.

   ⚠ Lo que NO entra aquí: `#agendaCitySelect` (39px). Ese no es del
   formulario, vive en la tira de pestañas de «Próximos eventos», al lado de
   «Hoy / Este fin de semana / Próximo mes». Subirlo a 44 lo descuadraría de
   sus propios vecinos, que miden 40 en móvil. Medido y contado; decide él.

   Auditoría de cierre 2026-09-03, hallazgo H-03, aprobado por él. */
@media screen and (min-width: 641px) {
    .asf-field select,
    .asf-field input[type="text"],
    .asf-field .flatpickr-input,
    .asf-field input[type="date"] {
        min-height: 38px;
    }
}
@media screen and (max-width: 640px) {
    .asf-field select,
    .asf-field input[type="text"],
    .asf-field .flatpickr-input,
    .asf-field input[type="date"] {
        min-height: 44px;
    }
}

/* ── El bloque de texto del destacado, compacto y pegado abajo (solo móvil) ─
   Reportado el 2026-09-03: «en vez de estar las píldoras compactadas una con
   la otra de manera armoniosa y lo más abajo de la imagen posible, están en el
   centro tapando por completo la imagen».

   No estaba mal COLOCADO —`.lista` ya va con `bottom: 0`—: estaba mal MEDIDO.
   El bloque ocupaba 114 de los 162px de la tarjeta, o sea el 70%, así que
   empezaba justo a media altura y de la foto solo quedaban 48px asomando.
   Repartido: 28 de relleno, 18 la fila de zona, 46 el título y 22 el precio.

   Se toca solo el relleno y los huecos entre líneas, y la fila del carril pasa
   de 162 a 190px. El título NO se recorta: son hasta tres líneas y el nombre
   del establecimiento es lo único que identifica la tarjeta — es la misma
   regla que en el `<title>`, no se recorta nunca lo que distingue.

   Medido a 360 y 320, antes → después:
       tarjeta       162 → 190
       bloque texto  114 →  93
       foto a la vista 48 (30%) → 97 (51%)

   En escritorio no cambia nada: todo esto va dentro de la media de 640. */
@media screen and (max-width: 640px) {
    ul.home-featured-track li .lista {
        padding: 8px 10px;
    }
    ul.home-featured-track li h3 {
        margin-bottom: 3px;
    }
}

/* ── La caja de búsqueda de la portada, a 44px en el móvil ─────────────────
   Hallazgo H-04 de la auditoría, aprobado por él el 2026-09-03. Medido: 42px
   en escritorio y 36 en el teléfono, cuando el objetivo táctil del sitio son
   44. Es LA caja de búsqueda del directorio.

   ⚠ La barra que la envuelve mide 36px de alto fijo, así que subir solo el
   campo lo dejaría desbordando su propia píldora: suben los dos. El botón
   redondo ya medía 40 y se queda como está, ahora con sitio de sobra.

   En escritorio no se toca: el campo sigue en 42 y la barra en 40. */
@media screen and (max-width: 640px) {
    .hero-search-bar {
        height: 48px;
    }
    .hero-search-bar input[type="text"] {
        height: 44px;
        line-height: 44px;
    }
}
