/* Base Styles */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #1a56db;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Medical Hero Gradient Overlay */
.hero-gradient {
    background: linear-gradient(135deg, rgba(26, 86, 219, 0.9) 0%, rgba(13, 148, 136, 0.8) 100%);
}

/* --- Nuevas Animaciones Mejoradas --- */

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ECG Heartbeat SVG Animation */
.beat-line {
    fill: none;
    stroke: #39ff14; /* Verde fosforescente neón */
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 12px rgba(57,255,20, 0.9)) drop-shadow(0 0 4px rgba(57,255,20, 1));
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawHeartbeat 3s linear infinite;
}
@keyframes drawHeartbeat {
    0% { stroke-dashoffset: 2000; }
    50%, 100% { stroke-dashoffset: 0; }
}

/* Marquee Continua */
.animate-marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    width: 100%;
}
.animate-marquee-content {
    display: inline-flex;
    padding-left: 100%;
    animation: marqueeScroll 15s linear infinite;
}
.animate-marquee-content:hover {
    animation-play-state: paused;
}
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Borde Arcoíris Gradient para la Marquesina */
.gb-rainbow {
    background: linear-gradient(90deg, #1a56db, #0d9488, #3b82f6, #14b8a6, #1a56db);
    background-size: 200% auto;
    animation: rainbowShift 3s linear infinite;
}
@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
