/* === RESET BÁSICO === */
/* Se limpia el margen y padding por defecto de todos los elementos para tener un lienzo uniforme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html,
body {
  height: 100%;
}
  
  /* === ESTILOS GENERALES === */
  /* Se define la fuente principal, color de fondo y color del texto */
  body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f9f9fb;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
  }
  
  /* === ENCABEZADO (HEADER) === */
  /* Encabezado con degradado azul-rojo, texto blanco y sombra */
  header {
    background-color: #0d6efd;
    color: white;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
  }
  
  header h1 {
    font-size: 1.8em;
    text-align: center;
    margin-bottom: 10px;
    color: white;
  }
  
  /* === CONTENEDOR DE NAVEGACIÓN === */
  /* Flexbox para alinear título y menú horizontalmente */
  .nav-container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
  }
  
  /* === MENÚ NAVEGACIÓN === */
  nav {
    flex: 1;
  }
  
  /* Lista de enlaces */
  .nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    transition: max-height 0.4s ease;
  }
  
  .nav-links li a {
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
  }
  
  .nav-links li a:hover,
  .nav-links li a.active {
    background-color: #ffffff22;
    color: #ffe57f;
  }
  
  /* === BOTÓN MENÚ HAMBURGUESA === */
  /* Solo aparece en pantallas pequeñas */
  .menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    z-index: 2001;
  }
  
  .menu-toggle .bar {
    height: 3px;
    width: 25px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .menu-toggle.open .top {
    transform: rotate(45deg) translateY(8px);
  }
  
  .menu-toggle.open .middle {
    opacity: 0;
  }
  
  .menu-toggle.open .bottom {
    transform: rotate(-45deg) translateY(-8px);
  }
  
  
  /* Animación al abrir el menú */
  .menu-toggle.open .top {
    transform: rotate(45deg) translateY(8px);
  }
  .menu-toggle.open .middle {
    opacity: 0;
  }
  .menu-toggle.open .bottom {
    transform: rotate(-45deg) translateY(-8px);
  }
  
  /* === CONTENIDO PRINCIPAL === */
  h1 {
    text-align: center;
    color: #1a2a6c;
    margin: 40px auto 20px;
    font-size: 2em;
    animation: fadeInDown 1s ease-in-out;
  }
  
  .gruas-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1000px;
    margin: auto;
    padding: 20px;
  }
  
  .grua {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease-in-out;
  }
  
  .grua:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  }
  
  .grua img {
    width: 200px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
  }
  
  .grua-info {
    flex: 1;
  }
  
  .grua-info h2 {
    font-size: 1.2em;
    color: #1a2a6c;
    margin-bottom: 10px;
  }
  
  .grua-info p {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 5px;
  }
  
  /* === ANIMACIONES === */
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes fadeInDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  /* === FOOTER === */
  footer {
    background-color: #1a2a6c;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 5px rgba(0, 0, 0, 0.2);
    margin-top: 60px;
  }
  
  /* === RESPONSIVE === */
  @media (max-width: 1024px) {
    .menu-toggle {
      display: flex;
    }
  
    .nav-links {
      flex-direction: column;
      align-items: center;
      max-height: 0;
      overflow: hidden;
      width: 100%;
      background-color: #1a2a6c;
    }
  
    .nav-links.show {
      max-height: 300px;
      padding: 10px 0;
    }
  
    .nav-links li {
      margin: 10px 0;
    }
  
    .grua {
      flex-direction: column;
      align-items: flex-start;
    }
  
    .grua img {
      width: 100%;
      height: auto;
    }
  }
  
  @media (max-width: 600px) {
    header h1 {
      font-size: 1.4em;
    }
  
    .grua-info h2 {
      font-size: 1.1em;
    }
  
    footer {
      font-size: 0.8em;
    }
  
    .menu-toggle .bar {
      width: 20px;
    }
  
    .nav-links {
      gap: 10px;
    }
  }
  
  /* === CARRUSEL === */
.carrusel {
    padding: 60px 20px;
    max-width: 1200px;
    margin: auto;
    text-align: center;
  }
  
  .carrusel h2 {
    font-size: 1.8rem;
    color: #1a2a6c;
    margin-bottom: 30px;
    position: relative;
  }
  
  .slider-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  }
  
  .slider {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
  }
  
  .slider img {
  width: 100%;
  max-height: 450px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 10px;
  background-color: #fff; /* para evitar fondo negro si hay espacio sobrante */
}
  
  /* === BOTONES DE NAVEGACIÓN === */
  .nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(26, 42, 108, 0.6);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 10;
  }
  
  .nav:hover {
    background-color: #b21f1f;
  }
  
  .nav.prev {
    left: 10px;
  }
  .nav.next {
    right: 10px;
  }
  
  /* === RESPONSIVE CARRUSEL === */
  @media (max-width: 768px) {
    .slider img {
      max-height: 300px;
    }
  
    .nav {
      font-size: 1.5rem;
      padding: 6px 12px;
    }
  }
  
  @media (max-width: 480px) {
    .slider img {
      max-height: 200px;
    }
  }
  

/* Hacer que el círculo de los controles sea oscuro */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  background-color: rgba(0, 0, 0, 0.6); /* medio transparente */
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
}

/* Opcional: ajusta el tamaño del ícono */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
}

/* 3. Empujamos el footer hacia abajo */
footer {
  margin-top: auto;
}
