.eg-main {
    --eg-primary: #2d6a4f;
    --eg-primary-dark: #1b4332;
    --eg-primary-soft: #d8f3dc;
    --eg-accent: #40916c;
    --eg-text: #212529;
    --eg-muted: #6c757d;
    --eg-radius: 18px;
    --eg-shadow: 0 20px 60px rgba(27, 67, 50, 0.18);
}

.eg-hero {
    background: linear-gradient(135deg, var(--eg-primary-dark) 0%, var(--eg-primary) 55%, var(--eg-accent) 100%);
    color: #fff;
    padding: 2rem 1rem 4.25rem;
    position: relative;
    overflow: hidden;
}

.eg-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -60% -10%;
    height: 80%;
    background: radial-gradient(closest-side, rgba(216, 243, 220, 0.18), transparent);
    pointer-events: none;
}

.eg-hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 0.7rem;
}

.eg-hero-title {
    font-weight: 800;
    font-size: clamp(1.55rem, 3.8vw, 2.3rem);
    line-height: 1.15;
    margin-bottom: 0.55rem;
}

.eg-hero-sub {
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.eg-hero-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 1.6rem;
}

.eg-hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.95);
}

.eg-wizard-section {
    margin-top: -2.5rem;
    padding-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.eg-wizard-card {
    background: #fff;
    border-radius: var(--eg-radius);
    box-shadow: var(--eg-shadow);
    padding: 1.4rem 1.5rem 1.75rem;
    max-width: 860px;
    margin: 0 auto;
}

.eg-stepper {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.eg-stepper li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--eg-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.25s ease;
}

.eg-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #eef2f0;
    color: var(--eg-muted);
    font-size: 0.85rem;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.eg-stepper li.active {
    color: var(--eg-primary);
}

.eg-stepper li.active .eg-step-dot {
    background: var(--eg-primary);
    color: #fff;
    box-shadow: 0 0 0 5px var(--eg-primary-soft);
}

.eg-stepper li.done {
    color: var(--eg-accent);
}

.eg-stepper li.done .eg-step-dot {
    background: var(--eg-accent);
    color: #fff;
}

.eg-progress {
    height: 6px;
    border-radius: 999px;
    background: #eef2f0;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.eg-progress-bar {
    height: 100%;
    width: 20%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--eg-primary), var(--eg-accent));
    transition: width 0.35s ease;
}

.eg-step {
    animation: eg-fade-in 0.3s ease;
}

.eg-step[hidden] {
    display: none;
}

@keyframes eg-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.eg-step-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--eg-text);
    margin-bottom: 0.35rem;
}

.eg-step-sub {
    color: var(--eg-muted);
    margin-bottom: 1.5rem;
}

.eg-optional-tag {
    display: inline-block;
    background: var(--eg-primary-soft);
    color: var(--eg-primary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    vertical-align: middle;
}

.eg-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.eg-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    background: #fff;
    border: 2px solid #e7ece9;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.eg-card:hover {
    border-color: var(--eg-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(64, 145, 108, 0.16);
}

.eg-card.seleccionada {
    border-color: var(--eg-primary);
    background: #f6fbf7;
    box-shadow: 0 10px 24px rgba(45, 106, 79, 0.18);
}

.eg-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: var(--eg-primary-soft);
    color: var(--eg-primary);
    font-size: 1.25rem;
    margin-bottom: 0.35rem;
}

.eg-card-cantidad .eg-card-icon {
    font-size: 1.05rem;
    font-weight: 800;
}

.eg-card-title {
    font-weight: 700;
    color: var(--eg-text);
    font-size: 1.02rem;
}

.eg-card-desc {
    color: var(--eg-muted);
    font-size: 0.9rem;
}

.eg-plan-feedback {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: linear-gradient(135deg, #f6fbf7, var(--eg-primary-soft));
    border: 1px solid #b7e4c7;
    border-radius: 14px;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    animation: eg-pop 0.35s ease;
}

.eg-plan-feedback[hidden] {
    display: none;
}

.eg-plan-feedback strong {
    display: block;
    color: var(--eg-primary-dark);
    font-size: 1rem;
}

.eg-plan-feedback span {
    color: #40634f;
    font-size: 0.92rem;
}

.eg-plan-check {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--eg-primary);
    color: #fff;
    font-size: 1.2rem;
}

@keyframes eg-pop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.eg-free-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--eg-primary-soft);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    color: var(--eg-primary-dark);
    margin-bottom: 1.5rem;
}

.eg-free-banner i {
    font-size: 1.5rem;
}

.eg-free-banner strong {
    display: block;
}

.eg-free-banner span {
    font-size: 0.92rem;
}

.eg-nav {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.eg-nav.eg-nav-flotante {
    position: fixed;
    bottom: 0.9rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(860px, calc(100vw - 2rem));
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #e7ece9;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(27, 67, 50, 0.22);
    padding: 0.8rem 1.25rem;
    z-index: 1030;
}

.eg-nav-center {
    justify-content: center;
}

.eg-btn-primary {
    background: var(--eg-primary);
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 0.7rem 1.6rem;
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.15s ease;
}

.eg-btn-primary:hover:not(:disabled) {
    background: var(--eg-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.eg-btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.eg-btn-outline {
    border: 2px solid var(--eg-primary);
    color: var(--eg-primary);
    font-weight: 700;
    padding: 0.65rem 1.4rem;
    border-radius: 12px;
    background: transparent;
}

.eg-btn-outline:hover:not(:disabled) {
    background: var(--eg-primary-soft);
}

.eg-btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.eg-btn-ghost {
    color: var(--eg-muted);
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
}

.eg-btn-ghost:hover {
    color: var(--eg-primary-dark);
    background: #f3f6f4;
}

.eg-btn-final {
    min-width: 230px;
}

.eg-otp-icon,
.eg-exito-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: var(--eg-primary-soft);
    color: var(--eg-primary);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.eg-exito-icon {
    background: var(--eg-primary);
    color: #fff;
    width: 4.25rem;
    height: 4.25rem;
    font-size: 2rem;
    animation: eg-pop 0.4s ease;
}

.eg-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.eg-otp-inputs input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--eg-text);
    border: 2px solid #e7ece9;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.eg-otp-inputs input:focus {
    outline: none;
    border-color: var(--eg-primary);
    box-shadow: 0 0 0 4px var(--eg-primary-soft);
}

.eg-otp-timer {
    text-align: center;
    color: var(--eg-muted);
    font-size: 0.9rem;
    min-height: 1.4em;
    margin-bottom: 1rem;
}

.eg-step[data-segmento="profesor"] .eg-step-sub,
.eg-step[data-segmento="complejo"] .eg-step-sub {
    margin-bottom: 1.25rem;
}

.eg-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

.eg-reaseguro {
    color: var(--eg-muted);
    font-size: 0.88rem;
    margin-top: 1.25rem;
}

.form-label {
    font-weight: 600;
    color: var(--eg-text);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--eg-accent);
    box-shadow: 0 0 0 4px var(--eg-primary-soft);
}

@media (max-width: 575.98px) {
    .eg-hero {
        padding: 1.5rem 1rem 3.5rem;
    }

    .eg-wizard-card {
        padding: 1.15rem 1rem 1.4rem;
    }

    .eg-step-label {
        display: none;
    }

    .eg-stepper {
        justify-content: space-around;
    }

    .eg-cards {
        grid-template-columns: 1fr;
    }

    .eg-nav {
        flex-direction: column-reverse;
    }

    .eg-nav .btn {
        width: 100%;
    }

    .eg-otp-inputs input {
        width: 2.6rem;
        height: 3.1rem;
        font-size: 1.2rem;
    }
}

@media (max-width: 360px) {
    .eg-otp-inputs {
        gap: 0.4rem;
    }

    .eg-otp-inputs input {
        width: 2.2rem;
        height: 2.9rem;
        font-size: 1.05rem;
    }

    .eg-btn-final {
        min-width: 0;
    }
}
