:root {
  --rojo-vino: rgba(198, 29, 26);
  --blanco: #fff;
  --negro: #000;
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  font-family:Arial, Helvetica, sans-serif; 
}

body {
  background-color: var(--blanco);
  color: var(--negro);
  scroll-behavior: smooth;
}

header img {
  position: absolute;
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
  width: 100%;
  height: 540px;
}

header h1 {
  padding-top: 135px;
  padding-left: 60px;
  position: relative;
  color: white;
  font-size: 47px;
  width: 680px;
}

header a {
  color: white;
  position: relative;
  margin-left: 63px;
  margin-top: 28px;
  border-radius: 3px;
  background-color: rgba(198, 29, 26);
  width: 220px;
  height: 35px;
  padding: 8px;
  padding-left: 15px;
  font-size: 19px;
  text-decoration: none;
  border-radius: 2px;
  display: inline-block; /* Similar a bloque pero conserva el flujo en línea */
}

header a:hover {
  background-color: #000000; /* Cambiar color de fondo al pasar el mouse */
  color: #fff; /* Cambiar el color del texto si lo deseas */
}


/* ===== Menú sticky con logo ===== */
.menu-hero-sticky {
  position: static;
  top: 0;
  background-color: rgba(0, 0, 0, 0.897);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0px 40px;
  box-shadow: 0 2px 5px rgba(45, 45, 45, 0.3);
  z-index: 1000;
  height: 75px;
}

/* Logo */
.menu-hero-sticky .logo img {
  height: 60px;
  width: 60px;
  border-radius: 8px;
  padding: 0;
  margin: 0;
}

/* Enlaces del menú */
.menu-hero-sticky .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.menu-hero-sticky .nav-links a {
  text-decoration: none;
  color: #ffffff;
  font-weight: bold;
  transition: color 0.3s ease, transform 0.3s ease;
}

.menu-hero-sticky .nav-links a:hover {
  color: var(--rojo-vino);
  transform: scale(1.1);
}

/* ===== Sección portada ===== */
.section-hero {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: var(--blanco);
  text-align: center;
  overflow: hidden;
}

.section-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('./Imagenes/Proyecto1.jpg') center/cover no-repeat;
  filter: brightness(0.4);
  z-index: -2;
}

.section-hero img {
  width: 400px;
  border-radius: 10px;
  margin-bottom: 20px;
  z-index: 1;
}

.section-hero h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  z-index: 1;
}

/* ===== Secciones generales ===== */
section {
  padding: 10px 10px 10px 20px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s ease;
  scroll-margin-top: 120px;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-content {
  max-width: 1200px;
  margin: auto;
  background: #ffffff;
  border-radius: 5px;
}

/* ===== Productos y Servicios ===== */
.products-services {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

.products-services .box {
  flex: 1 1 45%;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.products-services .box img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
  transition: transform 1.5s ease;
}

.products-services .box:hover img {
  transform: scale(1.05);
}

/* ===== Contacto ===== */
#contacto .section-content {
  padding-bottom: 60px;
  padding-top: 1px;
}

#contacto h2{
  margin-bottom: 20px;
}
form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

form input, form textarea {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

form button { 
  background-color: var(--rojo-vino);
  color: var(--blanco);
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s, transform 0.2s;
}

form button:hover {
  background-color: rgba(198, 29, 26);
  transform: scale(1.05);
}

/* ===== Footer ===== */
footer {
  background: var(--rojo-vino);
  color: var(--blanco);
  text-align: center;
  padding: 20px;
}

footer a {
  color: var(--blanco);
  text-decoration: underline;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .menu-hero-sticky {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }

  .menu-hero-sticky .nav-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
  }

  .products-services {
    flex-direction: column;
  }

  .products-services .box {
    flex: 1 1 100%;
  }

  .section-hero img {
    width: 80%;
  }
}

/* --- Nombre de la empresa --- */
.nombre-empresa {
  flex-grow: 1;
  text-align: left;
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-left: 20px;
}

/* Contenedor de tarjetas premium */
.cards-container-premium {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

/* Tarjeta premium */
.card-premium {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: relative;
  cursor: pointer;
}

.card-premium .card-img {
  position: relative;
  overflow: hidden;
}

.card-premium .card-img img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.card-premium .card-body {
  padding: 20px;
  text-align: left;
}

.card-premium h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  font-weight: 600;
}

.card-premium ul {
  list-style: none;
  padding-left: 0;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

.card-premium ul li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-premium:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.12);
  background-color: #f8f8f8;
}

.card-premium:hover .card-img img {
  transform: scale(1.03);
}

/* Tarjetas con carrusel - estilos generales */
.automatizacion-card,
.mecanica-card,
.electricidad-card {
  cursor: pointer;
  position: relative;
}

/* Indicador de hover para las tarjetas con carrusel */
.automatizacion-card .hover-indicator,
.mecanica-card .hover-indicator,
.electricidad-card .hover-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 1.1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
  text-align: center;
  padding: 20px;
  border-radius: 4px;
}

.automatizacion-card .hover-indicator::before,
.mecanica-card .hover-indicator::before,
.electricidad-card .hover-indicator::before {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}

.automatizacion-card:hover .hover-indicator,
.mecanica-card:hover .hover-indicator,
.electricidad-card:hover .hover-indicator {
  opacity: 1;
}

/* Colores específicos para cada servicio */
.automatizacion-card h3 {
  color: var(--azul-automatizacion);
}

.mecanica-card h3 {
  color: var(--verde-mecanica);
}

.electricidad-card h3 {
  color: var(--naranja-electricidad);
}

.automatizacion-card .hover-indicator {
  background-color: rgba(60, 59, 58, 0.7);
}

.mecanica-card .hover-indicator {
  background-color: rgba(176, 47, 47, 0.7);
}

.electricidad-card .hover-indicator {
  background-color: rgba(60, 59, 58, 0.7);
}

/* Efectos especiales para las tarjetas con carrusel al hacer hover */
.automatizacion-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(102, 61, 61, 0.2);
  border: 2px solid var(--azul-automatizacion);
}

.mecanica-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(102, 61, 61, 0.2);
  border: 2px solid var(--verde-mecanica);
}

.electricidad-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 30px rgba(102, 61, 61, 0.2);
  border: 2px solid var(--naranja-electricidad);
}

/* ===== CARRUSEL INTEGRADO MEJORADO ===== */
.inline-carrusel {
  width: 100%;
  height: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  margin-top: 20px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(-20px);
  position: relative;
  padding-bottom: 0px;
}

.inline-carrusel.active {
  height: 400px; /* Más alto que antes */
  opacity: 1;
  transform: translateY(0);
}

.carrusel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  background: linear-gradient(270deg, rgba(198, 29, 26) 20%, #750a0a 90%);
  color: white;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  height: 45px;
}

.carrusel-header h4 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 200;
  letter-spacing: 0.6px;
}

.close-carrusel-btn {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
  font-weight: bold;
}

.close-carrusel-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.carrusel-content {
  display: flex;
  align-items: center;
  height: 250px; /* Más alto */
  position: relative;
  padding: 0 70px;
  background: linear-gradient(to right, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
}

.carrusel-track-container {
  flex: 1;
  overflow: hidden;
  height: 100%;
  border-radius: 10px;
}

.carrusel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
  align-items: center;
  gap: 10px; /* Espacio entre imágenes */
}

.carrusel-slide {
  flex: 0 0 auto;
  width: 250px; /* Más ancho para imágenes cuadradas */
  height: 250px; /* Alto igual al ancho para hacerlo cuadrado */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  transition: all 0.3s ease;
}

.carrusel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cambiado a cover para llenar el cuadrado */
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.4s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: white;
}

.carrusel-slide img:hover {
  border-color: whitesmoke;
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Efecto de brillo al pasar el mouse */
.carrusel-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 12px;
  pointer-events: none;
}

.carrusel-slide:hover::before {
  opacity: 1;
}

/* Botones de navegación del carrusel mejorados */
.carrusel-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, var(--rojo-vino) 0%, rgb(147, 24, 22) 100%);
  color: white;
  border: none;
  padding: 18px 22px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 10%;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  font-weight: bold;
}

.carrusel-nav-btn:hover {
  background: linear-gradient(135deg, rgba(198, 29, 26) 0%, var(--rojo-vino) 100%);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.inline-prev-btn {
  left: 8px;
}

.inline-next-btn {
  right: 8px;
}

.carrusel-footer {
  padding: 15px 30px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-top: 2px solid #e0e0e0;
  text-align: center;
  border-radius: 0 0 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.carrusel-counter {
  font-weight: 700;
  color: var(--rojo-vino);
  font-size: 1.2rem;
  letter-spacing: 1px;
}

/* Indicadores de progreso */
.carrusel-progress {
  display: flex;
  gap: 7px;
  align-items: center;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  transition: all 0.3s ease;
}

.progress-dot.active {
  background: var(--rojo-vino);
  transform: scale(1.2);
}

/* Indicador de carga mejorado */
.carrusel-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: var(--rojo-vino);
  font-size: 1.3rem;
  font-weight: bold;
  flex-direction: column;
  gap: 15px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--rojo-vino);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Efecto de desplazamiento suave para la sección */
#servicios {
  transition: padding-top 0.5s ease;
}

#servicios.with-carrusel {
  padding-top: 120px;
}

/* Responsive para carrusel integrado mejorado */
@media (max-width: 1200px) {
  .inline-carrusel.active {
    height: 380px;
  }
  
  .carrusel-content {
    height: 280px;
    padding: 0 65px;
  }
  
  .carrusel-slide {
    width: 230px;
    height: 230px;
  }
}

@media (max-width: 768px) {
  .inline-carrusel.active {
    height: 350px;
  }
  
  .carrusel-content {
    height: 250px;
    padding: 0 60px;
  }
  
  .carrusel-slide {
    width: 200px;
    height: 200px;
  }
  
  .carrusel-nav-btn {
    padding: 15px 18px;
    font-size: 20px;
  }
  
  .carrusel-header {
    padding: 12px 25px;
  }
  
  .carrusel-header h4 {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .inline-carrusel.active {
    height: 320px;
  }
  
  .carrusel-content {
    height: 220px;
    padding: 0 50px;
  }
  
  .carrusel-slide {
    width: 180px;
    height: 180px;
  }
  
  .carrusel-nav-btn {
    padding: 12px 15px;
    font-size: 18px;
  }
  
  .carrusel-header h4 {
    font-size: 1.1rem;
  }
  
  .carrusel-footer {
    padding: 12px 20px;
    flex-direction: column;
    gap: 10px;
  }
}

/* Responsive para tarjetas */
@media (max-width: 768px) {
  .cards-container-premium {
    grid-template-columns: 1fr;
  }
  
  .automatizacion-card .hover-indicator,
  .mecanica-card .hover-indicator,
  .electricidad-card .hover-indicator {
    font-size: 0.9rem;
    padding: 15px;
  }
  
  .automatizacion-card .hover-indicator::before,
  .mecanica-card .hover-indicator::before,
  .electricidad-card .hover-indicator::before {
    font-size: 1.5rem;
  }
}

.quienes-somos-container {
  margin-top: 310px;
}

.texto-y-imagen {
  display: flex;
  align-items: flex-start;
  gap: 50px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.texto-quienes-somos {
  flex: 1 1 30%;
  text-align: justify;
}

#quienes-somos{
  margin: 0;
  padding-top: 0;
  padding-left: 50px;
}

#titulo-nosotros { 
  color: var(--negro);
  margin-top: 60px;
  margin-left: 48px; 
  font-size: 1.8em; 
}

.texto-quienes-somos p {
  padding: 50px;
  line-height: 1.6;
  font-size: 18px;
  align-content: center;
}

.imagen-equipo img {
  width: 640px;
  height: 420px;
  border-radius: 2px 2px 2px 90px; /* Más suave y consistente */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12); /* Sombra más profesional */
  margin: 0;
  padding: 0;
  transition: all 0.3s ease; /* Transición suave para hover */
  filter: brightness(1.02) contrast(1.05); /* Mejora sutil de calidad */
}

/* Marca de agua */
.quienes-somos-watermark {
  position: absolute;
  top: 50%;
  left: 25%;
  transform: translate(-50%, -50%);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
  max-width: 330px;
}

.quienes-somos-watermark img {
  width: 100%;
  height: 400px;
}

@media (max-width: 768px) {
  .texto-y-imagen {
    flex-direction: column;
    align-items: center;
  }

  .texto-quienes-somos, .imagen-equipo {
    flex: 1 1 100%;
    text-align: center;
  }
}

/* ===== Sección Visión/Misión (ajustada) ===== */
#vision-mision {
background: #575757;
background: linear-gradient(85deg,rgba(87, 87, 87, 0.98) 0%, rgba(209, 209, 209, 1) 47%, rgba(255, 255, 255, 1) 93%);
  height: 334px;
  margin-top: 7px;
  margin-bottom: 19px;
  padding: 20px;
  padding-top: 0px;
}


.contenedor-mision-vision {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 70px;
  max-width: 1000px;
  margin: 0px;
  margin-left: 145px;
}

.mision, .vision {
  flex: 1 1 400px;
  background: none;
  text-align: justify;
  padding: 20px;
  margin-top: 50px;
}

.mision h2, .vision h2 {
  color: #000000;
  text-align: center;
  margin-bottom: 14px;
  padding-left: 140px;
  font-weight: 620;
}

.contenido-mision, .contenido-vision {
  display: flex;
  align-items: center;
  gap: 30px;  /* Espacio entre la imagen y el texto */
}

.contenido-mision p, .contenido-vision p {
  color: #201e1e;
  line-height: 1.5;
  font-size: 18px;
}

.imagen-mision, .imagen-vision {
  width: 115px;  /* Ajusta el tamaño según lo necesites */
  height: 115px; /* Ajusta el tamaño según lo necesites */
}
/* ===== Sección Servicios ajustada ===== */
#servicios {
  min-height: auto;
  padding: 25px 20px;
  position: relative;
}