* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #000;
    /* Eliminamos height: 100% para que el scroll sea estándar */
    min-height: 100vh; 
    overflow-x: hidden;
}

/* FONDO DINÁMICO */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
}

.slideshow-image {
    position: absolute;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1.2);
    animation-duration: 20s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

#slide1 { background-image: url('imagenes/exterior-molino-2025-1.jpg'); animation-name: kenburnsPanRightToLeft; }
#slide2 { background-image: url('imagenes/terraza.jpg'); animation-name: kenburnsPanLeftToRight; }
#slide3 { background-image: url('imagenes/portada-molino.jpg'); animation-name: kenburnsPanRightToLeft; }
#slide4 { background-image: url('imagenes/caserioreformado.jpg'); animation-name: kenburnsPanLeftToRight; }
#slide5 { background-image: url('imagenes/molinointeriorchimenea.jpg'); animation-name: kenburnsPanRightToLeft; }

.slideshow-image.active { opacity: 1; z-index: 2; }

@keyframes kenburnsPanRightToLeft { 0% { transform: scale(1.1) translateX(8%); } 100% { transform: scale(1.3) translateX(-8%); } }
@keyframes kenburnsPanLeftToRight { 0% { transform: scale(1.1) translateX(-8%); } 100% { transform: scale(1.3) translateX(8%); } }

/* CONTENIDO SUPERPUESTO */
.content-overlay {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 130vh; /* Aumentamos para asegurar el espacio de scroll */
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    text-align: center;
    z-index: 10;
}

header h1 { font-size: 3.5rem; text-transform: uppercase; letter-spacing: 3px; margin-bottom: 10px; }
.tagline { font-size: 1.2rem; opacity: 0.9; }

.buttons-group { display: flex; flex-direction: column; gap: 20px; margin-top: 40px; }
.btn { display: inline-block; padding: 18px 50px; font-size: 1.1rem; font-weight: bold; text-decoration: none; text-transform: uppercase; border-radius: 4px; transition: all 0.3s ease; min-width: 260px; }
.btn-main { color: #000; background: #fff; border: 2px solid #fff; }
.btn-secondary { color: #fff; background: transparent; border: 2px solid #fff; }
.btn:hover { transform: translateY(-3px); }

.scroll-hint { margin-top: 50px; font-size: 0.9rem; opacity: 0.6; animation: bounce 2s infinite; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0);} 40% {transform: translateY(-10px);} 60% {transform: translateY(-5px);} }

/* FOOTER CON CORRECCIONES */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    color: #fff;
    padding: 30px 0 15px 0;
    z-index: 9999; /* Prioridad máxima sobre cualquier capa */
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Estado oculto */
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s ease-out;
    pointer-events: none;
}

/* Estado visible al hacer scroll */
.site-footer.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.footer-content { display: flex; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.footer-section { flex: 1; padding: 0 15px; text-align: center; border-right: 1px solid rgba(255, 255, 255, 0.2); }
.footer-section:last-child { border-right: none; }
.footer-section h4 { font-size: 0.8rem; text-transform: uppercase; margin-bottom: 10px; opacity: 0.5; }
.footer-section p, .footer-section a { font-size: 0.8rem; line-height: 1.6; color: #ddd; text-decoration: none; }
.footer-links a { display: block; margin-bottom: 5px; color: #fff; }
.footer-bottom { text-align: center; margin-top: 20px; font-size: 0.7rem; opacity: 0.4; }

@media (min-width: 768px) { .buttons-group { flex-direction: row; } }
@media (max-width: 768px) {
    .footer-content { flex-direction: column; }
    .footer-section { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 15px 0; }
}