:root {
    --branches-green: #08714f;
    --branches-dark: #004f3a;
    --branches-deep: #003d2e;
    --branches-mint: #eaf7f1;
    --branches-line: #ccdad4;
    --branches-muted: #59635f;
    --branches-white: #ffffff;
}

.branches-float,
.security-floating-button{
    position: fixed;
    left: 5px;
    z-index: 50;

    width: 56px;
    height: 56px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;

    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;

    color: var(--branches-white);
    background: linear-gradient(135deg, var(--branches-green), var(--branches-dark));

    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;

    box-shadow:
        0 12px 30px rgba(0, 61, 46, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);

    font-family: Manrope, sans-serif;
    text-decoration: none;

    cursor:pointer;

    transition: width 0.4s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;

}

.preregistro-float{
  position: fixed;
  left:auto;
  flex-direction: row-reverse;
    right: 5px;
    z-index: 50;

    width: 56px;
    height: 56px;
    padding: 0;

    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;

    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;

    color: var(--branches-white);
    background: linear-gradient(135deg, var(--branches-green), var(--branches-dark));

    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 999px;

    box-shadow:
        0 12px 30px rgba(0, 61, 46, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);

    font-family: Manrope, sans-serif;
    text-decoration: none;

    cursor:pointer;

    transition: width 0.4s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;  
}
/* =========================================================
  BOTÓN FLOTANTE DE WHATSAPP
========================================================= */
.floating-button--whatsapp {
    background: #25d366;
}
.whatsapp-btn {
    position: fixed;
    z-index: 19;
    right: 5px;
    bottom: 50px;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 9px 25px rgba(0, 0, 0, 0.28);
}

.whatsapp-btn img { width: 32px; height: 32px; }
/*---------FIN WHATSAPP---------------*/


/* =========================================================
  BOTÓN FLOTANTE DE PREREGISTRO
========================================================= */

.preregistro-float {
    bottom: 110px;
}

.preregistro-float svg {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 16px;

    fill: currentColor;
    box-sizing: border-box;
}

.preregistro-float span{
    flex: 0 0 112px;
    padding-right: 18px;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    opacity: 0;
    transform: translateX(-12);
    transition:
        opacity 0.25s ease 0.1s,
        transform 0.3s ease 0.1s;
}

.preregistro-float:hover,
.preregistro-float:focus-visible{
    width: 168px;
    transform: translateY(-3px);
    background: linear-gradient(
        135deg,
        #09966a,
        var(--branches-green)
        );
    box-shadow:
        0 16px 36px rgba(0, 61, 46, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.preregistro-float:hover span,
.preregistro-float:focus-visible span{
    opacity: 1;
    transform: translateX(0);
}

.preregistro-float:focus-visible{
    outline: 3px solid rgba(8, 113, 79, 0.3);
    outline-offset: 4px;
}



/* BOTÓN FLOTANTE SUCURSALES */

.branches-float {
    bottom: 50px;
}

.branches-float svg {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    padding: 16px;

    fill: currentColor;
    box-sizing: border-box;
}

.branches-float span{
    flex: 0 0 112px;
    padding-right: 18px;
    font-size: 15px;
    font-weight: 700;
    text-align: left;
    opacity: 0;
    transform: translateX(-12);
    transition:
        opacity 0.25s ease 0.1s,
        transform 0.3s ease 0.1s;
}

.branches-float:hover,
.branches-float:focus-visible{
    width: 168px;
    transform: translateY(-3px);
    background: linear-gradient(
        135deg,
        #09966a,
        var(--branches-green)
        );
    box-shadow:
        0 16px 36px rgba(0, 61, 46, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.branches-float:hover span,
.branches-float:focus-visible span{
    opacity: 1;
    transform: translateX(0);
}

.branches-float:focus-visible{
    outline: 3px solid rgba(8, 113, 79, 0.3);
    outline-offset: 4px;
}

/* BOTÓN FLOTANTE TIPS DE SEGURIDAD */

.security-floating-button {
    bottom: 110px;

    width: 66px;
    height: 66px;
    padding: 8px;

    gap: 12px;

    overflow: hidden;
    isolation: isolate;

    background: linear-gradient(
        135deg,
        #08714f 0%,
        #006047 55%,
        #176946 100%
    );

    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;

    box-shadow:
        0 16px 34px rgba(0, 61, 46, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}


.security-floating-button::before {
    content: "";

    position: absolute;
    top: -70px;
    right: 35px;
    z-index: 0;

    width: 130px;
    height: 130px;

    background: rgba(244, 190, 74, 0.12);
    border-radius: 50%;

    pointer-events: none;
}

.security-floating-button::after {
    content: "";

    position: absolute;
    right: -75px;
    bottom: -115px;
    z-index: 0;

    width: 200px;
    height: 200px;

    background: rgba(0, 44, 33, 0.17);
    border-radius: 50%;

    pointer-events: none;
}

.security-floating-button__icon {
    position: relative;
    z-index: 1;

    flex: 0 0 50px;

    width: 50px;
    height: 50px;

    display: grid;
    place-items: center;

    color: var(--branches-dark);
    background: var(--branches-white);
    border-radius: 50%;

    box-shadow: 0 5px 15px rgba(0, 35, 26, 0.2);
}

.security-floating-button__icon::after {
    content: "";

    position: absolute;
    top: 4px;
    right: 4px;

    width: 9px;
    height: 9px;

    background: #f4be4a;
    border: 2px solid var(--branches-white);
    border-radius: 50%;
}

.security-floating-button__icon svg {
    width: 29px;
    height: 29px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.security-floating-button__content {
    position: relative;
    z-index: 1;

    flex: 0 0 205px;

    padding-right: 16px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    align-items: flex-start;

    line-height: 1.08;

    opacity: 0;
    transform: translateX(-12px);

    transition:
        opacity 0.25s ease 0.12s,
        transform 0.3s ease 0.12s;
}

.security-floating-button__content small {
    color: rgba(255, 255, 255, 0.72);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.055em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
}

.security-floating-button__content strong {
    margin-top: 2px;

    color: var(--branches-white);

    font-size: 19px;
    font-weight: 800;
    line-height: 1.05;
    white-space: nowrap;
}

.security-floating-button:hover,
.security-floating-button:focus-visible {
    width: 292px;

    transform: translateY(-3px);

    background: linear-gradient(
        135deg,
        #08714f 0%,
        #006047 55%,
        #176946 100%
    );

    box-shadow:
        0 20px 42px rgba(0, 61, 46, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.security-floating-button:hover
.security-floating-button__content,
.security-floating-button:focus-visible
.security-floating-button__content {
    opacity: 1;
    transform: translateX(0);
}

.security-floating-button:focus-visible {
    outline: 3px solid rgba(244, 190, 74, 0.55);
    outline-offset: 4px;
}

/* MODAL */

.branches-modal {
    width: min(760px, calc(100% - 32px));
    max-height: 86vh;
    margin: auto;
    padding: 0;

    color: #101413;
    background: var(--branches-white);

    border: 0;
    border-radius: 20px;

    box-shadow: 0 28px 80px rgba(0, 38, 28, 0.3);
    overflow: hidden;

    font-family: Manrope, sans-serif;
}

.branches-modal::backdrop {
    background: rgba(0, 26, 19, 0.7);
    backdrop-filter: blur(3px);
}

.branches-modal[open] {
    animation: branchesModalShow 0.25s ease;
}

@keyframes branchesModalShow {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.branches-modal,
.branches-modal * {
    box-sizing: border-box;
}


/* ENCABEZADO DEL MODAL */

.branches-modal__header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 96px;
    padding: 24px 70px;

    border-bottom: 1px solid #edf2ef;
}

.branches-modal__header h2 {
    margin: 0;

    color: var(--branches-deep);

    font-size: clamp(25px, 3vw, 36px);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.branches-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;

    display: grid;
    place-items: center;

    width: 44px;
    height: 44px;
    padding: 0;

    color: var(--branches-deep);
    background: var(--branches-white);

    border: 1px solid var(--branches-green);
    border-radius: 50%;

    font-size: 30px;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.branches-modal__close:hover {
    color: var(--branches-white);
    background: var(--branches-green);
    transform: rotate(90deg);
}


/* CONTENIDO */

.branches-modal__body {
    max-height: calc(86vh - 96px);
    padding: 24px 28px 30px;
    overflow-y: auto;
}


/* BUSCADOR */

.branches-search {
    position: relative;
}

.branches-search svg {
    position: absolute;
    top: 50%;
    left: 17px;
    transform: translateY(-50%);

    width: 21px;
    height: 21px;

    fill: var(--branches-muted);
    pointer-events: none;
}

.branches-search input {
    width: 100%;
    height: 54px;
    padding: 0 18px 0 50px;

    color: #101413;
    background: var(--branches-white);

    border: 1px solid var(--branches-line);
    border-radius: 10px;
    outline: none;

    font: inherit;
    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.branches-search input:focus {
    border-color: var(--branches-green);
    box-shadow: 0 0 0 4px rgba(8, 113, 79, 0.12);
}


/* FILTROS */

.branches-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    margin: 18px 0 24px;
}

.branches-filter {
    min-width: 130px;
    padding: 10px 20px;

    color: var(--branches-dark);
    background: var(--branches-mint);

    border: 1px solid transparent;
    border-radius: 999px;

    font: inherit;
    font-size: 14px;
    font-weight: 600;

    cursor: pointer;
    transition:
        color 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
}

.branches-filter:hover,
.branches-filter.is-active {
    color: var(--branches-white);
    background: var(--branches-green);
    border-color: var(--branches-green);
}


/* TARJETAS */

.branches-list {
    display: grid;
    gap: 16px;
}

.branch-card {
    display: grid;
    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(175px, 0.75fr)
        130px;

    align-items: center;
    gap: 20px;

    padding: 20px;

    background: var(--branches-white);
    border: 1px solid var(--branches-line);
    border-radius: 14px;

    box-shadow: 0 6px 18px rgba(0, 61, 46, 0.06);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.branch-card:hover {
    transform: translateY(-2px);
    border-color: rgba(8, 113, 79, 0.5);
    box-shadow: 0 10px 24px rgba(0, 61, 46, 0.1);
}

.branch-card__location {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.branch-card__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;

    width: 52px;
    height: 52px;

    color: var(--branches-green);
    background: var(--branches-mint);
    border-radius: 50%;
}

.branch-card__icon svg {
    width: 25px;
    height: 25px;
    fill: currentColor;
}

.branch-card h3 {
    margin: 0 0 6px;

    color: var(--branches-green);

    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.branch-card p {
    margin: 0;

    color: var(--branches-muted);

    font-size: 13px;
    line-height: 1.55;
}

.branch-card__contact {
    padding-left: 20px;
    border-left: 1px solid var(--branches-line);
}

.branch-card__contact a {
    display: inline-block;
    margin-bottom: 8px;

    color: var(--branches-dark);

    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.branch-card__contact a:hover {
    color: var(--branches-green);
    text-decoration: underline;
}

.branch-card__actions {
    display: grid;
    gap: 9px;
}

.branch-card__button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;
    padding: 9px 13px;

    border: 1px solid var(--branches-green);
    border-radius: 7px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;

    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.branch-card__button--primary {
    color: var(--branches-white);
    background: var(--branches-green);
}

.branch-card__button--primary:hover {
    background: var(--branches-dark);
}

.branch-card__button--outline {
    color: var(--branches-green);
    background: var(--branches-white);
}

.branch-card__button--outline:hover {
    color: var(--branches-white);
    background: var(--branches-green);
}

.branches-empty {
    margin: 24px 0 0;
    padding: 18px;

    color: var(--branches-muted);
    background: var(--branches-mint);
    border-radius: 10px;

    text-align: center;
}

.branches-empty[hidden],
.branch-card[hidden] {
    display: none;
}


/* RESPONSIVE */

@media (max-width: 760px) {
 .branches-float {
        left: 16px;
        bottom: 16px;

        width: 52px;
        height: 52px;
        padding: 0;
    }

    .branches-float svg {
        flex-basis: 52px;

        width: 52px;
        height: 52px;
    }

    .branches-float:hover,
    .branches-float:focus-visible {
        width: 164px;
    }

    .security-floating-button {
        left: 16px;
        bottom: 80px;

        width: 58px;
        height: 58px;
        padding: 7px;

        gap: 11px;
    }

    .security-floating-button__icon {
        flex-basis: 44px;

        width: 44px;
        height: 44px;
    }

    .security-floating-button__icon svg {
        width: 25px;
        height: 25px;
    }

    .security-floating-button__content {
        flex-basis: 195px;
    }

    .security-floating-button__content small {
        font-size: 9px;
    }

    .security-floating-button__content strong {
        font-size: 17px;
    }

    .security-floating-button:hover,
    .security-floating-button:focus-visible {
        width: 270px;
    }

    
    
    .branches-modal__header {
        min-height: 82px;
        padding: 20px 60px 20px 20px;
        justify-content: flex-start;
    }

    .branches-modal__header h2 {
        font-size: 24px;
        text-align: left;
    }

    .branches-modal__close {
        top: 18px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    .branches-modal__body {
        max-height: calc(92vh - 82px);
        padding: 20px 16px 24px;
    }

    .branches-filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .branches-filter {
        min-width: max-content;
    }

    .branch-card {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .branch-card__contact {
        padding: 14px 0 0;
        border-top: 1px solid var(--branches-line);
        border-left: 0;
    }

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

    .branches-float {
        left: 16px;
        bottom: 16px;
        min-height: 50px;
        padding: 11px 18px;
    }
}

@media (max-width: 420px) {
    .branch-card__actions {
        grid-template-columns: 1fr;
    }
    .whatsapp-btn { right: 16px; bottom: 16px; }


}