/* Estilos existentes */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

header, footer {
    text-align: center;
    padding: 1em;
    background-color: #ffffff; /* Fondo blanco */
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin-right: 10px;
    transition: all 0.3s ease-in-out;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

nav ul li a:hover {
    color: #4e54c8;
    transform: scale(1.05);
}

/* Encabezado dinámico */
header {
    background-color: #fff; /* Fondo blanco */
    padding: 50px 20px;
    text-align: center;
    border-bottom: 2px solid #f3f3f3;
}

header h1 {
    font-size: 2.5em;
    color: #333;
    animation: fadeIn 2s ease-in-out;
    font-weight: bold;
    margin: 0;
}

/* Animación de fade-in para el título */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fondo muy sutil con una ligera sombra */
header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Ajustes para la sección de héroe (imagen a la izquierda, texto a la derecha) */
.hero-section {
    display: flex;
    align-items: flex-start;
}
.hero-section .hero-image {
    flex-basis: 50%;
}
.hero-section .hero-text {
    flex-basis: 50%;
}
.hero-section img {
    width: 95%;
    height: auto;
}
.aligned-text {
    width: 600px;
    margin-bottom: 20px;
    text-align: justify;
}
iframe {
    width: 560px;
    height: 315px;
}
.hero-text p {
    text-align: justify;
}

/* Estilos para pantallas grandes (escritorios) */
@media only screen and (min-width: 900px) {
    .hero-section img {
        width: 95%; /* Imagen ocupa el 95% en pantallas grandes */
        height: auto;
    }
    .aligned-text, iframe {
        width: 600px; /* Mantener el tamaño original del texto y vídeos en escritorio */
    }
}

/* Estilos específicos para dispositivos móviles pequeños (teléfonos) */
@media only screen and (max-width: 768px) {
    .hero-section {
        flex-direction: column; /* Apilar la imagen y texto en columna */
    }
    .hero-section .hero-image, .hero-section .hero-text {
        flex-basis: 100%; /* Cada elemento ocupa el 100% del ancho */
    }
    .aligned-text, iframe {
        width: 90%; /* Ajusta el ancho del texto y vídeo a 90% del ancho disponible */
    }
    .hero-section img {
        width: 50%; /* La imagen ocupará solo el 50% en dispositivos móviles */
        height: auto;
        margin: 0 auto; /* Centrar la imagen */
    }
}

/* Estilos específicos para tabletas */
@media only screen and (max-width: 1024px) {
    .aligned-text, iframe {
        width: 80%; /* Ajustar ancho del texto y vídeos a 80% en tabletas */
    }
    .hero-section img {
        width: 80%; /* Imagen más grande en tabletas, pero más pequeña que en escritorio */
        margin: 0 auto;
    }
}

