/* Hacer que la página ocupe toda la altura de la pantalla */

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Quicksand', 'Segoe UI', Arial, sans-serif;
    background: #f8f9fa;
    color: #222;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60vh;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
}

.welcome-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}

.welcome-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #a386b1 0%, #90d4bd 50%, #a386b1 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease-in-out infinite;
    z-index: 1;
}

/* Cuando hay imagen, quitar degradado y aplicar difuminado */
.welcome-background.with-image {
    /* Primero quitar el degradado y animación */
    background: none;
    animation: none;
    /* Luego configurar la imagen - esto se aplicará desde JavaScript */
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    filter: blur(5px); /* Aplicar difuminado a la imagen */
    transform: scale(1.05) !important; /* Escalar ligeramente para compensar el blur */
}

/* Quitar el overlay cuando hay imagen */
.welcome-background.with-image::after {
    display: none;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.welcome-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'Quicksand', sans-serif;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    /* Sombra múltiple para mayor impacto visual */
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.6),
        0 8px 16px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 0, 0, 0.5);
    /* Añadir un contorno sutil para mayor definición */
    -webkit-text-stroke: 1px rgba(0, 0, 0, 0.1);
    /* Hacer el texto más brillante para contrastar */
    color: #ffffff;
    filter: brightness(1.1);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.3s forwards;
}

.welcome-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 3rem;
    /* Mejorar la sombra del subtítulo para que también resalte */
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 4px 8px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.95);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.6s forwards;
}

.welcome-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #6c757d;
    border: none;
    padding: 18px 36px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Quicksand', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 4px 16px rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

.welcome-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.3),
        0 8px 20px rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 1);
    color: #a386b1;
}

.welcome-btn svg {
    transition: transform 0.3s ease;
}

.welcome-btn:hover svg {
    transform: translateX(5px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== INDICADOR DE SCROLL ===== */

.welcome-section .scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    opacity: 1;
    visibility: visible;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: scrollPulse 2s ease-in-out infinite;
}

.welcome-section .scroll-indicator.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateX(-50%) translateY(30px) scale(0.95) !important;
    pointer-events: none;
}

.scroll-text {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Quicksand', sans-serif;
}

.scroll-arrow {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.scroll-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.scroll-arrow svg {
    width: 24px;
    height: 24px;
    color: rgba(255, 255, 255, 0.9);
    animation: arrowBounce 1.5s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-section {
        height: 100vh;
        min-height: 600px; /* Altura mínima para pantallas muy pequeñas */
    }
    
    .welcome-content {
        padding: 1.5rem;
    }
    
    .welcome-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .welcome-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
    }
    
    .welcome-btn {
        padding: 16px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-section {
        height: 100vh;
        min-height: 500px; /* Altura mínima para móviles */
    }
    
    .welcome-content {
        padding: 1rem;
    }
    
    .welcome-title {
        font-size: 2rem;
        margin-bottom: 0.8rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .welcome-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
        gap: 8px;
    }
}

/* El footer ahora siempre estará al final */
#footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
        padding: 2rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 40vh;
        padding: 1.5rem 1rem;
    }
}