/* ===== SURGICAL METHODOLOGY — v2 moderno, oscuro, con profundidad ===== */
.surgical-methodology {
    position: relative;
    background: radial-gradient(ellipse 120% 80% at 50% -10%, #16305f 0%, #0a1830 45%, #050b1a 100%);
    color: #cbd5e1;
    padding: 140px 0;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    isolation: isolate;
}

/* ── FONDO: blobs animados + grid técnico + grano ── */
.m-bg-fx {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.m-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    will-change: transform;
}

.m-blob--1 {
    width: 520px;
    height: 520px;
    top: -180px;
    left: -120px;
    background: radial-gradient(circle, #2d4f95 0%, transparent 70%);
    animation: mFloat1 22s ease-in-out infinite;
}

.m-blob--2 {
    width: 460px;
    height: 460px;
    bottom: -160px;
    right: -100px;
    background: radial-gradient(circle, #b4935a 0%, transparent 70%);
    animation: mFloat2 26s ease-in-out infinite;
}

.m-blob--3 {
    width: 380px;
    height: 380px;
    top: 35%;
    left: 55%;
    background: radial-gradient(circle, #d93d56 0%, transparent 70%);
    opacity: 0.18;
    animation: mFloat3 30s ease-in-out infinite;
}

@keyframes mFloat1 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(60px, 40px) scale(1.1);
    }
}

@keyframes mFloat2 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-50px, -30px) scale(1.08);
    }
}

@keyframes mFloat3 {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-40px, 50px) scale(0.9);
    }
}

.m-grid-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
}

.surgical-methodology::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
}

.m-container {
    position: relative;
    z-index: 2;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ── ENCABEZADO ── */
.m-header {
    max-width: 800px;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.m-header.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.m-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d9b876;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 4px;
    font-weight: 700;
    margin-bottom: 22px;
    text-transform: uppercase;
}

.m-subtitle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d01341;
    box-shadow: 0 0 0 4px rgba(208, 19, 65, 0.2);
    animation: mPulse 2.4s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes mPulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(208, 19, 65, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(208, 19, 65, 0.06);
    }
}

.m-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 4.5vw, 54px);
    line-height: 1.15;
    font-weight: 400;
    margin-bottom: 26px;
    color: #ffffff;
    letter-spacing: -0.03em;
}

.m-divider {
    width: 64px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    margin-bottom: 32px;
    border-radius: 2px;
    overflow: hidden;
}

.m-divider span {
    display: block;
    height: 100%;
    width: 0%;
    background: #d01341;
    transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.m-header.is-visible .m-divider span {
    width: 100%;
}

.m-intro {
    font-size: 16px;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

.m-intro strong {
    color: #e2e8f0;
    font-weight: 600;
}

/* ── GRID DE TARJETAS ── */
.m-method-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.m-method-card {
    position: relative;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);

    opacity: 0;
    transform: translateY(40px) rotateX(6deg);
    transition:
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--m-delay, 0ms),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--m-delay, 0ms),
        border-color 0.4s ease,
        box-shadow 0.4s ease;

    transform-style: preserve-3d;
    will-change: transform;
}

.m-method-card.is-visible {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
}

.m-method-card:hover {
    border-color: rgba(217, 184, 118, 0.35);
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75);
}

/* número gigante de fondo, decorativo */
.m-card-index {
    position: absolute;
    top: -18px;
    right: 4px;
    font-family: 'Playfair Display', serif;
    font-size: 120px;
    font-weight: 700;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 0;
    user-select: none;
    transition: -webkit-text-stroke-color 0.4s ease;
}

.m-method-card:hover .m-card-index {
    -webkit-text-stroke-color: rgba(217, 184, 118, 0.25);
}

/* spotlight que sigue el cursor, vía JS con --mx / --my */
.m-card-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(217, 184, 118, 0.14), transparent 65%);
}

.m-method-card:hover .m-card-glow {
    opacity: 1;
}

.m-card-inner {
    position: relative;
    z-index: 2;
    padding: 44px 34px;
}

.m-card-top {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
}

.m-icon-box {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d9b876;
    transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.m-method-card:hover .m-icon-box {
    background: linear-gradient(135deg, #d01341, #d01341);
    border-color: transparent;
    color: #fff;
    transform: rotate(-6deg) scale(1.08);
    box-shadow: 0 10px 24px rgba(208, 19, 65, 0.35);
}

.m-icon-box svg {
    width: 22px;
    height: 22px;
}

.m-number {
    display: block;
    font-family: monospace;
    font-size: 10px;
    letter-spacing: 1.8px;
    color: #d9b876;
    font-weight: 600;
    margin-bottom: 6px;
}

.m-number em {
    font-style: normal;
    color: rgba(217, 184, 118, 0.5);
}

.m-card-meta h3 {
    font-family: 'Playfair Display', serif;
    font-size: 23px;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.m-card-content p {
    font-size: 14.5px;
    line-height: 1.65;
    color: #afb8c4;
    margin-bottom: 24px;
    text-align: justify;
}

.m-card-content strong {
    color: #edeff3;
    font-weight: 600;
}

.m-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.m-list li {
    font-size: 13.5px;
    color: #a9b0bc;
    margin-bottom: 13px;
    padding-left: 20px;
    position: relative;
    line-height: 1.55;
}

.m-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 1px;
    background: #d9b876;
    transition: width 0.3s ease;
}

.m-method-card:hover .m-list li::before {
    width: 12px;
}

.m-carousel-dots {
    display: none;
}

/* ===== RESPONSIVE — TABLET / MÓVIL ===== */
@media (max-width: 1024px) {
    .surgical-methodology {
        padding: 100px 0;
    }

    .m-header {
        margin-bottom: 48px;
        padding-inline: 20px;
    }

    .m-method-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 16px;
        margin-inline: -24px;
        padding-inline: 24px;
        padding-bottom: 24px;
    }

    .m-method-grid::-webkit-scrollbar {
        display: none;
    }

    .m-method-grid {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .m-method-card {
        flex: 0 0 82%;
        scroll-snap-align: center;
        transform: none;
    }

    .m-method-card.is-visible {
        transform: none;
    }

    .m-card-inner {
        padding: 36px 28px;
    }

    .m-carousel-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        margin-top: 20px;
    }

    .m-dot {
        width: 6px;
        height: 6px;
        background: rgba(255, 255, 255, 0.18);
        border-radius: 50%;
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .m-dot.active {
        width: 20px;
        background: linear-gradient(90deg, #d01341, #d93d56);
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .m-container {
        padding: 0 16px;
    }

    .m-method-grid {
        margin-inline: -16px;
        padding-inline: 16px;
    }

    .m-method-card {
        flex: 0 0 88%;
    }

    .m-card-index {
        font-size: 90px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .m-blob,
    .m-subtitle-dot {
        animation: none;
    }

    .m-header,
    .m-method-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .m-divider span {
        width: 100%;
        transition: none;
    }
}