/* Variables */
:root {
    --color-primario: #0052cc;
    --color-secundario: #00b33c;
    --color-fondo: #f9f9f9;
    --color-texto: #222;
    --color-texto-secundario: #555;
    --shadow-hover: rgba(0, 178, 60, 0.3);
    --radio-bordes: 12px;
    --btn-radius: 32px;
    --transicion: 0.3s ease;
    --verde-linea: #00b33c;
  }
  
  /* Reset */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* Container */
  .container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /* Navbar */
  .navbar {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 2000;
  }
  
  .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
  }
  
  .logo img {
    height: 48px;
    user-select: none;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    gap: 28px;
    align-items: center;
  }
  
  nav ul li {
    position: relative;
  }
  
  nav ul li a {
    color: var(--color-primario);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    padding: 8px 4px;
    user-select: none;
    cursor: pointer;
    transition: color 0.3s ease;
  }
  
  nav ul li a:hover,
  nav ul li a:focus {
    color: var(--color-secundario);
    outline: none;
  }
  
  /* Dropdown Menu */
  nav ul li a[aria-haspopup="true"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  
  nav ul li .dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    background: white;
    border-radius: var(--radio-bordes);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    min-width: 220px;
    display: none;
    flex-direction: column;
    padding: 12px 0;
    z-index: 3000;
  }
  
  nav ul li .dropdown li {
    padding: 8px 20px;
    white-space: nowrap;
    cursor: default;
    color: var(--color-primario);
    font-weight: 500;
    font-size: 0.95rem;
    user-select: text;
  }
  
  nav ul li .dropdown li:hover,
  nav ul li .dropdown li:focus {
    background-color: var(--color-secundario);
    color: white;
    outline: none;
  }
  
  nav ul li .dropdown-separator {
    height: 1px;
    background: var(--color-secundario);
    margin: 8px 12px;
  }
  
  nav ul li .info-mas a {
    color: var(--color-primario);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
  }
  
  nav ul li .info-mas a:hover,
  nav ul li .info-mas a:focus {
    color: var(--color-secundario);
    outline: none;
  }
  
  /* Show dropdown on hover/focus */
  nav ul li:hover > .dropdown,
  nav ul li:focus-within > .dropdown {
    display: flex;
    flex-direction: column;
  }
  
  /* Hero */
  .hero {
    position: relative;
    height: 460px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  
  .hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: brightness(0.6);
    transition: background-image 1s ease-in-out;
    z-index: 0;
  }
  
  .hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    text-align: center;
  }
  
  .hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  }
  
  .hero-content p {
    font-size: 1.25rem;
    margin-bottom: 1.4rem;
    font-weight: 400;
    text-shadow: 0 3px 7px rgba(0, 0, 0, 0.4);
  }
  
  .btn-primary {
    background-color: var(--color-secundario);
    color: white;
    padding: 0.9rem 2.2rem;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    border-radius: var(--btn-radius);
    cursor: pointer;
    box-shadow: 0 6px 10px var(--shadow-hover);
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
  }
  
  .btn-primary:hover,
  .btn-primary:focus {
    background-color: #008825;
    outline: none;
  }
  
  /* Separador animado */
  .separator {
    height: 4px;
    width: 100%;
    background: linear-gradient(
      270deg,
      var(--verde-linea),
      transparent,
      var(--verde-linea),
      transparent
    );
    background-size: 200% 100%;
    margin: 48px 0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
  }
  
  .separator-animated {
    animation: movimiento-linea 4s linear infinite;
  }
  
  @keyframes movimiento-linea {
    0% {
      background-position: 0% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }
  
  /* Nosotros */
  .nosotros h2 {
    color: var(--color-primario);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    text-align: center;
  }
  
  .nosotros p {
    font-size: 1.1rem;
    color: var(--color-texto-secundario);
    max-width: 800px;
    margin: 0 auto 1.4rem auto;
    text-align: center;
  }
  
  .firma {
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-primario);
    text-align: center;
    letter-spacing: 0.05em;
  }
  
  /* Servicios */
  .servicios h2 {
    color: var(--color-primario);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 1.8rem;
    text-align: center;
  }
  
  .servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
  }
  
  .servicio-card {
    background: white;
    border-radius: var(--radio-bordes);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: box-shadow var(--transicion);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 14px 24px;
    user-select: none;
  }
  
  .servicio-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radio-bordes);
    margin-bottom: 14px;
    pointer-events: none;
  }
  
  .servicio-card h3 {
    color: var(--color-primario);
    font-weight: 700;
    font-size: 1.3rem;
    text-align: center;
  }
  
  .servicio-card:hover,
  .servicio-card:focus {
    box-shadow: 0 8px 28px var(--shadow-hover);
    outline: none;
  }
  
  /* Modal */
  .modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4000;
    padding: 0 10px;
  }
  
  .modal.show {
    display: flex;
  }
  
  .modal-content {
    background: white;
    border-radius: var(--radio-bordes);
    padding: 24px 30px 32px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Permite que se adapte sin salirse de la ventana */
    overflow-y: auto;
  }
  
  
  .close-button {
    position: absolute;
    top: 14px;
    right: 18px;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-primario);
    transition: color 0.3s ease;
    user-select: none;
  }
  
  .close-button:hover,
  .close-button:focus {
    color: var(--color-secundario);
    outline: none;
  }
  
  /* WhatsApp Bot */
  .whatsapp-bot {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 5000;
    font-family: 'Poppins', sans-serif;
    user-select: none;
  }
  
  .whatsapp-icon {
    background: var(--color-secundario);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 6px 14px var(--shadow-hover);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
  }
  
  .whatsapp-icon img {
    width: 30px;
    height: 30px;
    user-select: none;
  }
  
  .whatsapp-icon:hover,
  .whatsapp-icon:focus {
    background-color: #008825;
    outline: none;
  }
  
  .whatsapp-chat {
    background: white;
    border-radius: var(--radio-bordes);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
    width: 280px;
    padding: 16px 18px 22px;
    margin-top: 12px;
    display: none;
    flex-direction: column;
  }
  
  .whatsapp-chat p {
    margin-bottom: 8px;
    color: var(--color-primario);
    font-weight: 600;
  }
  
  .whatsapp-chat input {
    padding: 10px 14px;
    border-radius: var(--radio-bordes);
    border: 1.6px solid var(--color-secundario);
    font-size: 0.95rem;
    outline: none;
    margin-bottom: 12px;
    transition: border-color 0.3s ease;
    width: 100%;
  }
  
  .whatsapp-chat input:focus {
    border-color: #008825;
  }
  
  .whatsapp-chat button {
    background: var(--color-secundario);
    border: none;
    border-radius: var(--btn-radius);
    padding: 10px 0;
    color: white;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    user-select: none;
  }
  
  .whatsapp-chat button:hover,
  .whatsapp-chat button:focus {
    background-color: #008825;
    outline: none;
  }
  
  /* Footer */
  footer {
    background-color: var(--color-primario);
    color: white;
    padding: 20px 0;
    font-size: 0.9rem;
    user-select: none;
    margin-top: 60px;
  }
  
  .footer-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
  }
  
  .footer-contacto a {
    color: #bbf0a1;
    font-weight: 600;
    text-decoration: none;
  }
  
  .footer-contacto a:hover,
  .footer-contacto a:focus {
    text-decoration: underline;
    outline: none;
  }
  
  /* Accesibilidad: foco visible */
  :focus-visible {
    outline: 3px solid var(--color-secundario);
    outline-offset: 2px;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .hero-content h1 {
      font-size: 2rem;
    }
  
    .hero-content p {
      font-size: 1rem;
    }
  
    nav ul {
      gap: 16px;
    }
  
    .servicios-grid {
      grid-template-columns: 1fr;
    }
  
    .footer-content {
      flex-direction: column;
      gap: 6px;
    }
  }
  #whatsapp-chat p {
  background: #f0f0f0;
  margin: 5px;
  padding: 8px;
  border-radius: 5px;
  font-size: 14px;
}
/* Galería */
.galeria {
  margin-top: 60px;
}

.galeria h2 {
  color: var(--color-primario);
  font-weight: 700;
  font-size: 2.2rem;
  margin-bottom: 1.8rem;
  text-align: center;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.galeria-item {
  border-radius: var(--radio-bordes);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.galeria-item:hover,
.galeria-item:focus {
  transform: scale(1.03);
  box-shadow: 0 8px 18px var(--shadow-hover);
  outline: none;
}

.galeria-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.modal-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: nowrap;
  width: 100%;
}


.modal-body img {
  max-width: 320px;
  width: 100%;
  border-radius: var(--radio-bordes);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.modal-text {
  max-width: 400px;
  text-align: left;
}

.modal-text h3 {
  font-size: 1.6rem;
  color: var(--color-primario);
  margin-bottom: 0.6rem;
}

.modal-text p {
  font-size: 1.05rem;
  color: var(--color-texto-secundario);
}

/* Responsive: columna en móviles */
@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
    text-align: center;
  }

  .modal-text {
    max-width: 100%;
  }
}
