/* Buscador de autoescuelas por provincia (buscador-autoescuelas.php, App\Helpers\BuscadorProvincia). */

/* ------------------------------------------------------------ formulario */
.bsq-form { position: sticky; top: 72px; z-index: 5; margin: 0 0 14px; padding: 14px; background: var(--ap-superficie); border: 1px solid var(--ap-borde-suave); border-radius: 16px; box-shadow: var(--ap-sombra-alta); }
.bsq-form-indice { position: static; max-width: 640px; }
.bsq-campo-texto { position: relative; display: flex; gap: 8px; }
.bsq-campo-texto > svg { position: absolute; left: 14px; top: 50%; width: 20px; height: 20px; margin-top: -10px; color: var(--ap-texto-3); pointer-events: none; }
.bsq-campo-texto input { flex: 1; min-width: 0; height: 50px; padding: 8px 14px 8px 44px; font-size: 16.5px; color: var(--ap-texto); background: var(--ap-superficie-2); border: 1px solid var(--ap-borde); border-radius: 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
.bsq-campo-texto input:focus { outline: none; background: var(--ap-superficie); border-color: var(--ap-acento); box-shadow: 0 0 0 4px var(--ap-acento-suave); }
.bsq-boton { flex: none; height: 50px; padding: 0 22px; font-weight: 700; color: #fff; background: var(--ap-acento); border: 0; border-radius: 12px; box-shadow: 0 4px 12px -4px rgba(31, 111, 235, .55); cursor: pointer; }
.bsq-boton:hover, .bsq-boton:focus-visible { background: var(--ap-acento-hover); }
.bsq-filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.bsq-filtros label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; font-size: 14px; color: var(--ap-texto-2); }
.bsq-filtros label > svg { width: 17px; height: 17px; color: var(--ap-acento); flex: none; }
.bsq-filtros select { width: auto; max-width: 260px; height: 36px; border-radius: 10px; }
.bsq-permiso { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.bsq-permiso label { position: relative; }
.bsq-permiso input { position: absolute; opacity: 0; pointer-events: none; }
.bsq-permiso label > span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; color: var(--ap-texto-2); background: var(--ap-superficie); border: 1px solid var(--ap-borde); border-radius: 999px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.bsq-permiso label > span svg { width: 16px; height: 16px; }
.bsq-permiso label:hover > span { border-color: #bcd2f7; }
.bsq-permiso input:checked + span { color: #fff; background: var(--ap-marca); border-color: var(--ap-marca); }
.bsq-permiso input:focus-visible + span { box-shadow: 0 0 0 3px var(--ap-acento-suave); }
.bsq-casilla input { margin: 0; accent-color: #d97706; }
.bsq-orden { margin-left: auto !important; }

.bsq-leyenda { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 13px; color: var(--ap-texto-2); }
.bsq-leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.bsq-leyenda .ap-cerrada { margin: 0; }
.bsq-punto { width: 10px; height: 10px; border-radius: 50%; }
.bsq-punto-alta { background: var(--ap-verde); }
.bsq-punto-media { background: var(--ap-acento); }
.bsq-punto-baja { background: #e5484d; }

.ap h2.bsq-titulo-lista { margin: 4px 0 6px; font-size: 21px; }
.bsq-cuenta { margin: 0 0 12px; color: var(--ap-texto-2); }
.bsq-cuenta strong { color: var(--ap-texto); font-size: 17px; }
#bsq-resultados { transition: opacity .15s; min-height: 120px; }
#bsq-resultados.bsq-cargando { opacity: .45; }
.bsq-paginas { text-align: center; }

/* ------------------------------------------------------------ tarjetas */
.bsq-rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; margin: 0 0 20px; padding: 0; list-style: none; }
.bsq-rejilla > li { display: flex; min-width: 0; }
.bsq-tarjeta { --bsq: var(--ap-acento); --bsq-suave: var(--ap-acento-suave); position: relative; display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 16px 16px 12px; background: var(--ap-superficie); border: 1px solid var(--ap-borde-suave); border-radius: 16px; box-shadow: var(--ap-sombra); overflow: hidden; transition: transform .18s cubic-bezier(.2, .7, .2, 1), box-shadow .18s, border-color .18s; }
.bsq-tarjeta::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--bsq); }
.bsq-tarjeta:hover, .bsq-tarjeta:focus-within { transform: translateY(-3px); box-shadow: var(--ap-sombra-alta); border-color: #bcd2f7; }
.bsq-alta { --bsq: var(--ap-verde); --bsq-suave: var(--ap-verde-suave); }
.bsq-baja { --bsq: #e5484d; --bsq-suave: #ffeef0; }
.bsq-pocos, .bsq-sin { --bsq: #9aa7b8; --bsq-suave: var(--ap-superficie-2); }
.bsq-cerrada { background: #fffdf8; }

.bsq-cab { display: flex; align-items: center; gap: 12px; }
.bsq-anillo { position: relative; flex: none; width: 64px; height: 64px; }
.bsq-anillo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.bsq-anillo circle { fill: none; stroke-width: 3.6; }
.bsq-anillo-fondo { stroke: var(--bsq-suave); }
.bsq-anillo-valor { stroke: var(--bsq); stroke-linecap: round; animation: bsq-anillo .9s cubic-bezier(.2, .7, .2, 1) both; }
.bsq-anillo b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--ap-letra-titulos); font-size: 19px; font-weight: 800; color: var(--ap-texto); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.bsq-anillo b small { font-size: 11px; font-weight: 700; margin: 4px 0 0 1px; color: var(--ap-texto-3); }
.bsq-sin .bsq-anillo b { color: var(--ap-texto-3); }
@keyframes bsq-anillo { from { stroke-dasharray: 0 100; } }

.bsq-quien { min-width: 0; }
.ap .bsq-quien h3 { margin: 0 0 3px; font-size: 16px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.bsq-quien h3 a { color: var(--ap-texto); text-decoration: none; }
/* Toda la tarjeta es el enlace a la ficha. */
.bsq-quien h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bsq-quien h3 a:focus-visible { outline: none; }
.bsq-tarjeta:focus-within { border-color: var(--ap-acento); }
.bsq-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin: 0; font-size: 12.5px; color: var(--ap-texto-2); }
.bsq-centro { display: inline-flex; align-items: center; gap: 3px; }
.bsq-centro svg { width: 13px; height: 13px; color: var(--bsq); }

.bsq-sellos { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.bsq-sello { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; font-size: 12px; font-weight: 700; border-radius: 999px; white-space: nowrap; }
.bsq-sello > svg { width: 13px; height: 13px; }
.bsq-sello-oro { color: #5a3d00; background: linear-gradient(135deg, #ffe08a, var(--ap-oro)); box-shadow: 0 2px 8px -3px rgba(255, 194, 61, .9); }
.bsq-sello-top { color: #3d4fd6; background: #eef0ff; }
.bsq-sello-verde { color: #11803a; background: var(--ap-verde-suave); }
.bsq-sello-cierre { position: relative; z-index: 2; padding: 3px 9px 3px 5px; background: #fff4e0; }
.bsq-sello-cierre .ap-cerrada { margin: 0; }

.bsq-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; }
.bsq-datos > div { padding: 7px 6px; text-align: center; background: var(--ap-superficie-2); border-radius: 10px; }
.bsq-datos dt { font-size: 11px; font-weight: 600; color: var(--ap-texto-3); text-transform: uppercase; letter-spacing: .03em; }
.bsq-datos dd { margin: 0; font-size: 16px; font-weight: 750; color: var(--ap-texto); font-variant-numeric: tabular-nums; }
.bsq-nota { margin: 0; padding: 10px 12px; font-size: 13.5px; color: var(--ap-texto-2); background: var(--ap-superficie-2); border-radius: 10px; }

.bsq-vs-barra { position: relative; display: block; height: 7px; background: var(--bsq-suave); border-radius: 4px; }
.bsq-vs-barra i { display: block; height: 100%; background: var(--bsq); border-radius: 4px; }
.bsq-vs-barra u { position: absolute; top: -4px; width: 2px; height: 15px; margin-left: -1px; background: var(--ap-marca); border-radius: 1px; }
.bsq-vs-texto { display: block; margin-top: 6px; font-size: 12.5px; color: var(--ap-texto-2); }
.bsq-alta .bsq-vs-texto { color: #11803a; font-weight: 600; }
.bsq-baja .bsq-vs-texto { color: #c2343a; font-weight: 600; }

.bsq-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: auto 0 0; padding-top: 10px; border-top: 1px solid var(--ap-borde-suave); }
.bsq-permisos { display: inline-flex; gap: 6px; position: relative; z-index: 2; }
.bsq-permisos > span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--ap-marca-2); background: var(--ap-superficie-2); border-radius: 8px; }
.bsq-permisos svg { width: 16px; height: 16px; }
.bsq-ver { display: inline-flex; align-items: center; gap: 4px; font-size: 13.5px; font-weight: 700; color: var(--ap-acento); white-space: nowrap; }
.bsq-ver svg { width: 15px; height: 15px; transition: transform .18s; }
.bsq-tarjeta:hover .bsq-ver svg { transform: translateX(4px); }

/* ------------------------------------------------------------ bloques de texto y enlaces */
.bsq-accesos { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 12px; margin: 22px 0; }
.bsq-accesos .ap-tarjeta { margin: 0; }
.bsq-centros { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; }
.bsq-centros li { padding: 10px 12px; background: var(--ap-superficie); border: 1px solid var(--ap-borde-suave); border-radius: 12px; }
.bsq-centros li > a:first-child { display: flex; align-items: center; gap: 5px; font-weight: 650; text-decoration: none; }
.bsq-centros svg { width: 15px; height: 15px; flex: none; }
.bsq-centros small { display: block; color: var(--ap-texto-2); }
.bsq-centro-mejores { font-size: 13px; }
.bsq-glosario { padding-left: 20px; }
.bsq-glosario li { margin-bottom: 4px; }

.bsq-otras { margin: 26px 0 10px; }
.ap .bsq-otras h2 { font-size: 18px; }
.bsq-otras ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bsq-otras a { display: inline-block; padding: 5px 11px; font-size: 13.5px; text-decoration: none; background: var(--ap-superficie); border: 1px solid var(--ap-borde-suave); border-radius: 999px; }
.bsq-otras a:hover { border-color: var(--ap-acento); background: var(--ap-acento-suave); }

/* ------------------------------------------------------------ índice de provincias */
.bsq-provincias { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 0 0 22px; padding: 0; list-style: none; }
.bsq-provincias a { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; color: var(--ap-texto); text-decoration: none; background: var(--ap-superficie); border: 1px solid var(--ap-borde-suave); border-radius: 14px; box-shadow: var(--ap-sombra); transition: transform .18s, box-shadow .18s, border-color .18s; }
.bsq-provincias a:hover, .bsq-provincias a:focus-visible { transform: translateY(-2px); box-shadow: var(--ap-sombra-alta); border-color: #bcd2f7; }
.bsq-provincia-icono { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px; color: var(--ap-acento); background: var(--ap-acento-suave); border-radius: 11px; }
.bsq-provincia-icono svg { width: 19px; height: 19px; }
.bsq-provincias strong { display: block; font-size: 15.5px; }
.bsq-provincias small { display: block; color: var(--ap-texto-2); font-size: 12.5px; }

@media (max-width: 767px) {
    .bsq-form { position: static; padding: 12px; }
    .bsq-boton { padding: 0 14px; }
    .bsq-filtros select { max-width: 100%; }
    .bsq-filtros > label:not(.bsq-casilla) { flex: 1 1 100%; }
    .bsq-filtros > label select { flex: 1; }
    .bsq-orden { margin-left: 0 !important; }
    .bsq-rejilla { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .bsq-anillo-valor { animation: none; }
    .bsq-tarjeta, .bsq-provincias a, .bsq-ver svg { transition: none; }
    .bsq-tarjeta:hover, .bsq-provincias a:hover { transform: none; }
}
