/* ============================================= */
/* MEDIA QUERIES (RESPONSIVE) */
/* ============================================= */

@media (max-width: 1200px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }

  .container {
    max-width: 1140px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-text {
    order: 1;
  }

  .hero-visual {
    order: 0;
    margin-bottom: 2rem;
  }

  .nav-links {
    gap: 1.5rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .feature-card h3 {
    min-height: auto;
  }

  .feature-card p {
    min-height: auto;
  }

  .municipalidades-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0.8rem 5%;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.5s ease;
    z-index: 999;
    display: flex !important; /* Asegurar que se muestre cuando está activo */
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links li {
    margin: 1.5rem 0;
  }

  .nav-links a {
    font-size: 1.2rem;
    color: white;
    padding: 0.5rem 1rem;
  }

  .hamburger-menu {
    display: flex;
  }

  .hero {
    padding: 120px 0 60px;
    height: auto;
    min-height: 100vh;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    font-size: 1.1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .section-title p {
    font-size: 1.1rem;
  }

  .testimonio-image {
    width: 120px;
    height: 120px;
  }

  .social-bar-container {
    top: auto;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    animation: fadeSlideInBottom 1s ease-out forwards;
    animation-delay: 0.4s;
  }

  .social-bar {
    flex-direction: row;
    border-radius: 12px 12px 0 0;
    width: max-content;
    max-width: 100vw;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 5px;
  }

  .social-link {
    width: 45px;
    height: 45px;
    flex-shrink: 0;
  }

  .social-link:hover {
    width: 45px;
    height: 55px;
    border-radius: 0;
  }

  .social-text {
    position: fixed;
    left: 50%;
    top: auto;
    bottom: 130px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-left: 0;
    white-space: nowrap;
    z-index: 2001;
  }

  .social-link:hover .social-text {
    opacity: 1;
    margin-left: 0;
  }

  /* Animación para la barra social en móviles */
  @keyframes fadeSlideInBottom {
    from {
      transform: translateX(-50%) translateY(100px);
      opacity: 0;
      filter: blur(5px);
    }
    to {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
      filter: blur(0);
    }
  }

  #contactForm {
    grid-template-columns: 1fr;
  }

  .form-group:nth-child(5),
  .form-group:nth-child(6) {
    grid-column: span 1;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .municipalidades-grid {
    grid-template-columns: 1fr;
  }

  .testimonios-grid {
    flex-direction: column;
    align-items: center;
  }

  .testimonio-card {
    max-width: 100%;
  }

  /* Ajustes para el footer en móviles */
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-column {
    min-width: 100%;
    text-align: center;
  }

  .footer-column h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-social-links {
    justify-content: center;
  }

  .modal-container {
    width: 95%;
    margin: 0 auto;
  }

  .modal-content {
    flex-direction: column;
  }

  .modal-img {
    height: 250px;
  }

  .modal-text-content {
    padding: 1.5rem;
  }

  #chatbot-window {
    width: 300px;
    height: 400px;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 100px 0 40px;
  }

  .hero-text h1 {
    font-size: 1.8rem;
  }

  .hero-text p {
    font-size: 1rem;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .section-title p {
    font-size: 1rem;
  }

  .feature-card {
    padding: 1.5rem 1rem;
  }

  .feature-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .testimonio-card {
    padding: 20px;
  }

  .process-step {
    padding: 2rem 1.5rem;
  }

  .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
  }

  .step-number:before {
    width: 70px;
    height: 70px;
  }

  .contact-container {
    padding: 0 15px;
  }

  .contact-info,
  .form-container {
    padding: 20px;
  }

  .social-bar {
    padding: 3px;
  }

  .social-link {
    width: 40px;
    height: 40px;
  }

  .social-link i {
    font-size: 18px;
  }

  #chatbot-window {
    width: 280px;
    height: 380px;
  }

  /* Ajustes para el footer en móviles */
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }

  .footer-column {
    min-width: 100%;
    text-align: center;
  }

  .footer-column h3:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-social-links {
    justify-content: center;
  }
}

@media (max-width: 400px) {
  .hero-text h1 {
    font-size: 1.6rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .feature-card {
    padding: 1rem;
  }

  .testimonio-image {
    width: 100px;
    height: 100px;
  }

  .modal-img {
    height: 200px;
  }

  .modal-text-content {
    padding: 1rem;
  }

  #chatbot-window {
    width: 260px;
    height: 360px;
  }
}
