/* mobil.css - Media queries para móvil (320px — 768px) */

@media (max-width: 768px) {
  /* Estilos comunes para tablet y móvil */
  
  /* Navbar */
  .logo-slogan {
    display: none;
  }
  
  .nav-item {
    margin-left: 1rem;
  }

  body, html {
    overflow-x: hidden;
  }
  
  .navbar {
    width: 100vw;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    right: -100%;
    width: 200px;
    height: 100vh;
    background-color: var(--white);
    flex-direction: column;
    justify-content: flex-start;
    padding: 80px 20px 30px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
  }
  
  .navbar.active {
    right: 0;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-item {
    margin: 0 0 1rem 0;
  }
  
  .nav-link {
    padding: 0.5rem 0;
    font-size: 1.1rem;
  }
  
  .navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: none;
  }
  
  .navbar-overlay.active {
    display: block;
  }

  .btn-nav {
    margin: 1rem 0 0 0;
    width: 60%;
    justify-content: center;
  }
  
  .mobile-menu-btn {
    display: flex;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Hero Section */
  .hero {
    padding: 80px 0 40px;
    margin-top: 0;
  }
  
  .hero .container {
    flex-direction: column-reverse;
    padding-left: 15px;
    padding-right: 15px;
    box-sizing: border-box;
    overflow-x: hidden;
    text-align: center;
    margin-bottom: 30px;
  }

  .hero-content {
    padding-right: 0;
    margin-bottom: 30px;
    text-align: center;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  
  .btn-primary, .btn-secondary {
    width: 100%;
    padding: 14px;
    justify-content: center;
    text-align: center;
    font-size: 1rem;
    box-sizing: border-box;
  }
  
  .hero-image {
    width: 85%; /* Imagen más estrecha */
    max-width: 350px; /* Tamaño máximo controlado */
    margin: 0 auto; /* Centrado */
  }

  .hero-image img {
    width: 85%;
    transform: none !important; /* Elimina perspectiva */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }

  .hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 92.5%;
    height: 20%; /* 1/6 de la altura */
    background: linear-gradient(to top, rgb(236, 239, 241) 0%, rgba(255,255,255, 0) 100%);
    pointer-events: none; /* Permite interacción con la imagen */
    border-radius: 0 0 8px 8px; /* Coincide con el border-radius de la imagen */
  }

  /* Elimina hover en móvil */
  .hero-image:hover img {
    transform: none !important;
  }

  .hero h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 0.95rem;
    max-width: 100%;
    margin: 0 auto 20px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 12px;
    max-width: 300px;
    margin: 0 auto;
  }

  
  /* Services Section - Versión compacta con botones */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 5px;
    margin: 15px auto;
    max-width: 500px;
  }

  .service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: height 0.2s ease-out;
    height: auto;
    max-height: 1000px; /* Altura máxima cuando está expandido */
  }

  .service-card:not(.expanded) {
    max-height: auto; /* Altura aproximada del contenido básico */
    margin: 15px auto !important;
  }

  .service-card.expanded {
    max-height: 1500px;
  }

  .service-icon {
    padding: 15px 0 10px !important;
  }

  .service-icon img {
    width: 150px;
    height: 150px;
  }

  .service-card h3 {
    margin: 5px 0 8px !important;
    padding: 0 15px !important;
    font-size: 1.2rem;
  }

  .service-card p {
    margin-bottom: 10px !important;
    padding: 0 15px !important;
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .service-features {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: 
      opacity 0.3s ease 0.1s,
      max-height 0.4s ease-out;
    padding: 0 15px;
  }

  .service-card.expanded .service-features {
    opacity: 1;
    max-height: 1000px;
    padding: 0 15px 15px;
  }

  .service-features.active {
    max-height: 1000px;
    opacity: 1;
    padding: 0 15px 10px !important;
    visibility: visible;
  }

  .service-card ul {
    padding: 0;
  }

  .service-card ul li {
    margin-bottom: 6px;
    font-size: 0.85rem;
    padding-left: 20px;
  }

  .service-card ul li:before {
    width: 8px;
    height: 8px;
    top: 6px;
  }

  /* Estilo para los botones de características */
  .features-toggle {
    display: block;
    width: calc(100% - 30px);
    margin: 10px 15px;
    padding: 10px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .features-toggle:hover {
    background: var(--dark-blue);
  }

  .features-toggle::after {
    content: '▼';
    margin-left: 6px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
  }

  .features-toggle.active::after {
    transform: rotate(180deg);
  }

  

  /* Projects Section */
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }

  /* Contact Section */
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .map-container {
    order: -1;
  }
  
  .form-group label {
    white-space: normal;
  }

  /* WhatsApp Button */
  .whatsapp-float span {
    display: none;
  }
}

/* Ajustes específicos solo para móvil (320px-480px) */
@media (max-width: 480px) {
  /* Navbar */
  .header .container {
    padding: 12px 15px;
  }
  
  .logo-text {
    font-size: 1.5rem;
  }

  .mobile-menu-btn {
    width: 25px;
    height: 18px;
  }

  .mobile-menu-btn span {
    height: 2px;
  }

  .navbar {
    width: 35vw;
    padding: 70px 15px 20px;
  }

  /* Hero */
  .hero {
    padding: 65px 0 2px;
  }

  .hero-image {
    width: 75%; /* Un poco más angosta en móviles pequeños */
    max-width: 300px;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
  }

  .btn-primary, 
  .btn-secondary {
    padding: 10px;
    font-size: 0.9rem;
  }

  /* Services */
  .services-grid {
    gap: 3px !important;
  }

  .features-toggle {
    padding: 8px !important;
    font-size: 0.85rem;
    margin: 5px 8px 3px !important;
  }

  /* Process */
  .process {
    padding: 50px 0;
  }

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

  .step-content-horizontal {
    padding: 15px;
  }

  .step-content-horizontal h3 {
    font-size: 1.1rem;
  }

  /* Projects */
  .projects {
    padding: 50px 0;
  }

  .project-slide {
    margin: 0 5px;
  }

  .project-info {
    padding: 15px;
  }

  .project-info h3 {
    font-size: 1.1rem;
  }

  .project-info ul li {
    font-size: 0.85rem;
  }

  /* Contact */
  .contact {
    padding: 50px 0;
  }

  .contact-form {
    padding: 15px;
  }

  .form-group label {
    font-size: 0.85rem;
  }

  .form-group input,
  .form-group textarea {
    width: 93.5%;
    padding: 10px;
    font-size: 0.9rem;
  }

  .info-item {
    flex-direction: column;
  }

  .info-item svg {
    margin-bottom: 5px;
  }

  /* WhatsApp Button */
  .whatsapp-float {
    position: fixed;
    bottom: 20px;       /* Más alejado del borde (antes: 10px) */
    right: 20px;        /* Más alejado del borde (antes: 10px) */
    background-color: #25D366;
    color: white;
    border-radius: 50px;
    padding: 20px 28px; /* Más grande (antes: 8px 12px) */
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    font-weight: 500;
    font-size: 16px;    /* Tamaño de texto definido */
    transition: all 0.3s ease;
  }

  .whatsapp-float:hover {
    background-color: #128C7E;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  }

  .whatsapp-float svg {
    width: 36px;        /* Icono más grande (antes: 22px) */
    height: 36px;       /* Icono más grande (antes: 22px) */
    flex-shrink: 0;
  }
}