/* ============================================
   MAIN.CSS - Grupo Rex Mantenimiento Industrial
   Versión: 2.1 | Fecha: 2024
   ============================================ */

/* ===== RESET Y CONFIGURACIONES GENERALES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    list-style: none;
}

body {
    font-family: Arial;
    width: 100%;
}

a {
    text-decoration: none !important;
}

/* ===== HEADER Y NAVEGACIÓN ===== */
header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .5rem;
    background-color: #FF8000;
    color: #fff;
    position: fixed;
    box-shadow: 0px 5px 10px #8d8d8d;
    z-index: 10000;
}

.logo {
    width: 100px;
    max-width: 100px;
    margin-left: 10px;
}

.BanLenguaje {
    display: inline-block;
    height: 20px;
    width: 34px;
    margin-left: 5px;
}

.nav-list {
    list-style-type: none;
    display: flex;
    gap: 2rem; /* Reducido de 2rem a 1.2rem - MEJORA ESPACIADO PC */
    align-items: center;
}

.nav-list li a {
    text-decoration: none;
    color: #fff;
    display: block;
    padding: 5px 0; /* Aumentado de 5px 0 a 10px 0 para mejor clic */
    font-size: clamp(1rem, 2vw, .8rem); /* Tamaño consistente */
    font-weight: 500; /* Mejorar legibilidad */
    /* white-space: nowrap; */
    vertical-align: top;
}

/* Mejorar hover para elementos del menú */
.nav-list li:hover > a {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.abrir-menu,
.cerrar-menu {
    display: none;
    background-color:#FF8000;
    margin-top: 10px;
}

/* Menús desplegables - CORREGIDO */
#Mhijo1,
#Mhijo2,
#Mhijo3,
#Mhijo4,
#Mhijo5 {
    display: none;
    position: absolute;
    background-color: #FF8000;
    min-width: 180px; /* Reducido de 200px a 180px */
    max-width: 220px; /* Limitar ancho máximo */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10001;
    top: 100%;
    left: 0;
    padding: 5px 0; /* Agregar padding interno */
}

/* Contenedor para menús desplegables */
.nav-list > li {
    position: relative;
}

/* Mostrar menú desplegable al pasar el mouse */
.nav-list > li:hover > #Mhijo1,
.nav-list > li:hover > #Mhijo2,
.nav-list > li:hover > #Mhijo3,
.nav-list > li:hover > #Mhijo4,
.nav-list > li:hover > #Mhijo5 {
    display: block;
}

.Bdespliega {
    padding: 2px 12px; /* Reducido padding */
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    border: 0px !important;
    color: #fff;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    margin: 0px;
}

.Bdespliega:active {
    border: 0px;
}

.Boculta {
    width: 100%;
    border: 0px;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 2px 10px;
}

.hijosNav {
    color: white;
    display: block;
    padding: 0;
    margin: 0;
}

.TamIcon {
    font-size: 1.5em;
    vertical-align: bottom;
    align-items: end;
}

.nav-list li {
    text-align: left;
}

.nav-list li:last-child {
    margin-bottom: 0;
    margin-right: 0;
}

/* Elementos hijos del menú - CORREGIDO */
.hijosNav li {
    padding: 8px 15px; /* Reducido de 10px 15px a 8px 15px */
    background-color: #dd7208;
    display: block;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    vertical-align: top;
    font-size: 0.9rem; /* Tamaño ligeramente menor */
}

.hijosNav li:last-child {
    border-bottom: none;
}

.hijosNav li:hover {
    background-color: #1A4E8E;
    cursor: pointer;
}

/* Estilo para enlaces dentro del menú desplegable */
.hijosNav li a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background-color: #bfbfbf;
}

::-webkit-scrollbar-thumb {
    background-image: url('../svg/scroll.svg');
    border-radius: 5px;
}

/* ===== COMPONENTES GENERALES ===== */
.hrs24 {
  width: 100%;
  background: #002a86;
  color: white;
  font-weight: bold;
  font-size: clamp(1rem, 3vw, 1.5rem);
  text-transform: uppercase;
  padding: 1rem 0;
  overflow: hidden;
  position: relative;
}

.hrs24-text {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: simple-scroll 15s linear infinite;
}

@keyframes simple-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

.tam100 {
    width: 100%;
    text-align: center;
}
.BanderinAmarillo{
    vertical-align: bottom;
    background-image: url(https://gruporex.com.mx/svg/franja-seguridad.svg);
    height:30px;
}
/* ===== BOTONES FLOTANTES ===== */
#Teloficina {
    position: fixed;
    bottom: 100px;
    right: 15px;
    z-index: 11000;
    width: 35px;
}

#whatsapp {
    position: fixed;
    bottom: 200px;
    right: 15px;
    z-index: 11000;
    width: 35px;
    cursor: pointer;
}
#telefon{
		position: fixed;
		bottom: 100px;
		right: 15px;
		z-index: 11000;
		width: 35px;
	}

#whatsapp img {
    position: absolute;
    width: 100%;
    height: auto;
    transition: opacity 0.4s ease;
}

#whatsapp img.letrero {
    opacity: 0;
}

#whatsapp:hover img.icono {
    opacity: 0;
}

#whatsapp:hover img.letrero {
    opacity: 1;
    right: 0px;
    width: 100px;
}


/* ===== BANNERS ===== */
.bennerMANTENIMIENTO {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../webp/portada/Fondo-Grupo-Rex-industrial.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerLIMPIEZA {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/img/Fodo-limpieza-de-almacenes-y-naves-industriales.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerPRODUCTIVA {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/webp/portada/Fondo-Grupo-Rex-limpieza-productiva.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerPROYECTOS {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/webp/portada/Fondo-Grupo-Rex-Proyectos-industriales.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerINFRACIVIL {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fondo-Grupo-Rex-concreto-industrial.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerICIVIL {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fondo-Grupo-Rex-infraestructura-civil-mexico.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerEMECANICA {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Portada-Infraestructura-Electromecanica.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.benner404 {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fondo-Grupo-Rex-404.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerContacto {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fondo-Grupo-Rex-contacto.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerSResponsable {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fodo-grupo-rex-empresa-socialmente-responsable.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerMTTOElectro {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/webp/portada/Fondo-Grupo-Rex-Mtto-Electromecanico.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerEVENTOS {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fondo-Grupo-Rex-eventos-industriales.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerEPOXICO {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/webp/Epoxico/Fondo-Grupo-Rex-epoxico.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerIMPER {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/webp/portada/Fondo-Grupo-Rex-Impermeabilizacion.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerCONCRETO {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(https://gruporex.com.mx/webp/portada/P-reparacion-de-concreto.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

.bennerELECTRONICO {
    width: 100%;
    height: 700px;
    padding: 1rem 3rem;
    text-align: center;
    background: url(../img/Fondo-Grupo-Rex-limpiezaindustrial.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-sizing: border-box;
}

/* ===== TIPOGRAFÍAS Y TÍTULOS ===== */
.H1MASTER {
    color: white;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-family: 'Poppins', sans-serif;
    position: absolute;
    right: 50px;
    top: 600px;
    text-shadow: 2px 2px 5px black;
}

h2 span {
    color: #fff;
    font-size: 1.2em;
    padding-top: -35px;
    vertical-align: top;
}

/* ===== SECCIÓN PRINCIPAL AZUL ===== */
.primercuadroazul {
    font-family: 'Poppins', sans-serif;
    background-color: #0032a0;
    color: white;
    width: 100%;
    padding-bottom: 50px;
}

.grid-container {
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tituloF {
    text-align: center;
}

.novecientos {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.Naranja1{
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    text-align: center;
    font-weight: 700;
    margin-bottom: 30px;
    color: #FF8000;
}
.optimizamos {
    font-size: 1.3em;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 30px;
    font-weight: 500;
}

.banderinazul {
    font-size: clamp(1.2em, 3vw, 1rem);
    background-color: #ffffff1a;
    border-left: 4px solid #FF8000;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    line-height: 1.7;
}

.BTNNaranjaAzul {
    background-color: #FF8000;
    color: #ffffff;
    border: none;
    padding: 12px 30px;
    font-size: clamp(0.8rem, 3vw, 1.2rem);
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contenidoF {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.contenidoF .texto {
    font-size: clamp(1.2em, 3vw, 1rem);
    line-height: 1.5em;
    text-align: justify;
}

.contenidoF .video video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ContValor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.ContValor .item img {
    max-width: 80px;
    margin-bottom: 0.5rem;
}

.ContValor .item img:last-child {
    max-width: 150px;
    padding-top: 25px;
}

.ContValor .item p {
    font-size: 0.95em;
    font-weight: 600;
}

/* ===== CARRUSEL DE TARJETAS ===== */
.tarjetas {
    overflow: hidden;
    background: #1a1a1a;
}
.Titulo-Carrusel{
    max-width: 900px;
    margin-top: 50px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px 20px;
    font-size: clamp(1rem, 4vw, 1.8rem);
}

.carousel-container {
    position: relative;
    width: 100vw;
    height: 100vh;
}

.bg-images {
    position: absolute;
    inset: 0;
    z-index: -1;
    z-index: 1;
}

.bg-images img {
    position: absolute;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.8s ease;
    display: block;
}

.bg-images img.active {
    opacity: 0.7;
}

.carousel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.card {
    margin-top: -50px;
    position: absolute;
    width: 500px;
    max-width: 45%;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.card.prev {
    left: 5%;
    transform: translateY(-50%) scale(0.8);
    z-index: 1;
    filter: brightness(0.6);
}

.card.active {
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 3;
    pointer-events: all;
}

.card.next {
    right: 5%;
    transform: translateY(-50%) scale(0.8);
    z-index: 1;
    filter: brightness(0.6);
}

.card-content {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    width: 100%;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.9);
}

.card-content h3 {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.card-content p {
    font-size: 1.2rem;
    line-height: 1.6;
}

.btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(5px);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.btn--left {
    left: 30px;
}

.btn--right {
    right: 30px;
}

.btn svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ===== SECCIÓN DE SERVICIOS ===== */
.services-section {
    max-height: 450px;
    height: 90vh;
    padding: 1.5rem;
}

.encabezadoServi {
    font-size: 2em;
    display: inline-block;
    border-bottom: 3px solid orange;
    padding-bottom: 4px;
    color: #002a86;
}

.ParrServi {
    text-align: justify;
    max-width: 900px;
    margin: 50px auto;
    color: #363636;
    font-size: clamp(1.2em, 3vw, 1rem);
    padding: 0px 30px;
}

.Serviciolink {
    display: inline-block;
    box-shadow: 0px 0px 20px #ccc;
    width: 250px;
    height: 450px;
    margin-left: 25px;
    margin-top: 20px;
    vertical-align: top;
}

.ServicioBlock {
    background-position: center;
    background-size: cover;
    width: 250px;
    height: 175px;
    transition: transform 0.5s ease, filter 0.5s ease;
    transform-origin: center;
}

.tituloservicio {
    font-size: 1.5em;
    color: #002a86;
    font-weight: 600;
    padding-top: 20px;
    height: 65px;
}

.ServicioBlock:hover {
    transform: scale(1.1);
}

.ServiciosP {
    text-align: justify;
    padding: 0px 15px;
    font-size: 0.9em;
    color: #363636;
    padding-top: 20px;
    height: 140px;
}

.ButtonInfoSer {
    border: none;
    background-color: #ffffff;
    color: #002a86;
    padding: 5px 15px;
    border-radius: 5px;
    box-shadow: 0px 2px 5px #000;
    margin-top: 10px;
    cursor: pointer;
    font-size: 0.8em;
    vertical-align: bottom;
}

.grid-serviciosGrupo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 2fr));
    gap: 1rem;
    height: 100%;
    max-width: 1100px;
    margin: 0 auto;
    margin-top: 50px;
}

.grid-Servi {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 180px;
}

.grid-Servi a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: white;
    position: relative;
}

.grid-Servi .bg-image {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) brightness(0.7);
    transition: all 0.5s ease;
    transform: scale(1);
}

.grid-Servi .text-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    transition: all 0.4s ease;
}

.grid-Servi h3 {
    font-size: 1.4rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.grid-Servi:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(-8px);
}

.grid-Servi:hover .bg-image {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.1);
}

.grid-Servi:hover .text-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 80%);
    padding-bottom: 2rem;
}

.grid-Servi:hover h3 {
    transform: translateY(-5px);
    font-size: 1.5rem;
}

/* ===== SECCIÓN DE CONTENIDO ===== */
.desborda {
    padding: 0% 0% 1% 1%;
    margin: 0px;
    margin-right: 5%;
    width: 100%;
    float: right;
}

.desborda2 {
    padding: 0% 0% 1% 1%;
    margin: 0px;
    margin-left: 5%;
    width: 100%;
    float: left;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
    margin-top: 50px;
}

.tex-1 {
    font-size: clamp(1.2em, 3vw, 1rem);
    padding: 0px 10%;
    text-align: justify;
    margin-top: 50px;
    font-size: 1.2em;
}
.list1 {
    list-style-type: none;
    margin-top: 0px;
    margin-left: 0px;
}

.list1 li {
    font-size: clamp(0.5em, 1em, 1.5em);
    padding-left: 0px;
    margin-bottom: 15px;
    margin-left: 10px;
    margin-top: 20px;
    text-align: left;
    line-height: 1em;
}

.list1 li::before {
    content: '•';
    color: #ffffff;
    font-weight: bold;
    padding-right: 10px;
}


.clearfix ul {
    list-style-type: none;
    margin-top: 50px;
    margin-left: 10px;
}

.clearfix li {
    padding-left: 10px;
    margin-bottom: 15px;
    text-align: left;
}

.clearfix li::before {
    content: '•';
    color: #FF8000;
    font-weight: bold;
    padding-right: 10px;
}

/* ===== GALERÍA ===== */

.Gal{
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.galeria {
    vertical-align: top;
    width: 100%;
    max-width: 380px;
    height: auto;
    display: inline-block;
    margin: 15px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: white;
}

.galeria:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.galeria-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.galeria:hover .galeria-img {
    transform: scale(1.05);
}

.galeria p {
    padding: 15px;
    font-weight: 600;
    color: #363636;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.5rem, 3vw, 1rem);
}

/* ===== TESTIMONIOS ===== */
.CardTes {
    display: inline-block;
    width: 100% !important;
    text-align: center;
}

.cardInd {
    vertical-align: top;
    max-width: 350px;
    margin-left: 10px;
    display: inline-block;
    margin-top: 50px
}

.foto-testimonio {
    width: 30%;
    height: auto;
    border-radius: 150px;
    box-shadow: 3px 3px 6px #545454;
    margin-top: 20px;
}

.nombre {
    text-align: center;
    font-weight: 600;
    font-family: arial;
    font-size: 1.1em;
}

.puesto {
    color: #7c7b7a;
    font-size: 1em;
}

.empresa{
    line-height: 2em;
    font-weight: 600;
    color: #363636;
    font-size: 1.1em;
}
.estrella{
    color: gold;
    margin: 15px 0px;
    font-size: 1.8em;
}

.comentarioT {
    padding: 15px 20px;
    text-align: justify;
    color: #4a4a49;
    font-size: 0.9em;
}

.texClientes {
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    color: #014b96;
    font-weight: 700;
    line-height: 1.3;
}

/* ===== FORMULARIO ===== */
.SectionForm{
    padding: 3rem 1rem;
    text-align: center;
}
.bloque-formulario {
    width: 100%;
    background: linear-gradient(135deg, #0032a0 0%, #002a86 100%);
}

.bloque-formulario h2{
    color: #ffffff; 
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 2rem;
}
.bloque-formulario p{
    font-size: clamp(.9rem, 3vw, 1.2rem);
    font-family: roboto;
    color: #ffffff;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
    line-height: 1.2;
}
form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.Capcha {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background-color: #0032a0;
    border-radius: 8px;
}

.MatCap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    max-width: 280px;
}
.Matematica{
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: #FF8000;
    font-weight: bold;
}
.MatBorde{
    padding: 8px 12px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    width: 120px;
}
.BTNForm{
    background-color:#FF8000;
    color: #fff;
    cursor: pointer;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

input,
textarea {
    width: 100%;
    max-width: 500px;
    margin: 10px 0;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: clamp(.9rem, 3vw, 1.2rem);
    transition: border-color 0.3s ease;
}
.EresHumano{
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #FF8000;
    background: rgba(255, 255, 255, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

button[type="submit"] {
    background-color: #FF8000;
    color: #fff;
    cursor: pointer;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.1em;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background-color: #e67300;
    transform: translateY(-2px);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    margin: 0;
    font-size: 0;
    padding: 3rem 1rem;
    color: white;
}

footer>* {
    font-size: 1rem;
}

.footerDiv,
.footerDivR {
    vertical-align: top;
    display: inline-block;
    width: 100%;
    max-width: 33.333%;
    height: auto;
    color: #fff;
    text-align: left;
    padding: 1rem;
    box-sizing: border-box;
}

.TituloFooter {
    padding: 15px 0;
    margin: 0 0 20px 0;
    font-size: clamp(0.5rem, 3vw, 1rem);
    font-weight: 700;
    color: #FF8000;
    border-bottom: 2px solid #FF8000;
}

.liFoter {
    font-size: clamp(0.5rem, 3vw, .8rem);
    padding: 8px 0;
    text-decoration: none !important;
    list-style: none;
    line-height: 1.3;
}

.liFoter a {
    color: #ddd;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.liFoter a:hover {
    color: #FF8000;
}

.liFoter span {
    font-size: 1.2em;
    color: #FF8000;
    margin-right: 10px;
}

.TamIconN {
    font-size: 1.2em;
    vertical-align: middle;
}
.Footer2{
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.IcoSocial{
    width: 40px;
    height: 40px;
}

/* ===== BANDERAS Y ELEMENTOS ESPECIALES ===== */
.banderetaazul {
    background-color: #002a86;
    font: "Oswald", sans-serif;
}

:root {
    --offset: 20vw;
    --move-initial: calc(-280px + var(--offset));
    --move-final: calc(-3850px + var(--offset));
}

@keyframes marquee {
    0% {
        transform: translateX(var(--move-initial));
    }

    100% {
        transform: translateX(var(--move-final));
    }
}

/* Iconos */
.icon-rex {
    display: inline-block;
    width: 20px; 
    height: 20px; 
    background-image: url('../svg/vineta-grupo-rex.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}
.icon-aprobado {
    display: inline-block;
    width: 20px; 
    height: 20px; 
    background-image: url('../svg/aprobado.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.icon-Energia {
    display: inline-block;
    width: 20px; 
    height: 20px; 
    background-image: url('../svg/Energia.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.icon-SobreTel {
    display: inline-block;
    width: 20px; 
    height: 20px; 
    background-image: url('../svg/sobreTel.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.icon-Mtto {
    display: inline-block;
    width: 25px; 
    height: 25px; 
    background-image: url('../svg/Mtto-Rex.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.icon-Limpieza {
    display: inline-block;
    width: 25px; 
    height: 25px; 
    background-image: url('../svg/LimpiezaPro.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.Ico-hamburguesa {
    display: inline-block;
    width: 25px; 
    height: 25px; 
    background-image: url('../svg/hamburgueza.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
    z-index: 999;
}

.Ico-Close {
    display: inline-block;
    width: 25px; 
    height: 25px; 
    background-image: url('../svg/Close.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
    z-index: 999;
}

.Ico-Proyectos {
    display: inline-block;
    width: 25px; 
    height: 25px; 
    background-image: url('https://gruporex.com.mx/svg/ProyectosInt.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.Ico-lapizEngrane {
    display: inline-block;
    width: 35px; 
    height: 35px; 
    background-image: url('../svg/lapiz-engrane.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}

.Ico-FlechaEngrane {
    display: inline-block;
    width: 35px; 
    height: 35px; 
    background-image: url('https://gruporex.com.mx/svg/flecha-engrane.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
    margin-right: 8px;
}
/* PARRALAX FOOTER */

.ParallaxLimpiezaProductuiva {
    background-image: url(https://gruporex.com.mx/webp/portada/Parallax-limpieza-productiva.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* PARALLAX */
    height: 400px;
    /* Flexbox para centrar contenido */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    padding-top: 0; /* Eliminar el padding */
}
.ParallaxLimpiezaProductuiva h3 {
    max-width: 800px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    font-weight: 600;
    text-shadow:
        -1px -1px 5px #000,
        1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    /* Opcional: eliminar márgenes por defecto del h3 */
    margin: 0;
    padding: 0px 20px;
}
.confianzaImpermeabilizacion {
    background-image: url(https://gruporex.com.mx/webp/portada/Parallax-impermeabilizacion.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* PARALLAX */
    height: 400px;
    /* Flexbox para centrar contenido */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    padding-top: 0; /* Eliminar el padding */
}

.confianzaImpermeabilizacion h3 {
    max-width: 800px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    font-weight: 600;
    text-shadow:
        -1px -1px 5px #000,
        1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    /* Opcional: eliminar márgenes por defecto del h3 */
    margin: 0;
    padding: 0px 20px;
}

.ParallaxEpoxi {
    background-image: url(https://gruporex.com.mx/webp/Epoxico/Parallax-epoxico.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* PARALLAX */
    height: 400px;
    /* Flexbox para centrar contenido */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    padding-top: 0; /* Eliminar el padding */
}

.ParallaxEpoxi h3 {
    max-width: 800px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    font-weight: 600;
    text-shadow:
        -1px -1px 5px #000,
        1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    /* Opcional: eliminar márgenes por defecto del h3 */
    margin: 0;
    padding: 0px 20px;
}

.ParallaxMttoElectro {
    background-image: url(https://gruporex.com.mx/webp/portada/Parallax-mantenimiento-electromecanico.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* PARALLAX */
    height: 400px;
    /* Flexbox para centrar contenido */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    padding-top: 0; /* Eliminar el padding */
}

.ParallaxMttoElectro h3 {
    max-width: 800px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    font-weight: 600;
    text-shadow:
        -1px -1px 5px #000,
        1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    /* Opcional: eliminar márgenes por defecto del h3 */
    margin: 0;
    padding: 0px 20px;
}

.ParallaxConcreto {
    background-image: url(https://gruporex.com.mx/webp/portada/Parallax-grupo-rex-concreto.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* PARALLAX */
    height: 400px;
    /* Flexbox para centrar contenido */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    padding-top: 0; /* Eliminar el padding */
}

.ParallaxConcreto h3 {
    max-width: 800px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    font-weight: 600;
    text-shadow:
        -1px -1px 5px #000,
        1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    /* Opcional: eliminar márgenes por defecto del h3 */
    margin: 0;
    padding: 0px 20px;
}

.ParallaxProyectos {
    background-image: url(https://gruporex.com.mx/webp/portada/Parallax-proyectos-industriales.webp);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed; /* PARALLAX */
    height: 400px;
    /* Flexbox para centrar contenido */
    display: flex;
    justify-content: center; /* Centrado horizontal */
    align-items: center; /* Centrado vertical */
    padding-top: 0; /* Eliminar el padding */
}

.ParallaxProyectos h3 {
    max-width: 800px;
    text-align: center;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    color: #fff;
    font-weight: 600;
    text-shadow:
        -1px -1px 5px #000,
        1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    /* Opcional: eliminar márgenes por defecto del h3 */
    margin: 0;
    padding: 0px 20px;
}


/* ===== MEDIA QUERIES PARA TABLET (768px - 1024px) ===== */
@media screen and (max-width: 1024px) {
    .abrir-menu,
    .cerrar-menu {
        display: block;
        border: 0;
        font-size: 1rem;
        background-color: transparent;
        cursor: pointer;
    }

    .abrir-menu {
        color: #ffffff;
        font-size: 2em;
        margin-right: 20px;
    }

    .cerrar-menu {
        color: #ececec;
        font-size: 1em;
    }

    .nav {
        opacity: 0;
        visibility: hidden;
        display: flex;
        flex-direction: column;
        align-items: end;
        gap: 1rem;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .5);
        height: auto;
        background-color: #FF8000;
        padding: 0px;
        width: 300px;
    }

    .nav.visible {
        opacity: 1;
        visibility: visible;
    }

    .nav-list {
        flex-direction: column;
        background-color: #FF8000;
        padding: 0;
        padding-left: 10px;
        cursor: pointer;
        width: 100%;
        /* REDUCIR ESPACIADO ENTRE ELEMENTOS */
        gap: 0.5rem; /* Reducido de 2rem a 0.5rem */
    }

    .nav-list li {
        width: 100%;
        text-align: left;
        margin-bottom: 5px; /* Reducido de 10px a 5px */
        padding: 8px 0; /* Agregar padding interno */
    }

    .nav-list li a {
        color: #ecececec;
        padding: 8px 0; /* Reducido de 10px 0 a 8px 0 */
        display: block;
        font-size: 1rem; /* Asegurar tamaño consistente */
    }

    /* Menús desplegables en móvil */
    #Mhijo1,
    #Mhijo2,
    #Mhijo3,
    #Mhijo4,
    #Mhijo5 {
        position: static;
        display: none;
        background-color: rgba(255, 255, 255, 0.1);
        margin-top: 5px;
        margin-left: 15px;
        box-shadow: none;
        width: calc(100% - 15px);
        /* MEJORAR ESPACIADO INTERNO */
        padding: 5px 0;
    }

    /* Mostrar menú desplegable en móvil */
    .nav-list > li.active > #Mhijo1,
    .nav-list > li.active > #Mhijo2,
    .nav-list > li.active > #Mhijo3,
    .nav-list > li.active > #Mhijo4,
    .nav-list > li.active > #Mhijo5 {
        display: block;
    }

    .hijosNav li {
        padding: 6px 15px; /* Reducido de 8px 15px a 6px 15px */
        margin-bottom: 0;
        font-size: 0.95rem; /* Reducir tamaño de fuente ligeramente */
    }

    /* Botones de menú desplegable en móvil */
    .Bdespliega {
        padding: 8px 10px; /* Reducir padding vertical */
        font-size: 1rem;
        margin: 2px 0; /* Agregar margen pequeño */
    }

    .tam50 {
        width: 100%;
    }

    input {
        width: 60%;
        margin: 5px 0px;
        padding: 10px;
    }

    textarea {
        width: 60%;
        margin: 5px 0px;
        padding: 10px;
    }

    .footerDiv,
    .footerDivR {
        vertical-align: top;
        display: inline-block;
        width: 100%;
        height: auto;
        color: #fff;
        text-align: center;
    }

    .services-section {
        height: auto;
    }

    .grid-Servi h3 {
        font-size: 1.2rem;
    }
}

/* ===== MEDIA QUERIES PARA SMARTPHONE (menor a 768px) ===== */
@media screen and (max-width: 767px) {
    .nav-list {
        gap: 0.3rem; /* Espaciado aún más reducido para móviles pequeños */
    }

    .nav-list li {
        margin-bottom: 3px; /* Mínimo espacio entre elementos */
        padding: 6px 0;
    }

    .nav-list li a {
        padding: 6px 0;
        font-size: 0.95rem;
    }

    .hijosNav li {
        padding: 5px 12px; /* Más compacto para móviles */
        font-size: 0.9rem;
    }

    /* Asegurar que el menú ocupe bien la pantalla */
    .nav {
        width: 250px; /* Ancho fijo para consistencia */
        padding-top: 60px; /* Espacio para el botón cerrar */
    }

    .nav-list ul li {
        margin-top: -5px;
    }
    .desborda {
        padding: 5%;
        margin: 0px;
        width: 100%;
    }
    .desborda2 {
        padding: 0px auto;
        margin: 0px;
        width: 100%;
    }
    .contenidoF {
        grid-template-columns: 1fr;
    }

    .grid-serviciosGrupo {
        margin-left: 15px;
        margin-right: 15px;
    }

    input {
        width: 80%;
        margin: 5px 0px;
        padding: 10px;
    }

    textarea {
        width: 80%;
        margin: 5px 0px;
        padding: 10px;
    }

    footer {
        padding: 2rem 1rem;
        font-size: initial; /* elimina el hack */
    }

    footer > * {
        font-size: 1rem;
    }

    .footerDiv,
    .footerDivR {
        width: 100%;
        max-width: 100%;
        display: block;
        text-align: center;
        margin-bottom: 20px;
    }

    .Footer2 {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Estilos para texto visualmente oculto */
 .visually-hidden {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* Mejoras de accesibilidad para enlaces */
        .logo-link,
        .whatsapp-link,
        .phone-link,
        .contact-button-link,
        .service-link,
        .social-link,
        .email-link,
        .phone-link-footer,
        .whatsapp-link-footer {
            position: relative;
            display: inline-block;
        }

        /* Mejora el contraste para enlaces del footer */
        .liInt:focus,
        .social-link:focus,
        .email-link:focus,
        .phone-link-footer:focus,
        .whatsapp-link-footer:focus {
            outline: 2px solid #FF8000;
            outline-offset: 2px;
        }