/* VARIABLES DE DISEÑO INDUSTRIAL CLARO */
:root {
    --azul-sens: #1F4E79;         /* AZUL MEDIO (PRINCIPAL) */
    --azul-oscuro: #003366;       /* AZUL PROFUNDO (FOOTER Y HOVERS) */
    --azul-claro: #D9E2EC;        /* AZUL MUY PÁLIDO PARA CONTRASTE */
    --acento: #0B3C5D;            /* AZUL PETRÓLEO PARA DETALLES */
    --fondo: #F0F4F8;             /* GRIS AZULADO MUY SUAVE */
    --blanco: #FFFFFF;
    --texto: #102A43;             /* AZUL CASI NEGRO PARA LECTURA */
    --borde: #BCCCDC;
}

* { box-sizing: border-box; }

body {
    background-color: var(--fondo);
    color: var(--texto);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
}

/* HEADER DINÁMICO */
header {
    background: var(--blanco);
    padding: 1.5rem 0;             /* ESPACIO ARRIBA Y ABAJO */
    display: flex;
    justify-content: center;      /* CENTRA HORIZONTALMENTE */
    align-items: center;          /* CENTRA VERTICALMENTE */
    border-bottom: 4px solid var(--azul-sens);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;                  /* ASEGURA QUE OCUPE TODO EL ANCHO */
}

.header-contact {
    display: flex;
    gap: 18px;
    flex: 1;
}

.header-contact a {
    color: var(--azul-sens);
    font-size: 1.1rem;
    transition: 0.3s;
    text-decoration: none;
}

.header-contact a:hover {
    color: var(--acento);
    transform: scale(1.2);
}

.logo {
    flex: 1;
    text-align: center;
    font-weight: 900;
    font-size: 1.6rem;
    letter-spacing: 4px;
    color: var(--azul-sens);
    text-transform: uppercase;
}

nav {
    flex: 1;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* BOTONES */
.btn-action, 
.btn-outline, 
a.btn-action, 
a.btn-outline {
    text-decoration: none !important;
    border-bottom: none !important;
    position: relative;
    display: inline-block;
    background: transparent;
    outline: none;
}

.btn-action.btn-outline {
    background: transparent;
    color: #1a4f7a;
    border: 2px solid transparent; 
    border-radius: 5px;
    padding: 10px 25px;
    /*font-size: 16px;*/
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    transition: all 0.4s ease;
    max-width: 100% !important; 
    font-size: 14px !important; /* UN POCO MÁS PEQUEÑO PARA QUE QUEPA MEJOR */
    white-space: normal !important; /* PERMITE QUE EL TEXTO DEL BOTÓN USE 2 LÍNEAS SI ES NECESARIO */
    text-align: center !important;
}

.btn-action.btn-outline:hover {
    text-decoration: none !important; /* REFUERZO EN EL HOVER */
    color: #3d76a1;
    border: 2px solid #3d76a1; 
    transform: translateY(-2px);
}

.btn-action::after, 
.btn-outline::after {
    display: none !important;
    content: none !important;
}

.btn-action:hover {
    color: #0d2a42; /* SE OSCURECE UN POCO */
}

.btn-action.btn-outline {
    color: #1a4f7a;
    border: 2px solid transparent; /* BORDE INVISIBLE PARA QUE NO BRINQUE */
    border-radius: 15px;          /* ESQUINAS SUAVIZADAS (CÁPSULA) */
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease;
}

.btn-action:hover::after {
    width: 100%;
}

.btn-action.btn-outline:hover {
    color: #3d76a1;
    background-color: transparent !important;
    border: 2px solid #3d76a1 !important; /* AQUÍ APARECE EL BORDE */
    text-decoration: none !important;
    transform: translateY(-3px);
    box-shadow: 0px 5px 15px rgba(0,0,0,0.05);
}

/* LAYOUT PRINCIPAL */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr; /* 2 PARTES PARA SERVICIOS, 1 PARA PROYECTOS */
    gap: 50px;
    align-items: start;
    width: 100%;
    max-width: none; /*max-width: 1300px;*/
    margin: 0; /*margin: 40px auto;*/
    padding-left: 1%;
    padding-right: 1%;
}

/* TÍTULOS DE SECCIÓN */
.section-title {
    font-size: 1.2rem;
    color: var(--azul-oscuro);
    border-left: 4px solid var(--azul-sens);
    padding-left: 15px;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ESTILO PARA CADA PROYECTO (COLUMNA DERECHA) */
.project-item {
    background: var(--blanco);
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid var(--borde);
    transition: 0.3s;
}

.project-item:hover {
    border-left: 5px solid var(--azul-sens);
    background: var(--azul-claro);
}

.project-date {
    font-weight: bold;
    color: var(--azul-sens);
    font-size: 0.8rem;
    letter-spacing: 1px; /* PARA QUE SE LEA MEJOR EL FORMATO */
    background: #eef2f7; /* UN FONDO SUTIL PARA RESALTARLA */
    padding: 2px 8px;
    border-radius: 4px; /* MANTENIENDO NUESTRAS ESQUINAS SUAVES */
    display: inline-block;
    margin-bottom: 5px;
}

.project-period {
    font-size: 0.7rem;
    color: #666;
    margin: 5px 0;
    font-style: italic;
    border-top: 1px solid #eee;
    padding-top: 5px;
}

/* RESALTAMOS LA FECHA DE REGISTRO QUE ES LA QUE MANDA */
.project-date {
    font-weight: bold;
    color: white;
    background: var(--azul-sens);
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px; /* ESQUINAS SUAVES */
    display: inline-block;
}

.project-item h4 {
    margin: 5px 0;
    font-size: 1rem;
    color: var(--azul-oscuro);
}

/* RESPONSIVO: EN MÓVILES SE PONEN UNO ABAJO DEL OTRO */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* GRILLA DE SERVICIOS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px 0;
    /* --- CAMBIO AQUÍ: Alineación superior --- */
    align-items: start;
}

.card {
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto; 
    min-height: 250px; 
    
    /* --- CAMBIO AQUÍ: Borde por defecto --- */
    border-top: 5px solid var(--borde); /* O usa var(--azul-sens) si prefieres */
    
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top 0.3s ease;
}

.card:hover {
    /* --- CAMBIO AQUÍ: Cambiar o quitar el borde en hover --- */
    border-top: 5px solid var(--azul-sens); /* Cambia el color al azul */
    
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px); 
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    /* Altura fija para el icono ayuda a alinear el texto */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image {
    width: 100%;
    height: 180px; /* ALTURA FIJA PARA UNIFORMIDAD */
    overflow: hidden;
    border-bottom: 3px solid var(--azul-sens);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* AJUSTA LA IMAGEN SIN DEFORMARLA */
    transition: transform 0.5s ease;
}

.card:hover .card-image img {
    transform: scale(1.1); /* EFECTO ZOOM AL PASAR EL MOUSE */
}

.card-body {
    padding: 20px;
}

.card h3 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 5px;
    /* Título con altura fija para evitar desalineación */
    height: 30px; 
    overflow: hidden;
}

.card p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 15px;
    /* Limitar texto para que no estire la caja */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.link-more {
    margin-top: auto; /* Empuja el enlace al final de la tarjeta */
    display: block;
}

/* SIDEBAR */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar-widget {
    background: var(--blanco);
    padding: 25px;
    border: 1px solid var(--borde);
}

.sidebar-widget h4 {
    margin: 0 0 20px 0;
    color: var(--azul-sens);
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--azul-claro);
    padding-bottom: 10px;
}

.search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--borde);
    background: var(--fondo);
    outline-color: var(--azul-sens);
}

.info-item {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.info-item strong { color: var(--azul-oscuro); }

.map-placeholder {
    background: var(--azul-claro);
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--azul-sens);
    border-radius: 4px;
}

/* FOOTER */
footer {
    text-align: center;
    padding: 40px;
    background: var(--azul-oscuro);
    color: white;
    margin-top: 60px;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* RESPONSIVO */
@media (max-width: 950px) {
    .main-layout { grid-template-columns: 1fr; }
    header { flex-direction: column; gap: 20px; text-align: center; }
    .header-contact, nav { justify-content: center; width: 100%; }
}



/* Asegurar que el formulario y sus campos se vean bien en la sidebar */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--borde);
    background: var(--fondo);
    box-sizing: border-box; /* Importante para el padding */
}

/* Ajuste sutil para el mapaplaceholder si es necesario */
.map-placeholder {
    margin-top: 15px;
    background: var(--azul-claro);
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--azul-sens);
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Estilo para el nombre de la empresa en el header */
#nombre_empresa {
    font-family: 'Arial Black', sans-serif;
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

/* Estilo específico para el icono dentro del nombre */
#nombre_empresa i {
    color: var(--azul-sens); /*color: #ff9900; /* Color naranja para destacar el icono, ajústalo a tu gusto */
    font-size: 2rem; /* Tamaño del icono */
}

/* -------------------- Estilos para el Slider ------------------------------------ */
.slider-container {
    width: 100%;
    height: 200px; /* Ajusta la altura a tu gusto */
    overflow: hidden;
    position: relative;
    margin-bottom: 20px; /* Espacio con la grilla de servicios */
}

.slider {
    width: 100%;
    height: 100%;
}

.slide {
    width: 100%;
    height: 100%;
    display: none; /* Ocultos por defecto */
    position: relative;
}

.slide.active {
    display: block; /* Solo el activo se ve */
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ajusta la imagen sin deformarla */
    filter: brightness(0.7); /* Oscurece un poco la imagen para leer el texto */
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    width: 80%;
}

.slide-content h2 {
    font-size: 2rem; /* tamaño del texto  */
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}



/*PARA EL BOTON HOME --------------------------------*/

.section-buttons {
    display: flex;             /* ACTIVA EL MODO FLEXIBLE */
    justify-content: flex-end; /* EMPUJA EL CONTENIDO A LA DERECHA */
    gap: 15px;                 /* AGREGA ESPACIO ENTRE LOS BOTONES */
    padding: 20px 0;           /* OPCIONAL: ESPACIO ARRIBA Y ABAJO */
}

.nav-container {
    display: flex;            /* ACTIVA EL MODO FLEX */
    align-items: center;      /* CENTRADO VERTICAL (LOGO Y BOTONES A LA PAR) */
    justify-content: center;  /* CENTRADO HORIZONTAL EN LA PÁGINA */
    gap: 20px;                /* ESPACIO UNIFORME ENTRE LOGO Y BOTONES */
    padding: 15px;
}

.nav-container img {
    display: block;           /* QUITA ESPACIOS EXTRA DEBAJO DE LA IMAGEN */
}


/* CONTENEDOR PRINCIPAL */
.logo-wrapper {
    position: relative; /* NECESARIO PARA QUE EL BOTÓN HOME SE POSICIONE BIEN */
    display: inline-block;
}

/* EFECTO EN LA IMAGEN */
.logo-img {
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo-wrapper:hover .logo-img {
    filter: blur(2px) brightness(0.7); /* SE OSCURECE PARA RESALTAR EL BOTÓN */
    transform: scale(1.05);
}

/* BOTÓN QUE APARECE */
.btn-home-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--azul-oscuro);
    color: white;
    border: 2px solid var(--azul-sens);
    padding: 8px 15px;
    cursor: pointer;
    opacity: 0; /* INVISIBLE POR DEFECTO */
    transition: opacity 0.3s ease;
    font-weight: bold;
    letter-spacing: 2px;
}

.logo-wrapper:hover .btn-home-overlay {
    opacity: 1; /* APARECE AL PASAR EL MOUSE */
}

/* CUADRO DE TEXTO PROFESIONAL */
.info-overlay {
    display: none; /* SE ACTIVA CON JS */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--blanco);
    border-left: 5px solid var(--azul-sens);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2000;
    max-width: 400px;
    text-align: left;
    color: var(--texto);
}

/* ESTILO PARA EL ENCABEZADO (TÍTULO) */
.overlay-title {
    color: var(--azul-sens); /* USA TU VARIABLE DE AZUL */
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #eee; /* LÍNEA SUTIL DE SEPARACIÓN */
    padding-bottom: 8px;
}

/* ESTILO PARA LA DESCRIPCIÓN */
.overlay-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444; /* UN GRIS OSCURO PARA QUE NO SEA TAN PESADO COMO EL NEGRO */
    text-align: justify;
    margin: 0;
}

/* ESTILO PARA EL BOTÓN DE CERRAR (SI NO LO TIENES) */
.btn-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.btn-close:hover {
    color: var(--azul-sens);
}

.btn-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--azul-sens);
}


/* FORZAMOS QUE EL HEADER NO SEA FLEX PARA QUE LAS FILAS CAIGAN POR SU PROPIO PESO */
.header-industrial {
    display: block !important;
    width: 100%;
    background: var(--blanco);
    padding: 0; /* QUITAMOS PADDING PARA CONTROLARLO POR FILA */
    border-bottom: 4px solid var(--azul-sens);
}

/* FILA 1: NOMBRE AL CENTRO */
.fila-1 {
    width: 100%;
    text-align: center;
    padding: 25px 0 15px 0;
    background: var(--blanco);
}

/* FILA 2: MENÚ A LA DERECHA */
.fila-2 {
    width: 100% !important;
    display: flex !important;
    /*justify-content: center !important; /* CENTRADO POR DEFECTO */
    justify-content: flex-start !important; /* CENTRADO POR DEFECTO */
    flex-wrap: wrap !important;        /* SI NO CABE, QUE BAJE A OTRA LÍNEA EN VEZ DE CORTARSE */
    padding: 10px 20px !important;
    background: var(--fondo) !important;
    gap: 20px !important;              /* ESPACIO ENTRE BOTONES */
    overflow: visible !important;
    box-sizing: border-box !important;
}
/* EL TRUCO DEL MARGEN AUTO PARA MANDARLO A LA DERECHA SIN ERRORES */
.fila-2 .btn-menu-texto:first-child {
    margin-left: 0 !important;
}

/* FILA 3: LOGO Y BOTONES AL CENTRO */
/* AQUÍ SÍ USAMOS FLEX PARA QUE EL LOGO Y LOS 2 BOTONES ESTÉN EN LA MISMA LÍNEA */
.fila-3 {
    display: flex !important;
    flex-wrap: wrap !important; /* PERMITE QUE LOS BOTONES BAJEN A LA SIGUIENTE LÍNEA */
    justify-content: center !important; /* CENTRA LOS ELEMENTOS CUANDO SE BAJAN */
    align-items: center !important;
    gap: 15px !important; /* ESPACIO ENTRE ELLOS */
    padding: 20px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important; /* EVITA QUE EL PADDING SUME ANCHO EXTRA */
}

/* IMPORTANTE: ESTO ASEGURA QUE LA DESCRIPCIÓN SIGA FUNCIONANDO */
.logo-wrapper {
    position: relative;
    display: inline-block;
}

/* Contenedor principal del footer */
.footer-container {
    background-color: var(--azul-sens); /* Asumiendo que el fondo es el azul de tu marca */
    display: flex;
    justify-content: space-between;    /* Texto a la izquierda, iconos a la derecha */
    align-items: center;
    padding: 15px 5%;                  /* Ajusta el espacio a los lados */
    color: white;                      /* Hace que el texto del copyright sea blanco */
}

/* Estilo específico para los iconos del footer */
.footer-socials {
    display: flex;
    gap: 18px;                         /* Espacio entre iconos */
}

.footer-socials a {
    color: white !important;           /* Forzamos el blanco para que resalte */
    font-size: 1.1rem;
    transition: 0.3s;
    text-decoration: none;
}

.footer-socials a:hover {
    color: var(--acento) !important;   /* Color de resalte al pasar el mouse */
    transform: scale(1.2);
}



.hr-gradiente {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--azul-sens), transparent);
    /*margin: 40px 0;*/
}

.hr-industrial {
    border: 0;
    height: 3px;
    background-color: #eee;
    position: relative;
    margin: 50px 0;
}

.hr-industrial::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 80px; /* Tamaño del acento */
    background-color: var(--azul-sens);
}

.hr-con-icono {
    border: 0;
    border-top: 1px solid #ddd;
    text-align: center;
    margin: 40px 0;
    height: 0;
}

.hr-con-icono::after {
    content: "\f0ad"; /* Código Unicode de una llave inglesa de FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: relative;
    top: -15px; /* Ajusta para que quede centrado sobre la línea */
    background: white; /* Debe ser el color de tu fondo */
    padding: 0 15px;
    color: var(--azul-sens);
}


/*----------- link ver proyectos --------------------------------------------------------------------*/
.view-all-container {
    margin-top: 20px; /* ESPACIO CONSTANTE */
    text-align: right;
    width: 100%;
}

.link-view-all {
    color: var(--azul-sens);
    font-weight: bold;
    text-decoration: none;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.3s;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px; /* SUAVIZADO SUTIL */
}

.link-view-all:hover {
    background-color: var(--azul-sens);
    color: white;
    transform: translateX(5px); /* PEQUEÑO DESPLAZAMIENTO AL PASAR EL MOUSE */
}



/* CONTENEDOR PARA LOS PROYECTOS QUE ESTÁN OCULTOS */
.extra-projects {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    /* TRANSICIÓN SUAVE PARA AMBOS LADOS */
    transition: max-height 0.6s ease-out, opacity 0.4s ease;
}

.extra-projects.open {
    max-height: 5000px;
    opacity: 1;
}


/* CONTROL DE CELDAS EDITABLES */
.cell-scroll {
    width: 250px;           /* MISMO ANCHO PARA TÍTULO Y DESCRIPCIÓN */
    max-height: 75px;       /* EQUIVALENTE A 3 LÍNEAS APROX. */
    overflow-y: auto;       /* ACTIVA EL SCROLL SI EL TEXTO ES LARGO */
    padding: 5px;
    border: 1px solid transparent;
    transition: 0.3s;
    line-height: 1.4;
    text-align: left;
    word-wrap: break-word;
}

.cell-scroll:hover {
    border: 1px dashed var(--azul-sens);
    background: #f9f9f9;
}

/* SCROLLBAR MÁS DELGADO PARA QUE NO SE VEA TOSCO */
.cell-scroll::-webkit-scrollbar {
    width: 4px;
}
.cell-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

html, body {
    min-height: 100%;
    /*overflow-x: hidden; /* EVITA QUE LA PANTALLA SE MUEVA A LOS LADOS */
    max-width: 100vw !important;
    overflow-x: hidden !important; /* PROHIBIDO EL SCROLL LATERAL */
    margin: 0 !important;
    padding: 0 !important;
}

/*---------------------------- AJUSTE PARA EL MODAL DE CONTACTO --------------------------------*/
.contact-modal {
    display: none !important; /* SE ASEGURA DE QUE NACZA OCULTO */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 90% !important;
    max-width: 500px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    background: var(--blanco) !important;
    padding: 30px !important;
    z-index: 9999999 !important;
}

/* ESTA REGLA ES LA QUE MANDA CUANDO LE DAS CLICK A CONTÁCTANOS */
.contact-modal.activo {
    display: block !important;
}


.contact-form .form-row {
    display: flex !important;
    flex-wrap: wrap !important; /* EN MÓVIL, NOMBRE Y APELLIDO SE PONEN UNO ABAJO DEL OTRO */
    gap: 10px !important;
}

.contact-form .form-group {
    flex: 1 1 100% !important; /* FUERZA A OCUPAR TODO EL ANCHO EN MÓVIL */
}

.contact-form label {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--azul-sens);
    margin-bottom: 5px;
}

.contact-form input, .contact-form select, .contact-form textarea {
    width: 100% !important; /* QUE NO SE SALGAN DEL MARGEN */
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.btn-enviar-contacto {
    width: 100% !important;
    padding: 15px !important;
    margin-top: 20px !important;
    margin-bottom: 10px !important; /* ESPACIO EXTRA AL FINAL */
    display: block !important;
}

.btn-enviar-contacto:hover {
    background: #003d7a;
}

.btn-menu-texto {
    background: none !important;
    border: none !important;
    color: var(--azul-sens) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    padding: 8px 12px !important;   /* MÁS PADDING PARA QUE SEAN CLICKEABLES */
    display: inline-block !important;
    white-space: nowrap !important; /* PROHIBIDO ROMPER LA PALABRA */
    width: auto !important;         /* QUE CREZCA SEGÚN EL TEXTO */
}

.btn-menu-texto::after {
    content: '' !important;
    position: absolute !important;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--azul-sens);
    transition: width 0.3s ease;
}

.btn-menu-texto:hover {
    color: var(--azul-oscuro) !important;
}

.btn-menu-texto:hover::after {
    width: 100%;
}

.btn-outline-modern {
    background: transparent;
    color: var(--azul-sens);
    border: 2px solid var(--azul-sens);
    padding: 10px 25px;
    font-weight: bold;
    border-radius: 4px; /* MENOS REDONDEADO PARA LOOK INDUSTRIAL */
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn-outline-modern:hover {
    background: var(--azul-sens);
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.hr-gradiente {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, rgba(0,0,0,0), var(--borde), rgba(0,0,0,0));
    margin: 0;
}





/* ESTILOS DEL BOTÓN DE WHATSAPP */
.whatsapp-float {
    position: fixed !important;
    bottom: 25px !important;
    left: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background-color: #25d366 !important; /* VERDE WHATSAPP FORZADO */
    color: white !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999999 !important; /* POR ENCIMA DE TODO */
    text-decoration: none !important;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.3) !important;
    
    /* FIX PARA MÓVILES (APARECER SIN SCROLL) */
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}


/* EL CÍRCULO VERDE (AHORA A LA DERECHA DEL TEXTO) */
.whatsapp-float i {
    color: white !important;
    font-size: 30px !important;
    display: block !important;
}

/* ESTO QUITA EL SUBRAYADO AZUL QUE VISTE AL PRINCIPIO */
.whatsapp-float, .whatsapp-float * {
    text-decoration: none !important;
}

/* MOSTRAR AL PASAR EL MOUSE O SIEMPRE */
.whatsapp-float:hover .wa-tooltip {
    color: #128c7e;
}

.whatsapp-float:hover i {
    transform: scale(1.1);
    background-color: #128c7e;
}

.wa-tooltip {
    position: absolute !important;
    left: 70px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    
    /* FONDO CREMITA / BLANCO HUESO */
    background: #FDFCF9 !important; 
    
    /* TEXTO EN TU AZUL SENS PARA QUE RESALTE */
    color: #1a4f7a !important; 
    
    padding: 8px 15px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    
    /* SOMBRA SUTIL PARA DAR PROFUNDIDAD */
    box-shadow: 2px 4px 12px rgba(0,0,0,0.15) !important;
    
    /* BORDE SUTIL PARA DEFINIR EL GLOBO */
    border: 1px solid #EBE7E0 !important;
    
    pointer-events: none !important;
    display: block !important;
}

/* CAMBIAMOS TAMBIÉN EL COLOR DEL TRIANGULITO A CREMITA */
.wa-tooltip::after {
    content: "" !important;
    position: absolute !important;
    left: -10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    border-width: 5px !important;
    border-style: solid !important;
    border-color: transparent #FDFCF9 transparent transparent !important;
}

.wa-tooltip b {
    color: #1a4f7a !important;
    text-decoration: none !important;
}

/* QUITAR SUBRAYADO DEL TEXTO INTERNO */
.whatsapp-float span, .whatsapp-float b {
    text-decoration: none !important;
}


/* ANIMACIÓN OPCIONAL PARA LLAMAR LA ATENCIÓN */
@keyframes pulse-wa {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* --- AJUSTE PARA EL TEXTO EN MÓVIL --- */
/* --- SOLUCIÓN PARA QUE SE VEA SIEMPRE EN MÓVIL --- */
@media (max-width: 480px) {
    .wa-tooltip {
        font-size: 10px !important;
        padding: 5px 10px !important;
        left: 65px !important;
    }
}


@media (min-width: 768px) {
    .fila-2 {
        /* CAMBIAMOS FLEX-END POR FLEX-START PARA QUE EL MARGEN AUTO FUNCIONE */
        justify-content: flex-start !important; 
        padding-right: 5% !important;
    }
}

@media (max-width: 767px) {
    .fila-2 {
        justify-content: center !important;
    }
    .fila-2 .btn-menu-texto:first-child {
        margin-left: 0 !important;
    }
}

@media (min-width: 992px) {
    .fila-2 {
        /*justify-content: flex-end !important; /* A LA DERECHA SOLO EN PC */
        justify-content: flex-start !important; /* A LA DERECHA SOLO EN PC */
        padding-right: 5% !important;
    }
}


/* --- NUEVA SECCIÓN DE SERVICIOS DESTACADOS --- */
.servicios-destacados {
    display: flex !important;
    align-items: center;
    gap: 30px;
    padding: 60px 40px;
    margin: 20px 0 40px 0;
    border-radius: 8px;
    
    /* ESTO OBLIGA A QUE NADA SE PONGA A SU LADO */
    width: 100% !important;
    grid-column: 1 / -1 !important; 
    clear: both; 

    /* COLOR DE RESPALDO POR SI LA IMAGEN NO CARGA */
    background-color: #1a4f7a !important; 
    
    position: relative;
    overflow: hidden;
    border: 1px solid var(--azul-sens);
}

/* COLUMNA IZQUIERDA: IMAGEN (40%) */
.servicios-destacados .image-container {
    flex: 0 0 30% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
    
    /* FONDO CREMITA CON TRANSPARENCIA (RGBA) */
    /* 253, 252, 249 ES EL COLOR CREMITA / 0.85 ES EL NIVEL DE TRANSPARENCIA */
    background-color: rgba(253, 252, 249, 0.85) !important; 
    
    padding: 25px; 
    border-radius: 20px; 
    
    /* EFECTO DE DESENFOQUE DETRÁS DEL RECUADRO (OPCIONAL, SE VE MUY MODERNO) */
    backdrop-filter: blur(0px); 
    
    /* SOMBRA SUTIL */
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid rgba(235, 231, 224, 0.5);
}

.servicios-destacados .image-container img {
    width: 100%;
    height: auto;
    max-width: 320px;
    border-radius: 12px; 
    display: block;
    object-fit: contain;
    
    /* PEQUEÑO FILTRO PARA QUE LA IMAGEN RESALTE SOBRE EL CREMITA */
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.2));
}

/* COLUMNA DERECHA: TEXTO (60%) */
.servicios-destacados .text-container {
    flex: 0 0 70% !important;
}

.servicios-destacados .text-container h2 {
    color: white !important;
    font-size: 1.8rem !important;
    font-weight: 800;
    text-transform: uppercase;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
}

/* ESTO FUERZA A QUE LA GRILLA DE ABAJO EMPIECE EN UNA NUEVA FILA */
.services-grid {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 25px;
    width: 100%;
}

@media (max-width: 768px) {
    .servicios-destacados {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 40px 15px !important;
        
        /* FUERZA EL FONDO A REPETIRSE SI EL TEXTO ES MUY LARGO */
        background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), 
                          url('../client/img/slide1.png') !important;
        background-repeat: repeat !important; /* REPETIR EN CASO DE QUE FALTE ESPACIO */
        background-size: auto !important;     /* MANTIENE EL TAMAÑO ORIGINAL PARA QUE ENLACE BIEN */
        background-position: top center !important;

        /* ASEGURAR ANCHO TOTAL */
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* AJUSTE DEL CUADRO CREMITA EN MÓVIL */
    .servicios-destacados .image-container {
        flex: 0 0 auto !important;
        width: 160px !important; 
        height: auto !important;
        background-color: rgba(253, 252, 249, 0.85) !important;
        padding: 15px !important;
        border-radius: 15px !important;
        margin-bottom: 20px !important;
    }

    .servicios-destacados .image-container img {
        width: 100% !important;
        height: auto !important;
    }

    /* AJUSTE DEL TEXTO DEBAJO */
    .servicios-destacados .text-container {
        width: 100% !important;
        padding: 0 10px !important;
    }

    .servicios-destacados .text-container h2 {
        font-size: 1.3rem !important;
        text-align: center !important;
        color: white !important;
        line-height: 1.4 !important;
        text-shadow: 2px 2px 5px rgba(0,0,0,1) !important;
    }
}