/* Enhanced Hero Typewriter Effect Styles */

/* Initial state - everything hidden */
.hero-content {
    text-align: center;
    max-width: 800px;
    z-index: 1;
}

/* Ensure video is fully visible initially */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    z-index: -2;
}

/* Overlay starts transparent */
.hero-overlay-initial {
    opacity: 0 !important;
}

.hero-overlay-active {
    opacity: 1 !important;
}

/* Title styles for typewriter */
.hero-title {
    font-size: 3.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    color: #ffffff !important;
    opacity: 0;
    transition: opacity 0.5s ease;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
}

.hero-title.visible {
    opacity: 1;
}

/* Subtitle styles for typewriter */
.hero-subtitle {
    font-size: 1.25rem !important;
    color: #ffffff !important;
    margin-bottom: 3rem !important;
    opacity: 0;
    transition: opacity 0.5s ease;
    line-height: 1.6;
    max-width: 100%;
    word-wrap: break-word;
}

.hero-subtitle.visible {
    opacity: 1;
}

/* Typewriter cursor animation */
@keyframes blink-cursor {
    0%, 50% {
        border-color: #ffffff;
    }
    51%, 100% {
        border-color: transparent;
    }
}

/* Typewriter elements */
.typewriter-main,
.typewriter-subtitle {
    display: inline-block;
    border-right: 3px solid #ffffff;
    white-space: pre-wrap;
    overflow: visible;
    animation: blink-cursor 1s infinite;
    color: #ffffff;
    word-wrap: break-word;
    max-width: 100%;
}

.typewriter-main {
    font-weight: inherit;
    font-size: inherit;
    line-height: 1.2;
}

.typewriter-subtitle {
    font-weight: inherit;
    font-size: inherit;
    line-height: 1.4;
}

/* CTA Button animation states */
.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: all !important;
}

/* SCROLL ELIMINADO DEL HERO - SOLUCIÓN DEFINITIVA */
.hero .scroll-down {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Scroll reposicionado FUERA del hero */
.scroll-down {
    position: fixed !important; /* FIXED para estar fuera del hero */
    bottom: 30px !important;
    right: 30px !important; /* Esquina inferior derecha */
    left: auto !important;
    transform: none !important;
    background: rgba(0, 86, 210, 0.9) !important;
    border: none;
    color: white !important;
    cursor: pointer;
    z-index: 1000 !important; /* Muy alto pero fuera del hero */
    font-size: 0.8rem;
    padding: 10px !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: none; /* OCULTO hasta activación manual */
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 12px rgba(0, 86, 210, 0.3) !important;
}

.scroll-down-hidden {
    opacity: 0 !important;
    transform: translateX(-50%) translateY(20px) !important;
    pointer-events: none !important;
}

/* Scroll flotante que aparece al salir del hero */
.scroll-down.floating-scroll {
    display: flex !important;
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    animation: float-in 0.5s ease !important;
}

/* Icono de flecha hacia abajo para el scroll flotante */
.scroll-down .scroll-arrow {
    font-size: 1.2rem !important;
    line-height: 1 !important;
}

/* Ocultar el mouse icon en el scroll flotante */
.scroll-down.floating-scroll .scroll-mouse,
.scroll-down.floating-scroll .scroll-text {
    display: none !important;
}

@keyframes float-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Scroll indicator design */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(-3px);
}

/* Mouse icon - Más pequeño y discreto */
.scroll-mouse {
    width: 16px;
    height: 26px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 13px;
    position: relative;
    background: transparent;
}

.scroll-wheel {
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s infinite;
}

/* Scroll text */
.scroll-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

/* Scroll arrow */
.scroll-arrow {
    color: rgba(255, 255, 255, 0.8);
    animation: bounce-arrow 2s infinite;
}

/* Animations */
@keyframes scroll-wheel {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0.3;
    }
    100% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes bounce-arrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.125rem !important;
    }
    
    .typewriter-main,
    .typewriter-subtitle {
        border-right-width: 2px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .typewriter-main,
    .typewriter-subtitle {
        border-right-width: 2px;
    }
}