:root {
  --primary-navy: #0a2540;
  --secondary-blue: #1d61f2;
  --accent-cyan: #00d2ff;
  --dark-slate: #1d2a3a;
  --light-bg: #f4f7fa;
  --white: #ffffff;
  --text-main: #333333;
  --text-muted: #666666;
  --border-color: #e2e8f0;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
}

body {
  background-color: var(--light-bg);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Contenedor principal del preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: #ffffff; /* Ajusta al fondo que prefieras */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition:
    opacity 0.5s ease,
    visibility 0.5s ease;
}

/* Estilos y animación para el logo */
.preloader-logo {
  max-width: 180px; /* Ajusta el tamaño del logo */
  height: auto;
  animation: pulse-logo 1.5s infinite ease-in-out;
}

/* Animación de pulso suave */
@keyframes pulse-logo {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.8;
  }
}

/* Contenedor centralizado */
.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Barra de carga externa */
.progress-bar {
  width: 200px;
  height: 4px;
  background-color: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

/* Relleno animado de la barra */
.progress-fill {
  width: 0%;
  height: 100%;
  background-color: #1d61f2; /* Azul principal de Netsys */
  border-radius: 4px;
  animation: loadProgress 1.2s ease-in-out forwards;
}

/* Animación del 0% al 100% */
@keyframes loadProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Clase para ocultarlo con JS cuando la página cargue */
#preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}

.spinner-logo {
  font-size: 4rem;
  color: var(--accent-cyan);
  animation: pulseLogo 1.5s infinite ease-in-out;
}

.spinner-line {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.spinner-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 50%;
  height: 100%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: loadLine 1.4s infinite ease-in-out;
}

@keyframes pulseLogo {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@keyframes loadLine {
  0% {
    left: -50%;
  }
  100% {
    left: 100%;
  }
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

/* Header & Navigation */
header {
  background-color: var(--white);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 0.2rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  position: relative;
}

/* Logo personalizado en imagen */
/* Estilos para el Logo y Texto en 2 filas */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.1;
}

.logo-line1 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-blue);
  letter-spacing: 1px;
}

.logo-line2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--primary-navy);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--secondary-blue);
}

.mobile-only-btn {
  display: none;
}

/* Botón Catálogo PDF */
.btn-header {
  background-color: #1d61f2;
  color: var(--white);
  padding: 0.6rem 1.4rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.2s,
    box-shadow 0.2s,
    background-color 0.2s;
}

.btn-header:hover {
  background-color: #0b4ed8;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(29, 97, 242, 0.3);
}

/* Hero Section */
.hero {
  position: relative;
  background:
    linear-gradient(
      135deg,
      rgba(10, 37, 64, 0.92) 0%,
      rgba(29, 42, 58, 0.88) 100%
    ),
    url("/main/hero-bg.jpg") center/cover no-repeat;
  color: var(--white);
  padding: 7rem 2rem 6rem;
  text-align: center;
  overflow: hidden;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  line-height: 1.15;
}

.hero p {
  font-size: 1.15rem;
  color: #cbd5e1;
  margin-bottom: 2.5rem;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}

.btn-primary {
  background: #1d61f2;
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(29, 97, 242, 0.4);
}

.btn-primary:hover {
  background: #0b4ed8;
  transform: translateY(-2px);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--white);
  color: var(--primary-navy);
}

/* Estadísticas */
.stats-section {
  background: var(--white);
  padding: 2.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.stats-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--secondary-blue);
  font-weight: 700;
}

.stat-item p {
  color: var(--text-muted);
  font-weight: 500;
}

/* Secciones Generales */
.section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2 {
  font-size: 2.2rem;
  color: var(--primary-navy);
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}

.section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--secondary-blue);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-muted);
  margin-top: 8px;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.about-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--secondary-blue);
}

.about-card i {
  font-size: 2.5rem;
  color: var(--secondary-blue);
  margin-bottom: 1rem;
}

.about-card h3 {
  color: var(--primary-navy);
  margin-bottom: 1rem;
}

/* Services Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(10, 37, 64, 0.15);
  border-color: var(--secondary-blue);
}

.service-icon {
  width: 60px;
  height: 60px;
  background: rgba(29, 97, 242, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  transition: background-color 0.3s ease;
}

.service-card:hover .service-icon {
  background: var(--secondary-blue);
}

.service-icon i {
  font-size: 1.8rem;
  color: var(--secondary-blue);
  transition: color 0.3s ease;
}

.service-card:hover .service-icon i {
  color: var(--white);
}

.service-card h3 {
  font-size: 1.25rem;
  color: var(--primary-navy);
  margin-bottom: 0.8rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

/* Filtro de Servicios */
.services-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.filter-btn {
  background: var(--light-bg);
  border: 1px solid var(--border-color);
  color: var(--primary-navy);
  padding: 0.6rem 1.4rem;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--secondary-blue);
  color: var(--white);
  border-color: var(--secondary-blue);
}

.service-card.hide {
  display: none !important;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.5rem;
  color: var(--secondary-blue);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.card-link i {
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.service-card:hover .card-link i {
  transform: translateX(6px);
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 37, 64, 0.75);
  backdrop-filter: blur(4px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  max-width: 550px;
  width: 90%;
  max-height: 90vh; /* Evita que el modal se salga en pantallas cortas */
  overflow-y: auto;  /* Permite scroll interno si la descripción es larga */
  position: relative;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 28px;
  font-weight: bold;
  color: #0a2540;
  cursor: pointer;
}

.modal-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}

.modal-title {
  color: #0a2540;
  font-size: 20px;
  margin-bottom: 10px;
}

.modal-desc {
  color: #4a5568;
  font-size: 14px;
  line-height: 1.5;
}

/* Carrusel de Clientes */
.clients-section {
  background: var(--white);
  padding: 5rem 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.slider-container {
  margin-bottom: 4rem;
  overflow: hidden;
  width: 100%;
  padding: 1rem 0;
}

.slider-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scrollSlider 22s linear infinite;
}

.slider-track:hover {
  animation-play-state: paused;
}

.slide-logo {
  width: 240px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.8rem;
}

.slide-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: grayscale(100%) opacity(0.7);
  transition: all 0.4s ease;
}

.slide-logo img.logo-dark-bg {
  mix-blend-mode: screen;
  filter: grayscale(100%) opacity(0.7);
}

.slide-logo img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

@keyframes scrollSlider {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--light-bg);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-stars {
  color: #ffc107;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.testimonial-text {
  color: var(--text-main);
  font-size: 0.95rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--secondary-blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.author-info h4 {
  color: var(--primary-navy);
  font-size: 0.95rem;
  margin: 0;
}

.author-info span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Why Choose Us */
.why-us-bg {
  background: #ebf3fa;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.feature-item i {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  background: var(--primary-navy);
  padding: 10px;
  border-radius: 50%;
}

.feature-item h4 {
  color: var(--primary-navy);
  margin-bottom: 4px;
}

/* Contacto & Formulario */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.contact-info {
  background: var(--primary-navy);
  color: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.info-item i {
  font-size: 1.4rem;
  color: var(--accent-cyan);
  width: 30px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--primary-navy);
  font-size: 0.9rem;
}

.form-control {
  padding: 0.8rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

.form-control:focus {
  border-color: var(--secondary-blue);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  background: var(--primary-navy);
  color: var(--white);
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: var(--secondary-blue);
}

/* Footer */
footer {
  background-color: var(--primary-navy);
  color: #94a3b8;
  padding: 3rem 2rem 1.5rem;
  text-align: center;
  border-top: 1px solid #1e293b;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1e293b;
}

.footer-brand {
  color: var(--white);
  font-size: 1.2rem;
  font-weight: 700;
}

.copyright {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: #25d366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Botón Hamburguesa */
.hamburger-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--primary-navy);
  cursor: pointer;
}

/* FAQ Section */
.faq-section {
  background: var(--white);
  border-top: 1px solid var(--border-color);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item.active {
  border-color: var(--secondary-blue);
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.5rem;
  background: var(--white);
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-navy);
  cursor: pointer;
  text-align: left;
}

.faq-question i {
  color: var(--secondary-blue);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.3s ease,
    padding 0.3s ease;
  background: var(--light-bg);
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 1.2rem 1.5rem;
  overflow-y: auto;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Adaptación Responsive / Mobile */
@media (max-width: 900px) {
  .hamburger-btn {
    display: block;
  }

  /* Ocultar el botón azul grande del PDF en el header en móviles */
  .btn-header {
    display: none;
  }

 /* Dar más espacio lateral al encabezado */
  .navbar {
    padding: 1rem 1.5rem;
  }

  /* Reducir el tamaño del título para mejor lectura */
  .hero h1 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
    text-shadow: none; /* Limpia el borde alrededor del texto */
  }

/* Ajustar el texto descriptivo */
  .hero p {
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0 0.5rem;
    margin-bottom: 1.8rem;
  }

  /* Mejorar el diseño y separación de los botones */
  .hero-buttons {
    flex-direction: column;
    gap: 0.8rem; /* Espacio uniforme entre botones */
    width: 100%;
    padding: 0 1rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    max-width: 100%;
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    border-radius: 6px;
  }

  .btn-mobile-quote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-align: center;
    background-color: #1d61f2;
    color: var(--white) !important;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1.2rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
      max-height 0.4s ease,
      opacity 0.3s ease;
  }

  .nav-links.active {
    max-height: 420px;
    opacity: 1;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.98);
  }

  .mobile-only-btn {
    display: block;
    width: 80%;
    margin-top: 0.5rem;
  }

  .contact-container {
    grid-template-columns: 1fr;
    padding: 1.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }
}

.map-container {
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 180px;
  border: none;
}