/* Variables locales para el wizard */
:root {
    --wizard-bg: #0a0a0a;
    --wizard-accent: #D4AF37;
    /* Gold */
    --wizard-accent-glow: rgba(212, 175, 55, 0.3);
    --wizard-gold: #D4AF37;
    --wizard-text: #ffffff;
    --wizard-text-muted: rgba(255, 255, 255, 0.6);
    --wizard-card-bg: rgba(20, 20, 20, 0.8);
    --wizard-card-border: rgba(212, 175, 55, 0.2);
    --wizard-radius: 12px;
}

/* Modal Overlay */
.wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Wizard Container */
.wizard-container {
    width: 95%;
    max-width: 900px;
    height: 90vh;
    max-height: 800px;
    background: var(--wizard-bg);
    border: 1px solid var(--wizard-card-border);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-overlay.active .wizard-container {
    transform: scale(1) translateY(0);
}

/* Header */
.wizard-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--wizard-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to right, rgba(212, 175, 55, 0.05), transparent);
}

.wizard-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wizard-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--wizard-accent), #8a6e1e);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.2rem;
    box-shadow: 0 0 15px var(--wizard-accent-glow);
}

.wizard-title h3 {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    color: var(--wizard-gold);
    letter-spacing: 1px;
}

.wizard-title span {
    font-size: 0.7rem;
    color: var(--wizard-text-muted);
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.wizard-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: var(--wizard-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-close:hover {
    background: var(--wizard-accent);
    color: #000;
    border-color: var(--wizard-accent);
    transform: rotate(90deg);
}

/* Progress Bar */
.wizard-progress {
    padding: 2rem 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.step-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--wizard-card-bg);
    border: 1px solid var(--wizard-card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--wizard-text-muted);
    position: relative;
    transition: all 0.4s ease;
    z-index: 2;
    font-family: 'Cinzel', serif;
}

.step-indicator.active {
    background: var(--wizard-accent);
    border-color: var(--wizard-accent);
    color: #000;
    box-shadow: 0 0 15px var(--wizard-accent-glow);
    transform: scale(1.1);
}

.step-indicator.completed {
    background: var(--wizard-accent);
    border-color: var(--wizard-accent);
    color: #000;
}

.step-line {
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
}

.step-line.active {
    background: var(--wizard-accent);
    box-shadow: 0 0 10px var(--wizard-accent-glow);
}

.step-label {
    position: absolute;
    top: 50px;
    font-size: 0.7rem;
    white-space: nowrap;
    color: var(--wizard-text-muted);
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-indicator.active .step-label {
    opacity: 1;
    transform: translateY(0);
    color: var(--wizard-accent);
}

/* Content Area */
.wizard-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem 2rem;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: var(--wizard-accent) transparent;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.wizard-step.active {
    display: block;
}

.step-heading {
    text-align: center;
    margin-bottom: 2.5rem;
}

.step-heading h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--wizard-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding-bottom: 0.2rem;
    /* Prevent descender clipping */
}

.step-heading p {
    color: var(--wizard-text-muted);
    font-weight: 300;
}

/* Step 1: Event Types Grid */
.event-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.event-type-card {
    background: var(--wizard-card-bg);
    border: 1px solid var(--wizard-card-border);
    border-radius: var(--wizard-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.event-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.event-type-card:hover {
    border-color: var(--wizard-accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.event-type-card:hover::before {
    opacity: 1;
}

.event-type-card.selected {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--wizard-accent);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.event-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--wizard-gold);
    transition: transform 0.3s ease;
}

.event-type-card:hover .event-icon {
    transform: scale(1.1);
}

.event-type-card h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.event-type-card p {
    font-size: 0.8rem;
    color: var(--wizard-text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Step 2: Inputs */
.inputs-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.input-group {
    background: var(--wizard-card-bg);
    border: 1px solid var(--wizard-card-border);
    border-radius: var(--wizard-radius);
    padding: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--wizard-gold);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.number-input-row {
    display: flex;
    gap: 1.5rem;
}

.input-wrapper {
    flex: 1;
}

.input-wrapper span {
    display: block;
    font-size: 0.85rem;
    color: var(--wizard-text-muted);
    margin-bottom: 0.5rem;
}

.wizard-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: 'Cinzel', serif;
}

.wizard-input:focus {
    outline: none;
    border-color: var(--wizard-accent);
    box-shadow: 0 0 0 1px var(--wizard-accent);
}

/* Budget Selection */
.budget-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.budget-option {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
}

.budget-option:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.5);
}

.budget-option.selected {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--wizard-accent);
}

.budget-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    color: var(--wizard-text-muted);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.budget-option.selected .budget-icon {
    background: var(--wizard-accent);
    color: #000;
}

.budget-option h5 {
    margin: 0 0 0.2rem;
    font-size: 0.9rem;
    color: #fff;
}

.budget-range {
    display: block;
    font-size: 0.85rem;
    color: var(--wizard-gold);
    margin-bottom: 0.2rem;
    font-weight: 600;
    font-family: 'Cinzel', serif;
}

.budget-option small {
    color: var(--wizard-text-muted);
    font-size: 0.75rem;
}

/* Step 3: Results */
.recommendation-container {
    max-width: 800px;
    margin: 0 auto;
}

.best-match-card {
    background: linear-gradient(145deg, rgba(20, 20, 20, 0.9), rgba(10, 10, 10, 0.95));
    border: 1px solid var(--wizard-accent);
    border-radius: var(--wizard-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.best-match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.15), transparent 60%);
    pointer-events: none;
}

.match-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.match-icon-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--wizard-accent), #8a6e1e);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #000;
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    flex-shrink: 0;
}

.match-info h3 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
    color: var(--wizard-gold);
}

.match-desc {
    color: var(--wizard-text-muted);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.match-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: 'Cinzel', serif;
}

.match-price small {
    font-size: 0.9rem;
    color: var(--wizard-text-muted);
    font-weight: 400;
    font-family: var(--font-body);
}

.match-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-col h4 {
    color: var(--wizard-gold);
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-col p {
    color: var(--wizard-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.alternatives-section h3 {
    text-align: center;
    color: var(--wizard-gold);
    margin-bottom: 0.5rem;
    font-family: 'Cinzel', serif;
}

.alternatives-section>p {
    text-align: center;
    color: var(--wizard-text-muted);
    margin-bottom: 2rem;
}

.alternatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.alt-card {
    background: var(--wizard-card-bg);
    border: 1px solid var(--wizard-card-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.alt-card:hover {
    transform: translateY(-3px);
    background: rgba(212, 175, 55, 0.05);
    border-color: var(--wizard-accent);
}

.alt-rank {
    width: 32px;
    height: 32px;
    background: rgba(212, 175, 55, 0.1);
    color: var(--wizard-gold);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.alt-info h4 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    color: white;
}

.alt-info p {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: var(--wizard-text-muted);
}

.alt-price {
    color: var(--wizard-gold);
    font-weight: 700;
    font-size: 1.1rem;
    font-family: 'Cinzel', serif;
}

/* Footer Actions */
.wizard-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--wizard-card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wizard-bg);
}

.btn-wizard-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--wizard-text);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.btn-wizard-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
}

.btn-wizard-primary {
    background: linear-gradient(135deg, var(--wizard-accent), #8a6e1e);
    border: none;
    color: #000;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.btn-wizard-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    filter: brightness(1.1);
}

.btn-wizard-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: #333;
    color: #666;
    box-shadow: none;
}

/* Capacity Warning */
.capacity-warning {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid rgba(255, 50, 50, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.capacity-warning i {
    color: #ff4444;
    font-size: 1.2rem;
    margin-top: 2px;
}

.capacity-warning p {
    margin: 0;
    font-size: 0.9rem;
    color: #ffcccc;
}

/* Info Block */
.info-block {
    background: rgba(30, 30, 50, 0.6);
    border: 1px solid rgba(100, 100, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease forwards;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    color: #aaddff;
    font-weight: 600;
    font-size: 1.1rem;
}

.info-header i {
    font-size: 1.2rem;
}

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

.info-list li {
    position: relative;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    color: #ccddee;
    font-size: 0.9rem;
    line-height: 1.4;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #aaddff;
}

/* Dynamic Price Update Animation */
@keyframes pricePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: #fff;
    }

    100% {
        transform: scale(1);
    }
}

.price-update {
    animation: pricePulse 0.3s ease;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .wizard-container {
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }

    .wizard-header {
        padding: 1rem;
    }

    .wizard-content {
        padding: 1rem;
    }

    .step-heading h2 {
        font-size: 1.4rem;
    }

    /* Stack budget options vertically on mobile */
    .budget-options {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .event-type-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .number-input-row {
        flex-direction: column;
        gap: 1rem;
    }

    /* Compact Best Match Card */
    .best-match-card {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .match-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }

    .match-icon-large {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }

    .match-info h3 {
        font-size: 1.5rem;
    }

    .match-details-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }

    /* Horizontal Scrollable Alternatives (Carousel) */
    .alternatives-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1rem;
        padding-bottom: 1rem;
        margin: 0 -1rem;
        /* Negative margin to allow full-width scroll */
        padding-left: 1rem;
        /* Restore padding */
        padding-right: 1rem;
        -webkit-overflow-scrolling: touch;
    }

    .alt-card {
        flex: 0 0 85%;
        /* Show 85% of card to encourage scrolling */
        scroll-snap-align: center;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .alt-rank {
        margin-bottom: 0.5rem;
    }

    .alt-info {
        width: 100%;
    }

    /* Wizard Footer */
    .wizard-footer {
        padding: 1rem;
        flex-direction: column-reverse;
        /* Stack buttons, primary on top */
        gap: 1rem;
    }

    .btn-wizard-primary,
    .btn-wizard-secondary {
        width: 100%;
        justify-content: center;
    }
}