/* ===== ANIMACIONES MELGATEL ===== */

/* ---- Contador de logros / Stats ---- */
.stats-band {
    background: linear-gradient(135deg, #101820 0%, #1b2a35 100%);
    padding: 55px 0;
    color: #fff;
    border-bottom: 4px solid #b70202;
}
.stats-band .stat-item {
    text-align: center;
    padding: 12px 10px;
}
.stats-band .stat-num {
    font-size: 54px;
    font-weight: 800;
    line-height: 1;
    color: #b70202;
    font-family: "Roboto", sans-serif;
}
.stats-band .stat-label {
    margin-top: 10px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #ffffff;
    opacity: 0.95;
}
@media (max-width: 767px) {
    .stats-band .stat-num { font-size: 40px; }
    .stats-band .stat-label { font-size: 13px; }
}

/* ---- Cinta de sectores (marquee) ---- */
.marquee-band {
    background: #b70202;
    color: #fff;
    overflow: hidden;
    padding: 18px 0;
    white-space: nowrap;
    border-bottom: 3px solid #101820;
}
.marquee-track {
    display: inline-block;
    animation: marqueeScroll 30s linear infinite;
}
.marquee-band:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    display: inline-block;
    padding: 0 28px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.marquee-track .sep-mel { color: #ffd9d9; }
@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---- Boton WhatsApp flotante animado ---- */
#wsp-melgatel {
    position: fixed;
    bottom: 25px;
    right: 25px;
    left: auto;
    z-index: 9999;
    width: 68px;
    height: 68px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.5);
    transition: all 0.4s ease;
}
#wsp-melgatel.ghost-visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
#wsp-melgatel:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.85);
}
#wsp-melgatel .wsp-icono {
    font-size: 38px;
    color: #ffffff;
    line-height: 1;
    animation: wspBrinco 1.6s ease-in-out infinite;
}
#wsp-melgatel .wsp-onda,
#wsp-melgatel .wsp-onda2 {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25d366;
    z-index: -1;
    animation: wspOnda 2.4s ease-out infinite;
}
#wsp-melgatel .wsp-onda2 { animation-delay: 1.2s; }
@keyframes wspOnda {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.9); opacity: 0; }
}
@keyframes wspBrinco {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
#wsp-melgatel .wsp-etiqueta {
    position: absolute;
    left: auto;
    right: 78px;
    top: 50%;
    transform: translateY(-50%) scale(0.8);
    background: #b70202;
    color: #fff;
    font-family: "Roboto", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 10px 18px;
    border-radius: 30px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}
#wsp-melgatel:hover .wsp-etiqueta {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}
@media (max-width: 767px) {
    #wsp-melgatel { width: 56px; height: 56px; bottom: 18px; right: 18px; }
    #wsp-melgatel .fa-whatsapp { font-size: 30px; }
}

/* ---- Barra de progreso de scroll ---- */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #b70202, #ff5f5f);
    z-index: 100000;
    box-shadow: 0 0 10px rgba(183, 2, 2, 0.5);
}

/* ---- Boton subir ---- */
#btn-ir-arriba {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 9998;
    width: 52px;
    height: 52px;
    background: #b70202;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    box-shadow: 0 6px 18px rgba(183, 2, 2, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s ease;
}
#btn-ir-arriba.ghost-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#btn-ir-arriba:hover {
    background: #101820;
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(183, 2, 2, 0.6);
}
@media (max-width: 767px) {
    #btn-ir-arriba { width: 44px; height: 44px; bottom: 18px; left: 18px; font-size: 17px; }
}

/* ---- Máquina de escribir hero ---- */
html.mel-js [data-tipeo],
html.mel-js [data-tipeo-hero] b {
    opacity: 0;
}
html.mel-js [data-tipeo].mel-typing,
html.mel-js [data-tipeo-hero] b.mel-typing {
    opacity: 1;
}
.mel-linea-1, .mel-linea-2 { display: block; }
.mel-linea-2 {
    color: #ff4d4d;
    text-shadow: 0 0 18px rgba(255, 77, 77, 0.45);
}
.mel-linea-1 { text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6); }
.mel-tip-cursor::after {
    content: "|";
    margin-left: 4px;
    color: inherit;
    font-weight: 700;
    animation: melParpadeo 0.8s steps(1) infinite;
}
@keyframes melParpadeo {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ---- Hover dinamico en tarjetas de servicios ---- */
.product {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    will-change: transform;
}
.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 40px rgba(183, 2, 2, 0.35);
    outline: 3px solid #b70202;
    outline-offset: -3px;
}