:root {
  --primary: #2c3e50;
  --secondary: #34495e;
  --accent: #3498db;
  --highlight: #f1c40f;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #f5f5f5;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.header {
  background: linear-gradient(135deg, rgba(33, 37, 41, 0.92), rgba(33, 37, 41, 0.92)) no-repeat,
              radial-gradient(circle at center, rgba(255,255,255,0.1), rgba(255,255,255,0.05)) no-repeat;
  background-size: cover;
  background-position: center;
  animation: gradientAnimation 10s infinite alternate, shimmer 2s infinite;
  padding: 5px 0;
  box-shadow: 0 4px 25px rgba(0,0,0,0.2);
  border-bottom: 2px solid var(--accent);
  position: sticky; /* Hacer el header sticky */
  top: 0; /* Mantener el header en la parte superior */
  z-index: 1000;
  overflow: hidden;
  position: relative;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1), transparent);
  animation: waveAnimation 5s infinite linear;
  z-index: -1;
}

@keyframes waveAnimation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

@keyframes gradientAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* Ajustes para el contenedor de logos */
.logo-container {
  padding: 10px 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  position: relative;
  z-index: 2;
  transform: translateY(-3px); /* Mover los logos 3px más arriba */
}

/* Ajustes para las cajas de los logos */
.logo-box {
  width: 120px;  /* Aumentado de 80px */
  height: 90px; /* Aumentado de 60px */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.logo-box:hover {
  transform: scale(1.05);
}

.nav-section {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 10px 0;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--highlight);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--accent);
  color: var(--highlight);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-links a:hover::after {
  width: 100%;
}

@keyframes glow {
  0% { box-shadow: 0 0 5px var(--accent); }
  50% { box-shadow: 0 0 20px var(--accent); }
  100% { box-shadow: 0 0 5px var(--accent); }
}

@keyframes glowText {
  0% {
    text-shadow: 0 0 5px rgba(241,196,15,0.5);
    filter: brightness(1);
  }
  50% {
    text-shadow: 0 0 15px rgba(241,196,15,0.8);
    filter: brightness(1.2);
  }
  100% {
    text-shadow: 0 0 5px rgba(241,196,15,0.5);
    filter: brightness(1);
  }
}

.hero-slider {
  height: 600px;
  position: relative;
}

.slide {
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.slide-content {
  background: rgba(66,66,66,0.8);
  padding: 2rem;
  border-radius: 10px;
}

.service-card {
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  background-color: white;
  /* Eliminar la animación float */
  /* animation: float 6s ease-in-out infinite; */
}

.service-card:hover {
  /* Eliminar el efecto de hover que causa el movimiento */
  /* transform: translateY(-10px); */
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.floating-buttons {
  position: fixed;
  right: 20px;
  top: 75%; /* Ajusta la posición para que esté un poco más arriba */
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: sideFloat 3s ease-in-out infinite;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

@keyframes sideFloat {
  0% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(-5px); }
  100% { transform: translateY(-50%) translateX(0); }
}

.floating-button {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: transform 0.3s;
  background-color: var(--primary);
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

.floating-button:hover {
  transform: scale(1.1);
}

.modal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
  padding: 15px;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

.modal-gallery img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

.modal-gallery img:hover {
  transform: scale(1.1) rotate(2deg);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

footer {
  background-color: var(--primary) !important;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

section {
  opacity: 0;
  transition: opacity 0.5s ease;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

section.animate__fadeIn {
  opacity: 1;
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

.modal.fade .modal-dialog {
  transform: scale(0.7);
  transition: all 0.3s ease;
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

.modal.show .modal-dialog {
  transform: scale(1);
  box-sizing: border-box; /* Asegura que el padding y border estén incluidos en el ancho total */
}

@media (max-width: 768px) {
  .header {
    padding: 5px 0;
  }

  .logo-container {
    flex-direction: row; /* Cambiar a horizontal */
    gap: 70px; /* Ajustar el espacio entre los elementos */
  }

  .company-name-container {
    flex-direction: column; /* Mantener los nombres en columna */
    text-align: center;
  }

  .company-name {
    font-size: 18px; /* Ajustar el tamaño del nombre de la empresa */
  }

  .distribuidor-tagline {
    font-size: 16px; /* Ajustar el tamaño del tagline */
    text-align: center;
  }

  .logo-box {
    width: 100px;
    height: 75px;
  }

  .logo-box .company-logo {
    width: 100%; /* Asegura que el logo ocupe todo el ancho del contenedor */
    height: auto; /* Mantiene la proporción del logo */
    max-width: 100%; /* Limita el ancho máximo del logo */
    max-height: 100%; /* Limita la altura máxima del logo */
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 5px;
  }

  .nav-links a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .hero-slider {
    height: 400px;
  }

  .floating-buttons {
    right: 10px;
    top: 75%; /* Ajusta la posición para que esté un poco más arriba */
  }

  .floating-button {
    width: 60px;
    height: 60px;
  }

  .service-card {
    margin-bottom: 15px;
  }

  .slide-content {
    width: 90%;
    padding: 1rem;
  }

  .slide-content h2 {
    font-size: 1.5rem;
  }

  section {
    padding: 3rem 0;
  }

  section h2 {
    font-size: 1.8rem;
  }

  .modal-gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .footer {
    text-align: center;
  }

  .footer-contact {
    margin-bottom: 20px;
  }

  .map-container {
    height: 200px;
    margin: 10px 0;
  }
}

@media (max-width: 576px) {
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .logo-box svg {
    width: 95px;
  }

  .html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  .logo-container {
    gap: 5px;
    padding-left: 6px;
    padding-right: 6px;
  }

  .distribuidor-tagline {
    font-size: 14px;
    text-align: center;
  }

  .nav-links a {
    font-size: 0.75rem;
    padding: 5px 10px;
  }

  .floating-buttons {
    top: 75%; /* Ajusta la posición para que esté un poco más arriba */
    right: 16px;
  }

  .floating-button {
    width: 55px;
    height: 55px;
    font-size: 0.8rem;
  }

  .hero-slider {
    height: 300px;
  }

  .modal-dialog {
    margin: 10px;
  }

  .service-card {
    margin: 10px 0;
  }

  .container {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }

  .row {
    margin: 0;
  }

  .footer-column {
    padding: 10px;
  }

  footer h4 {
    margin-bottom: 1rem;
  }

  footer ul li {
    margin-bottom: 0.6rem;
  }

  footer .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
  }

  .logo-box:first-child {
    transform: translateY(4px); /* Mover el primer logo 4px más abajo */
  }

  .gallery-slider .swiper-slide img {
    width: 100%;
    height: 250px; /* Ajusta este valor según tus necesidades */
    object-fit: cover;
  }

  .rotating-image {
    width: 100%;
    max-width: 300px; /* Ajusta este valor según tus necesidades */
    margin: 0 auto;
    transition: transform 0.5s ease-in-out;
  }

  .rotating-image:hover {
    transform: rotate(10deg);
  }
}

/* Secciones con mejor distinción visual */
section:nth-of-type(odd) {
  background-color: var(--section-light);
  padding: 4rem 0;
  position: relative;
  box-shadow: inset 0 0 50px rgba(52, 152, 219, 0.1);
  border-top: 1px solid rgba(52, 152, 219, 0.1);
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

section:nth-of-type(even) {
  background-color: var(--section-dark);
  padding: 4rem 0;
  position: relative;
  box-shadow: inset 0 0 50px rgba(44, 62, 80, 0.1);
  border-top: 1px solid rgba(44, 62, 80, 0.1);
  border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

/* Efecto de degradado en los bordes de las secciones */
section::before,
section::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
}

section::before {
  top: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(52, 152, 219, 0.2),
    transparent
  );
}

section::after {
  bottom: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(52, 152, 219, 0.2),
    transparent
  );
}

/* Mejorar la distinción del contenido dentro de las secciones */
section .container {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 15px;
  padding: 2rem;
  backdrop-filter: blur(5px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

/* Footer styles */
footer {
  background-color: var(--primary) !important;
  margin-top: 2rem;
  box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
  color: white;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

footer .row {
  display: flex;
  flex-wrap: wrap;
  margin: -15px;
}

footer .footer-column {
  flex: 1;
  padding: 15px;
  min-width: 250px;
}

footer h4 {
  color: var(--highlight);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer ul li {
  margin-bottom: 0.8rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}

footer a:hover {
  color: var(--highlight);
  text-decoration: none;
}

/* Media queries actualizados */
@media (max-width: 768px) {
  section {
    padding: 2rem 0;
  }

  footer  {
    text-align: center;
  }

  section .container {
    padding: 1.5rem;
  }

  footer .footer-column {
    flex: 0 0 100%;
    text-align: center;
  }

  footer ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 576px) {
  section {
    padding: 1.5rem 0;
  }

  section .container {
    padding: 1rem;
  }

  footer {
    text-align: center;
  }

  footer .footer-column {
    padding: 10px;
  }

  footer h4 {
    margin-bottom: 1rem;
  }

  footer .row {
    margin: 0;
  }

  footer ul li {
    margin-bottom: 0.6rem;
  }

  /* Centrar elementos de contacto en móvil */
  footer .contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
  }
}

/* Añadir un borde suave alrededor de las cards de servicio */
.service-card {
  border: 1px solid rgba(52, 152, 219, 0.1);
  background: linear-gradient(145deg,
    rgba(255, 255, 255, 1),
    rgba(255, 255, 255, 0.9)
  );
}

/* Mejorar la distinción visual de las cards */
.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

/* Estilos para el fondo en movimiento */
.moving-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.moving-background::before,
.moving-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
  opacity: 0.3;
  animation: float 20s linear infinite;
}

.moving-background::before {
  width: 200px;
  height: 200px;
  left: 50%;
  top: 50%;
  animation-delay: 0s;
}

.moving-background::after {
  width: 300px;
  height: 300px;
  left: 25%;
  top: 25%;
  animation-delay: 5s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(15px, 15px) rotate(5deg);
  }
  50% {
    transform: translate(0, 25px) rotate(0deg);
  }
  75% {
    transform: translate(-15px, 15px) rotate(-5deg);
  }
}

@keyframes flowLine {
  0% {
    transform: translateX(-50%) rotate(-15deg);
  }
  100% {
    transform: translateX(50%) rotate(-15deg);
  }
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1) rotate(180deg);
    opacity: 0.8;
  }
}

/* Estilos adicionales para partículas en movimiento */
.moving-background::before,
.moving-background::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  opacity: 0.5;
  animation: particleMove 5s linear infinite;
}

@keyframes particleMove {
  0% {
    transform: translate(0, 0);
    opacity: 0.5;
  }
  50% {
    transform: translate(50px, -50px);
    opacity: 1;
  }
  100% {
    transform: translate(0, 0);
    opacity: 0.5;
  }
}

/* Estilos actualizados para el distribuidor tagline */
.distribuidor-tagline {
  position: absolute;
  bottom: -15px; /* Ajusta esta valor para mover la etiqueta más arriba o abajo */
  left: 50%;
  transform: translateX(-50%);
  background-color: #f1c40f; /* Amarillo más visible */
  color: #000; /* Texto negro */
  padding: 4px 12px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 15px;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Media queries para responsive */
@media (max-width: 768px) {
  .logo-box {
    width: 100px;
    height: 75px;
  }

  .distribuidor-tagline {
    font-size: 11px;
    padding: 3px 10px;
  }
}

@media (max-width: 576px) {
  .logo-box {
    width: 90px;
    height: 65px;
  }

  .container {
    top: -8px;
  }

  .distribuidor-tagline {
    font-size: 10px;
    padding: 2px 8px;
  }

  .logo-box:first-child {
    transform: translateY(4px); /* Mover el primer logo 4px más abajo */
  }

  .gallery-slider .swiper-slide img {
    width: 100%;
    height: 250px; /* Ajusta este valor según tus necesidades */
    object-fit: cover;
  }
}
