/* EM Buscador — colores corporativos WWME */
.em-buscador {
    --em-rojo: #CB333B;
    --em-amarillo: #F0B323;
    --em-gris: #53565A;
    --em-teal: #00A3AD;
    --em-naranja: #F68D2E;
    --em-gris-claro: #f4f4f4;
    font-family: 'Montserrat', sans-serif;
    color: var(--em-gris);
    max-width: 1100px;
    margin: 0 auto;
}

/* Filtros */
.em-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.em-q {
    flex: 2 1 240px;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
}
.em-q:focus { border-color: var(--em-teal); outline: none; }
.em-sel-loc {
    flex: 1 1 180px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 0;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}
.em-cercania {
    padding: 12px 18px;
    border: 2px solid var(--em-teal);
    background: #fff;
    color: var(--em-teal);
    border-radius: 0;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}
.em-cercania.em-activo { background: var(--em-teal); color: #fff; }

/* Chips de mes */
.em-meses {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.em-mes {
    padding: 6px 14px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 0;
    font-family: inherit;
    font-size: .85rem;
    cursor: pointer;
    color: var(--em-gris);
}
.em-mes.em-activo {
    background: var(--em-gris);
    color: #fff;
    border-color: var(--em-gris);
}

/* Píldoras de tipo (solo en modo "todos") */
.em-tipos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.em-tipo {
    padding: 8px 18px;
    border: 2px solid var(--em-rojo);
    background: #fff;
    border-radius: 0;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--em-rojo);
}
.em-tipo.em-activo {
    background: var(--em-rojo);
    color: #fff;
    border-color: var(--em-rojo);
}
/* Píldoras por tipo (v1.0.37) */
.em-tipo[data-tipo="matrimonios"] { border-color: #F0B323; color: #b8890f; }
.em-tipo[data-tipo="matrimonios"].em-activo { background: #F0B323; color: #fff; border-color: #F0B323; }
.em-tipo[data-tipo="novios"] { border-color: #00A3AD; color: #00A3AD; }
.em-tipo[data-tipo="novios"].em-activo { background: #00A3AD; color: #fff; border-color: #00A3AD; }
.em-tipo[data-tipo="sacerdotes"] { border-color: #CB333B; color: #CB333B; }
.em-tipo[data-tipo="sacerdotes"].em-activo { background: #CB333B; color: #fff; border-color: #CB333B; }

/* Etiqueta de tipo en las tarjetas del modo "todos" */
.em-tipo-tag {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--em-gris);
    background: rgba(255,255,255,.75);
    border: 1px solid #ddd;
    border-radius: 0;
    padding: 2px 10px;
    margin: 4px 0 6px;
}

/* Resumen de búsqueda */
.em-resumen {
    font-size: .9rem;
    color: var(--em-teal);
    min-height: 1.4em;
    margin-bottom: 12px;
    font-weight: 600;
}

/* Pestañas de vista */
.em-vistas {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--em-gris-claro);
}
.em-vista-btn {
    padding: 10px 24px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--em-gris);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}
.em-vista-btn.em-activo {
    color: var(--em-rojo);
    border-bottom-color: var(--em-rojo);
}

/* Tarjetas */
.em-lista {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}
.em-tarjeta {
    display: flex;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.em-fecha-badge {
    background: var(--em-amarillo);
    color: #fff;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 8px;
    text-align: center;
    font-weight: 700;
}
.em-fecha-badge .em-dias { font-size: 1.25rem; line-height: 1.1; }
.em-fecha-badge .em-mes-badge { font-size: .95rem; text-transform: uppercase; }
.em-tarjeta-cuerpo { padding: 14px 16px; flex: 1; }
.em-comunidad {
    font-weight: 700;
    font-size: 1.35rem;
    margin: 0 0 2px;
    color: var(--em-gris);
    line-height: 1.2;
}
.em-fecha {
    font-size: 0.95rem;
    color: #888;
    margin: 0 0 12px;
}
.em-localidad-sub {
    font-weight: 600;
    font-size: 1rem;
    margin: 0 0 6px;
    color: var(--em-teal);
}
.em-localidad {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0 0 4px;
    color: var(--em-gris);
}
.em-lugar { font-size: .9rem; color: #777; margin: 0 0 4px; }
.em-region { font-size: .85rem; color: #999; margin: 0 0 4px; }
.em-hora { font-size: .85rem; color: #999; margin: 0 0 6px; }
.em-tarjeta { cursor: pointer; }
.em-tarjeta:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.em-distancia { font-size: .85rem; color: var(--em-teal); font-weight: 600; margin: 0 0 10px; }
.em-inscribir {
    display: inline-block;
    background: var(--em-rojo);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
}
.em-inscribir:hover { background: #a8282f; color: #fff; }
.em-vacio { text-align: center; padding: 30px; color: #999; }

/* Calendario */
.em-cal { max-width: 900px; margin: 0 auto; }
.em-cal-detalle { margin-top: 16px; }
.fc-event { cursor: pointer; }

/* Etiqueta de tipo en su propia línea (v1.0.38): en la tarjeta G6 compartía
   línea con el botón y este se le montaba encima unos píxeles */
.em-tarjeta.em-g6 .em-tipo-tag {
    display: block;
    width: max-content;
    margin: 0 auto 12px;
}

/* Leyenda de colores por tipo en calendario y mapa (v1.0.38) */
.em-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    justify-content: center;
    margin: 16px 0 4px;
    font-size: .92rem;
    color: var(--em-gris);
    font-weight: 600;
}
.em-leyenda i {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    vertical-align: -2px;
}

/* Mapa */
.em-map { height: 480px; border-radius: 0; z-index: 1; }
.em-popup strong { font-size: 1rem; }
/* v1.0.40: letra blanca en el botón del globo. Sin esto, el color de enlace
   del tema (#44bdbd) se imponía al .em-inscribir base dentro del mapa. */
.em-popup .em-inscribir { margin-top: 8px; font-size: .85rem; padding: 8px 14px; color: #fff; }
.em-popup .em-inscribir:hover { color: #fff; }
/* Botones del popup del mapa por tipo (v1.0.37): sin esto caían al rojo base */
.em-popup .em-inscribir.em-tipo-matrimonios { background: #F0B323; }
.em-popup .em-inscribir.em-tipo-matrimonios:hover { background: #d9a11f; }
.em-popup .em-inscribir.em-tipo-novios { background: #00A3AD; }
.em-popup .em-inscribir.em-tipo-novios:hover { background: #008a93; }
.em-popup .em-inscribir.em-tipo-sacerdotes { background: #CB333B; }
.em-popup .em-inscribir.em-tipo-sacerdotes:hover { background: #a8282f; }

@media (max-width: 640px) {
    .em-lista { grid-template-columns: 1fr; }
    .em-map { height: 360px; }
    .em-vista-btn { padding: 10px 14px; font-size: .9rem; }
}

/* Modal de detalle */
.em-modal { position: fixed; inset: 0; z-index: 9999; }
.em-modal[hidden] { display: none; }
.em-modal-fondo {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
}
.em-modal-caja {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 0;
    max-width: 520px;
    width: calc(100% - 40px);
    max-height: 85vh;
    overflow-y: auto;
    padding: 28px;
    font-family: 'Montserrat', sans-serif;
    color: var(--em-gris);
}
.em-modal-cerrar {
    position: absolute;
    top: 10px; right: 14px;
    background: none; border: none;
    font-size: 2rem; line-height: 1;
    color: #999; cursor: pointer;
}
.em-modal-cerrar:hover { color: var(--em-rojo); }
.em-modal-fecha { border-radius: 0; margin-bottom: 14px; max-width: 140px; }
.em-modal-caja .em-comunidad { font-size: 1.6rem; margin-bottom: 2px; }
.em-modal-caja .em-inscribir {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 16px;
    background: #CB333B !important;
    color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 0;
    text-decoration: none !important;
    font-weight: 600 !important;
}
.em-modal-caja .em-inscribir:hover {
    background: #a8282f !important;
    color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.em-detalle-lista { margin: 16px 0; }
.em-detalle-lista dt {
    font-weight: 700; font-size: .8rem;
    text-transform: uppercase; color: #999;
    margin-top: 10px;
}
.em-detalle-lista dd { margin: 2px 0 0; font-size: 1rem; }
.em-detalle-lista a { color: var(--em-teal); }

/* Diseño F con fondo punteado (opción elegida por Jorge 15-10-2026) */
.em-tarjeta.em-f {
    display: block;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    padding: 28px 20px 0;
    text-align: center;
    position: relative;
    border: none;
    overflow: visible;
    border-left: 6px solid #F0B323;
    transition: transform .2s, box-shadow .2s;
    margin-top: 14px;
}
.em-tarjeta.em-f:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(240,179,35,.25);
}
.em-tarjeta.em-f .em-f-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: #F0B323;
    color: #fff;
    border-radius: 0;
    padding: 7px 18px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(240,179,35,.4);
}
.em-tarjeta.em-f .em-comunidad {
    font-size: 22px;
    margin: 30px 0 16px;
}
.em-tarjeta.em-f .em-inscribir {
    display: inline-block;
    border-radius: 0;
    padding: 10px 36px;
    margin-bottom: 20px;
}
.em-tarjeta.em-f::after {
    content: "";
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #F0B323, #F68D2E);
    margin: 0 -20px;
    border-radius: 0;
}
/* Más separación entre tarjetas */
.em-lista {
    gap: 28px !important;
}

/* Color por tipo (propuesta Emi 15-11-2026, v1.0.37): la clase em-tipo-* la pone
   el JS según la página (un solo tipo) o el tipo propio del fin (página general).
   Letras blancas también sobre amarillo, por acuerdo con Emi y Jorge. */
.em-tarjeta.em-f.em-tipo-matrimonios { border-left-color: #F0B323; }
.em-tarjeta.em-f.em-tipo-matrimonios .em-f-badge { background: #F0B323; box-shadow: 0 2px 8px rgba(240,179,35,.4); }
.em-tarjeta.em-f.em-tipo-matrimonios::after { background: linear-gradient(90deg, #F0B323, #F68D2E); }
.em-tarjeta.em-f.em-tipo-matrimonios:hover { box-shadow: 0 10px 28px rgba(240,179,35,.25); }
.em-tarjeta.em-f.em-tipo-matrimonios .em-inscribir { background: #F0B323; color: #fff; }
.em-tarjeta.em-f.em-tipo-matrimonios .em-inscribir:hover { background: #d9a11f; color: #fff; }
.em-tarjeta.em-f.em-tipo-novios { border-left-color: #00A3AD; }
.em-tarjeta.em-f.em-tipo-novios .em-f-badge { background: #00A3AD; box-shadow: 0 2px 8px rgba(0,163,173,.4); }
.em-tarjeta.em-f.em-tipo-novios::after { background: linear-gradient(90deg, #00A3AD, #4ecdc4); }
.em-tarjeta.em-f.em-tipo-novios .em-inscribir { background: #00A3AD; color: #fff; }
.em-tarjeta.em-f.em-tipo-novios .em-inscribir:hover { background: #008a93; color: #fff; }
.em-tarjeta.em-f.em-tipo-novios:hover { box-shadow: 0 10px 28px rgba(0,163,173,.25); }
.em-tarjeta.em-f.em-tipo-sacerdotes { border-left-color: #CB333B; }
.em-tarjeta.em-f.em-tipo-sacerdotes .em-f-badge { background: #CB333B; box-shadow: 0 2px 8px rgba(203,51,59,.4); }
.em-tarjeta.em-f.em-tipo-sacerdotes::after { background: linear-gradient(90deg, #CB333B, #F68D2E); }
.em-tarjeta.em-f.em-tipo-sacerdotes .em-inscribir { background: #CB333B; color: #fff; }
.em-tarjeta.em-f.em-tipo-sacerdotes .em-inscribir:hover { background: #a8282f; color: #fff; }
.em-tarjeta.em-f.em-tipo-sacerdotes:hover { box-shadow: 0 10px 28px rgba(203,51,59,.25); }

/* Diseño G6: banda superior con fecha grande (elegido por Jorge 15-10-2026) */
.em-tarjeta.em-g6 {
    display: block;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    overflow: hidden;
    text-align: center;
    border: none;
    padding: 0;
    transition: transform .2s, box-shadow .2s;
}
.em-tarjeta.em-g6:hover {
    transform: translateY(-4px);
}
.em-tarjeta.em-g6 .em-g6-top {
    color: #fff;
    padding: 14px 16px;
    font-weight: 800;
    font-size: 20px;
}
.em-tarjeta.em-g6 .em-g6-bot {
    padding: 18px 20px 20px;
}
.em-tarjeta.em-g6 .em-comunidad {
    font-size: 20px;
    margin: 0 0 14px;
}
.em-tarjeta.em-g6 .em-inscribir {
    display: inline-block;
    border-radius: 0;
    padding: 10px 36px;
}
/* Color por tipo (propuesta Emi 15-11-2026, v1.0.37) */
.em-tarjeta.em-g6.em-tipo-matrimonios { border-left: 6px solid #F0B323; }
.em-tarjeta.em-g6.em-tipo-matrimonios .em-g6-top { background: #F0B323; }
.em-tarjeta.em-g6.em-tipo-matrimonios .em-inscribir { background: #F0B323; color: #fff; }
.em-tarjeta.em-g6.em-tipo-matrimonios .em-inscribir:hover { background: #d9a11f; color: #fff; }
.em-tarjeta.em-g6.em-tipo-matrimonios:hover { box-shadow: 0 10px 28px rgba(240,179,35,.25); }
.em-tarjeta.em-g6.em-tipo-novios { border-left: 6px solid #00A3AD; }
.em-tarjeta.em-g6.em-tipo-novios .em-g6-top { background: #00A3AD; }
.em-tarjeta.em-g6.em-tipo-novios .em-inscribir { background: #00A3AD; color: #fff; }
.em-tarjeta.em-g6.em-tipo-novios .em-inscribir:hover { background: #008a93; color: #fff; }
.em-tarjeta.em-g6.em-tipo-novios:hover { box-shadow: 0 10px 28px rgba(0,163,173,.25); }
.em-tarjeta.em-g6.em-tipo-sacerdotes { border-left: 6px solid #CB333B; }
.em-tarjeta.em-g6.em-tipo-sacerdotes .em-g6-top { background: #CB333B; }
.em-tarjeta.em-g6.em-tipo-sacerdotes .em-inscribir { background: #CB333B; color: #fff; }
.em-tarjeta.em-g6.em-tipo-sacerdotes .em-inscribir:hover { background: #a8282f; color: #fff; }
.em-tarjeta.em-g6.em-tipo-sacerdotes:hover { box-shadow: 0 10px 28px rgba(203,51,59,.25); }

/* Distancia en km (botón "cerca de mí") */
.em-tarjeta .em-distancia {
    font-size: 13px;
    color: #888;
    margin: -6px 0 10px;
}

/* Cursor ojo rojo corporativo en las tarjetas (elegido por Jorge 15-10-2026) */
.em-tarjeta.em-g6 {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48'><ellipse cx='24' cy='24' rx='20' ry='13' fill='white' stroke='%23CB333B' stroke-width='4'/><circle cx='24' cy='24' r='7' fill='%23CB333B'/><circle cx='26' cy='22' r='2.5' fill='white'/></svg>") 24 24, pointer;
}
/* El botón mantiene la mano normal */
.em-tarjeta.em-g6 .em-inscribir {
    cursor: pointer;
}

/* Modal de detalle por tipo (v1.0.37): insignia de fecha y botón del color efectivo */
.em-modal.em-tipo-matrimonios .em-fecha-badge { background: #F0B323; }
.em-modal.em-tipo-novios .em-fecha-badge { background: #00A3AD; }
.em-modal.em-tipo-sacerdotes .em-fecha-badge { background: #CB333B; }
.em-modal.em-tipo-matrimonios .em-modal-caja .em-inscribir { background: #F0B323 !important; }
.em-modal.em-tipo-novios .em-modal-caja .em-inscribir { background: #00A3AD !important; }
.em-modal.em-tipo-sacerdotes .em-modal-caja .em-inscribir { background: #CB333B !important; }
.em-modal.em-tipo-matrimonios .em-modal-caja .em-inscribir:hover { background: #d9a11f !important; }
.em-modal.em-tipo-novios .em-modal-caja .em-inscribir:hover { background: #008a93 !important; }
.em-modal.em-tipo-sacerdotes .em-modal-caja .em-inscribir:hover { background: #a8282f !important; }
/* Pin del mapa por tipo (v1.0.37): el color va en el HTML del divIcon */
.em-pin { background: transparent; border: none; }
