/* ==========================================================
   ENCABEZADO
========================================================== */

/*
El tamaño, el degradado y la sombra se controlan desde
static/css/base/generales.css.
Aquí solo se asigna la imagen de Contacto.
*/

.contacto-hero {
    background-image: url("../../images/fondos/contacto-hero.jpg");
}

/*
No crear un ::before particular aquí:
generales.css ya aplica el mismo brillo a todas las portadas.
*/

.contacto-hero-contenido {
    position: relative;
    z-index: 1;
}

.contacto-etiqueta {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.9rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    color: #f2d38b;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contacto-hero h1 {
    margin-bottom: 1rem;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.7rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.contacto-hero p {
    max-width: 680px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}


/* ==========================================================
   SECCIÓN PRINCIPAL
========================================================== */

.seccion-contacto {
    padding: 5.5rem 0;
    background:
        radial-gradient(
            circle at 0 0,
            rgba(31, 81, 55, 0.08),
            transparent 28%
        ),
        #f6f3eb;
}

.mensajes-contacto {
    margin-bottom: 2rem;
}

.subtitulo-seccion {
    display: inline-block;
    margin-bottom: 0.7rem;
    color: #9a6c20;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}


/* ==========================================================
   INFORMACIÓN
========================================================== */

.tarjeta-informacion-contacto,
.tarjeta-formulario-contacto {
    height: 100%;
    border: 1px solid rgba(31, 81, 55, 0.12);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(21, 49, 35, 0.09);
}

.tarjeta-informacion-contacto {
    padding: clamp(1.75rem, 4vw, 3rem);
    color: #ffffff;
    background:
        linear-gradient(
            145deg,
            rgba(31, 81, 55, 0.98),
            rgba(12, 45, 30, 0.99)
        );
}

.tarjeta-informacion-contacto h2,
.tarjeta-formulario-contacto h2 {
    margin-bottom: 1rem;
    color: inherit;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
    font-weight: 700;
}

.texto-introduccion {
    margin-bottom: 2.25rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.75;
}

.lista-contacto {
    display: grid;
    gap: 1.7rem;
}

.dato-contacto {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.icono-contacto {
    display: grid;
    width: 48px;
    min-width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(231, 195, 112, 0.3);
    border-radius: 14px;
    color: #f0ce7e;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.15rem;
}

.dato-contacto h3 {
    margin-bottom: 0.35rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
}

.dato-contacto p,
.dato-contacto a {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.dato-contacto a {
    text-decoration: none;
}

.dato-contacto a:hover {
    color: #f0ce7e;
}

.contacto-aviso {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding-top: 1.5rem;
    margin-top: 2.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.contacto-aviso i {
    color: #f0ce7e;
    font-size: 1.2rem;
}

.contacto-aviso p {
    margin: 0;
    color: rgba(255, 255, 255, 0.67);
    font-size: 0.87rem;
    line-height: 1.6;
}


/* ==========================================================
   FORMULARIO
========================================================== */

.tarjeta-formulario-contacto {
    padding: clamp(1.75rem, 4vw, 3rem);
    background: #ffffff;
}

.encabezado-formulario {
    margin-bottom: 2rem;
}

.encabezado-formulario h2 {
    color: #183d2b;
}

.encabezado-formulario p {
    margin-bottom: 0;
    color: #66746c;
}

.form-label {
    margin-bottom: 0.55rem;
    color: #244634;
    font-size: 0.9rem;
    font-weight: 700;
}

.campo-obligatorio {
    color: #b34040;
}

.campo-opcional {
    color: #859087;
    font-size: 0.78rem;
    font-weight: 500;
}

.tarjeta-formulario-contacto .form-control {
    min-height: 52px;
    padding: 0.75rem 1rem;
    border: 1px solid #ccd5cf;
    border-radius: 12px;
    color: #1d3327;
    background-color: #fbfcfb;
    box-shadow: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.tarjeta-formulario-contacto textarea.form-control {
    min-height: 155px;
    resize: vertical;
}

.tarjeta-formulario-contacto .form-control:focus {
    border-color: #2e7450;
    background-color: #ffffff;
    box-shadow: 0 0 0 0.22rem rgba(46, 116, 80, 0.14);
}

.tarjeta-formulario-contacto .form-control.is-invalid {
    border-color: #b34040;
}

.mensaje-error {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    color: #a33131;
    font-size: 0.82rem;
}

.contador-mensaje {
    color: #7b8980;
    font-size: 0.78rem;
}

.btn-enviar-contacto {
    display: inline-flex;
    min-width: 190px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #286544, #173f2b);
    box-shadow: 0 10px 24px rgba(31, 81, 55, 0.22);
    font-weight: 700;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-enviar-contacto:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(31, 81, 55, 0.28);
}

.btn-enviar-contacto:disabled {
    cursor: wait;
    opacity: 0.72;
    transform: none;
}

.texto-boton,
.cargando-boton {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.campo-trampa {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}


/* ==========================================================
   DISEÑO RESPONSIVO
========================================================== */

@media (max-width: 991.98px) {
    .seccion-contacto {
        padding: 4rem 0;
    }
}


@media (max-width: 575.98px) {
    .seccion-contacto {
        padding: 3rem 0;
    }

    .tarjeta-informacion-contacto,
    .tarjeta-formulario-contacto {
        border-radius: 16px;
    }

    .btn-enviar-contacto {
        width: 100%;
    }
}





/* ==========================================================
   UBICACIÓN Y MAPA
========================================================== */

.seccion-ubicacion-contacto {
    padding-top: 5rem;
}

.encabezado-ubicacion {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.encabezado-ubicacion > div {
    max-width: 720px;
}

.encabezado-ubicacion h2 {
    margin-bottom: 0.8rem;
    color: #183d2b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
}

.encabezado-ubicacion p {
    margin-bottom: 0;
    color: #66746c;
    line-height: 1.75;
}

.btn-abrir-mapa {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 50px;
    padding: 0.8rem 1.35rem;
    border: 1px solid #1f5137;
    border-radius: 12px;
    color: #ffffff;
    background: #1f5137;
    box-shadow: 0 10px 24px rgba(31, 81, 55, 0.18);
    font-weight: 700;
    text-decoration: none;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.btn-abrir-mapa:hover {
    color: #ffffff;
    background: #143b28;
    box-shadow: 0 14px 30px rgba(31, 81, 55, 0.25);
    transform: translateY(-2px);
}

.contenedor-mapa {
    position: relative;
    min-height: 450px;
    overflow: hidden;
    border: 1px solid rgba(31, 81, 55, 0.14);
    border-radius: 22px;
    background: #e8ece9;
    box-shadow: 0 20px 50px rgba(21, 49, 35, 0.12);
}

.contenedor-mapa iframe {
    display: block;
    width: 100%;
    min-height: 450px;
    filter: saturate(0.85) contrast(1.02);
}

.etiqueta-mapa {
    position: absolute;
    bottom: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    max-width: calc(100% - 48px);
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 15px;
    color: #ffffff;
    background: rgba(17, 56, 37, 0.94);
    box-shadow: 0 12px 30px rgba(10, 31, 22, 0.28);
    backdrop-filter: blur(8px);
}

.icono-etiqueta-mapa {
    display: grid;
    width: 44px;
    min-width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 12px;
    color: #f0ce7e;
    background: rgba(255, 255, 255, 0.1);
    font-size: 1.15rem;
}

.etiqueta-mapa strong,
.etiqueta-mapa span {
    display: block;
}

.etiqueta-mapa strong {
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.etiqueta-mapa span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.87rem;
}

/* ==========================================================
   MAPA RESPONSIVO
========================================================== */

@media (max-width: 767.98px) {
    .seccion-ubicacion-contacto {
        padding-top: 3.5rem;
    }

    .encabezado-ubicacion {
        align-items: stretch;
        flex-direction: column;
    }

    .btn-abrir-mapa {
        width: 100%;
    }

    .contenedor-mapa,
    .contenedor-mapa iframe {
        min-height: 380px;
    }

    .contenedor-mapa {
        border-radius: 16px;
    }

    .etiqueta-mapa {
        right: 14px;
        bottom: 14px;
        left: 14px;
        max-width: none;
    }
}

@media (max-width: 575.98px) {
    .contenedor-mapa,
    .contenedor-mapa iframe {
        min-height: 340px;
    }

    .etiqueta-mapa {
        padding: 0.85rem;
    }
}