
body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background-color: #f8f8f8;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    /* CAMBIO 1: Se añadió la transición para la animación suave */
    transition: transform 0.4s ease-in-out;
}

header .logo {
    font-size: 1.9rem;
    font-weight: bold;
    color: #4A148C;
    max-width: 100%;
    height: auto;
}

nav a {
    text-decoration: none;
    color: #333;
    margin: 15px;
    font-weight: 700;
    font-size: 18px;
    display: inline-block;
}

nav a:hover {
    color: #4A148C;
}

/* Hero Section */
.hero {
    position: relative;
    height: 420px;
    background: #4A148C;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
}

.hero-content {
    position: relative;
    max-width: 950px;
    z-index: 1;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero a {
    background: #00A8B5;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-weight: bold;
    text-decoration: none;
}

/* Section Styles */
.section {
    padding: 60px 50px;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

section {
    scroll-margin-top: 100px;
}

/* Anclas para la navegación */
#inicio, #Quienes-Somos, #Directrices, #conjuntos, #servicios, #contacto, #Iniciarsesion {
    position: relative;
    padding-top: 100px;  
    margin-top: -100px;
}

.section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #4A148C;
}

.imagenes {
    display: flex;          
    justify-content: center; 
    gap: 20px;              
}

.imagenes img {
    width: 250px;          
    height: auto;           
    border-radius: 10px;    
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    text-align: center;
    margin-top: 50px;
}

.stats div {
    font-size: 1rem;
}

.info {
    display: flex;
    align-items: center;   
    justify-content: center;
    gap: 40px;            
    padding: 40px;
}  
.info h2 {
   color: #4A148C;
}  

.info-img img {
    width: 300px;   
    border-radius: 20px; 
}

.info-quien {
    max-width: 500px;   
}

.info-quien p {
    color: #666;
    line-height: 1.6; 
     font-size: 18px; 
}

.cards {
    display: flex;
    gap: 0px;
    flex-wrap: wrap;
    justify-content: center;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 60px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 350px;
    text-align: center;
    margin: 0 auto;
     font-size: 18px;
}

.card h3 {
    color: #4A148C;
    font-size: 25px;
}

/* Mantenemos la mejora del footer que te gustó */
footer {
    background: #4A148C;
    color: white;
    padding: 20px;
    text-align: center;
    margin: 30px auto;
    width: 500% /* Ancho más razonable para escritorio */
    max-width: 1200px; /* Consistente con el resto del contenido */
    border-radius: 10px;
}

footer a {
    color: violet;
}



/* Para pantallas de máximo 768px (tablets y móviles) */
@media (max-width: 768px) {
  nav ul li {
    display: block;
    margin: 10px 0;
  }

  header h1 {
    font-size: 1.2rem;
  }

  main {
    padding: 10px;
  }

  button {
    width: 100%; /* Botón de ancho completo en móviles */
  }
}

/* Para pantallas muy pequeñas (máx 480px: celulares pequeños) */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  header, footer {
    padding: 8px;
  }

  nav a {
    font-size: 0.9rem;
  }
}


/* Clase que se añade con JavaScript para ocultar el header */
header.header-oculto {
    transform: translateY(-100%); /* Desliza el header hacia arriba */
}

/* Reglas para que el header se vea bien en pantallas pequeñas */
@media (max-width: 850px) {
    header {
        flex-direction: column;
        padding: 15px;
    }
    nav {
        margin-top: 15px;
        border-top: 1px solid #eee;
        padding-top: 10px;
        width: 100%;
        text-align: center;
    }
    nav a {
        display: block;
        margin: 8px 0;
        padding: 5px;
    }
}