/* ===== COMPONENTE SCROLL TO TOP ===== */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-all);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===== NAVEGACIÓN MEJORADA ===== */

.nav-link {
    position: relative;
    transition: var(--transition-all);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-blue);
    transition: var(--transition-all);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary-blue);
}

/* ===== HERO SECTION ANIMATIONS ===== */

.hero-title {
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-features {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-form {
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* ===== HERO SECTION GRADIENTE PERSONALIZADO ===== */

#inicio {
    background: linear-gradient(135deg, 
        #6366f1 0%,    /* indigo-500 */
        #3b82f6 35%,   /* blue-600 */
        #8b5cf6 70%,   /* purple-600 */
        #7c3aed 100%   /* purple-700 */
    );
    background-attachment: fixed;
    position: relative;
}

#inicio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Asegurar que el formulario se vea bien sobre el nuevo fondo */
.card-hero {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ===== PROGRESS BAR PARA FORMULARIO ===== */

.form-progress {
    height: 4px;
    background-color: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.form-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--success-green));
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

/* ===== EFECTOS DE TYPING ===== */

.typing-effect {
    border-right: 2px solid var(--primary-blue);
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-blue); }
}

/* ===== PARALLAX EFFECT ===== */

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* ===== MICROINTERACCIONES ===== */

.pulse-on-hover:hover {
    animation: pulse 1s infinite;
}

.scale-on-hover:hover {
    transform: scale(1.05);
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

/* ===== LOADING SKELETON ===== */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== FLOATING LABELS ===== */

.floating-label {
    position: relative;
}

.floating-label input,
.floating-label textarea {
    border: none;
    border-bottom: 2px solid #e5e7eb;
    background: transparent;
    padding: 10px 0;
    font-size: 16px;
    color: var(--gray-dark);
    outline: none;
    transition: var(--transition-all);
}

.floating-label label {
    position: absolute;
    top: 10px;
    left: 0;
    font-size: 16px;
    color: var(--gray-medium);
    pointer-events: none;
    transition: var(--transition-all);
}

.floating-label input:focus ~ label,
.floating-label input:not(:placeholder-shown) ~ label,
.floating-label textarea:focus ~ label,
.floating-label textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    font-size: 14px;
    color: var(--primary-blue);
}

.floating-label input:focus,
.floating-label textarea:focus {
    border-bottom-color: var(--primary-blue);
}

/* ===== FORMULARIO CON MEJOR CONTRASTE ===== */

.card-hero {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-label {
    color: #1f2937 !important;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.form-input {
    background-color: #ffffff !important;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    color: #1f2937 !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background-color: #ffffff !important;
}

.form-input::placeholder {
    color: #9ca3af;
    opacity: 1;
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    padding: 14px 24px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid;
    font-size: 14px;
    font-weight: 500;
}

.alert-success {
    background-color: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.alert-error {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --text-primary: #ffffff;
        --bg-secondary: #2d2d2d;
    }
    
    .dark-mode-support {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
}
