/* =====================================================================
   VARIABLES DE MARCA
   ===================================================================== */
:root {
    --brand: #175a80;
    --brand-dark: #071b26;
    --brand-light: #e6f1fb;
    --brand-hover: #2481b7;

    /* Ancho de contenido para alinear el hero con las secciones de abajo.
       Más ancho = menos margen lateral en hero y secciones (ambos iguales). */
    --container-max: 1400px;

    /* Margen lateral único para el layout full-width (hero + secciones + footer).
       El contenido ocupa TODO el ancho, dejando solo este respiro en los bordes. */
    --gutter: clamp(1.5rem, 3.5vw, 4.5rem);
}

/* =====================================================================
   BASE
   ===================================================================== */
* {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 13px;
}


body {
    color: #333;
}


h1, h2, h3, .titulo > span {
    font-family: 'Montserrat', sans-serif;
}

/* =====================================================================
   NAVBAR
   ===================================================================== */
.navbarMain {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    z-index: 1030;
}

.navbar-brand {
    color: var(--brand) !important;
}

.titulo > span:nth-child(1) { 
    font-weight: 600; 
    letter-spacing: -0.5px;
    font-size: 1.2rem;
}

.titulo > span:nth-child(2) { 
    font-weight: 1000; 
    letter-spacing: 0.5px; 
    font-size: 1.2rem;
}


.consorcios {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 12px;
    letter-spacing: 6px; /* Aumentado ligeramente para dar un toque más moderno */
    text-transform: lowercase; /* Asegura que se vea igual a la imagen */
    color: var(--brand);
}


.navbarMain .nav-link {
    color: #444 !important;
    font-weight: 400;
    padding: 8px 12px !important;
}
.navbarMain .nav-link:hover {
    color: var(--brand) !important;
}

/* =====================================================================
   BOTONES
   ===================================================================== */
.btn {
    border-radius: 10px !important;
    font-weight: 400;
}

.btn-dark {
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #fff !important;
}
.btn-dark:hover {
    background-color: var(--brand-hover) !important;
    border-color: var(--brand-hover) !important;
}

.btn-outline-brand {
    background-color: #fff !important;
    color: var(--brand) !important;
    border: 1px solid var(--brand) !important;
}
.btn-outline-brand:hover {
    background-color: var(--brand-light) !important;
}

/* =====================================================================
   HERO
   ---------------------------------------------------------------------
   FIX: antes usaba 55vw/45vw y min-height 60vh, por lo que en pantallas
   grandes se veía "chato" y el texto se estiraba de borde a borde,
   desalineado con el .container de las secciones de abajo.
   Ahora: más alto, el texto se alinea al ancho del contenedor y el
   párrafo/título tienen un ancho máximo para no quedar finitos.
   ===================================================================== */
.hero {
    min-height: 50vh;
    align-items: stretch;   /* la imagen ocupa toda la altura del hero */
    border-bottom: 1px solid #e3e9ef;  /* separa el hero de la sección blanca de abajo */
}

.hero-text {
    width: 55%;
    /* Alineado al mismo gutter que las secciones full-width de abajo */
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-right: 3rem;
    padding-left: var(--gutter);
}


.badge-exp {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    background: var(--brand-light);
    color: var(--brand);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 500;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    /* escala con la pantalla: llena mejor el espacio en full screen */
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 0.9rem;
    letter-spacing: -0.5px;
}

.hero-sub {
    font-size: clamp(14px, 1.1vw, 16px);
    line-height: 1.65;
    color: #555;
    margin-bottom: 1.5rem;
}

.seccionImagen,
.hero-img {
    background-image: url(../imagenes/fondo.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
    width: 60%;
}

.seccionImagen::before,
.hero-img::before {
    content: "";
    position: absolute;
    background: white;
    z-index: 1;
    top: 0;
    left: 0;
    bottom: 0;
    width: 40px;
    border-radius: 0 40px 40px 0 / 0 300px 300px 0;
}

/* Animación de texto (conservada de tu diseño original) */
.textAnimation > * {
    animation-name: translateLeft;
    animation-duration: 1.6s;
    animation-timing-function: ease-in;
    animation-fill-mode: backwards;
}
.textAnimation > :nth-child(1) { animation-delay: 0ms; }
.textAnimation > :nth-child(2) { animation-delay: 200ms; }
.textAnimation > :nth-child(3) { animation-delay: 400ms; }
.textAnimation > :nth-child(4) { animation-delay: 600ms; }

@keyframes translateLeft {
    0%   { opacity: 0; transform: translateX(-60%); }
    20%  { opacity: 0; }
    100% { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .textAnimation > * { animation: none; }
    .card-servicio { transition: none; }
}

/* =====================================================================
   SECCIONES GENÉRICAS
   ---------------------------------------------------------------------
   FIX: ritmo vertical consistente en todas las secciones y contenedor
   con un ancho máximo un poco mayor para acompañar al hero.
   ===================================================================== */
.seccion {
    padding: 4.5rem var(--gutter);
}

/* Ancho de contenido unificado (levemente mayor que el default de BS) */
.container {
    max-width: var(--container-max);
}

.seccion-alt {
    background: #f7f9fb;
}

.seccion-titulo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.seccion-sub {
    font-size: 14px;
    color: #666;
    max-width: 620px;
    margin: 0.4rem auto 0;
}

/* =====================================================================
   TARJETAS DE SERVICIOS
   ---------------------------------------------------------------------
   FIX: cards más trabajadas, todas de igual altura (flex-column),
   con acento superior sutil y separación interna pareja.
   ===================================================================== */
.card-servicio {
    background: #fff;
    border: 1px solid #eaeef2;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Acento superior que aparece en hover */
.card-servicio::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.card-servicio:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(23, 90, 128, 0.12);
    border-color: #cfe0ee;
}
.card-servicio:hover::before {
    transform: scaleX(1);
}

.card-icono {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 1.1rem;
}

.card-titulo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.card-texto {
    font-size: 13px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 0;
}

/* =====================================================================
   POR QUÉ ELEGIRNOS
   ===================================================================== */
.por-que-icono {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* =====================================================================
   FORMULARIO
   ===================================================================== */
.card-form {
    background: #fff;
    border: 1px solid #eaeef2;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

/* El formulario ocupa todo el ancho de la sección. */
.form-wrap {
    max-width: 100%;
}

.form-control {
    border-radius: 10px;
    font-size: 14px;
    padding: 0.6rem 0.9rem;
}
.form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.15rem rgba(23, 90, 128, 0.15);
}

.bloque-presupuesto {
    border-top: 1px dashed #d6dde3;
    padding-top: 1.2rem;
}

.bloque-titulo {
    font-size: 13px;
    color: #555;
    margin-bottom: 0.9rem;
}
.opcional {
    color: #999;
}

/* Chips de servicios (checkbox estilizado) */
.chip {
    position: relative;
    cursor: pointer;
    margin: 0;
}
.chip input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}
.chip span {
    display: inline-block;
    font-size: 12px;
    border: 1px solid #d6dde3;
    color: #666;
    border-radius: 20px;
    padding: 5px 12px;
    transition: all 0.15s;
}
.chip input:checked + span {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 400;
}

input[name="unidades"] {
    width: 220px;
}

/* =====================================================================
   CONTACTO / MAPA
   ===================================================================== */
.card-contacto {
    background: #fff;
    border: 1px solid #eaeef2;
    border-radius: 16px;
    padding: 1.6rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
}

.mediaicons li { display: flex; margin-bottom: 0.5rem; }

.mediaicons i {
    display: flex;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    background: var(--brand-light);
    color: var(--brand);
    flex-shrink: 0;
}

.mediaicons p {
    color: #444;
    font-size: 13px;
}

.mediaicons a { text-decoration: none; }

.mediaicons > li:hover i {
    background: var(--brand);
    color: #fff;
    transition: 0.3s;
}

/* Reduce el padding vertical de la sección (arriba y abajo) */
#ubicacion {
    padding: 2rem var(--gutter); /* Antes era 4.5rem */
}

/* Ajusta la altura del mapa para que sea más pequeño */
.mapa {
    min-height: 250px !important; /* Reducido de 340px */
    height: 250px !important;
}

.mapa iframe {
    min-height: 250px !important;
    height: 250px !important;
}

/* =====================================================================
   FOOTER (conservado)
   ===================================================================== */
footer {
    background: linear-gradient(90deg, var(--brand-dark) 0%, var(--brand) 100%);
    color: white;
    min-height: 5rem;
    width: 100%;
}



.tituloFooter > :nth-child(1),
.tituloFooter > :nth-child(2) {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    line-height: 18px;
}
.tituloFooter > :nth-child(1) { font-weight: 500; letter-spacing: -1px; }
.tituloFooter > :nth-child(2) { font-weight: 800; letter-spacing: 1px; }

.navfooter a { color: white; text-decoration: none; }
.navfooter a:hover { color: #cfe1ee; }
.navfooter p { font-size: 12px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media screen and (max-width: 767px) {
    .hero { flex-direction: column; min-height: auto; }

    .hero-text {
        width: 100%;
        padding: 2rem 1.5rem;
        order: 2;
    }
    .hero-text > * { max-width: 100%; }

    .hero-img,
    .seccionImagen {
        width: 100%;
        min-height: 38vh;
        order: 1;
    }

    .hero-img::before,
    .seccionImagen::before {
        top: inherit;
        left: 0;
        right: 0;
        bottom: 0;
        height: 40px;
        width: 100%;
        border-radius: 300px 300px 0 0 / 40px 40px 0 0;
    }

    .seccion { padding: 3rem var(--gutter); }
}

@media screen and (max-width: 575px) {
    .hero-img,
    .seccionImagen { min-height: 26vh; }
}