.boa-home {
    max-width: 1120px;
}

.boa-home-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 24px;
    margin-bottom: 22px;
    animation: boaFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.boa-home-eyebrow {
    color: var(--boa-red);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.boa-home-header h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 6px 0;
}

.boa-home-subtitle {
    color: #555e68;
    font-size: 17px;
    margin: 0;
}

.boa-home-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.boa-home-badge {
    align-items: center;
    background: #f8f9fb;
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    color: #38414a;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    padding: 6px 12px;
}

.boa-home-badge-dot {
    background: var(--boa-red);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(195, 16, 23, 0.16);
    display: inline-block;
    height: 8px;
    width: 8px;
    animation: boaBadgePulse 2.4s ease-in-out infinite;
}

.boa-map-card {
    background: #ffffff;
    border: 1px solid #e6e9ee;
    border-radius: 20px;
    box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08), 0 4px 14px rgba(17, 24, 39, 0.04);
    overflow: hidden;
    animation: boaMapReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.boa-map-card:hover {
    box-shadow: 0 24px 56px rgba(17, 24, 39, 0.11), 0 6px 18px rgba(195, 16, 23, 0.06);
}

.boa-map-stage {
    aspect-ratio: 1562 / 1194;
    background: linear-gradient(180deg, #f8f8fa 0%, #edeff3 100%);
    margin: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.boa-map-img {
    display: block;
    height: 100%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
    user-select: none;
    width: 100%;
    animation: boaMapZoomIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.boa-map-card:hover .boa-map-img {
    transform: scale(1.012);
}

.boa-map-svg {
    height: 100%;
    inset: 0;
    pointer-events: none;
    position: absolute;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    width: 100%;
    z-index: 2;
    animation: boaMapZoomIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.boa-map-card:hover .boa-map-svg {
    transform: scale(1.012);
}

.boa-route-base {
    fill: none;
    stroke: rgba(195, 16, 23, 0.22);
    stroke-dasharray: 8 10;
    stroke-linecap: round;
    stroke-width: 2.6;
    transition: stroke 0.3s ease, stroke-width 0.3s ease, opacity 0.3s ease;
    animation: boaDashFlow 18s linear infinite;
}

.boa-route-glow {
    fill: none;
    stroke: rgba(195, 16, 23, 0.35);
    stroke-dasharray: 28 180;
    stroke-linecap: round;
    stroke-width: 3.8;
    transition: opacity 0.3s ease, stroke 0.3s ease;
    animation: boaRouteSweep 5.5s linear infinite;
}

.boa-route-group.is-dimmed .boa-route-base {
    opacity: 0.25;
}

.boa-route-group.is-dimmed .boa-route-glow,
.boa-route-group.is-dimmed .boa-route-pulse {
    opacity: 0.15;
}

.boa-route-group.is-active .boa-route-base {
    stroke: rgba(195, 16, 23, 0.78);
    stroke-width: 3.4;
    animation-duration: 9s;
}

.boa-route-group.is-active .boa-route-glow {
    stroke: #c31017;
    stroke-width: 4.6;
    animation-duration: 3.2s;
}

.boa-pulse-halo {
    fill: rgba(195, 16, 23, 0.16);
}

.boa-pulse-core {
    fill: #c31017;
    filter: drop-shadow(0 0 5px rgba(195, 16, 23, 0.65));
}

.boa-hub-ring {
    fill: none;
    stroke: #c31017;
    stroke-width: 2.8;
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: boaHubRipple 3.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

.boa-hub-ring--delay {
    animation-delay: 1.6s;
}

.boa-hub-node[data-hub="madrid"] .boa-hub-ring { animation-delay: 0s; }
.boa-hub-node[data-hub="madrid"] .boa-hub-ring--delay { animation-delay: 1.6s; }
.boa-hub-node[data-hub="miami"] .boa-hub-ring { animation-delay: 0.55s; }
.boa-hub-node[data-hub="miami"] .boa-hub-ring--delay { animation-delay: 2.15s; }
.boa-hub-node[data-hub="cdmx"] .boa-hub-ring { animation-delay: 1.1s; }
.boa-hub-node[data-hub="cdmx"] .boa-hub-ring--delay { animation-delay: 2.7s; }
.boa-hub-node[data-hub="saopaulo"] .boa-hub-ring { animation-delay: 1.45s; }
.boa-hub-node[data-hub="saopaulo"] .boa-hub-ring--delay { animation-delay: 3.05s; }

.boa-hub-dot {
    fill: #c31017;
    stroke: #ffffff;
    stroke-width: 3;
    transition: transform 0.25s ease, fill 0.25s ease;
    transform-box: fill-box;
    transform-origin: center;
}

.boa-hub-node.is-active .boa-hub-dot {
    fill: #9f0d13;
    transform: scale(1.28);
}

.boa-hub-hit {
    cursor: pointer;
    fill: transparent;
    pointer-events: all;
}

.boa-map-tooltip {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(195, 16, 23, 0.22);
    border-radius: 14px;
    bottom: 18px;
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.14);
    left: 18px;
    max-width: 330px;
    opacity: 0;
    padding: 13px 16px;
    pointer-events: none;
    position: absolute;
    transform: translateY(8px);
    transition: opacity 0.24s ease, transform 0.24s ease;
    z-index: 4;
}

.boa-map-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.boa-map-tooltip-country {
    color: var(--boa-red);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.boa-map-tooltip-city {
    color: #161b22;
    display: block;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.boa-map-tooltip-entity {
    color: #3f4752;
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

.boa-map-tooltip-role {
    color: #6a737d;
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.boa-map-tooltip-addr {
    border-top: 1px dashed #e3e7ed;
    color: #4a5560;
    display: block;
    font-size: 12.5px;
    line-height: 1.4;
    margin-top: 7px;
    padding-top: 6px;
}

.boa-map-tooltip-addr:empty {
    display: none;
}

.boa-map-tooltip-addr::before {
    content: "📍 ";
}

.boa-map-footer {
    align-items: stretch;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-top: 1px solid #eef1f5;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 18px 11px;
}

.boa-map-offices {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.boa-office {
    align-items: flex-start;
    background: #f7f8fa;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    color: #1d2329;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    gap: 3px;
    padding: 7px 11px 8px;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.boa-office:hover {
    background: #fff6f6;
    border-color: rgba(195, 16, 23, 0.35);
    transform: translateY(-1px);
}

.boa-office:focus-visible {
    outline: 2px solid rgba(195, 16, 23, 0.5);
    outline-offset: 2px;
}

.boa-office.is-active {
    background: #fff5f5;
    border-color: rgba(195, 16, 23, 0.5);
    box-shadow: inset 0 0 0 1px rgba(195, 16, 23, 0.14), 0 6px 14px rgba(195, 16, 23, 0.08);
}

.boa-office-name {
    align-items: center;
    color: #1a1f26;
    display: flex;
    font-size: 12.5px;
    font-weight: 700;
    gap: 6px;
    line-height: 1.2;
}

.boa-office.is-active .boa-office-name {
    color: var(--boa-red);
}

.boa-office-dot {
    background: #c31017;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(195, 16, 23, 0.14);
    flex: 0 0 auto;
    height: 7px;
    width: 7px;
}

.boa-office-addr {
    color: #6b7480;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.35;
}

.boa-map-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.boa-hub-btn {
    align-items: center;
    background: #f4f6f9;
    border: 1px solid #e1e5ec;
    border-radius: 999px;
    color: #2c343d;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    gap: 7px;
    padding: 5px 13px;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.boa-hub-btn:hover {
    background: #fff5f5;
    border-color: rgba(195, 16, 23, 0.35);
    color: var(--boa-red);
    transform: translateY(-1px);
}

.boa-hub-btn.is-active {
    background: var(--boa-red);
    border-color: var(--boa-red);
    color: #ffffff;
}

.boa-map-caption {
    color: #68717b;
    font-size: 13px;
    margin: 0;
}

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

@keyframes boaMapReveal {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes boaMapZoomIn {
    from {
        opacity: 0.72;
        transform: scale(1.03);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes boaDashFlow {
    from {
        stroke-dashoffset: 360;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes boaRouteSweep {
    from {
        stroke-dashoffset: 416;
    }
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes boaHubRipple {
    0% {
        opacity: 0.82;
        transform: scale(0.8);
    }
    70% {
        opacity: 0.16;
    }
    100% {
        opacity: 0;
        transform: scale(3.8);
    }
}

@keyframes boaBadgePulse {
    0%, 100% {
        box-shadow: 0 0 0 2px rgba(195, 16, 23, 0.18);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(195, 16, 23, 0.05);
    }
}

/* Vista de una sola pantalla: la portada cabe sin scroll vertical */
@media (min-width: 900px) and (min-height: 560px) {
    .boa-home {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 62px);
        height: calc(100dvh - 62px);
        overflow: hidden;
    }

    .boa-home-header {
        flex: 0 0 auto;
        margin-bottom: 14px;
    }

    .boa-map-card {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    .boa-map-stage {
        aspect-ratio: auto;
        flex: 1 1 auto;
        min-height: 0;
    }

    .boa-map-footer {
        flex: 0 0 auto;
    }
}

@media (min-width: 900px) and (max-height: 820px) {
    .boa-home-header h2 {
        font-size: 26px;
    }
    .boa-home-subtitle {
        font-size: 15px;
    }
    .boa-home-eyebrow {
        font-size: 12px;
    }
    .boa-office-name {
        font-size: 12px;
    }
    .boa-office-addr {
        font-size: 11px;
    }
    .boa-map-caption {
        font-size: 12px;
    }
}

@media (max-width: 900px) {
    .boa-map-offices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .boa-home-header h2 {
        font-size: 25px;
    }
    .boa-map-tooltip {
        bottom: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        padding: 10px 12px;
    }
    .boa-map-footer {
        padding: 10px 12px 12px;
    }
}

@media (max-width: 560px) {
    .boa-map-offices {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .boa-home-header,
    .boa-map-card,
    .boa-map-img,
    .boa-map-svg,
    .boa-route-base,
    .boa-route-glow,
    .boa-hub-ring,
    .boa-home-badge-dot {
        animation: none !important;
        transition: none !important;
    }
}
