/* Scoped integration also handles Elementor's cached legacy heading. */
.contenedor_mapa:has(.tq-branches) > .elementor-element-709b9ed, .contenedor_mapa:has(.tq-branches) .elementor-element-8e44179 { display: none; }
.contenedor_mapa:has(.tq-branches) { display: block; width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 20px; border: 0; box-sizing: border-box; }
.contenedor_mapa:has(.tq-branches) > .elementor-element { width: 100%; max-width: none; padding: 0; }
.tq-branches { --branch-blue: #0065a8; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; color: #172b3a; }
.tq-branches * { box-sizing: border-box; }
.tq-branches-heading, .tq-branches-directory { grid-column: 1 / -1; }
.tq-branches h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.2; color: var(--branch-blue); margin: 0 0 10px; }
.tq-branches h3 { font-size: 23px; line-height: 1.25; color: var(--branch-blue); margin: 0 0 14px; }
.tq-branches p { font-size: 16px; line-height: 1.5; margin: 0 0 12px; }
.tq-branches .tq-branches-context { font-size: 13px; color: #526979; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #dce6ec; letter-spacing: .03em; }
.tq-branches-overview { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: center; gap: 24px; padding: 18px 24px 18px 18px; background: #f5f8fa; border: 1px solid #e4ecf1; border-radius: 12px; }
.tq-branches-map { min-width: 0; align-self: center; }
.tq-map-stage { position: relative; overflow: hidden; border-radius: 8px; }
.tq-branches .mapa-svg { display: block; width: 100%; height: auto; }
.tq-branches .mapa-svg path { fill: #e8eef2; stroke: #fff; stroke-width: 1; cursor: default; }
.tq-branches .mapa-svg .tq-branch-state { fill: #73accb; cursor: default; stroke-width: 1.5; transition: fill .15s; }
.tq-branches .mapa-svg .tq-branch-state[data-selected=true] { fill: var(--branch-blue); stroke: #004976; stroke-width: 2; }
@media (hover: hover) and (pointer: fine) { .tq-branch-card:hover { border-color: #87b5cf; } .tq-map-hotspot:hover .tq-pin-shape { border-color: #004976; box-shadow: 0 0 0 3px rgb(0 101 168 / 12%); } }
.tq-branches .tq-map-instruction { font-size: 13px; color: #526979; margin: 6px 0 0; }
.tq-map-mobile-title, .tq-map-hotspots { display: none; }
.tq-branches.is-enhanced .tq-map-hotspots { display: block; position: absolute; inset: 0; pointer-events: none; }
.tq-map-hotspot { position: absolute; transform: translate(-50%, -100%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; }
.tq-pin-shape { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid #607889; border-radius: 50% 50% 0 50%; background: #fff; color: #0065a8; transform: rotate(45deg); box-shadow: 0 2px 5px rgb(23 43 58 / 10%); }
.tq-pin-shape span { transform: rotate(-45deg); font-size: 12px; font-weight: 700; line-height: 1; }
.tq-map-hotspot[aria-pressed=true] .tq-pin-shape { background: var(--branch-blue); color: #fff; border-color: #fff; box-shadow: 0 0 0 2px var(--branch-blue); }
.tq-branches-active { display: none; align-self: center; height: 310px; padding: 22px; border: 1px solid #dce6ec; border-left: 3px solid var(--branch-blue); background: #fff; border-radius: 8px; box-shadow: 0 4px 16px rgb(23 43 58 / 4%); }
.tq-branches.is-enhanced .tq-branches-active { display: flex; flex-direction: column; justify-content: center; }
.tq-branches .tq-branch-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .15em; margin: 0 0 10px; color: #526979; }
.tq-branches-active h3 { font-size: 26px; margin-bottom: 14px; }
.tq-branches-active .tq-branch-details { display: flex; flex-direction: column; align-items: flex-start; }
.tq-branches-directory { border-top: 1px solid #dce6ec; padding-top: 22px; }
.tq-branches-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tq-branch-card { border: 1px solid #dce6ec; border-radius: 8px; padding: 10px 14px; background: #fff; min-width: 0; }
.tq-branch-card.is-selected { border-color: var(--branch-blue); box-shadow: inset 3px 0 var(--branch-blue); background: #f7fbfd; }
.tq-branch-card h4 { margin: 0 0 4px; line-height: 1.3; }
.tq-branch-select { appearance: none; background: none; border: 0; padding: 4px 0; width: 100%; min-height: 44px; text-align: left; font: inherit; font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--branch-blue); cursor: pointer; scroll-margin-top: 90px; }
.tq-branch-card .tq-branch-address { font-size: 14px; line-height: 1.5; margin: 0; }
.tq-branch-contacts { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 4px 0; }
.tq-branch-phone, .tq-branch-email { display: inline-flex; align-items: center; min-height: 34px; color: var(--branch-blue); text-decoration: underline; }
.tq-branch-email { max-width: 100%; overflow-wrap: anywhere; }
.tq-branch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tq-branch-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--branch-blue); border-radius: 6px; color: var(--branch-blue); font-size: 14px; line-height: 22px; font-weight: 600; }
.tq-branch-actions a:last-child { background: var(--branch-blue); color: #fff; }
.tq-branch-actions a:hover { background: #e8f2f8; color: #004976; }
.tq-branch-actions a:last-child:hover { background: #004976; color: #fff; }
.tq-branches :is(a, button, [role=button]):focus-visible { outline: 3px solid #172b3a; outline-offset: 3px; }
.tq-branches .tq-branch-select:focus:not(:focus-visible) { outline: 0; }
.tq-branches .tq-branch-select:focus-visible { outline: 3px solid var(--branch-blue); outline-offset: 3px; border-radius: 4px; }
.tq-branch-details[hidden] { display: none; }
@media (max-width: 1100px) {
    .tq-branches { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .tq-branches-overview { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px; }
    .tq-branches-active { height: 280px; }
    .tq-branches-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .contenedor_mapa:has(.tq-branches) { padding: 24px 16px; }
    .tq-branches-heading { order: 0; }
    .tq-branches-directory { order: 1; padding-top: 18px; }
    .tq-branches-overview { order: 2; display: block; padding: 16px 0 0; border: 0; background: none; }
    .tq-branches-map { padding-top: 0; }
    .tq-branches.is-enhanced .tq-branches-active { display: none; }
    .tq-branches-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .tq-branch-card { padding: 0 14px; }
    .tq-branch-card h4 { margin: 0; }
    .tq-branch-select { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 56px; font-size: 16px; }
    .tq-branch-select::after { content: '+'; font-size: 22px; }
    .tq-branch-select[aria-expanded=true]::after { content: '−'; }
    .tq-branch-details { padding: 2px 0 14px; }
    .tq-branch-card .tq-branch-address { font-size: 15px; }
    .tq-map-mobile-title { display: block; }
    .tq-map-stage { width: calc(100% + 24px); margin-left: -12px; background: #f5f8fa; }

}
@media (prefers-reduced-motion: reduce) { .tq-branches .mapa-svg .tq-branch-state { transition: none; } }
/* Shared tracks align title, address, phone and actions within each directory row. */
@media (min-width: 768px) {
    .tq-branch-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; }
    .tq-branch-card h4 { margin: 0; }
    .tq-branch-card .tq-branch-details { display: contents; }
    .tq-branch-card .tq-branch-address { min-height: 3em; }
    .tq-branch-card .tq-branch-contacts { align-self: start; }
    .tq-branch-card .tq-branch-actions { align-self: start; }
}
