/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes scrollBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 100%;
    }
}

body {
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Estilos para el fondo con patrón de texto */
.pattern-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-color: #000;
    overflow: hidden;
}

/* Creamos múltiples instancias del texto para mayor visibilidad */
.pattern-background::before,
.pattern-background::after {
    content: 'BÁSICO BÁSICO BÁSICO';
    position: absolute;
    font-size: 10rem; /* Texto aún más grande */
    font-weight: 900; /* Extra negrita */
    color: #ffffff; /* Blanco sólido */
    white-space: nowrap;
    transform: rotate(45deg);
    letter-spacing: 15px; /* Mayor espaciado entre letras */
}

.pattern-background::before {
    top: -20%;
    left: -20%;
    width: 200%;
    height: 200%;
    line-height: 15rem;
    animation: scrollBackground 25s linear infinite;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

.pattern-background::after {
    content: 'BÁSICO BÁSICO BÁSICO';
    bottom: -20%;
    right: -20%;
    width: 200%;
    height: 200%;
    line-height: 20rem;
    animation: scrollBackground 30s linear infinite reverse;
    opacity: 0.8;
}

/* Estilos para el video de fondo */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Mantiene -1 para que esté detrás del contenido pero sobre el patrón de fondo */
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3); /* Añade un ligero oscurecimiento para mejorar la visibilidad del patrón */
}

/* Imagen alternativa para navegadores lentos */
.fallback-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/bg_alt.jpg');
    background-size: cover;
    background-position: center center;
    z-index: -1; /* Detrás del video pero visible si el video no carga */
}

/* Ocultar la imagen alternativa cuando el video está disponible */
@media (min-width: 768px) {
    video::-webkit-media-controls-start-playback-button {
        display: none !important;
    }
    
    /* La imagen alternativa se oculta cuando el video está cargado y reproduciéndose */
    video[playing] + .fallback-image {
        display: none;
    }
}

#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: auto; /* Altura automática para mantener la proporción */
    transform: translateX(-50%) translateY(-50%);
    object-fit: contain; /* Cambiado a contain para priorizar el ancho completo */
    opacity: 0.8; /* Hacemos el video ligeramente transparente para ver el fondo */
}

/* Puntos de quiebre para video responsivo */
/* Pantallas pequeñas (móviles) */
@media (max-width: 576px) {
    #background-video {
        width: 100%;
        height: auto;
    }
}

/* Pantallas medianas (tablets) */
@media (min-width: 577px) and (max-width: 992px) {
    #background-video {
        width: 100%;
        height: auto;
    }
}

/* Pantallas grandes (escritorio) */
@media (min-width: 993px) {
    #background-video {
        width: 100%;
        height: auto;
        max-height: 100vh; /* Limita la altura al alto de la ventana */
    }
}

/* Para pantallas muy anchas, aseguramos que el video no se estire demasiado */
@media (min-width: 1600px) {
    #background-video {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
}

/* Estilos del encabezado y menú social */
header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.7);
}

.social-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 50px;
}

.encontranos {
    color: white;
    font-weight: bold;
    margin-right: 15px;
}

.social-menu ul {
    display: flex;
    list-style: none;
}

.social-menu ul li {
    margin-left: 15px;
}

.social-menu ul li a {
    color: white;
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-menu ul li a:hover {
    color: #e1e1e1;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    .social-menu {
        justify-content: center;
        padding-right: 0;
        flex-wrap: wrap;
    }
    
    .encontranos {
        margin-bottom: 10px;
        width: 100%;
        text-align: center;
    }
}
