/* === Estilos generales === */
body {
    font-family: 'Times New Roman', serif;
    margin: 0;
    padding: 0;
    background: url('escuela.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #333;
}

/* === Encabezado (ID selector + herencia) === */
#encabezado {
    background-color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 40px 20px;
    border-bottom: 1px solid #ccc;
}

.titulo-principal {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitulo {
    font-style: italic;
}

/* === Menú con posición sticky === */
.menu-sticky {
    position: sticky;
    top: 0;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
    text-align: center;
}

.menu-sticky ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-sticky li {
    display: inline-block;
    margin: 0 15px;
}

.menu-sticky a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: bold;
}

.menu-sticky a:hover {
    color: #7e4c29; /* pseudoclase */
}

/* === Secciones de contenido === */
main {
    padding: 40px 20px;
}

/* Herencia aplicada: todas las secciones heredan tipografía y color */
.info {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* === Posicionamiento relativo === */
.posicion-relativa {
    position: relative;
}

.cuadro-animado {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #ffd9b3;
    padding: 10px 15px;
    border-radius: 8px;
    animation: aparecer 2s ease-in-out;
    font-weight: bold;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
}

/* === Imagen con animación al pasar el mouse === */
.imagen-educativa {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.4s ease;
}

.imagen-educativa:hover {
    transform: scale(1.05); /* pseudoclase + transformación */
}

/* === Video === */
.video-contenido {
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* === Pie de página con posición fija opcional === */
#footer {
    background-color: rgba(44, 62, 80, 0.9);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    position: static; /* puedes cambiar a fixed si quieres */
}

/* Pseudoelemento decorativo */
.volver-inicio::before {
    content: "⬆️ ";
}

/* === Animación keyframes === */
@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
