/* Estilos Generales */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9; /* Fondo general */
    color: #333; /* Texto oscuro */
  }
  
  /* Sección Hero */
  .hero {
    position: relative; /* Necesario para posicionar el overlay */
    background: url('/IMGS/robotica.webp') no-repeat left center/cover;
    height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
    overflow: hidden; /* Asegura que el overlay no se salga del contenedor */
  }

  .hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Color negro con opacidad del 50% */
    z-index: 1; /* Asegura que quede detrás del contenido */
  }

  .hero-contenido {
    position: relative;
    z-index: 2; /* Asegura que el contenido esté encima del overlay */
  }
  
  .hero h1 {
    font-size: 2.8rem;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  }
  
  .hero p {
    font-size: 1.2rem;
    margin: 20px 0;
  }
  
  .hero .btn {
    padding: 10px 20px;
    margin: 10px;
    font-size: 1rem;
    color: white;
    background-color: #6D1624;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .hero .btn:hover {
    background-color: #30070e;
  }
  
  /* Valores Destacados */
  .valores {
    text-align: center;
    padding: 40px 20px;
    background-color: #ffffff;
  }
  
  .valores h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 20px;
  }

  .valores h3{
    padding-bottom: 20px;
  }
  
  .valores p {
    max-width: 700px;
    margin: 0 auto 20px auto;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
  }

  .valores-contenedor {
    display: flex;
    justify-content:center;
    flex-wrap: nowrap;
    gap: 20px;
  }

  .valor img {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
  }
    
  /* Niveles Educativos */
  .niveles{
    padding: 40px 20px;
    background-color: #f4f4f4;
    border-style: groove none;
    border-color: #30070e;
  }

  .niveles-contenedor, .niveles h2 {
    display: flex; /* Activamos Flexbox */
    justify-content: center; /* Centrar horizontalmente los niveles */
    gap: 20px; /* Espaciado entre los niveles */
    flex-wrap: wrap; /* Permitir que se ajusten en pantallas más pequeñas */
  }

  .niveles .nivel {
    flex: 1; /* Permitir que cada nivel ocupe espacio proporcional */
    max-width: 300px; /* Ancho máximo por nivel */
    min-width: 250px; /* Ancho mínimo para mantener consistencia */
    margin: 10px; /* Espacio exterior alrededor de cada nivel */
    padding: 10px;
    text-align: center;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .niveles .nivel:hover {
    transform: translateY(-10px); /* Efecto de flotación al pasar el cursor */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  }

  .niveles .nivel h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  .niveles .nivel p {
    font-size: 0.9rem;
    color: #555;
  }

  .nivel img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 10px;
  }

  /* Contacto */
  .contacto {
    text-align: center;
    padding: 40px 20px;
    background-color: #8f8b84;
    color: white;
  }
  
  .contacto h2 {
    font-size: 2rem;
    margin-bottom: 20px;
  }
  
  .contacto p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto 20px auto;
  }
  
  .contacto .btn, .anuncios .btn{
    padding: 10px 20px;
    font-size: 1rem;
    color: #ffffff;
    background-color: #6D1624;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  
  .contacto .btn:hover, .anuncios .btn:hover {
    background-color: #30070e;
  }

  /* Sección de Anuncios */
  .anuncios{
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 20px;
  }

  .anuncios h2 {
    font-size: 2.5rem;
    color: #6D1624;
  }
  .anuncios p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 10px;
  }
  .seccion-anuncios {
    margin-bottom: 40px;
  }

  .seccion-anuncios h2 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
  }

  .anuncios-contenedor {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
  }

  .anuncio {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 300px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .anuncio img {
    width: auto;
    border-radius: 10px 10px 0 0;
    object-fit: cover;
    max-height: 140px;
    margin-bottom: 10px;
  }

  .anuncio h3 {
    font-size: 1.5rem;
    color: #6D1624;
    margin-bottom: 10px;
  }

  .anuncio p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
  }

  .anuncio:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
  } 

  /* Animaciones */
  .valor, .nivel {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  .valor:hover, .nivel:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  }
  
  /* Responsividad */
  @media (max-width: 768px) {
    .hero h1 {
      font-size: 2rem;
    }
  
    .niveles-contenedor {
      flex-direction: column; /* Cambiar a diseño vertical */
      align-items: center; /* Centrar los elementos verticalmente */
    }
  
    .niveles .nivel {
      max-width: 100%;
    }

    .anuncios-contenedor {
      flex-direction: column;
      align-items: center;
    }
    .seccion-anuncios h2{
        text-align: center;
    }
  }
  