.contact-section.section-block {
    padding-bottom: clamp(4.5rem, 7vw, 6.5rem);
}

.contact-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.75rem;
    padding-bottom: 3rem;
    align-items: start;
}

.contact-layout--single {
    grid-template-columns: minmax(0, 820px);
    justify-content: center;
}

.contact-data,
.contact-form,
.branch-card {
    padding: 2.15rem;
    border-radius: 1.9rem;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 249, 249, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 1.4rem 2.6rem rgba(26, 39, 66, 0.05);
}

.contact-data h3,
.branch-card h3 {
    margin: 0 0 1.1rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.06em;
    color: var(--text-main);
}

.contact-data p {
    margin: 0 0 0.8rem;
}

.contact-data h4 {
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    color: var(--brand-primary);
    text-transform: uppercase;
}

.contact-data a,
.branch-card-copy a {
    color: var(--text-main);
}

.contact-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.65rem;
}

.contact-data-branch {
    min-width: 0;
}

.contact-data-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.65rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(38, 55, 73, 0.1);
}

.contact-email-link {
    font-weight: 700;
    text-decoration: none;
}

.contact-modal-open {
    min-height: 4.35rem;
    padding-inline: 1.75rem;
}

.contact-modal-open .isax,
#contact-submit .isax {
    font-size: 1.42rem;
}

.contact-wide-wrap {
    width: calc(100% - 4rem);
    margin-inline: auto;
}

.contact-unified-panel {
    padding: clamp(1.45rem, 2.4vw, 2rem);
    border-radius: 1.9rem;
    border: 1px solid rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 249, 249, 0.94));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 1.4rem 2.6rem rgba(26, 39, 66, 0.05);
}

.contact-branches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-branch {
    display: grid;
    grid-template-rows: auto minmax(16rem, 1fr);
    gap: 1.35rem;
    min-width: 0;
}

.contact-branch:first-child {
    padding-right: clamp(1.2rem, 2.4vw, 2rem);
    border-right: 1px solid rgba(38, 55, 73, 0.18);
}

.contact-branch:last-child {
    padding-left: clamp(1.2rem, 2.4vw, 2rem);
}

.contact-branch-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(7rem, auto);
    gap: 1rem;
    align-items: start;
}

.contact-branch-copy {
    min-width: 0;
}

.contact-branch-copy h3 {
    margin: 0 0 0.65rem;
    font-family: var(--font-display);
    font-size: clamp(2rem, 3vw, 2.8rem);
    line-height: 1;
    letter-spacing: -0.06em;
    color: var(--text-main);
}

.contact-branch-copy p {
    margin: 0;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-copy);
}

.contact-panel-footer {
    margin-top: 30px;
}

.contact-panel-separator {
    width: 100%;
    height: 1px;
    background: rgba(38, 55, 73, 0.16);
}

.contact-channel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.35rem;
    margin-top: 30px;
    flex-wrap: wrap;
}

.contact-phone-group,
.contact-whatsapp-link--footer,
.contact-mail-link {
    display: inline-flex;
    align-items: center;
    gap: 0.725rem;
    color: var(--text-main);
    font-weight: 700;
    font-size: clamp(1.3125rem, 1.475vw, 1.6rem);
    text-decoration: none;
    line-height: 1.2;
}

.contact-phone-group {
    flex-wrap: wrap;
}

.contact-channel-icon {
    width: 2.4375rem;
    height: 2.4375rem;
    display: block;
    flex: 0 0 auto;
}

.contact-channel-row > :not(.contact-modal-open) .contact-channel-icon {
    background: var(--button-primary-gradient);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.contact-channel-icon--phone {
    -webkit-mask-image: url("../../../img/icons/telefono.svg");
    mask-image: url("../../../img/icons/telefono.svg");
}

.contact-channel-icon--whatsapp {
    -webkit-mask-image: url("../../../img/icons/whatsapp.svg");
    mask-image: url("../../../img/icons/whatsapp.svg");
}

.contact-channel-icon--mail {
    -webkit-mask-image: url("../../../img/icons/mail.svg");
    mask-image: url("../../../img/icons/mail.svg");
}

.contact-channel-icon--button {
    width: 1.75rem;
    height: 1.75rem;
}

.contact-phone-group a {
    color: var(--text-main);
    text-decoration: none;
}

.contact-phone-group a:hover,
.contact-whatsapp-link--footer:hover span,
.contact-mail-link:hover span {
    color: var(--brand-primary-dark);
}

.contact-whatsapp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}

.contact-whatsapp-link .isax {
    font-size: 1rem;
    color: var(--brand-primary);
}

.contact-whatsapp-link:hover .isax,
.contact-whatsapp-link:hover span {
    color: var(--brand-primary-dark);
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.1rem;
    align-items: start;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.form-field {
    display: grid;
    gap: 0.5rem;
}

.form-field--full,
.contact-actions {
    grid-column: 1 / -1;
}

.contact-form label {
    display: block;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
}

.contact-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
}

#contact-feedback {
    font-size: 18px;
    letter-spacing: -0.02em;
    color: var(--text-copy);
    min-height: 2.4rem;
    line-height: 150%;
}

.contact-modal-dialog {
    width: min(760px, calc(100% - 2rem));
}

.contact-modal-content h3 {
    margin-bottom: 1.6rem;
}

.contact-modal-icon-glyph {
    width: 4.9rem;
    height: 4.9rem;
    display: block;
    background: #ffffff;
    -webkit-mask-image: url("../../../img/icons/send.svg");
    mask-image: url("../../../img/icons/send.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.contact-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid rgba(38, 55, 73, 0.14);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text-main);
    font: inherit;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0.7rem 1.25rem rgba(26, 39, 66, 0.04);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.contact-form input {
    min-height: 3.15rem;
    padding: 0.75rem 1rem;
}

.contact-form textarea {
    min-height: 8.5rem;
    padding: 0.9rem 1rem;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(47, 158, 209, 0.58);
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 0 0 4px rgba(47, 158, 209, 0.13),
        0 0.85rem 1.45rem rgba(26, 39, 66, 0.05);
}

.contact-form.is-sending {
    pointer-events: none;
}

#contact-feedback.is-error {
    color: #9a2d2d;
}

#contact-feedback.is-success {
    color: var(--brand-primary-dark);
    font-weight: 700;
}

.contact-map-band {
    width: 100%;
    margin-top: 1rem;
    padding: clamp(3rem, 5vw, 4.5rem) 0;
    background: #dfe4ea;
}

.branch-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem;
    width: calc(100% - 4rem);
    margin-inline: auto;
}

.branch-card {
    display: grid;
    grid-template-rows: auto minmax(16rem, 1fr);
    gap: 1.15rem;
    min-height: 100%;
    padding: 1.7rem;
}

.branch-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 30%);
    gap: 1.2rem;
    align-items: start;
}

.branch-card h3 {
    margin-bottom: 0.9rem;
    font-size: clamp(1.95rem, 2.8vw, 2.9rem);
}

.branch-card-copy > p {
    margin: 0 0 0.55rem;
}

.branch-card-copy > p:last-child {
    margin-bottom: 0;
}

.branch-card-action-wrap {
    display: flex;
    justify-content: flex-end;
}

.branch-directions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.78rem;
    padding: 0.2rem 0;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: color 0.28s ease;
}

.branch-directions-icon {
    width: 5.15rem;
    height: 5.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.38rem;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
    box-shadow:
        0 0.15rem 0.35rem rgba(42, 153, 239, 0.18),
        0 1rem 1.8rem rgba(59, 84, 232, 0.16);
    transform-origin: center;
    transition:
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.34s ease,
        filter 0.34s ease;
}

.branch-directions-glyph {
    width: 2.7rem;
    height: 2.7rem;
    display: block;
    background: #ffffff;
    -webkit-mask-image: url("../../../img/icons/map.svg");
    mask-image: url("../../../img/icons/map.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transform-origin: center;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.branch-directions-text {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--text-main);
    text-align: center;
    transform: translateY(0);
    transition:
        transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
        color 0.28s ease,
        font-weight 0.28s ease;
}

.branch-directions:hover .branch-directions-icon,
.branch-directions:focus-visible .branch-directions-icon,
.branch-directions.is-directions-active .branch-directions-icon {
    transform: scale(1.045);
    filter: saturate(1.05);
    box-shadow:
        0 0.2rem 0.45rem rgba(42, 153, 239, 0.22),
        0 1.25rem 2.2rem rgba(59, 84, 232, 0.2);
}

.branch-directions:hover .branch-directions-glyph,
.branch-directions:focus-visible .branch-directions-glyph,
.branch-directions.is-directions-active .branch-directions-glyph {
    transform: scale(1.18);
}

.branch-directions:hover .branch-directions-text,
.branch-directions:focus-visible .branch-directions-text,
.branch-directions.is-directions-active .branch-directions-text {
    transform: translateY(0.28rem);
    font-weight: 800;
    color: var(--brand-primary);
}

.branch-card-map {
    width: 100%;
    min-height: 16rem;
    border-radius: 1.55rem;
    overflow: hidden;
    background: #dbe4ea;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.96),
        0 0.8rem 1.6rem rgba(26, 39, 66, 0.05);
}

.contact-unified-panel .branch-card-map {
    min-height: 23rem;
}

.branch-card-map .leaflet-pane.leaflet-tile-pane {
    filter: var(--map-tint-filter);
}

.branch-card-map .leaflet-container {
    width: 100%;
    height: 100%;
    background: var(--map-bg);
}

.branch-card-map .leaflet-control-zoom a {
    color: var(--brand-primary-dark);
    background: rgba(255, 255, 255, 0.92);
}

.branch-card-map .branch-map-marker {
    border: 0;
    background: transparent;
}

.branch-card-map .branch-map-marker-glyph {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    background: url("../../../img/icons/empresa.svg") center / contain no-repeat;
    filter: drop-shadow(0 0.45rem 0.75rem rgba(6, 49, 85, 0.32));
    transform-origin: center;
    animation: branch-marker-pulse 4.8s ease-in-out 2.4s infinite;
    will-change: transform, filter;
}

.branch-card-map .branch-map-marker-glyph::after {
    content: "";
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    pointer-events: none;
    background:
        radial-gradient(circle at 38% 28%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.24) 18%, rgba(255, 255, 255, 0) 42%);
    mix-blend-mode: screen;
    opacity: 0;
    transform: scale(0.72);
    animation: branch-marker-glare 4.8s ease-in-out 2.4s infinite;
}

.branch-card-map .branch-map-marker:hover .branch-map-marker-glyph,
.branch-card-map .branch-map-marker:focus-visible .branch-map-marker-glyph {
    animation: none;
    transform: scale(1);
    filter: drop-shadow(0 0.45rem 0.75rem rgba(6, 49, 85, 0.32));
}

.branch-card-map .branch-map-marker:hover .branch-map-marker-glyph::after,
.branch-card-map .branch-map-marker:focus-visible .branch-map-marker-glyph::after {
    animation: none;
    opacity: 0;
}

@keyframes branch-marker-pulse {
    0%,
    58%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0.45rem 0.75rem rgba(6, 49, 85, 0.32));
    }

    10% {
        transform: scale(1.1);
        filter:
            drop-shadow(0 0.52rem 0.85rem rgba(6, 49, 85, 0.34))
            drop-shadow(0 0 0.7rem rgba(47, 205, 253, 0.36));
    }

    18% {
        transform: scale(1.02);
    }

    28% {
        transform: scale(1.08);
    }

    38% {
        transform: scale(1);
    }
}

@keyframes branch-marker-glare {
    0%,
    8%,
    48%,
    100% {
        opacity: 0;
        transform: scale(0.72);
    }

    16%,
    30% {
        opacity: 0.7;
        transform: scale(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .branch-card-map .branch-map-marker-glyph,
    .branch-card-map .branch-map-marker-glyph::after {
        animation: none;
    }
}

.branch-card-map .leaflet-popup-content-wrapper,
.branch-card-map .leaflet-popup-tip {
    background: rgba(240, 247, 255, 0.96);
    color: var(--text-main);
}

@media (max-width: 980px) {
    .contact-layout,
    .contact-form,
    .branch-cards-grid,
    .contact-data-grid,
    .contact-branches {
        grid-template-columns: 1fr;
    }

    .contact-branch:first-child {
        padding-right: 0;
        padding-bottom: 1.65rem;
        border-right: 0;
        border-bottom: 1px solid rgba(38, 55, 73, 0.18);
    }

    .contact-branch:last-child {
        padding-top: 1.65rem;
        padding-left: 0;
    }

    .branch-card-top {
        grid-template-columns: minmax(0, 1fr) 9.5rem;
    }

    .contact-channel-row {
        justify-content: flex-start;
    }

    .contact-modal-open {
        margin-left: auto;
    }
}

@media (max-width: 860px) {
    .contact-section.section-block {
        padding-bottom: 3.5rem;
    }
}

@media (max-width: 640px) {
    .contact-wide-wrap {
        width: calc(100% - 1rem);
    }

    .branch-cards-grid {
        width: calc(100% - 1rem);
    }

    .contact-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-data-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-modal-open {
        margin-left: 0;
        width: 100%;
    }

    .contact-unified-panel {
        padding: 1rem;
        border-radius: 1.45rem;
    }

    .contact-branch-head {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .contact-branch .branch-directions {
        align-items: center;
    }

    .contact-channel-row {
        align-items: center;
        flex-direction: column;
        gap: 1.1rem;
    }

    .contact-phone-group,
    .contact-whatsapp-link--footer,
    .contact-mail-link {
        justify-content: center;
        gap: 0.55rem;
        font-size: clamp(1.31rem, 7vw, 1.56rem);
        line-height: 1.25;
        text-align: center;
    }

    .contact-phone-group {
        width: 100%;
    }

    .contact-channel-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    .contact-channel-icon--button {
        width: 1.45rem;
        height: 1.45rem;
    }

    .branch-card-top {
        grid-template-columns: 1fr;
    }

    .branch-card-action-wrap {
        justify-content: flex-start;
    }

    .branch-directions {
        width: auto;
        min-width: 9rem;
    }

    .branch-card {
        padding: 1.5rem;
    }

    .contact-unified-panel .branch-card-map,
    .branch-card-map {
        min-height: 20rem;
        border-radius: 1.2rem;
    }

    .branch-directions {
        width: 100%;
        align-items: center;
        flex-direction: column;
        min-width: 0;
        gap: 0.68rem;
        padding: 0.45rem 0 0.9rem;
    }

    .branch-directions-icon {
        width: 5.66rem;
        height: 5.66rem;
        border-radius: 1.56rem;
    }

    .branch-directions-glyph {
        width: 2.73rem;
        height: 2.73rem;
    }

    .branch-directions-text {
        font-family: var(--font-display);
        font-size: clamp(1.45rem, 8vw, 1.8rem);
        line-height: 1.05;
        font-weight: 700;
        text-align: center;
        text-transform: none;
    }

    .contact-branch-copy {
        text-align: center;
    }

    .contact-branch-copy h3 {
        font-size: clamp(1.8rem, 11vw, 2.35rem);
    }

    .contact-branch-copy p {
        font-size: 17.5px;
    }

    .contact-modal-dialog {
        width: calc(100% - 1rem);
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

    .contact-actions .btn {
        width: 100%;
    }

    #contact-feedback {
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .contact-unified-panel {
        padding: 0.75rem;
    }

    .contact-branch:first-child {
        padding-bottom: 1.25rem;
    }

    .contact-branch:last-child {
        padding-top: 1.25rem;
    }

    .contact-unified-panel .branch-card-map,
    .branch-card-map {
        min-height: 17rem;
    }

    .contact-phone-group,
    .contact-whatsapp-link--footer,
    .contact-mail-link {
        font-size: 1.25rem;
    }

    .contact-phone-group {
        align-items: flex-start;
    }

    .contact-phone-group span[aria-hidden="true"] {
        display: none;
    }

    .contact-phone-group a {
        display: block;
        width: calc(100% - 2.6rem);
    }
}
