﻿body {
    padding-top: 76px;
    /* Altura del navbar fijo */
}

.nav-slim {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.nav-slim .navbar-brand img {
    transition: height 0.3s ease;
}

.brand-text {
    font-family: 'Muli', sans-serif;
    font-size: 1.5rem;
    letter-spacing: -0.3px;
    line-height: 1;
}

.brand-bold {
    font-weight: 700;
    color: #0d6efd;
}

.brand-light {
    font-weight: 600;
    color: #003366;
}

.nav-slim .nav-link {
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.25s ease;
    position: relative;
    letter-spacing: 0.2px;
}

.nav-slim .nav-link:hover {
    color: #0d6efd;
    background: rgba(13, 110, 253, 0.05);
}

.nav-slim .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0d6efd;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-slim .nav-link:hover::after,
.nav-slim .nav-link.active::after {
    width: 60%;
}

/* Responsive */
@media (max-width: 991px) {
    .nav-slim {
        padding: 0.6rem 0;
    }

    .nav-slim .nav-link {
        padding: 0.65rem 1rem !important;
        border-radius: 10px;
    }

    .nav-slim .nav-link:hover {
        background: rgba(13, 110, 253, 0.06);
    }
}

.heartbeat-divider-top {
    background: #003366;
    height: 40px;
    border-bottom: 1px solid rgba(2, 111, 167, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* Position adjustment against sticky header if needed */
    margin-bottom: -1px;
}

.ecg-container {
    position: relative;
}

.ecg-line-top {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.ecg-path-top {
    fill: none;
    stroke: #026FA7;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Valores ajustados para cubrir los nuevos picos y mantener la fluidez */
    stroke-dasharray: 600 2000;
    animation: sweepEcg 7.5s linear infinite;
    filter: drop-shadow(0 0 6px rgba(2, 111, 167, 0.8));
}

.ecg-text {
    position: relative;
    z-index: 10;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: #003366;
    padding: 0 20px;
    border-radius: 20px;
    opacity: 0;
    animation: fadeText 7.5s linear infinite;
}

@keyframes sweepEcg {
    0% {
        stroke-dashoffset: 600;
    }

    100% {
        stroke-dashoffset: -1800;
    }
}

@keyframes fadeText {

    0%,
    35% {
        opacity: 0;
        transform: scale(0.9);
    }

    45%,
    55% {
        opacity: 1;
        transform: scale(1);
        text-shadow: 0 0 8px rgba(2, 51, 102, 0.5);
    }

    65%,
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}

@media (max-width: 768px) {
    .heartbeat-divider-top {
        height: 35px;
    }

    .ecg-text {
        font-size: 12px;
        padding: 0 10px;
    }
}