/* VARIABLES */
:root {
    --verde-primario: #12aa4a; 
    --verde-fondo-iconos: #e8f7ed; 
    --oscuro-texto: #111b21;
    --blanco: #ffffff;
    --fondo-verde-claro: #edf6eb;
}

/* RESET Y GLOBALES */
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 100px; 
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; color: var(--oscuro-texto); line-height: 1.6; }

/* HEADER */
.header-principal {
    background-color: var(--blanco);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.contenedor-header {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo img { height: 60px; width: auto; }
.menu-navegacion ul { list-style: none; display: flex; gap: 30px; }
.menu-navegacion a { text-decoration: none; color: var(--oscuro-texto); font-weight: 800; text-transform: lowercase; transition: 0.3s; }
.menu-navegacion a:hover { color: var(--verde-primario); }

/* HERO */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--blanco);
    background: url('../img/portada.webp') center 10%/cover no-repeat;
}
.overlay-oscuro { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 1; }
.contenido-hero { position: relative; z-index: 2; padding: 0 20px; max-width: 900px; }
.subtitulo { font-size: 1.2rem; margin-bottom: 15px; }
.subrayado-verde { border-bottom: 3px solid var(--verde-primario); }
.titulo-principal { font-size: clamp(2rem, 5vw, 4rem); font-weight: 800; margin-bottom: 30px; line-height: 1.1; }
.boton-wsp-hero { display: inline-flex; align-items: center; gap: 12px; background: var(--verde-primario); color: white; text-decoration: none; padding: 16px 35px; border-radius: 50px; font-weight: 700; transition: 0.3s; }
.boton-wsp-hero:hover { transform: scale(1.05); }
.icono-wsp { width: 20px; }

/* SERVICIOS PREMIUM (CORREGIDO: "Borde" o padding de tarjeta más compacto y fotos perfectamente cuadradas) */
.seccion-servicios { background-color: var(--fondo-verde-claro); padding: 80px 20px; }
.contenedor-servicios { max-width: 1200px; margin: 0 auto; }
.cabecera-seccion { text-align: center; margin-bottom: 50px; }
.cabecera-seccion h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.linea-verde { width: 60px; height: 3px; background: var(--verde-primario); margin: 0 auto; }

.grilla-servicios { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 30px; 
    align-items: start; /* Impide que las tarjetas se estiren verticalmente dejando espacio en blanco */
}

.tarjeta-servicio { 
    background: var(--blanco);
    border-radius: 16px;
    padding: 16px; /* SOLUCIÓN: Reducido de 24px a 16px para que el marco blanco de la foto sea más chico */
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid #e2ece0; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tarjeta-servicio:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}

/* SOLUCIÓN: Forzar relación de aspecto cuadrada estricta, sin importar el layout o la imagen original */
.tarjeta-servicio img { 
    width: 100% !important; 
    height: auto !important;
    aspect-ratio: 1 / 1 !important; /* Fuerza proporción cuadrada perfecta */
    object-fit: cover !important; 
    border-radius: 8px; 
    border: 1px solid #d5e4d2;
    box-shadow: 8px 8px 0px rgba(180, 200, 180, 0.4); /* Sombra sólida clásica de ERM un poquito más compacta */
    margin-bottom: 20px; /* Margen inferior de la foto ajustado a 20px */
    flex-shrink: 0; /* Impide que flexbox comprima la imagen verticalmente */
    align-self: center; /* Impide que flexbox estire la imagen hacia los lados */
}

.contenido-tarjeta-servicio {
    display: flex;
    flex-direction: column;
    padding: 0 8px; /* Un pequeño margen interno para el texto dentro de la tarjeta compacta */
}

.tarjeta-servicio h3 { 
    font-size: 1.35rem; 
    font-weight: 800;
    color: var(--oscuro-texto);
    margin-bottom: 10px; 
    text-align: left; 
}

.tarjeta-servicio p {
    color: #555;
    font-size: 0.92rem;
    line-height: 1.5;
    text-align: left;
}

/* VENTAJAS */
.seccion-ventajas { 
    position: relative; 
    padding: 100px 20px; 
    background-image: url('../img/ventajas-foto1.webp'); 
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex; 
    align-items: center; 
}
.overlay-ventajas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.35); z-index: 1; }
.contenedor-ventajas { position: relative; z-index: 2; max-width: 1200px; width: 100%; margin: 0 auto; display: flex; justify-content: flex-end; }
.contenido-ventajas { max-width: 600px; color: var(--blanco); }
.linea-verde-izquierda { width: 60px; height: 3px; background: var(--verde-primario); margin-bottom: 30px; }
.lista-ventajas { list-style: none; }
.lista-ventajas li { margin-bottom: 20px; padding-left: 25px; position: relative; }
.lista-ventajas li::before { content: '•'; color: var(--verde-primario); font-size: 1.5rem; position: absolute; left: 0; top: -5px; }

/* PROYECTOS */
.seccion-proyectos { background-color: var(--fondo-verde-claro); padding: 80px 0; overflow: hidden; }
.swiper-proyectos .swiper-wrapper { transition-timing-function: linear !important; }
.swiper-slide img { 
    width: 100%; 
    height: 350px; 
    object-fit: cover; 
    display: block; 
    border-radius: 8px; 
}

/* CONTACTO ESTILO TARJETAS */
.seccion-contacto { 
    background-color: var(--fondo-verde-claro); 
    padding: 80px 20px; 
}
.contenedor-contacto {
    max-width: 1200px;
    margin: 0 auto;
}
.bloque-contacto-premium { 
    display: flex; 
    justify-content: center; 
    align-items: stretch; 
    gap: 40px; 
    max-width: 1100px; 
    margin-left: auto; 
    margin-right: auto; 
}

/* Tarjetas Contacto */
.tarjeta-contacto-wsp, .tarjeta-contacto-info {
    background: var(--blanco);
    border-radius: 16px;
    padding: 50px 40px;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    border: 1px solid #e2ece0; 
}

/* Tarjeta WhatsApp */
.tarjeta-contacto-wsp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.circulo-wsp-premium {
    background: var(--verde-fondo-iconos);
    width: 120px; 
    height: 120px; 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}
.circulo-wsp-premium img {
    width: 65px;
    height: 65px;
    display: block;
}
.tarjeta-contacto-wsp h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--oscuro-texto);
    margin-bottom: 15px;
}
.tarjeta-contacto-wsp p {
    color: #555;
    font-size: 1rem;
    margin-bottom: 30px;
    max-width: 320px;
}
.boton-abrir-wsp {
    background-color: var(--verde-primario);
    color: var(--blanco);
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    transition: 0.3s;
    width: 100%;
    max-width: 280px;
    text-align: center;
}
.boton-abrir-wsp:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(18, 170, 74, 0.3);
}
.telefono-texto {
    margin-top: 15px;
    font-size: 0.9rem;
    color: #888;
}

/* Tarjeta Información */
.tarjeta-contacto-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0; 
}
.tarjeta-contacto-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--oscuro-texto);
    margin-bottom: 30px;
}
.lista-datos-premium {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Items de contacto */
.item-dato-premium {
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: 0.3s;
    padding: 12px;
    border-radius: 12px;
    min-width: 0; 
}
.circulo-icono {
    background: var(--verde-fondo-iconos);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
    min-width: 50px; 
    min-height: 50px;
}
.circulo-icono svg {
    width: 22px;
    height: 22px;
    fill: var(--verde-primario);
    transition: 0.3s;
}
.info-texto {
    display: flex;
    flex-direction: column;
    min-width: 0; 
}
.info-texto .etiqueta {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    margin-bottom: 2px;
}
.info-texto .valor {
    font-size: 1rem;
    color: var(--oscuro-texto);
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
    word-break: break-all; 
}

/* Hovers */
.item-dato-premium:hover {
    background-color: #f1f9f3;
}
.item-dato-premium:hover .circulo-icono {
    background-color: var(--verde-primario);
}
.item-dato-premium:hover .circulo-icono svg {
    fill: var(--blanco);
}
.item-dato-premium:hover .info-texto .valor {
    color: var(--verde-primario);
}

.link-mapa-premium {
    line-height: 1.5;
}
.link-mapa-premium span {
    font-size: 0.8rem;
    color: var(--verde-primario);
    text-decoration: underline;
    font-weight: 400;
}

/* Redes Sociales */
.redes-sociales {
    margin-top: 35px;
    border-top: 1px solid #eee;
    padding-top: 25px;
}
.etiqueta-redes {
    display: block;
    font-size: 0.85rem;
    color: #888;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.iconos-redes {
    display: flex;
    gap: 15px;
}
.enlace-red {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}
.enlace-red svg {
    width: 18px;
    height: 18px;
    fill: #555;
    transition: 0.3s;
}
.enlace-red:hover {
    background-color: var(--verde-primario);
}
.enlace-red:hover svg {
    fill: var(--blanco);
}

/* FOOTER */
.footer-negro { background: #080d05; color: white; padding: 40px 20px; text-align: center; font-size: 13px; }
.footer-negro p { opacity: 0.7; margin-bottom: 10px; }
.copyright { font-weight: bold; margin-top: 20px; text-transform: uppercase; }

/* BOTÓN FLOTANTE */
.wsp-flotante { 
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    background: #25d366; 
    width: 60px; 
    height: 60px; 
    border-radius: 50px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    z-index: 2000; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    transition: 0.3s; 
}
.wsp-flotante:hover { transform: scale(1.1); }
.wsp-flotante img { width: 35px; height: 35px; }

/* RESPONSIVE MEJORADO */
@media (max-width: 850px) {
    .seccion-ventajas {
        padding: 60px 15px;
    }
    
    .bloque-contacto-premium { flex-direction: column; gap: 30px; }
    .tarjeta-contacto-wsp, .tarjeta-contacto-info { padding: 35px 25px; }
    .menu-navegacion { display: none; }
    .contenedor-ventajas { justify-content: center; text-align: center; }
    .linea-verde-izquierda { margin: 0 auto 30px auto; }
    
    .wsp-flotante {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    .wsp-flotante img {
        width: 30px;
        height: 30px;
    }
}