/* ==========================================================================
   ECOIMAGEN SALUD - TARJETAS DE DATOS CURIOSOS Y ANIMACIÓN MÉDICA
   Diseño Ultra-HD Ampliado, Alto Contraste y Cero Borrosidad
   ========================================================================== */

/* 1. Dimensiones ampliadas del carrusel en escritorio para máxima visibilidad */
.portfolio-swiper {
    width: 460px !important;
    height: 660px !important;
    padding-top: 0.5rem !important;
    padding-bottom: 3.5rem !important;
    overflow: visible !important;
}

/* 2. Tarjeta con máxima nitidez, fondo opaco de alta legibilidad y contraste */
.service-card {
    width: 100% !important;
    height: 100% !important;
    border-radius: 26px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1.5px solid rgba(10, 58, 117, 0.15) !important;
    box-shadow: 0 16px 45px rgba(10, 58, 117, 0.1), 0 2px 10px rgba(0, 102, 204, 0.05) !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.service-card:hover {
    border-color: rgba(0, 102, 204, 0.42) !important;
    box-shadow: 0 22px 55px rgba(10, 58, 117, 0.16), 0 0 30px rgba(0, 102, 204, 0.12) !important;
}

.card-content {
    padding: 2rem 2.2rem 1.8rem !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    z-index: 2 !important;
    overflow: visible !important;
}

/* Icono y título del servicio más grandes, nítidos y oscuros */
.service-icon-wrapper {
    width: 54px !important;
    height: 54px !important;
    border-radius: 16px !important;
    background: rgba(10, 58, 117, 0.07) !important;
    border: 1.5px solid rgba(10, 58, 117, 0.18) !important;
    color: #0066cc !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.service-icon-wrapper i {
    width: 28px !important;
    height: 28px !important;
}

.service-title {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    color: #07264e !important;
    letter-spacing: -0.015em !important;
}

/* Descripción del servicio con tipografía más grande y contraste alto */
.service-description {
    font-size: 0.98rem !important;
    line-height: 1.55 !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    margin-bottom: 1.25rem !important;
    height: auto !important;
    min-height: 4.6em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Flechas de navegación del Swiper reposicionadas */
.swiper-button-prev {
    left: calc(50% - 315px) !important;
}

.swiper-button-next {
    right: calc(50% - 315px) !important;
}

.swiper-button-prev, .swiper-button-next {
    width: 54px !important;
    height: 54px !important;
    box-shadow: 0 8px 25px rgba(10, 58, 117, 0.12) !important;
    border: 1.5px solid rgba(10, 58, 117, 0.16) !important;
}

/* Botón Consultar CUPS más grande y llamativo */
.cups-btn {
    height: 52px !important;
    border-radius: 14px !important;
    font-size: 1.02rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(10, 58, 117, 0.12) 100%) !important;
    border: 1.5px solid rgba(0, 102, 204, 0.28) !important;
    color: #07264e !important;
    box-shadow: 0 4px 14px rgba(10, 58, 117, 0.06) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.6rem !important;
    cursor: pointer !important;
    transition: var(--transition-fast, all 0.25s ease) !important;
}

.cups-btn:hover {
    background: #0066cc !important;
    border-color: #0066cc !important;
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(0, 102, 204, 0.35) !important;
    transform: translateY(-2px) !important;
}

/* 3. Tarjeta de Dato Curioso Ampliada */
.service-curiosity-card {
    width: 100%;
    flex: 1;
    min-height: 290px;
    height: auto;
    border-radius: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f0f7ff 100%);
    border: 1.5px solid rgba(0, 102, 204, 0.2);
    box-shadow: 0 8px 25px rgba(10, 58, 117, 0.06), inset 0 1px 0 #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 1.35rem 1.05rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
    transition: var(--transition-smooth, all 0.35s ease);
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

.service-curiosity-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 234, 255, 0.16) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.service-card:hover .service-curiosity-card {
    border-color: rgba(0, 102, 204, 0.45);
    background: linear-gradient(145deg, #ffffff 0%, #eaf4ff 100%);
    box-shadow: 0 12px 32px rgba(0, 102, 204, 0.12), inset 0 0 20px rgba(0, 234, 255, 0.08);
    transform: translateY(-2px);
}

.curiosity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.curiosity-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 22px;
    background: rgba(0, 102, 204, 0.1);
    border: 1.5px solid rgba(0, 102, 204, 0.25);
    color: #005bb5;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.curiosity-badge i {
    width: 14px;
    height: 14px;
    color: #d97706;
}

.curiosity-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00c853;
    box-shadow: 0 0 8px rgba(0, 200, 83, 0.9);
    animation: curiosity-dot-pulse 2s infinite ease-in-out;
}

@keyframes curiosity-dot-pulse {
    0%, 100% { transform: scale(0.9); opacity: 0.85; }
    50% { transform: scale(1.35); opacity: 1; }
}

.curiosity-category-tag {
    font-size: 0.76rem;
    font-weight: 800;
    color: #0a3a75;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(10, 58, 117, 0.06);
    padding: 3px 10px;
    border-radius: 8px;
    border: 1px solid rgba(10, 58, 117, 0.1);
}

.curiosity-body {
    position: relative;
    z-index: 2;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}

.curiosity-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #07264e;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.curiosity-text {
    font-size: 0.92rem;
    line-height: 1.52;
    color: #1e293b;
    font-weight: 500;
    display: block;
}

/* Pills de beneficios y datos clave */
.curiosity-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.45rem;
    margin-bottom: 0.45rem;
    position: relative;
    z-index: 2;
}

.curiosity-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(0, 102, 204, 0.06);
    border: 1.5px solid rgba(0, 102, 204, 0.18);
    border-radius: 10px;
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #07264e;
    transition: var(--transition-fast, all 0.2s ease);
}

.service-card:hover .curiosity-pill {
    background: rgba(0, 102, 204, 0.1);
    border-color: rgba(0, 102, 204, 0.3);
}

.curiosity-pill i {
    width: 15px;
    height: 15px;
    color: #0066cc;
}

/* Track de animación temática médica */
.curiosity-anim-track {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    background: rgba(10, 58, 117, 0.045);
    border: 1.5px solid rgba(0, 102, 204, 0.14);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin-top: 0.4rem;
}

.service-card:hover .curiosity-anim-track {
    border-color: rgba(0, 102, 204, 0.3);
    background: rgba(0, 102, 204, 0.08);
}

/* ANIMACIONES MÉDICAS */

/* 1. ECG Cardiología */
.anim-ecg-svg {
    width: 100%;
    height: 100%;
}
.anim-ecg-path {
    stroke: #005bb5;
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: ecg-draw 2.8s infinite linear;
}
.anim-ecg-glow {
    stroke: #00e5ff;
    stroke-width: 2.5;
    fill: none;
    stroke-dasharray: 40 160;
    animation: ecg-pulse-sweep 2.8s infinite linear;
}
@keyframes ecg-draw {
    0% { stroke-dashoffset: 200; }
    100% { stroke-dashoffset: 0; }
}
@keyframes ecg-pulse-sweep {
    0% { stroke-dashoffset: 200; }
    100% { stroke-dashoffset: -200; }
}

/* 2. Ondas de Ultrasonido / Ecografía */
.anim-ultrasound-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
}
.wave-arc {
    border: 3px solid transparent;
    border-right-color: #005bb5;
    border-radius: 50%;
    animation: wave-expand 1.8s infinite ease-out;
}
.wave-arc:nth-child(1) { width: 18px; height: 18px; animation-delay: 0s; }
.wave-arc:nth-child(2) { width: 30px; height: 30px; animation-delay: 0.3s; border-right-color: #0088cc; }
.wave-arc:nth-child(3) { width: 42px; height: 42px; animation-delay: 0.6s; border-right-color: #00b0ff; }
.wave-arc:nth-child(4) { width: 54px; height: 54px; animation-delay: 0.9s; border-right-color: #005bb5; }
@keyframes wave-expand {
    0% { opacity: 0.2; transform: scale(0.7); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.2; transform: scale(1.2); }
}

/* 3. Radar Detección Mama */
.anim-radar-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.radar-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 102, 204, 0.3);
}
.radar-ring:nth-child(1) { width: 22px; height: 22px; }
.radar-ring:nth-child(2) { width: 56px; height: 56px; }
.radar-ring:nth-child(3) { width: 90px; height: 90px; }
.radar-sweep-bar {
    position: absolute;
    width: 45px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00b0ff);
    transform-origin: left center;
    left: 50%;
    animation: radar-rotate 3s infinite linear;
}
.radar-blip {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00c853;
    border-radius: 50%;
    box-shadow: 0 0 10px #00c853;
    animation: radar-blip-pulse 3s infinite ease-in-out;
}
@keyframes radar-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes radar-blip-pulse {
    0%, 70% { opacity: 0; transform: scale(0.5); }
    75% { opacity: 1; transform: scale(1.2); }
    90% { opacity: 0.4; }
    100% { opacity: 0; }
}

/* 4. Scanner Tomografía 3D */
.anim-tomo-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 14px;
}
.tomo-ring-3d {
    width: 36px;
    height: 36px;
    border: 2.5px solid rgba(0, 102, 204, 0.45);
    border-top-color: #00b0ff;
    border-radius: 50%;
    transform: rotateX(60deg);
    animation: tomo-spin 2s infinite linear;
}
.tomo-laser-line {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00b0ff, transparent);
    box-shadow: 0 0 10px rgba(0, 176, 255, 0.7);
    animation: tomo-laser 2.2s infinite ease-in-out;
}
@keyframes tomo-spin {
    0% { transform: rotateX(60deg) rotate(0deg); }
    100% { transform: rotateX(60deg) rotate(360deg); }
}
@keyframes tomo-laser {
    0%, 100% { top: 15%; opacity: 0.5; }
    50% { top: 80%; opacity: 1; }
}

/* 5. Haz Fotónico Radiografía / Rayos X */
.anim-xray-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 1.5rem;
    position: relative;
}
.xray-bar {
    width: 4px;
    height: 24px;
    background: rgba(0, 102, 204, 0.25);
    border-radius: 3px;
    animation: xray-glow-scan 1.8s infinite ease-in-out;
}
.xray-bar:nth-child(1) { animation-delay: 0.1s; }
.xray-bar:nth-child(2) { animation-delay: 0.25s; height: 34px; }
.xray-bar:nth-child(3) { animation-delay: 0.4s; height: 20px; }
.xray-bar:nth-child(4) { animation-delay: 0.55s; height: 38px; }
.xray-bar:nth-child(5) { animation-delay: 0.7s; height: 26px; }
.xray-bar:nth-child(6) { animation-delay: 0.85s; height: 32px; }
.xray-bar:nth-child(7) { animation-delay: 1.0s; height: 20px; }
@keyframes xray-glow-scan {
    0%, 100% { background: rgba(0, 102, 204, 0.25); transform: scaleY(0.8); }
    50% { background: #00b0ff; box-shadow: 0 0 12px #00b0ff; transform: scaleY(1.15); }
}

/* 6. Spin Magnético MRI Resonancia */
.anim-mri-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.mri-nucleus {
    width: 12px;
    height: 12px;
    background: #005bb5;
    border-radius: 50%;
    box-shadow: 0 0 12px #0088cc;
}
.mri-orbit {
    position: absolute;
    width: 56px;
    height: 26px;
    border: 2px dashed rgba(0, 102, 204, 0.5);
    border-radius: 50%;
    animation: mri-orbit-spin 3s infinite linear;
}
.mri-orbit:nth-child(2) {
    transform: rotate(60deg);
    animation-duration: 2.4s;
    border-color: rgba(0, 176, 255, 0.65);
}
.mri-orbit:nth-child(3) {
    transform: rotate(-60deg);
    animation-duration: 3.2s;
}
@keyframes mri-orbit-spin {
    0% { transform: rotate(var(--rot, 0deg)) rotateZ(0deg); }
    100% { transform: rotate(var(--rot, 0deg)) rotateZ(360deg); }
}

/* 7. Diana Guiada Biopsias / Intervencionismo */
.anim-target-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.target-ring {
    width: 30px;
    height: 30px;
    border: 2px solid #005bb5;
    border-radius: 50%;
    position: relative;
    animation: target-pulse 2s infinite ease-in-out;
}
.target-cross-h {
    position: absolute;
    top: 50%;
    left: -12px;
    right: -12px;
    height: 1.5px;
    background: rgba(0, 176, 255, 0.85);
}
.target-cross-v {
    position: absolute;
    left: 50%;
    top: -12px;
    bottom: -12px;
    width: 1.5px;
    background: rgba(0, 176, 255, 0.85);
}
.target-lock-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    background: #00c853;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #00c853;
}
@keyframes target-pulse {
    0%, 100% { transform: scale(0.9); border-color: #005bb5; }
    50% { transform: scale(1.15); border-color: #00b0ff; box-shadow: 0 0 14px rgba(0, 176, 255, 0.5); }
}

/* 8. Flujo Peristáltico / Digestivas & Hemodinamia */
.anim-flow-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 1.5rem;
}
.flow-line {
    width: 100%;
    height: 3.5px;
    background: rgba(0, 102, 204, 0.2);
    border-radius: 3px;
    position: relative;
}
.flow-particle {
    position: absolute;
    top: -5px;
    width: 13px;
    height: 13px;
    background: #0088cc;
    border-radius: 50%;
    box-shadow: 0 0 10px #00b0ff;
    animation: flow-move 2.2s infinite ease-in-out;
}
.flow-particle:nth-child(2) { animation-delay: 0.7s; background: #005bb5; }
.flow-particle:nth-child(3) { animation-delay: 1.4s; background: #00c853; }
@keyframes flow-move {
    0% { left: 0%; opacity: 0; transform: scale(0.6); }
    15% { opacity: 1; transform: scale(1); }
    85% { opacity: 1; transform: scale(1); }
    100% { left: 95%; opacity: 0; transform: scale(0.6); }
}

/* 9. Analítica Bioquímica Laboratorio */
.anim-lab-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}
.lab-droplet {
    width: 9px;
    height: 9px;
    background: #005bb5;
    border-radius: 50%;
    box-shadow: 0 0 10px #00b0ff;
    animation: lab-float 1.8s infinite ease-in-out;
}
.lab-droplet:nth-child(1) { animation-delay: 0s; background: #005bb5; }
.lab-droplet:nth-child(2) { animation-delay: 0.4s; background: #0088cc; width: 12px; height: 12px; }
.lab-droplet:nth-child(3) { animation-delay: 0.8s; background: #00c853; }
.lab-droplet:nth-child(4) { animation-delay: 1.2s; background: #00b0ff; width: 11px; height: 11px; }
@keyframes lab-float {
    0%, 100% { transform: translateY(8px); opacity: 0.35; }
    50% { transform: translateY(-8px); opacity: 1; }
}

/* 10. Medidor DEXA Densitometría Ósea */
.anim-dexa-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 1.5rem;
}
.dexa-scale-track {
    flex: 1;
    height: 10px;
    background: rgba(10, 58, 117, 0.1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.dexa-level-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 75%;
    background: linear-gradient(90deg, #005bb5, #00c853);
    border-radius: 6px;
    animation: dexa-calibrate 2.5s infinite ease-in-out;
}
.dexa-score-tag {
    font-size: 0.8rem;
    font-weight: 800;
    color: #005bb5;
    letter-spacing: 0.02em;
}
@keyframes dexa-calibrate {
    0%, 100% { width: 68%; }
    50% { width: 88%; }
}

/* 11. Medicina Alternativa Zen Armonía */
.anim-zen-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.zen-pulse-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 200, 83, 0.18);
    border: 2px solid rgba(0, 200, 83, 0.6);
    animation: zen-breathe 3s infinite ease-in-out;
}
@keyframes zen-breathe {
    0%, 100% { transform: scale(0.8); opacity: 0.45; }
    50% { transform: scale(1.4); opacity: 1; border-color: #00c853; box-shadow: 0 0 16px rgba(0, 200, 83, 0.5); }
}

/* 12. Consultas Médicas Pulse */
.anim-consult-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 1.5rem;
}
.consult-line {
    flex: 1;
    height: 2.5px;
    background: rgba(0, 102, 204, 0.25);
    position: relative;
}
.consult-pulse-node {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #005bb5;
    animation: consult-node-glow 2s infinite ease-in-out;
}
.consult-pulse-node.n1 { animation-delay: 0s; }
.consult-pulse-node.n2 { animation-delay: 0.5s; background: #0088cc; }
.consult-pulse-node.n3 { animation-delay: 1s; background: #00c853; }
@keyframes consult-node-glow {
    0%, 100% { transform: scale(0.85); box-shadow: none; opacity: 0.5; }
    50% { transform: scale(1.3); box-shadow: 0 0 10px currentColor; opacity: 1; }
}

/* Media Queries Responsivas Adaptadas */
@media (max-width: 1024px) {
    .portfolio-swiper {
        width: 420px !important;
        height: 640px !important;
    }
    .swiper-button-prev {
        left: calc(50% - 280px) !important;
    }
    .swiper-button-next {
        right: calc(50% - 280px) !important;
    }
    .service-title {
        font-size: 1.45rem !important;
    }
    .curiosity-title {
        font-size: 1.08rem;
    }
    .curiosity-text {
        font-size: 0.88rem;
    }
}

@media (max-width: 768px) {
    .portfolio-swiper {
        width: 350px !important;
        height: 600px !important;
    }
    .service-card {
        border-radius: 20px !important;
    }
    .card-content {
        padding: 1.5rem 1.4rem !important;
    }
    .service-curiosity-card {
        min-height: 260px;
        padding: 1rem 1.1rem 0.85rem;
    }
    .service-title {
        font-size: 1.35rem !important;
    }
    .service-description {
        font-size: 0.9rem !important;
    }
    .curiosity-title {
        font-size: 1rem;
    }
    .curiosity-text {
        font-size: 0.82rem;
    }
    .curiosity-pill {
        font-size: 0.74rem;
        padding: 0.25rem 0.6rem;
    }
    .curiosity-anim-track {
        height: 44px;
    }
    .swiper-button-prev, .swiper-button-next {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .portfolio-swiper {
        width: 300px !important;
        height: 560px !important;
    }
    .card-content {
        padding: 1.25rem 1.1rem !important;
    }
    .service-curiosity-card {
        min-height: 240px;
        padding: 0.85rem 0.95rem 0.75rem;
    }
    .service-title {
        font-size: 1.25rem !important;
    }
    .service-description {
        font-size: 0.84rem !important;
        -webkit-line-clamp: 2 !important;
    }
    .curiosity-title {
        font-size: 0.94rem;
    }
    .curiosity-text {
        font-size: 0.76rem;
        -webkit-line-clamp: 3;
    }
    .curiosity-anim-track {
        height: 38px;
    }
}
