@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--gris-oscuro);
  }
  
  .contenedor {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }

  :root {
    --blanco: #FFFFFF;
    --gris-claro: #F5F5F5;
    --gris-medio: #B0B0B0;
    --gris-oscuro: #4A4A4A;
    --azul-profesional: #2C3E50;
    --azul-suave: #6D7A83F5;
    --beige-suave: #EAEAEA;
  }
  
  /* Encabezado */
  header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(44, 62, 80, 0.1);
    padding: 1rem 0;
    border-radius: 0 0 10px 10px;
    transition: all 0.3s ease;
    z-index: 1000;
  }
  
  /* Header sólido al hacer scroll */
  header.scrolled {
    background-color: var(--azul-suave);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }
  .space{
    padding: 1rem auto;
  }
  .separation  {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
  }
  header h1 {
    float: left;
    color: #2c3e50;
  }
  
  /* Navegación escritorio */
  .nav-desktop {
    float: right;
    margin: 0 2rem;
  }
  
  .nav-desktop ul {
    list-style: none;
  }
  
  .nav-desktop ul li {
    display: inline-block;
    margin-left: 20px;
  }
  
  .nav-desktop ul li a {
    text-decoration: none;
    color: var(--blanco);
    font-weight: bold;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  .nav-desktop ul li a:hover{
    color: var(--azul-profesional);
    transform: translateY(-2px);
  }
  
  /* Botón hamburguesa */
  .hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    justify-content: space-between;
  }
  
  .hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--blanco);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Menú móvil */
  .nav-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--azul-suave);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 10px 10px;
  }
  
  .nav-mobile.active {
    display: block;
  }
  
  .nav-mobile ul {
    list-style: none;
    padding: 1rem 0;
  }
  
  .nav-mobile ul li {
    text-align: center;
    margin: 0;
  }
  
  .nav-mobile ul li a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--blanco);
    font-weight: bold;
    transition: background-color 0.3s ease;
  }
  
  .nav-mobile ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }

  .logo{
    max-width: 8rem;
  }
  
  /* Sección Hero */
  .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    color: #fff;
    text-align: center;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-top: 80px; /* Espacio para el header fijo */
    padding-bottom: 5px; /* Mínimo espacio desde el borde inferior */
  }
  
  .hero .boton {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 30px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
  }
  .video-fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
  }
  
  /* Ajuste del contenedor principal */
  .hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    text-align: center;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
  }

  /* Mostrar solo el horizontal en pantallas grandes */
.video-escritorio {
  display: block;
}
.video-movil {
  display: none;
}

/* Mostrar solo el vertical en pantallas pequeñas */
@media (max-width: 768px) {
  .video-escritorio {
    display: none;
  }
  .video-movil {
    display: block;
  }
}

  
  /* Secciones */
  section {
    padding: 60px 0;
  }
    #inicio{
      padding-top: 25rem;
    }
  @media (min-width: 768px) {
    #inicio{
      padding-top: 25rem;
    }
  }
  .servicios .grid,
  .equipo .grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .servicio,
  .miembro {
    flex: 1 1 calc(33.333% - 20px);
    background-color: #f9f9f9;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
  }
  
  .servicio img,
  .miembro img {
    max-width: 100px;
    margin-bottom: 10px;
    border-radius: 10px
  }
  
  /* Formulario de contacto */
  .contacto form {
    display: flex;
    flex-direction: column;
    min-width: 600px;
  }
  .formulario{
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .contacto label {
    margin-top: 10px;
  }
  
  .contacto input,
  .contacto textarea {
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  .contacto button {
    margin: 20px auto 0 auto;
    padding: 10px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100px;
  }
  
  /* Pie de página */
  footer {
    background-color: #2C3E50;
    color: var(--blanco);
    padding: 2rem 0;
    text-align: center;
    font-family: 'Roboto', sans-serif;
  }
  
  footer .copy {
    margin-top: 1rem;
    font-size: 14px;
    color: #999;
  }
  
  .footer-columns {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .footer-item {
    text-align: left;
    max-width: 300px;
  }
  
  .footer-item h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 500;
  }
  
  .footer-item a {
    color: var(--blanco);
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: color 0.3s ease, transform 0.3s ease;
  }
  
  .footer-item a:hover {
    color: #3498db;
    transform: translateY(-2px);
  }
  
  .footer-item p {
    color: var(--blanco);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
  }
  
  @media (max-width: 768px) {
    .footer-columns {
      flex-direction: column;
      gap: 30px;
      text-align: center;
    }
  
    .footer-item {
      text-align: center;
    }
  }
  
  
  /* Responsividad */
  @media (max-width: 768px) {
    header {
      padding: 0.5rem 0;
    }
    
    .separation {
      flex-direction: column;
      align-items: center;
      gap: 1rem;
    }
    
    .logo {
      max-width: 6rem;
    }
    
    /* Ocultar navegación de escritorio en móviles */
    .nav-desktop {
      display: none;
    }
    
    /* Mostrar botón hamburguesa en móviles */
    .hamburger {
      display: flex;
    }
    
    /* Ajustar header para móviles */
    .separation {
      position: relative;
    }
    
    .hero {
      padding-top: 120px; /* Más espacio en móvil para el header más alto */
      padding-bottom: 5px; /* Mínimo espacio en móvil */
    }
  
    .servicio,
    .miembro {
      flex: 1 1 100%;
    }
    .contacto form {
      min-width: 400px;
    }
  }
  
  /* Icono whatsapp */
  .boton-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
    animation: pulse 2s infinite;
    margin-top: 2rem;
  }
  
  .boton-whatsapp:hover {
    background-color: #1ebe5d;
    transform: scale(1.05);
  }
  
  .icono-whatsapp {
    width: 24px;
    height: 24px;
    margin-right: 10px;
  }
  
  /* @keyframes pulse {
    0% {
      opacity: 1;
    }
    50% {
      opacity: 0.7;
    }
    100% {
      opacity: 1;
    }
  } */
  
  /* OPCIONAL: Mostrar solo en dispositivos móviles */
  /* @media (min-width: 769px) {
    .boton-whatsapp {
      display: none;
    }
  } */
  
  .whatsapp-fijo {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite;
    z-index: 1000;
  }
  
  .whatsapp-fijo:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
  }
  .whatsapp-fijo img {
    width: 30px;
    height: 30px;
  }

  /* Toasts */
  .toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1100;
    pointer-events: none;
  }
  .toast {
    min-width: 260px;
    max-width: 360px;
    background: #2C3E50;
    color: #fff;
    padding: 12px 14px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
    font-size: 14px;
  }
  .toast.show { opacity: 1; transform: translateY(0); }
  .toast.success { background: #2e7d32; }
  .toast.error { background: #c62828; }
  .toast .title { font-weight: 700; margin-bottom: 4px; }
  .toast .msg { opacity: 0.95; }

  
  /* Carrusel equipo */
  .servicios h2 {
    text-align: center;
    margin-bottom: 1rem;
    text-align: center;
  }
  .carousel {
    position: relative;
    width: 100%;
    margin: 0 auto 1rem auto;
  }
  .carousel-window {
    overflow: hidden;
    width: 100%;
    transition: height 0.3s ease;
  }
  .carousel-track {
    display: flex;
    transition: transform 0.4s ease;
    will-change: transform;
  }
  .slide {
    padding: 10px;
    box-sizing: border-box;
  }
  .carousel { cursor: grab; user-select: none; }
  .carousel.dragging { cursor: grabbing; }
  .carousel.dragging .carousel-track { transition: none !important; }
  .carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44,62,80,0.8);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
  }
  .carousel-btn.prev { left: -10px; }
  .carousel-btn.next { right: -10px; }

  .equipo-cta { text-align: center; margin-top: 10px; }
  .btn-equipo {
    display: inline-block;
    background: #2C3E50;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
  }
  .btn-equipo:hover { background: #1f2c3a; transform: translateY(-2px); }

  /* Indicadores (puntos) del carrusel */
  
  /* Sección Antes:Después */
  .antes-despues h2 {
    text-align: center;
    margin-bottom: 1rem;
  }
  .ad-carousel { position: relative; width: 100%; margin: 0 auto 1rem auto; }
  .ad-window {
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    background: #f5f7f9; /* sutil fondo para letterboxing */
  }
  .ad-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
  }
  .ad-slide {
    min-width: 100%;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
  }
  .ad-slide img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain; /* evitar recorte/zoom */
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  }
  /* Reutilizar estilos de botones del carrusel y ajustar offsets */
  .ad-prev { left: 8px; }
  .ad-next { right: 8px; }
  .ad-indicators { margin-top: 10px; }

  .carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
  }
  .carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #cfd6db;
    cursor: pointer;
  }
  .carousel-indicators button.active {
    background: #2C3E50;
  }

  /* Tarjetas del equipo reutilizables */
  .miembro {
    background: #f9f9f9;
    border-radius: 8px;
    text-align: center;
    padding: 16px;
  }
  .miembro img {
    width: 100%;
    max-width: 260px;
    aspect-ratio: 1 / 1; /* Forzar cuadrado uniforme */
    object-fit: cover;   /* Recorta para uniformar encuadre */
    display: block;
    margin: 0 auto 10px;
    border-radius: 10px;
  }
  .miembro h3 {
    margin-top: 10px;
    font-size: 14px;
    letter-spacing: 0.5px;
    font-weight: 800;
  }
  .miembro p {
    margin-top: 4px;
    font-size: 13px;
    color: #6D7A83F5;
  }

  /* Página "Conoce el equipo" */
  .team-page { padding-top: 120px; }
  .team-header { text-align: center; margin-bottom: 20px; }
  .team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  @media (max-width: 1024px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
  @media (max-width: 640px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }

  /* Ajustes responsive para carrusel */
  @media (max-width: 768px) {
    .carousel-btn.prev { left: 4px; }
    .carousel-btn.next { right: 4px; }
  }