/*
 * FILE: assets/css/components/etapas.css
 * PAGE: /etapas — Diagrama interactivo del ciclo anual
 */

/* ── Variables de color por etapa ── */
:root {
    --et-green:   #45A85A;
    --et-blue:    #1758A0;
    --et-magenta: #E94E89;
    --et-yearlong:#B7791F;
}

/* ============================================================
   HERO
   ============================================================ */
.et-hero {
    position: relative;
    background: #021f14;
    color: #fff;
    padding: clamp(5rem, 9vw, 8rem) 0 clamp(4rem, 7vw, 7rem);
    overflow: hidden;
    border-bottom: 1px solid rgba(69,168,90,0.10);
}
.et-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.et-hero__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
}
.et-hero__glow--green   { width: 460px; height: 460px; background: #45A85A; top: -100px; left: -80px; opacity: 0.26; }
.et-hero__glow--blue    { width: 340px; height: 340px; background: #1758A0; top: 40px;   right: 8%;   opacity: 0.18; }
.et-hero__glow--magenta { width: 220px; height: 220px; background: #E94E89; bottom:-40px;right: 28%;  opacity: 0.13; }

.et-hero__inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: center;
}
.et-hero__left { display: flex; flex-direction: column; gap: var(--space-7); }

.et-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 16px;
    border: 1px solid rgba(69,168,90,0.35);
    border-radius: 999px;
    background: rgba(69,168,90,0.07);
    color: #7dce8e;
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.15em; text-transform: uppercase;
    width: fit-content;
}
.et-hero__title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    font-weight: 800; line-height: 1.04;
    letter-spacing: -0.04em; color: #fff; margin: 0;
    display: flex; flex-direction: column; gap: 0.04em;
}
.et-hero__title-accent { color: #45A85A; }
.et-hero__title-place  {
    font-size: 0.52em; font-weight: 600;
    letter-spacing: 0.18em; text-transform: uppercase;
    color: rgba(255,255,255,0.30); margin-top: 0.3em;
}
.et-hero__stats {
    display: flex; align-items: stretch;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.et-hero__stat       { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 0 var(--space-4); }
.et-hero__stat:first-child { padding-left: 0; }
.et-hero__stat-value { font-family: var(--font-display); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.et-hero__stat-value--green { color: #7dce8e; }
.et-hero__stat-value--blue  { color: #7aabdf; }
.et-hero__stat-value--pink  { color: #f09bbf; }
.et-hero__stat-desc  { font-size: 0.68rem; color: rgba(255,255,255,0.35); }
.et-hero__stat-sep   { width: 1px; background: rgba(255,255,255,0.08); align-self: stretch; flex-shrink: 0; }

.et-hero__right {
    display: flex; flex-direction: column; gap: var(--space-6);
    padding-left: var(--space-8);
    border-left: 1px solid rgba(255,255,255,0.07);
}
.et-hero__lead  { font-size: clamp(1rem,1.5vw,1.1rem); line-height: 1.78; color: rgba(255,255,255,0.72); margin: 0; }
.et-hero__body  { font-size: clamp(0.88rem,1.2vw,0.96rem); line-height: 1.82; color: rgba(255,255,255,0.46); margin: 0; }
.et-hero__lead strong,
.et-hero__body strong { color: rgba(255,255,255,0.88); font-weight: 600; }

/* ============================================================
   MAIN
   ============================================================ */
.et-main {
    background: #f6fbf7;
    padding: clamp(5rem, 8vw, 8rem) 0 clamp(4rem, 7vw, 7rem);
}

.et-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    margin-bottom: clamp(4rem, 7vw, 6rem);
}

/* ============================================================
   RUEDA
   ============================================================ */
.et-wheel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 72px;
}

.et-wheel__ring {
    position: relative;
    width: 360px;
    height: 360px;
}

/* Centro */
.et-wheel__center {
    position: absolute;
    inset: 50%;
    transform: translate(-50%,-50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #003824;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 0 0 6px rgba(69,168,90,0.10), 0 0 0 12px rgba(69,168,90,0.05);
}
.et-wheel__center-label {
    font-family: var(--font-display);
    font-size: 0.72rem; font-weight: 800;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: #45A85A;
}
.et-wheel__center-sub {
    font-size: 0.60rem; font-weight: 600;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.08em;
}

/* Nodos */
.et-wheel__node {
    position: absolute;
    top: 50%; left: 50%;
    /* r = 160px */
    transform:
        translate(-50%, -50%)
        rotate(var(--deg))
        translateY(-155px)
        rotate(calc(-1 * var(--deg)));
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-family: var(--font-display);
    font-size: 0.72rem; font-weight: 800;
    transition:
        transform 0.25s cubic-bezier(0.16,1,0.3,1),
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    z-index: 2;
}

.et-wheel__node--green   { background: #e8f5eb; color: #003824; border-color: rgba(69,168,90,0.25); }
.et-wheel__node--blue    { background: #e8eef7; color: #1758A0; border-color: rgba(23,88,160,0.25); }
.et-wheel__node--magenta { background: #fde8f2; color: #b5185a; border-color: rgba(233,78,137,0.25); }
.et-wheel__node--yearlong { background: #fff8e8; color: #7c4a03; border-color: rgba(183,121,31,0.34); }

.et-wheel__node:hover,
.et-wheel__node.is-active {
    transform:
        translate(-50%, -50%)
        rotate(var(--deg))
        translateY(-155px)
        rotate(calc(-1 * var(--deg)))
        scale(1.18);
    box-shadow: 0 6px 20px rgba(0,0,0,0.14);
}

.et-wheel__node--green.is-active   { background: #45A85A; color: #fff; border-color: #45A85A; box-shadow: 0 0 0 4px rgba(69,168,90,0.22), 0 8px 24px rgba(69,168,90,0.30); }
.et-wheel__node--blue.is-active    { background: #1758A0; color: #fff; border-color: #1758A0; box-shadow: 0 0 0 4px rgba(23,88,160,0.22),  0 8px 24px rgba(23,88,160,0.30);  }
.et-wheel__node--magenta.is-active { background: #E94E89; color: #fff; border-color: #E94E89; box-shadow: 0 0 0 4px rgba(233,78,137,0.22), 0 8px 24px rgba(233,78,137,0.30); }
.et-wheel__node--yearlong.is-active { background: var(--et-yearlong); color: #fff; border-color: var(--et-yearlong); box-shadow: 0 0 0 4px rgba(183,121,31,0.22), 0 8px 24px rgba(183,121,31,0.28); }

.et-wheel__node-num { pointer-events: none; }

.et-wheel__node--external {
    width: 48px;
    height: 48px;
    min-height: 0;
    border-radius: 50%;
    padding: 0;
    position: absolute;
    transform: translateX(-50%);
    z-index: 5;
}

.et-wheel__node--external:hover,
.et-wheel__node--external.is-active {
    transform: translateX(-50%) scale(1.04);
}

.et-wheel__node[data-etapa="8"] {
    position: absolute;
    top: 50%;
    left: -48px;
    bottom: auto;
    right: auto;
    z-index: 5;
    transform: translateY(-50%);
}

.et-wheel__node[data-etapa="9"] {
    position: absolute;
    top: 50%;
    right: -48px;
    left: auto;
    bottom: auto;
    z-index: 5;
    transform: translateY(-50%);
}

/* especificidad 0,3,0 > 0,2,0 de --external:hover — evita que translateX(-50%) pise el estado activo */
.et-wheel__node[data-etapa="8"]:hover,
.et-wheel__node[data-etapa="8"].is-active,
.et-wheel__node[data-etapa="9"]:hover,
.et-wheel__node[data-etapa="9"].is-active {
    transform: translateY(-50%) scale(1.04);
}

/* Círculo de fondo de la rueda */
.et-wheel__ring::before {
    content: '';
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    border: 1px dashed rgba(0,56,36,0.12);
}

/* Anillo exterior permanente: etapas 08 y 09 acompanan todo el ciclo anual */
.et-wheel__ring::after {
    content: '';
    position: absolute;
    inset: -28px;
    border-radius: 50%;
    background: rgba(183,121,31,0.34);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
    opacity: 0.88;
    pointer-events: none;
    z-index: 0;
}

.et-wheel__node[data-etapa="8"]::after,
.et-wheel__node[data-etapa="9"]::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0.34;
    pointer-events: none;
}

.et-wheel__node[data-etapa="8"]::after {
    box-shadow: 0 0 18px rgba(183,121,31,0.22);
}

.et-wheel__node[data-etapa="9"]::after {
    box-shadow: 0 0 18px rgba(183,121,31,0.22);
}

/* ============================================================
   PANEL DE DETALLE
   ============================================================ */
.et-detail { position: relative; min-height: 340px; }

.et-panel {
    display: none;
    flex-direction: column;
    gap: var(--space-5);
    animation: etFadeIn 0.30s ease forwards;
}
.et-panel.is-active { display: flex; }

@keyframes etFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.et-panel__top {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.et-panel__icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.et-panel__icon--green   { background: rgba(69,168,90,0.12);  color: #45A85A; }
.et-panel__icon--blue    { background: rgba(23,88,160,0.12);  color: #1758A0; }
.et-panel__icon--magenta { background: rgba(233,78,137,0.10); color: #E94E89; }
.et-panel__icon--yearlong { background: rgba(183,121,31,0.12); color: var(--et-yearlong); }

.et-panel__num {
    display: block;
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(0,56,36,0.42);
    margin-bottom: 2px;
}

.et-panel__meses {
    display: inline-block;
    font-size: 0.75rem; font-weight: 700;
    padding: 3px 10px; border-radius: 999px;
}
.et-panel__meses--green   { background: rgba(69,168,90,0.10);  color: #205F3E; }
.et-panel__meses--blue    { background: rgba(23,88,160,0.10);  color: #1758A0; }
.et-panel__meses--magenta { background: rgba(233,78,137,0.10); color: #b5185a; }
.et-panel__meses--yearlong { background: rgba(183,121,31,0.12); color: #7c4a03; }

.et-panel__title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: #003824;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0;
}

.et-panel__desc {
    font-size: var(--text-base);
    line-height: 1.78;
    color: rgba(0,56,36,0.65);
    margin: 0;
}

.et-panel__actores { display: flex; flex-direction: column; gap: var(--space-2); }

.et-panel__actores-label {
    font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: rgba(0,56,36,0.40);
}

.et-panel__actores-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.et-panel__actor {
    font-size: 0.75rem; font-weight: 600;
    padding: 5px 12px; border-radius: 999px;
}
.et-panel__actor--green   { background: rgba(69,168,90,0.09);  color: #205F3E; }
.et-panel__actor--blue    { background: rgba(23,88,160,0.09);  color: #1758A0; }
.et-panel__actor--magenta { background: rgba(233,78,137,0.09); color: #b5185a; }
.et-panel__actor--yearlong { background: rgba(183,121,31,0.10); color: #7c4a03; }

/* ============================================================
   STEPPER LINEAL — resumen / mobile
   ============================================================ */
.et-stepper {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0;
    position: relative;
}

/* línea conectora */
.et-stepper::before {
    content: '';
    position: absolute;
    top: 22px; left: 5%; right: 5%;
    height: 2px;
    background: linear-gradient(to right, #45A85A 0%, #1758A0 55%, #E94E89 100%);
    opacity: 0.30;
    z-index: 0;
}

.et-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    text-align: center;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.et-step__dot {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 0.70rem; font-weight: 800;
    border: 2px solid transparent;
    transition: transform 0.2s ease;
}
.et-step:hover .et-step__dot { transform: scale(1.12); }

.et-step--green   .et-step__dot { background: #e8f5eb; color: #003824; border-color: rgba(69,168,90,0.35); }
.et-step--blue    .et-step__dot { background: #e8eef7; color: #1758A0; border-color: rgba(23,88,160,0.35); }
.et-step--magenta .et-step__dot { background: #fde8f2; color: #b5185a; border-color: rgba(233,78,137,0.35); }
.et-step--yearlong .et-step__dot { background: #fff8e8; color: #7c4a03; border-color: rgba(183,121,31,0.42); }

.et-step__body {
    display: flex; flex-direction: column; gap: 2px;
}

.et-step__label {
    font-size: 0.62rem; font-weight: 700;
    color: #003824;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.et-step__meses {
    font-size: 0.55rem;
    color: rgba(0,56,36,0.42);
    font-weight: 500;
    overflow-wrap: anywhere;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .et-layout { grid-template-columns: 360px 1fr; }
    .et-wheel__ring { width: 320px; height: 320px; }
    .et-wheel__node {
        transform:
            translate(-50%, -50%)
            rotate(var(--deg))
            translateY(-135px)
            rotate(calc(-1 * var(--deg)));
    }
    .et-wheel__node:hover,
    .et-wheel__node.is-active {
        transform:
            translate(-50%, -50%)
            rotate(var(--deg))
            translateY(-135px)
            rotate(calc(-1 * var(--deg)))
            scale(1.18);
    }
    .et-wheel__ring::before { inset: 18px; }
    .et-wheel__ring::after { inset: -24px; }
    .et-wheel__node--external,
    .et-wheel__node--external:hover,
    .et-wheel__node--external.is-active {
        transform: translateX(-50%);
    }
    .et-wheel__node--external:hover,
    .et-wheel__node--external.is-active {
        transform: translateX(-50%) scale(1.04);
    }
}

@media (max-width: 900px) {
    .et-hero__inner { grid-template-columns: 1fr; gap: var(--space-10); }
    .et-hero__right { padding-left: 0; border-left: none; border-top: 1px solid rgba(255,255,255,0.07); padding-top: var(--space-8); }
    .et-hero__glow--blue, .et-hero__glow--magenta { display: none; }
    .et-layout { grid-template-columns: 1fr; }
    .et-wheel { margin-bottom: var(--space-6); }
    .et-stepper { grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
    .et-stepper::before { display: none; }
}

@media (max-width: 560px) {
    .et-stepper { grid-template-columns: repeat(3, 1fr); }
    .et-hero__stats { flex-direction: column; gap: var(--space-4); }
    .et-hero__stat  { padding: 0; }
    .et-hero__stat-sep { display: none; }
    .et-wheel__ring { width: 280px; height: 280px; }
    .et-wheel__node {
        transform:
            translate(-50%, -50%)
            rotate(var(--deg))
            translateY(-115px)
            rotate(calc(-1 * var(--deg)));
        width: 38px; height: 38px; font-size: 0.65rem;
    }
    .et-wheel__node:hover,
    .et-wheel__node.is-active {
        transform:
            translate(-50%, -50%)
            rotate(var(--deg))
            translateY(-115px)
            rotate(calc(-1 * var(--deg)))
            scale(1.18);
    }
    .et-wheel__ring::after { inset: -18px; }
    .et-wheel__node--external {
        width: 42px;
        height: 42px;
        min-height: 0;
        padding: 0;
        transform: translateX(-50%);
    }
    .et-wheel__node--external:hover,
    .et-wheel__node--external.is-active {
        transform: translateX(-50%) scale(1.03);
    }
    .et-wheel__node[data-etapa="8"]::after,
    .et-wheel__node[data-etapa="9"]::after {
        inset: -6px;
    }
}
