/* ═══════════════════════════════════════════════════════
   metodologia2.css — Metodología slider premium
   Namespace: lp-opo-metodo2__*
   Cargado en: /home (index) + /cms/curso (landing de producto)
   ═══════════════════════════════════════════════════════ */

.lp-opo-metodo2 {
    --m2-grad: linear-gradient(135deg, var(--color-secondary-dark) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    --m2-accent: var(--color-primary);
    --m2-dark:   var(--color-bg-dark);
    --m2-interval: 5s;
    padding: 5rem 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Orbes ambientales de fondo */
.lp-opo-metodo2::before,
.lp-opo-metodo2::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.lp-opo-metodo2::before {
    width: 640px; height: 640px;
    background: radial-gradient(circle, rgba(235,86,89,.055) 0%, transparent 68%);
    top: -220px; right: -160px;
}
.lp-opo-metodo2::after {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(15,52,96,.05) 0%, transparent 68%);
    bottom: -120px; left: -120px;
}

.lp-opo-metodo2 .container { position: relative; z-index: 1; }

/* ─── Header ─────────────────────────────────────────── */
.lp-opo-metodo2__label {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(235,86,89,.1);
    color: var(--color-primary);
    border-radius: 50px;
    padding: .3rem .9rem;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: .75rem;
}
.lp-opo-metodo2__heading {
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-bg-dark);
    margin-bottom: .5rem;
}
.lp-opo-metodo2__lead {
    color: var(--color-text-muted);
    font-size: .95rem;
    margin-bottom: 1rem;
}
.lp-opo-metodo2__stat {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: var(--m2-grad);
    color: #fff;
    border-radius: 50px;
    padding: .5rem 1.25rem;
    font-size: .88rem;
    font-weight: 600;
}

/* ─── Nav tabs ───────────────────────────────────────── */
.lp-opo-metodo2__nav {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin: 2.5rem 0 1.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    padding: .25rem .5rem .75rem;
}
.lp-opo-metodo2__nav::-webkit-scrollbar { display: none; }

.lp-opo-metodo2__tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .45rem;
    padding: .7rem .9rem .55rem;
    border: 2px solid var(--color-border);
    background: #fff;
    border-radius: 14px;
    cursor: pointer;
    min-width: 100px;
    text-align: center;
    transition: border-color .25s, box-shadow .25s;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.lp-opo-metodo2__tab:hover:not(.is-active) {
    border-color: rgba(235,86,89,.4);
    box-shadow: 0 2px 14px rgba(235,86,89,.1);
}
.lp-opo-metodo2__tab.is-active {
    border-color: transparent;
    background: var(--m2-grad);
    box-shadow: 0 6px 22px rgba(235,86,89,.28);
}

/* Barra de timer: crece 0→100% en --m2-interval */
.lp-opo-metodo2__tab::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 3px;
    background: rgba(255,255,255,.7);
    border-radius: 0 2px 2px 0;
}
.lp-opo-metodo2__tab.is-active::after {
    animation: m2TimerOpo var(--m2-interval) linear forwards;
}
.lp-opo-metodo2.is-paused .lp-opo-metodo2__tab.is-active::after {
    animation-play-state: paused;
}
@keyframes m2TimerOpo {
    from { width: 0; }
    to   { width: 100%; }
}

.lp-opo-metodo2__tab-num {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--color-border);
    color: var(--color-text-muted);
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, color .25s;
    flex-shrink: 0;
}
.lp-opo-metodo2__tab.is-active .lp-opo-metodo2__tab-num {
    background: rgba(255,255,255,.2);
    color: #fff;
}
.lp-opo-metodo2__tab-text {
    font-size: .71rem;
    color: var(--color-text-muted);
    line-height: 1.2;
}
.lp-opo-metodo2__tab.is-active .lp-opo-metodo2__tab-text {
    color: rgba(255,255,255,.92);
    font-weight: 600;
}

/* ─── Content card ───────────────────────────────────── */
.lp-opo-metodo2__card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 48px rgba(0,0,0,.1);
    position: relative;
}

/* ─── Slides ─────────────────────────────────────────── */
.lp-opo-metodo2__slide { display: none; }
.lp-opo-metodo2__slide.is-active {
    display: flex;
    animation: m2InOpo .42s cubic-bezier(.22,.68,0,1.1) both;
}
@keyframes m2InOpo {
    from { opacity: 0; transform: translateX(30px) scale(.985); }
    to   { opacity: 1; transform: translateX(0)    scale(1); }
}

/* Imagen */
.lp-opo-metodo2__media {
    flex: 0 0 42%;
    max-width: 42%;
    position: relative;
    overflow: hidden;
}
.lp-opo-metodo2__img {
    width: 100%;
    height: 100%;
    min-height: 340px;
    object-fit: cover;
    display: block;
    transition: transform .7s ease;
}
.lp-opo-metodo2__card:hover .lp-opo-metodo2__img {
    transform: scale(1.04);
}
.lp-opo-metodo2__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent 60%, rgba(248,249,250,.7));
    pointer-events: none;
}

/* Cuerpo de texto */
.lp-opo-metodo2__body {
    flex: 1;
    background: var(--color-bg-soft);
    padding: 2.25rem 2.25rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
/* Número decorativo de fondo */
.lp-opo-metodo2__body::before {
    content: attr(data-step);
    position: absolute;
    right: -.1em; bottom: -.15em;
    font-size: 9rem;
    font-weight: 900;
    color: rgba(235,86,89,.06);
    line-height: 1;
    pointer-events: none;
    user-select: none;
    font-family: Georgia, serif;
}

.lp-opo-metodo2__step-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: rgba(235,86,89,.1);
    color: var(--color-primary);
    border-radius: 50px;
    padding: .28rem .82rem;
    font-size: .78rem;
    font-weight: 700;
    margin-bottom: .9rem;
    width: fit-content;
}
.lp-opo-metodo2__slide-title {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--color-bg-dark);
    margin-bottom: 1.1rem;
    line-height: 1.35;
}

/* Checklist */
.lp-opo-metodo2__points {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.lp-opo-metodo2__point {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .875rem;
    color: #4a5464;
    line-height: 1.5;
}
.lp-opo-metodo2__point .bi {
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: .15rem;
    font-size: .95rem;
}

/* ─── Controles ──────────────────────────────────────── */
.lp-opo-metodo2__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
}
.lp-opo-metodo2__btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    line-height: 1;
}
.lp-opo-metodo2__btn:hover:not(:disabled) {
    background: var(--color-primary);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 14px rgba(235,86,89,.35);
}
.lp-opo-metodo2__btn:disabled { opacity: .3; cursor: not-allowed; }
.lp-opo-metodo2__progress {
    font-size: .9rem;
    font-weight: 600;
    color: var(--color-text-muted);
    min-width: 44px;
    text-align: center;
    letter-spacing: .03em;
}

/* Barra de progreso de pasos */
.lp-opo-metodo2__bar-wrap {
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}
.lp-opo-metodo2__bar {
    height: 100%;
    background: var(--m2-grad);
    border-radius: 2px;
    transition: width .42s cubic-bezier(.22,.68,0,1.1);
}

/* ─── CTA final ──────────────────────────────────────── */
.lp-opo-metodo2__cta {
    background: var(--m2-grad);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    margin-top: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.lp-opo-metodo2__cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
@media (min-width: 992px) { .lp-opo-metodo2__cta { padding: 3rem; } }
.lp-opo-metodo2__cta-title {
    font-size: clamp(1.3rem, 2.5vw, 1.75rem);
    color: #fff;
    margin-bottom: .5rem;
    position: relative;
}
.lp-opo-metodo2__cta-text {
    color: rgba(255,255,255,.85);
    font-size: .95rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.lp-opo-metodo2__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--color-bg-dark);
    font-weight: 700;
    padding: .9rem 2.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: none;
    position: relative;
    overflow: hidden;
    transition: background .2s, transform .15s, box-shadow .2s;
    width: 100%;
}
@media (min-width: 576px) { .lp-opo-metodo2__cta-btn { width: auto; } }
.lp-opo-metodo2__cta-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* ─── Mobile (< 768px) ───────────────────────────────── */
@media (max-width: 767px) {
    .lp-opo-metodo2 { padding: 3.5rem 0; }
    .lp-opo-metodo2__tab { min-width: 52px; padding: .55rem .4rem .4rem; }
    .lp-opo-metodo2__tab-text { display: none; }
    .lp-opo-metodo2__slide.is-active { flex-direction: column; }
    .lp-opo-metodo2__media { flex: none; max-width: 100%; }
    .lp-opo-metodo2__img { min-height: 200px; max-height: 230px; }
    .lp-opo-metodo2__media::after {
        background: linear-gradient(to bottom, transparent 65%, rgba(248,249,250,.75));
    }
    .lp-opo-metodo2__body { padding: 1.5rem 1.25rem 1.25rem; }
    .lp-opo-metodo2__body::before { font-size: 5.5rem; }
}

/* Accesibilidad: respetar reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .lp-opo-metodo2__slide.is-active { animation: none; }
    .lp-opo-metodo2__tab::after      { animation: none !important; }
    .lp-opo-metodo2__img             { transition: none; }
}
