/* 🔒 Prevención global de scroll horizontal */
html, body {
  overflow-x: hidden;
}

/* 📱 Navbar */
@media (max-width: 1024px) {
  .navbar {
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    position: relative;
  }

  .navbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  /*.logo {
    margin-left: 0;
  }*/
  
  .logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 1rem;
  flex: 1;
}

.logo img {
  max-height: 90px;
  height: auto;
  display: block;
}
  .menu-toggle {
    display: block;
    position: static;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
  }

.nav-links {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: rgba(48, 73, 111, 0.95);
  backdrop-filter: blur(4px);
  padding: 1rem 2rem;
  z-index: 1000;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}


  .nav-links.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
  }

  .nav-links li a {
    font-size: 1rem;
    padding: 0.5rem 0;
  }
}

/* 🖼️ Hero */
@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    height: auto;
    padding: 1rem 1rem;
    text-align: center;
  }

  .hero-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
  }

  .hero-text {
    position: static;
    transform: none;
    background: none;
    padding: 1rem;
    color: var(--color-primario);
  }

  .hero-text h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }
}

/* 📱 Nosotros */
@media (max-width: 768px) {
  .nosotros {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 100px 1rem 0 1rem;
    gap: 2rem;
    height: auto;
  }

  .nosotros-img img {
    max-width: 100%;
    height: auto;
  }

  .nosotros-texto {
    max-width: 100%;
    text-align: center;
  }

  .nosotros-texto h2 {
    font-size: 1.6rem;
  }

  .nosotros-texto h3 {
    font-size: 1.1rem;
  }

  .nosotros-texto p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .animate-left,
  .animate-right {
    transform: none;
    opacity: 1;
    transition: none;
  }

  .animate-fade {
    opacity: 1;
    transition: none;
  }
}

/* 📦 Espaciado entre secciones */
@media (max-width: 768px) {
  section {
    padding: 2rem 1rem;
    scroll-margin-top: 80px;
  }

  img {
    max-width: 100%;
    height: auto;
  }
}

/* 🧴 Servicios */
@media (max-width: 768px) {
  .service-grid {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
  }

  .service-item {
    max-width: 100%;
    margin: 0 auto;
  }
}

/* 📞 Formularios */
@media (max-width: 768px) {
  form {
    padding: 1rem;
  }

  form button {
    width: 100%;
    font-size: 1rem;
  }
}

/* 🧭 Footer */
@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    text-align: center;
    padding: 20px 15px;
  }

  .footer h4 {
    font-size: 1.2rem;
  }

  .footer p,
  .social-icon {
    font-size: 0.95rem;
  }

  .footer-social {
    gap: 12px;
  }

  .footer-copy {
    font-size: 0.85rem;
  }

  .scroll-up {
    bottom: 40px;
    right: 15px;
  }

  .scroll-up svg {
    width: 40px;
    height: 40px;
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .footer h4 {
    font-size: 1rem;
  }

  .footer p,
  .social-icon {
    font-size: 0.9rem;
  }

  .scroll-up {
    bottom: 30px;
    right: 10px;
  }

  .scroll-up svg {
    width: 36px;
    height: 36px;
    padding: 6px;
  }
}