/* General */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background-color: #ffffff;
  color: #333333;
}

/* NAVBAR */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #2b2d63;
  padding: 0.1rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  gap: 2rem;
}

/* LOGO */
.logo-container {
  display: flex;
  align-items: center;
}

.logo-nav {
  height: 130px;
  width: auto;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.5));
  transition: transform 0.3s ease;
}

.logo-nav:hover {
  transform: scale(1.05);
}

/* NAV LINKS */
.nav-links {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.05rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #ffd700;
}

/* PRELOADER */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 1s ease forwards;
  animation-delay: 2.5s;
}

.preloader-logo img {
  width: 350px;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* SECCIONES GENERALES */
.section {
  padding: 4rem 2rem;
}

.section h2,
.about h2,
.proyectos h2,
.contact-title {
  text-align: center;
  font-size: 2.2rem;
  color: #2b2d63;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* NOSOTROS */
.about {
  background: #ffffff;
  padding: 3rem 2rem;
  max-width: 960px;
  margin: 2rem auto;
  border-radius: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  border-top: 4px solid #1d649c;
  animation: fadeIn 1s ease-in-out;
}

.about p {
  font-size: 1rem;
  line-height: 1.7;
  text-align: justify;
  max-width: 880px;
  margin: 0 auto;
}

/* SERVICIOS */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service {
  background: #f9f9f9;
  border: 1px solid #ccc;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.service:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.service i {
  font-size: 2rem;
  color: #2b2d63;
  margin-bottom: 0.5rem;
}

.service h3 {
  color: #2b2d63;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.service p {
  font-size: 1rem;
}

/* PROYECTOS */
.proyectos {
  padding: 3rem 2rem;
  background-color: #f4f4f4;
}

.grid-proyectos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.proyecto {
  background-color: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.proyecto:hover img {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.proyecto img {
  width: 100%;
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 1rem;
}

.proyecto h3 {
  color: #2b2d63;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.proyecto p {
  color: #333;
  font-size: 1rem;
}

/* CONTACTO */
#contacto {
  background: linear-gradient(to right, #2b2d63, #0a2b43);
  color: white;
  padding: 4rem 2rem;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  align-items: stretch;
}

.contact-info, .contact-form {
  flex: 1 1 320px;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  padding: 2rem;
}

.contact-info {
  background: rgba(255, 255, 255, 0.1);
}

.contact-info-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid #ffd700;
  padding-bottom: 0.5rem;
  display: inline-block;
}

.contact-form {
  background: white;
  color: #333;
}

.contact-form .form-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: #2b2d63;
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'Roboto', sans-serif;
}

.contact-form button {
  background-color: #2b2d63;
  color: white;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.contact-form button:hover {
  background-color: #1d3f8b;
  transform: translateY(-2px);
}

#mensaje-exito {
  color: #2b2d63;
  font-weight: bold;
  margin-top: 1rem;
}

/* FOOTER */
footer {
  background-color: #2b2d63;
  color: white;
  text-align: center;
  padding: 1rem;
  font-size: 0.95rem;
}

.about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.about-logo img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s ease;
}

.about-logo img:hover {
  transform: scale(1.05);
}

.about-text {
  flex: 1;
  min-width: 280px;
  max-width: 600px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #444;
  text-align: justify;
}

.nosotros-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-top: 2rem;
}

.nosotros-texto {
  flex: 1 1 400px;
}

.nosotros-imagen {
  flex: 1 1 300px;
  text-align: center;
}

.nosotros-imagen img {
  width: 100%;
  max-width: 400px; /* Agrandado */
  height: auto;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #2b2d63;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    text-align: center;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .navbar {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .logo-container {
    flex: 1;
  }

  .nav-links a {
    padding: 1rem 0;
    border-top: 1px solid #444;
  }
}

.certificaciones {
  background-color: #f4f4f4;
  padding: 3rem 2rem;
  text-align: center;
}

.certificaciones h2 {
  font-size: 2rem;
  color: #2b2d63;
  margin-bottom: 2rem;
  font-weight: 700;
}

.cert-carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.cert-track {
  display: flex;
  gap: 2rem;
  animation: scrollCarousel 20s linear infinite;
  width: max-content;
}

.cert-item {
  min-width: 150px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.cert-item img {
  max-width: 120px;
  height: auto;
  filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.cert-item img:hover {
  transform: scale(1.05);
}

@keyframes scrollCarousel {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* En pantallas grandes se detiene el carrusel y se muestra en grilla */
@media (min-width: 769px) {
  .cert-carousel {
    overflow: visible;
  }

  .cert-track {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
  }

  .cert-item {
    margin: 1rem;
  }
}

/* SERVICIOS ESPECIALIZADOS */
.servicios-especializados {
  background-color: #f9f9f9;
  padding: 4rem 2rem;
}

.servicios-especializados h2 {
  text-align: center;
  font-size: 2.2rem;
  color: #2b2d63;
  font-weight: 700;
  margin-bottom: 2rem;
}

.special-services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.special-service {
  background: #ffffff;
  border: 1px solid #ddd;
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.special-service:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.special-service i,
.special-service img {
  font-size: 2rem;
  color: #2b2d63;
  margin-bottom: 0.8rem;
}

.special-service h3 {
  font-size: 1.2rem;
  color: #2b2d63;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.special-service p {
  font-size: 0.95rem;
  color: #444;
}

/* OFICINAS */
.oficinas {
  background-color: #f9f9f9;
  padding: 4rem 2rem;
  text-align: center;
}

.oficinas h2 {
  font-size: 2.2rem;
  color: #2b2d63;
  margin-bottom: 2rem;
  font-weight: 700;
}

.oficinas-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.oficina {
  background: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  max-width: 320px;
  flex: 1 1 280px;
  transition: transform 0.3s ease;
  text-align: left;
}

.oficina:hover {
  transform: translateY(-5px);
}

.oficina i.fa-map-marker-alt {
  font-size: 2rem;
  color: #2b2d63;
  margin-bottom: 0.5rem;
  display: block;
}

.oficina h3 {
  font-size: 1.4rem;
  color: #2b2d63;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.oficina p a {
  display: inline-block;
  color: #2b2d63;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.oficina p a:hover {
  color: #1d3f8b;
}

.oficina p a i {
  margin-right: 0.5rem;
  color: #ff4c60;
}
/* GALERÍA DE PROYECTOS */
.galeria {
  background: linear-gradient(to bottom right, #f4f4f4, #e0e0e0);
  padding: 4rem 2rem;
  text-align: center;
}

.galeria h2 {
  font-size: 2.5rem;
  color: #2b2d63;
  margin-bottom: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.galeria-item {
  background: #ffffff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.galeria-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.galeria-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #ccc;
  border-radius: 12px 12px 0 0;
}

.titulo-proyecto {
  font-size: 1.3rem;
  color: #2b2d63;
  font-weight: 700;
  margin: 1rem 1rem 0.5rem;
  text-align: center;
}

.galeria-item p {
  padding: 0 1rem 1.2rem;
  font-size: 1rem;
  color: #555;
  text-align: center;
  line-height: 1.5;
}
