/* ==========================================================================
   CUSTOM CONTACT - Pagina de contacto: banner superior y seccion mapa/formulario
   ========================================================================== */

/* ----------------------------------------------------------------------------
   Estilos base (Desktop)
   ---------------------------------------------------------------------------- */

/* --- Contact Banner --- */

#contactBanner {
    display: flex;
    gap: 80px;
    padding: 48px 64px 0 64px;
}

#contactBanner .leftCol {
    max-width: 512px;
    width: 100%;
}

#contactBanner .leftCol #breadCrumb {
    padding: 0;
    margin-bottom: 56px;
}

#contactBanner .leftCol .title {
    margin: 0 0 24px 0;
    font-family: 'Playfair Display';
    font-size: 4rem;
    color: #00181a;
    font-weight: 400;
    line-height: 5rem;
    text-transform: uppercase;
}

#contactBanner .leftCol .subtitle {
    margin: 0 0 48px 0;
    font-size: 1.1875rem;
    color: #00181a;
    font-weight: 700;
    line-height: 1.8125rem;
}

#contactBanner .leftCol p {
    margin: 0 0 24px 0;
    font-size: 1.0625rem;
    color: #00181a;
    font-weight: 400;
    line-height: 1.625rem;
}

#contactBanner .leftCol p:last-child {
    margin-bottom: 0;
}

/* Grupo de botones: "Leer mas" + "Ver en Google Maps" */
#contactBanner .leftCol .btnGroup {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}

/* Boton solido corporativo (Google Maps) */
#contactBanner .leftCol .googleMapsBtn {
    margin-top: 16px;
    border-color: #00A8B5;
    background-color: #00A8B5;
    color: #ffffff;
    text-decoration: none;
}

/* Resetear margin cuando esta dentro del grupo (el grupo ya pone margin-top) */
#contactBanner .leftCol .btnGroup .googleMapsBtn {
    margin-top: 0;
}

#contactBanner .leftCol .googleMapsBtn:hover {
    border-color: #008691;
    background-color: #008691;
    color: #ffffff;
    text-decoration: none;
}

/* Flecha en blanco para contrastar con el fondo azul */
#contactBanner .leftCol .googleMapsBtn img.arrow {
    filter: brightness(0) invert(1);
}

#contactBanner .rightCol {
    display: flex;
    gap: 80px;
    width: 100%;
}

#contactBanner .rightCol .bannerImg {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

#contactBanner .rightCol .bannerImg picture,
#contactBanner .rightCol .bannerImg picture img {
    display: block;
    max-width: 620px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#contactBanner .rightCol .rightBox {
    display: flex;
    flex-direction: column;
    justify-content: end;
    max-width: 320px;
    width: 100%;
    padding: 64px 0;
}

#contactBanner .rightCol .title {
    margin-bottom: 24px;
    font-size: 1.1875rem;
    color: #00181a;
    font-weight: 700;
    line-height: 1.8125rem;
    text-transform: uppercase;
}

#contactBanner .rightCol ul {
    display: flex;
    gap: 16px;
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
}

#contactBanner .rightCol ul li {
    display: flex;
    gap: 5px;
    align-items: center;
}

#contactBanner .rightCol ul li .labe {
    font-size: 0.8125rem;
    color: #00181a;
    font-weight: 700;
    line-height: 1.375rem;
    text-transform: uppercase;
}

#contactBanner .rightCol ul li a {
    position: relative;
    font-size: 1.1875rem;
    color: #00181a;
    font-weight: 400;
    line-height: 1.375rem;
}

#contactBanner .rightCol ul li a::after {
    content: "";
    width: 100%;
    height: 1px;
    background: #606060;
    position: absolute;
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .40s cubic-bezier(0, 0, 0.57, 1);
}

#contactBanner .rightCol ul li a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* --- Seccion Mapa y Formulario --- */

#mapsSec {
    padding-top: 128px;
    padding-bottom: 128px;
}

#mapsSec .text {
    display: flex;
    max-width: 1180px;
    margin: 0 auto 128px auto;
    font-family: 'Playfair Display';
    font-size: 1.6875rem;
    color: #00181a;
    font-weight: 400;
    line-height: 2.6875rem;
    text-align: center;
}

#mapsSec .mapsBox {
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

#mapsSec .mapsBox #map {
    width: 100%;
    height: 824px;
}

#mapsSec .contactFrom {
    position: relative;
    max-width: 1180px;
    width: 100%;
    padding: 80px;
    margin: -110px auto 0 auto;
    background-color: #2A2A2A;
    background-image: url(../images/noise-white-bg.png);
    background-position: center center;
    background-repeat: repeat;
    z-index: 1;
}

#mapsSec .contactFrom h4 {
    margin-bottom: 40px;
    font-family: 'Playfair Display';
    font-size: 3.375rem;
    color: #FFFFFF;
    font-weight: 400;
    line-height: 5.0625rem;
    text-transform: uppercase;
    text-align: center;
}

#mapsSec .contactFrom form {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 652px;
    margin: 0 auto;
}

#mapsSec .contactFrom form .field {
    width: 100%;
}

#mapsSec .contactFrom form .field.half {
    width: calc(50% - 12px);
}

#mapsSec .contactFrom form .field .floating-label-wrap {
    width: 100%;
}

#mapsSec .contactFrom form .field .floating-label-wrap label {
    margin-bottom: 8px;
    font-size: 0.8125rem;
    color: #FFFFFF;
    font-weight: 700;
    line-height: 1.375rem;
}

#mapsSec .contactFrom form .field .floating-label-wrap .form-control {
    display: block;
    height: 48px;
    padding: 12px 70px 12px 12px;
    border: 1px solid #FFFFFF;
    background-color: transparent;
    border-radius: 6px;
    box-shadow: none;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 300;
    line-height: 1.5rem;
}

#mapsSec .contactFrom form .field .floating-label-wrap textarea.form-control {
    height: auto;
    resize: none;
}

#mapsSec .contactFrom form .field .floating-label-wrap .form-control::placeholder {
    color: #ffffff;
}

#mapsSec .contactFrom form .field p {
    margin: 0;
    font-size: 0.8125rem;
    color: #FFFFFF;
    font-weight: 400;
    line-height: 1.375rem;
}

#mapsSec .contactFrom form .field p span {
    font-weight: 700;
}

#mapsSec .contactFrom form .field p span a {
    color: inherit;
    transition: color 0.3s ease;
}

#mapsSec .contactFrom form .field p span a:hover {
    color: #00A8B5;
}

/* Boton de envio: sobreescribe estilos globales del boton */
#mapsSec .contactFrom form .sendButton {
    border-color: #FFFFFF;
    background-color: white;
    color: #00181a;
}

#mapsSec .contactFrom form .sendButton:hover {
    border-color: #00a8b5;
    background-color: #00a8b5;
    color: #ffffff;
}

#mapsSec .contactFrom form .sendButton img.arrow {
    filter: none;
}

#mapsSec .contactFrom form .sendButton:hover img.arrow {
    filter: brightness(0) invert(1);
}

/* --- Mensajes de formulario --- */

#mapsSec .contactFrom .js-form-messages {
    width: 100%;
}

#mapsSec .contactFrom .alert {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9375rem;
    line-height: 1.375rem;
    text-align: center;
}

#mapsSec .contactFrom .alert--success {
    background-color: rgba(40, 167, 69, 0.15);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #a3e4b0;
}

#mapsSec .contactFrom .alert--error {
    background-color: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #f5a5ab;
}

/* --- Errores de campo --- */

#mapsSec .contactFrom form .field .form-control.error {
    border-color: #dc3545;
}

#mapsSec .contactFrom form .field .error-message {
    display: block;
    margin-top: 4px;
    font-size: 0.8125rem;
    color: #f5a5ab;
    line-height: 1.125rem;
}

/* --- Checkbox privacidad --- */

#mapsSec .contactFrom form .field--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

#mapsSec .contactFrom form .field--checkbox input[type="checkbox"] {
    margin-top: 4px;
    accent-color: white;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

#mapsSec .contactFrom form .field--checkbox label {
    font-size: 0.8125rem;
    color: #FFFFFF;
    font-weight: 400;
    line-height: 1.375rem;
    cursor: pointer;
}

#mapsSec .contactFrom form .field--checkbox label a {
    color: #FFFFFF;
    font-weight: 700;
    transition: color 0.3s ease;
}

#mapsSec .contactFrom form .field--checkbox label a:hover {
    color: #00A8B5;
}

/* === NUEVO === */

/* --- Boton submit: estados loading y disabled --- */

/* Estado loading: oculta texto e icono manteniendo ancho del boton
   y muestra un spinner centrado */
#mapsSec .contactFrom form .sendButton.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

/* Spinner centrado. El color se toma del boton: fondo claro (white)
   con texto oscuro (#2A2A2A), por lo que el spinner usa el color oscuro */
#mapsSec .contactFrom form .sendButton.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    margin-left: -9px;
    border: 2px solid #2A2A2A;
    border-top-color: transparent;
    border-radius: 50%;
    animation: sendButtonSpin 0.8s linear infinite;
}

@keyframes sendButtonSpin {
    to { transform: rotate(360deg); }
}

/* Estado disabled generico: atenuado y con cursor de espera */
#mapsSec .contactFrom form .sendButton:disabled,
#mapsSec .contactFrom form .sendButton[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* Disabled sin loading: cursor de bloqueo en lugar de espera */
#mapsSec .contactFrom form .sendButton:disabled:not(.loading),
#mapsSec .contactFrom form .sendButton[disabled]:not(.loading) {
    cursor: not-allowed;
}

/* Respeto a usuarios con preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    #mapsSec .contactFrom form .sendButton.loading::after {
        animation: none;
    }
}

/* --- Override .recaptcha-notice para el formulario de contacto ---
   El formulario tiene fondo oscuro (#2A2A2A), asi que el aviso usa
   un color claro con suficiente contraste. Los enlaces mantienen
   el color blanco con hover corporativo. */
#mapsSec .contactFrom form .recaptcha-notice {
    width: 100%;
    margin: 0;
    color: rgba(255, 255, 255, 0.70);
}

#mapsSec .contactFrom form .recaptcha-notice a {
    color: #FFFFFF;
}

#mapsSec .contactFrom form .recaptcha-notice a:hover {
    color: #00A8B5;
}

/* --- Honeypot anti-bot --- */

/* Se oculta visualmente pero permanece accesible para los bots que
   rellenan todos los inputs. No se usa display:none porque los bots
   sofisticados lo detectan y lo evitan.
   JUSTIFICACION DE !important: este elemento es de seguridad y debe
   blindarse frente a cualquier regla heredada de .field o .form-control
   dentro del formulario. Excepcion documentada a la regla general
   de evitar !important. */
#mapsSec .contactFrom form .contact-form__honeypot {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* ----------------------------------------------------------------------------
   Sub-rango intermedio (992px - 1365px)
   Valores reducidos para pantallas desktop pequenas
   Los estilos base (sin media query) aplican para 1366px+ y coinciden con la maqueta
   ---------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1365px) {
    #contactBanner {
        gap: 40px;
        padding: 40px 15px 0 15px;
    }

    #contactBanner .leftCol {
        max-width: 35%;
    }

    #contactBanner .leftCol #breadCrumb {
        margin-bottom: 20px;
    }

    #contactBanner .leftCol .title {
        margin: 0 0 20px 0;
        font-size: 2.8125rem;
        line-height: 3.4375rem;
    }

    #contactBanner .leftCol .subtitle {
        margin: 0 0 20px 0;
    }

    #contactBanner .leftCol p {
        margin: 0 0 20px 0;
    }

    #contactBanner .leftCol .btnGroup {
        gap: 12px;
        margin-top: 7px;
    }

    #contactBanner .leftCol .googleMapsBtn {
        margin-top: 7px;
    }

    #contactBanner .rightCol {
        gap: 40px;
    }

    #contactBanner .rightCol .rightBox {
        padding: 40px 0;
        max-width: 40%;
    }

    #contactBanner .rightCol .title {
        margin-bottom: 20px;
    }

    #contactBanner .rightCol ul {
        gap: 14px;
    }

    #contactBanner .rightCol ul li a {
        font-size: 1rem;
        line-height: 1.25rem;
    }

    #mapsSec {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    #mapsSec .text {
        font-size: 1.5625rem;
        line-height: 2.1875rem;
        margin: 0 auto 70px auto;
    }

    #mapsSec .mapsBox #map {
        height: 600px;
    }

    #mapsSec .contactFrom {
        max-width: 90%;
        padding: 50px;
    }

    #mapsSec .contactFrom h4 {
        font-size: 2.8125rem;
        line-height: 3.4375rem;
        margin-bottom: 30px;
    }
}

/* ----------------------------------------------------------------------------
   Desktop Grande (>1920px)
   Sin ajustes especificos: los estilos base aplican correctamente
   ---------------------------------------------------------------------------- */

@media (min-width: 1921px) {
    /* Los estilos base cubren este rango. Se mantiene el bloque para
       futuras adaptaciones a pantallas grandes */
}

/* ----------------------------------------------------------------------------
   Tablet y Movil (<992px)
   Valores tomados del sub-rango superior 768-960px del maquetador
   ---------------------------------------------------------------------------- */

@media (max-width: 991px) {
    #contactBanner {
        padding: 40px 15px 0 15px;
        flex-direction: column;
        gap: 40px;
    }

    #contactBanner .leftCol {
        max-width: 100%;
    }

    #contactBanner .leftCol #breadCrumb {
        margin-bottom: 20px;
    }

    #contactBanner .leftCol .title {
        margin: 0 0 15px 0;
        font-size: 2.5rem;
        line-height: 2.8125rem;
    }

    #contactBanner .leftCol .subtitle {
        margin: 0 0 15px 0;
        font-size: 1.0625rem;
        line-height: 1.6875rem;
    }

    #contactBanner .leftCol p {
        margin: 0 0 15px 0;
    }

    #contactBanner .leftCol .btnGroup {
        gap: 12px;
        margin-top: 7px;
    }

    #contactBanner .leftCol .googleMapsBtn {
        margin-top: 7px;
    }

    #contactBanner .rightCol {
        gap: 40px;
    }

    #contactBanner .rightCol .rightBox {
        padding: 40px 0;
    }

    #contactBanner .rightCol .title {
        font-size: 1rem;
        line-height: 1.25rem;
        margin-bottom: 20px;
    }

    #contactBanner .rightCol ul {
        gap: 10px;
    }

    #contactBanner .rightCol ul li a {
        font-size: 1rem;
        line-height: 1.25rem;
    }

    #mapsSec {
        padding-top: 50px;
        padding-bottom: 50px;
    }

    #mapsSec .text {
        font-size: 1.375rem;
        line-height: 1.875rem;
        margin: 0 auto 50px auto;
    }

    #mapsSec .mapsBox #map {
        height: 500px;
    }

    #mapsSec .contactFrom {
        max-width: 90%;
        padding: 40px;
        margin: -80px auto 0 auto;
    }

    #mapsSec .contactFrom h4 {
        font-size: 2.5rem;
        line-height: 2.8125rem;
    }

    #mapsSec .contactFrom form .sendButton {
        padding: 10px 20px;
    }
}

/* ----------------------------------------------------------------------------
   Movil pequeno (<768px)
   ---------------------------------------------------------------------------- */

@media (max-width: 767px) {
    #contactBanner {
        padding: 30px 15px 0 15px;
        gap: 30px;
    }

    #contactBanner .leftCol .title {
        margin: 0 0 15px 0;
        font-size: 2.1875rem;
        line-height: 2.5rem;
    }

    #contactBanner .leftCol .subtitle {
        margin: 0 0 15px 0;
        font-size: 1.0625rem;
        line-height: 1.6875rem;
    }

    #contactBanner .leftCol p {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    #contactBanner .leftCol .btnGroup {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    #contactBanner .rightCol {
        flex-direction: column;
        gap: 30px;
    }

    #contactBanner .rightCol .rightBox {
        padding: 0;
    }

    #mapsSec .mapsBox #map {
        height: 400px;
    }

    #mapsSec .contactFrom {
        max-width: 100%;
        padding: 25px;
        margin: 30px auto 0 auto;
    }

    #mapsSec .contactFrom h4 {
        font-size: 1.6875rem;
        line-height: 2.1875rem;
        margin-bottom: 25px;
    }

    #mapsSec .contactFrom form {
        gap: 15px;
    }

    #mapsSec .contactFrom form .field.half {
        width: 100%;
    }

    #mapsSec .contactFrom form .field .floating-label-wrap .form-control {
        height: 44px;
        padding: 10px;
        font-size: 0.875rem;
    }

    #mapsSec .contactFrom form .sendButton {
        padding: 10px 20px;
    }
}