/* ========================================
   40 HYDE PARK - FASE 4: INNOVACIÓN TOTAL
   Características de Última Generación
   ======================================== */

/* ========================================
   1. SCROLL TIMELINE ANIMATIONS
   ======================================== */
.scroll-timeline-section {
    position: relative;
}

.scroll-timeline-pin {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.scroll-timeline-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.scroll-timeline-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s, transform 0.6s;
}

.scroll-timeline-layer.active {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Indicator */
.scroll-progress-dots {
    position: fixed;
    right: var(--space-6);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 100;
}

.scroll-progress-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-medium);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.scroll-progress-dot::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.scroll-progress-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

.scroll-progress-dot.active::before {
    border-color: var(--accent);
}

/* ========================================
   2. VOICE SEARCH INTERFACE
   ======================================== */
.voice-search-container {
    position: relative;
}

.voice-search-btn {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.voice-search-btn.listening {
    animation: voicePulse 1.5s infinite;
}

@keyframes voicePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(201, 162, 39, 0);
    }
}

.voice-visualizer {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.voice-visualizer.active {
    opacity: 1;
    visibility: visible;
}

.voice-bar {
    width: 4px;
    height: 20px;
    background: var(--accent);
    border-radius: var(--radius-full);
    animation: voiceBar 0.5s ease-in-out infinite alternate;
}

.voice-bar:nth-child(2) { animation-delay: 0.1s; }
.voice-bar:nth-child(3) { animation-delay: 0.2s; }
.voice-bar:nth-child(4) { animation-delay: 0.3s; }
.voice-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes voiceBar {
    from { height: 5px; }
    to { height: 25px; }
}

/* ========================================
   3. PWA INSTALL PROMPT
   ======================================== */
.pwa-install-prompt {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    padding: var(--space-4) var(--space-6);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    z-index: 9997;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90%;
    width: 400px;
}

.pwa-install-prompt.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

.pwa-install-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.pwa-install-content {
    flex: 1;
}

.pwa-install-title {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 2px;
}

.pwa-install-text {
    font-size: 0.8125rem;
    color: var(--text-light);
}

.pwa-install-actions {
    display: flex;
    gap: var(--space-2);
}

.pwa-install-btn {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.pwa-install-btn.primary {
    background: var(--accent);
    color: var(--primary);
}

.pwa-install-btn.secondary {
    background: transparent;
    color: var(--text-light);
}

.pwa-install-btn:hover {
    transform: scale(1.05);
}

/* ========================================
   4. OFFLINE INDICATOR
   ======================================== */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ef4444;
    color: white;
    text-align: center;
    padding: var(--space-2);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(-100%);
    transition: transform 0.3s;
}

.offline-indicator.visible {
    transform: translateY(0);
}

/* ========================================
   5. ADVANCED FORM VALIDATION
   ======================================== */
.form-group-advanced {
    position: relative;
    margin-bottom: var(--space-5);
}

.form-input-advanced {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-light);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.3s;
}

.form-input-advanced:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-white);
}

.form-input-advanced.valid {
    border-color: #22c55e;
    padding-right: var(--space-12);
}

.form-input-advanced.invalid {
    border-color: #ef4444;
    padding-right: var(--space-12);
}

.form-validation-icon {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.form-input-advanced.valid ~ .form-validation-icon.valid,
.form-input-advanced.invalid ~ .form-validation-icon.invalid {
    opacity: 1;
}

.form-validation-icon.valid {
    color: #22c55e;
}

.form-validation-icon.invalid {
    color: #ef4444;
}

.form-validation-message {
    position: absolute;
    bottom: -20px;
    left: 0;
    font-size: 0.75rem;
    color: #ef4444;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s;
}

.form-input-advanced.invalid ~ .form-validation-message {
    opacity: 1;
    transform: translateY(0);
}

.form-floating-label {
    position: absolute;
    left: var(--space-5);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    transition: all 0.3s;
    background: transparent;
    padding: 0 var(--space-1);
}

.form-input-advanced:focus ~ .form-floating-label,
.form-input-advanced:not(:placeholder-shown) ~ .form-floating-label {
    top: 0;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--bg-white);
}

/* Password Strength Indicator */
.password-strength {
    margin-top: var(--space-2);
    height: 4px;
    background: var(--border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.3s, background-color 0.3s;
}

.password-strength-bar.weak {
    width: 33%;
    background: #ef4444;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f59e0b;
}

.password-strength-bar.strong {
    width: 100%;
    background: #22c55e;
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: var(--space-1);
    color: var(--text-light);
}

/* ========================================
   6. INFINITE SCROLL LOADING
   ======================================== */
.infinite-scroll-container {
    position: relative;
}

.infinite-scroll-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-8);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.infinite-scroll-loader.visible {
    opacity: 1;
    visibility: visible;
}

.infinite-scroll-loader-text {
    font-size: 0.875rem;
    color: var(--text-light);
}

.infinite-scroll-end {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-light);
    font-size: 0.875rem;
    opacity: 0;
    visibility: hidden;
}

.infinite-scroll-end.visible {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   7. TYPING EFFECT
   ======================================== */
.typing-effect {
    overflow: hidden;
    border-right: 3px solid var(--accent);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

/* ========================================
   8. FLOATING ELEMENTS
   ======================================== */
.floating-element {
    animation: floating 6s ease-in-out infinite;
}

.floating-element-delay-1 { animation-delay: 1s; }
.floating-element-delay-2 { animation-delay: 2s; }
.floating-element-delay-3 { animation-delay: 3s; }

@keyframes floating {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   9. BREATHING ANIMATION
   ======================================== */
.breathing {
    animation: breathing 4s ease-in-out infinite;
}

@keyframes breathing {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ========================================
   10. NEON GLOW EFFECT
   ======================================== */
.neon-glow {
    text-shadow: 
        0 0 5px var(--accent),
        0 0 10px var(--accent),
        0 0 20px var(--accent),
        0 0 40px var(--accent);
}

.neon-border {
    box-shadow: 
        0 0 5px var(--accent),
        inset 0 0 5px var(--accent);
}

/* ========================================
   11. AURORA BACKGROUND
   ======================================== */
.aurora-bg {
    position: relative;
    overflow: hidden;
}

.aurora-bg::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(201, 162, 39, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(26, 54, 93, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
    animation: aurora 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes aurora {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Scanline effect - REMOVED (causing visual artifacts)

/* ========================================
   13. KINETIC TEXT
   ======================================== */
.kinetic-text {
    display: inline-block;
}

.kinetic-text span {
    display: inline-block;
    transition: transform 0.3s;
}

.kinetic-text:hover span {
    animation: kineticWave 0.5s ease-in-out;
}

.kinetic-text:hover span:nth-child(1) { animation-delay: 0s; }
.kinetic-text:hover span:nth-child(2) { animation-delay: 0.05s; }
.kinetic-text:hover span:nth-child(3) { animation-delay: 0.1s; }
.kinetic-text:hover span:nth-child(4) { animation-delay: 0.15s; }
.kinetic-text:hover span:nth-child(5) { animation-delay: 0.2s; }

@keyframes kineticWave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Loading skeleton - SIMPLIFICADO */
.skeleton-shimmer {
    background-color: var(--bg-light);
}

/* ========================================
   15. CONFIRMATION ANIMATION
   ======================================== */
.confirmation-check {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #22c55e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transform: scale(0);
    animation: confirmationPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes confirmationPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ========================================
   16. NOTIFICATION BADGE PULSE
   ======================================== */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* ========================================
   17. DRAG AND DROP ZONE
   ======================================== */
.drop-zone {
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-12);
    text-align: center;
    transition: all 0.3s;
    background: var(--bg-light);
}

.drop-zone.drag-over {
    border-color: var(--accent);
    background: rgba(201, 162, 39, 0.1);
    transform: scale(1.02);
}

.drop-zone-icon {
    font-size: 3rem;
    color: var(--text-light);
    margin-bottom: var(--space-4);
    transition: color 0.3s;
}

.drop-zone.drag-over .drop-zone-icon {
    color: var(--accent);
}

/* ========================================
   18. TOOLTIP ADVANCED
   ======================================== */
[data-tooltip-advanced] {
    position: relative;
}

[data-tooltip-advanced]::after {
    content: attr(data-tooltip-advanced);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    padding: var(--space-2) var(--space-4);
    background: var(--primary);
    color: var(--text-white);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
}

[data-tooltip-advanced]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    border: 5px solid transparent;
    border-top-color: var(--primary);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

[data-tooltip-advanced]:hover::after,
[data-tooltip-advanced]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* ========================================
   19. SPLIT TEXT REVEAL
   ======================================== */
.split-text-reveal {
    overflow: hidden;
    display: inline-block;
}

.split-text-reveal .char {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s, opacity 0.4s;
}

.split-text-reveal.revealed .char {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   20. HOVER CARD EXPAND
   ======================================== */
.hover-card-expand {
    transition: transform 0.4s, box-shadow 0.4s;
}

.hover-card-expand:hover {
    transform: scale(1.05) translateY(-10px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}
