/* Trail por los Viñedos - 2da Edición - Estilos */
:root {
    --tv-green: #2d5016;
    --tv-green-light: #4a7c2e;
    --tv-burgundy: #6b2d5b;
    --tv-container-max: 900px;
    --tv-burgundy-dark: #4a1942;
    --tv-gold: #c9a84c;
    --tv-gold-light: #e8d494;
    --tv-dark: #0a0a0a;
    --tv-dark2: #141414;
    --tv-dark3: #1e1e1e;
    --tv-text: #f0f0f0;
    --tv-text2: #b0b0b0;
    --tv-border: #2a2a2a;
    --tv-radius: 12px;
    --tv-transition: 0.3s cubic-bezier(0.4,0,0.2,1);
}

/* === RESET EVENT PAGE === */
.tv-page { background: var(--tv-dark); color: var(--tv-text); min-height: 100vh; }
.tv-page main { max-width: 100%; overflow-x: hidden; }
.tv-page main header, .tv-page article header, .tv-page section header {
    position: static !important; top: auto !important; width: auto !important;
    height: auto !important; min-height: 0 !important; max-height: none !important;
    background: transparent !important; border: none !important; z-index: 1 !important;
    padding: 0 !important;
}
.tv-container { max-width: var(--tv-container-max); margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

/* === HERO === */
.tv-hero {
    position: relative; min-height: 90vh; display: flex; align-items: center;
    justify-content: center; text-align: center; overflow: hidden;
    background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.7) 60%, var(--tv-dark) 100%),
                url('img/fondorovere.jpg') center/cover no-repeat;
}
.tv-hero::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 80%, rgba(45,80,22,0.2), transparent 70%);
    animation: tvPulse 5s ease-in-out infinite; z-index: 1;
}
@keyframes tvPulse { 0%,100%{opacity:.4;transform:scale(1)} 50%{opacity:.7;transform:scale(1.05)} }

.tv-hero-content { position: relative; z-index: 2; padding: 20px; }
.tv-hero-logo {
    max-width: 280px; width: 90%; height: auto; margin-bottom: 20px;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.6));
    animation: tvLogoIn 1.2s ease-out forwards, tvFloat 5s ease-in-out infinite 1.2s;
    opacity: 0; pointer-events: auto;
}
@keyframes tvLogoIn { from{opacity:0;transform:scale(.85) translateY(30px)} to{opacity:1;transform:scale(1) translateY(0)} }
@keyframes tvFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }

.tv-hero-date {
    font-family: var(--font-heading, 'Montserrat', sans-serif); font-size: 1.3rem;
    color: var(--tv-gold); letter-spacing: 3px; text-transform: uppercase;
    margin-bottom: 8px; opacity: 0; animation: tvFadeUp .8s ease-out .4s forwards;
}
.tv-hero-subtitle {
    font-size: 1rem; color: var(--tv-text2); margin-bottom: 20px;
    opacity: 0; animation: tvFadeUp .8s ease-out .6s forwards;
}
.tv-hero-distances { display: flex; gap: 12px; justify-content: center; margin-bottom: 30px; opacity:0; animation: tvFadeUp .8s ease-out .8s forwards; }
.tv-dist-chip {
    background: rgba(201,168,76,0.15); border: 1px solid var(--tv-gold);
    color: var(--tv-gold); padding: 8px 24px; border-radius: 50px;
    font-weight: 800; font-size: 1.1rem; letter-spacing: 1px;
}
.tv-hero-cta { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; opacity:0; animation: tvFadeUp .8s ease-out 1s forwards; }
@keyframes tvFadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* === BUTTONS === */
.tv-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px;
    border-radius: 50px; font-weight: 700; font-size: 1rem; border: none;
    cursor: pointer; transition: var(--tv-transition); text-decoration: none;
    font-family: var(--font-body, 'Inter', sans-serif);
}
.tv-btn-primary {
    background: linear-gradient(135deg, var(--tv-green), var(--tv-green-light));
    color: #fff; box-shadow: 0 4px 20px rgba(45,80,22,0.4);
}
.tv-btn-primary:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 8px 30px rgba(45,80,22,0.5); }
.tv-btn-secondary {
    background: transparent; border: 2px solid var(--tv-gold); color: var(--tv-gold);
}
.tv-btn-secondary:hover { background: rgba(201,168,76,0.1); transform: translateY(-2px); }

/* === SECTIONS === */
.tv-section { padding: 40px 0; }
.tv-section-title {
    text-align: center; margin-bottom: 40px;
}
.tv-section-title h2 {
    font-size: 1.8rem; margin: 0 0 10px;
    background: linear-gradient(90deg, var(--tv-gold), var(--tv-gold-light));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.tv-line { width: 60px; height: 3px; background: var(--tv-gold); margin: 0 auto; border-radius: 2px; }

/* === INFO GRID === */
.tv-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tv-info-card {
    background: var(--tv-dark2); border: 1px solid var(--tv-border); border-radius: var(--tv-radius);
    padding: 25px; text-align: center; transition: var(--tv-transition);
}
.tv-info-card:hover { border-color: var(--tv-gold); transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.tv-info-card .tv-icon { font-size: 2rem; margin-bottom: 10px; }
.tv-info-card h3 { font-size: 1rem; color: var(--tv-gold); margin: 0 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.tv-info-card p { margin: 4px 0; font-size: 0.9rem; color: var(--tv-text2); }
.tv-info-card .tv-sub { font-size: 0.8rem; color: var(--tv-text2); margin-top: 5px; }

/* === COSTS === */
.tv-costs-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 700px; margin: 0 auto; }
.tv-cost-card {
    background: linear-gradient(135deg, var(--tv-dark2), var(--tv-dark3));
    border: 1px solid var(--tv-border); border-radius: var(--tv-radius);
    padding: 25px; text-align: center; transition: var(--tv-transition);
}
.tv-cost-card:hover { border-color: var(--tv-burgundy); }
.tv-cost-card .type { font-size: .75rem; color: var(--tv-text2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.tv-cost-card .dist { font-size: 1.4rem; font-weight: 800; color: var(--tv-gold); }
.tv-cost-card .price { font-size: 1.8rem; font-weight: 900; color: #fff; margin-top: 5px; }
.tv-cost-note { text-align: center; margin-top: 20px; font-size: .85rem; color: var(--tv-text2); }
.tv-cost-note strong { color: var(--tv-gold); }

/* === BENEFITS === */
.tv-benefits-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tv-benefit { display: flex; align-items: center; gap: 12px; background: var(--tv-dark2); border: 1px solid var(--tv-border); border-radius: 8px; padding: 15px; }
.tv-benefit .icon { font-size: 1.5rem; flex-shrink: 0; }
.tv-benefit p { margin: 0; font-size: .9rem; }

/* === PRIZES === */
.tv-prizes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); gap: 25px; }
.tv-prize-block { background: var(--tv-dark2); border: 1px solid var(--tv-border); border-radius: var(--tv-radius); overflow: hidden; }
.tv-prize-header {
    background: linear-gradient(135deg, var(--tv-burgundy-dark), var(--tv-burgundy));
    padding: 15px 20px; font-weight: 700; font-size: 1.1rem; color: #fff;
}
.tv-prize-body { padding: 20px; }
.tv-prize-body h4 { color: var(--tv-gold); margin: 15px 0 8px; font-size: .9rem; text-transform: uppercase; }
.tv-prize-body h4:first-child { margin-top: 0; }
.tv-prize-body ul { margin: 0; padding-left: 20px; }
.tv-prize-body li { color: var(--tv-text2); font-size: .85rem; margin: 4px 0; list-style: disc; }

/* === MAP === */
.tv-map-wrap { border-radius: var(--tv-radius); overflow: hidden; border: 1px solid var(--tv-border); height: 350px; }
.tv-map-wrap iframe { width: 100%; height: 100%; border: 0; }
.tv-map-link {
    display: inline-block; margin-top: 12px; color: var(--tv-gold); font-size: .9rem;
    transition: var(--tv-transition);
}
.tv-map-link:hover { color: var(--tv-gold-light); transform: translateX(3px); }

/* === SPONSORS === */
.tv-sponsors { text-align: center; padding: 10px 0; }
.tv-sponsors-row { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.tv-sponsors-row img { max-height: 160px; width: auto; opacity: .9; transition: var(--tv-transition); pointer-events: auto; }
.tv-sponsors-row img:hover { opacity: 1; transform: scale(1.05); }

/* === AVM TRANSPORT === */
.tv-avm { text-align: center; padding: 10px 0; }
.tv-avm img { max-width: 320px; width: 90%; height: auto; pointer-events: auto; border-radius: 10px; }

/* === CONTACT === */
.tv-contact { text-align: center; padding: 30px 0; }
.tv-contact h3 { color: var(--tv-gold); margin-bottom: 15px; font-size: 1.1rem; }
.tv-contact-person { margin: 12px 0; }
.tv-contact-person .name { font-weight: 700; font-size: 1rem; color: #fff; display: block; margin-bottom: 4px; }
.tv-wa-link {
    display: inline-flex; align-items: center; gap: 6px; background: #25D366;
    color: #fff; padding: 8px 18px; border-radius: 50px; font-weight: 600;
    font-size: .85rem; transition: var(--tv-transition); text-decoration: none;
}
.tv-wa-link:hover { background: #20bd5a; transform: translateY(-2px); }

/* === CTA FINAL === */
.tv-cta-final {
    text-align: center; padding: 40px 20px;
    background: linear-gradient(135deg, var(--tv-burgundy-dark), var(--tv-dark));
    border-top: 1px solid var(--tv-border);
}
.tv-cta-final h2 { font-size: 1.6rem; margin: 0 0 10px; color: #fff; }
.tv-cta-final p { color: var(--tv-text2); margin-bottom: 25px; }

/* === FOOTER === */
.tv-footer { text-align: center; padding: 30px 20px; font-size: .82rem; color: #666; border-top: 1px solid var(--tv-border); }
.tv-footer a { color: var(--accent-green, #00D664); }

/* === MODAL === */
.tv-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.8);
    z-index: 50000; align-items: center; justify-content: center; padding: 20px;
    backdrop-filter: blur(4px);
}
.tv-modal-overlay.active { display: flex; }
.tv-modal {
    background: var(--tv-dark2); border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius); width: 100%; max-width: 700px;
    max-height: 90vh; overflow-y: auto; position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.tv-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 25px; border-bottom: 1px solid var(--tv-border);
    background: linear-gradient(135deg, var(--tv-burgundy-dark), var(--tv-dark2));
    position: sticky; top: 0; z-index: 10;
}
.tv-modal-header h3 { margin: 0; font-size: 1.1rem; color: #fff; }
.tv-modal-close {
    background: none; border: none; color: #fff; font-size: 1.8rem;
    cursor: pointer; width: 36px; height: 36px; display: flex;
    align-items: center; justify-content: center; border-radius: 50%;
    transition: var(--tv-transition);
}
.tv-modal-close:hover { background: rgba(255,255,255,0.1); }
.tv-modal-body { padding: 25px; }
.tv-modal-footer {
    display: flex; justify-content: flex-end; gap: 10px; padding: 15px 25px;
    border-top: 1px solid var(--tv-border); position: sticky; bottom: 0;
    background: var(--tv-dark2);
}

/* === FORM === */
.tv-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.tv-form-group { margin-bottom: 15px; }
.tv-form-group label { display: block; font-size: .85rem; color: var(--tv-text2); margin-bottom: 5px; font-weight: 600; }
.tv-form-group .required { color: #ff4444; }
.tv-form-group input, .tv-form-group select {
    width: 100%; padding: 10px 14px; background: var(--tv-dark); border: 1px solid var(--tv-border);
    border-radius: 8px; color: #fff; font-size: .9rem; font-family: inherit;
    transition: var(--tv-transition); box-sizing: border-box;
    -webkit-user-select: auto; user-select: auto;
}
.tv-form-group input:focus, .tv-form-group select:focus { border-color: var(--tv-gold); outline: none; box-shadow: 0 0 0 2px rgba(201,168,76,0.2); }
.tv-form-group input::placeholder { color: #555; }
.tv-form-group select option { background: var(--tv-dark); color: #fff; }

/* Type selector */
.tv-type-selector { display: flex; gap: 10px; margin-bottom: 20px; }
.tv-type-btn {
    flex: 1; padding: 14px; text-align: center; border: 2px solid var(--tv-border);
    border-radius: 10px; cursor: pointer; transition: var(--tv-transition);
    background: var(--tv-dark); color: var(--tv-text2); font-weight: 700;
}
.tv-type-btn.active { border-color: var(--tv-gold); color: var(--tv-gold); background: rgba(201,168,76,0.08); }
.tv-type-btn:hover { border-color: var(--tv-gold); }

/* Price display */
.tv-price-display {
    background: linear-gradient(135deg, var(--tv-burgundy-dark), var(--tv-dark2));
    border: 1px solid var(--tv-burgundy); border-radius: 10px;
    padding: 15px; text-align: center; margin: 15px 0;
}
.tv-price-display .label { font-size: .8rem; color: var(--tv-text2); text-transform: uppercase; }
.tv-price-display .amount { font-size: 1.8rem; font-weight: 900; color: var(--tv-gold); }

/* Group stepper */
.tv-group-nav {
    display: flex; gap: 8px; flex-wrap: wrap; margin: 15px 0;
    padding: 10px; background: var(--tv-dark); border-radius: 8px;
}
.tv-group-tab {
    padding: 6px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600;
    cursor: pointer; border: 1px solid var(--tv-border); background: transparent;
    color: var(--tv-text2); transition: var(--tv-transition);
}
.tv-group-tab.active { background: var(--tv-gold); color: #000; border-color: var(--tv-gold); }
.tv-group-tab.completed { background: var(--tv-green); color: #fff; border-color: var(--tv-green); }
.tv-group-warning {
    background: rgba(255,204,0,0.1); border: 1px solid rgba(255,204,0,0.3);
    border-radius: 8px; padding: 12px; margin: 10px 0; font-size: .85rem; color: #ffcc00;
}

/* Comprobante search */
.tv-search-bar {
    display: flex; gap: 0; margin-bottom: 20px;
}
.tv-search-bar input {
    flex: 1; padding: 12px 16px; background: var(--tv-dark); border: 1px solid var(--tv-border);
    border-radius: 8px 0 0 8px; color: #fff; font-size: .95rem;
    -webkit-user-select: auto; user-select: auto;
}
.tv-search-bar button {
    padding: 12px 20px; background: var(--tv-gold); border: none;
    border-radius: 0 8px 8px 0; cursor: pointer; font-size: 1.1rem;
    transition: var(--tv-transition); color: #000;
}
.tv-search-bar button:hover { background: var(--tv-gold-light); }

/* Data preview */
.tv-data-preview { background: var(--tv-dark); border-radius: 8px; padding: 15px; margin: 15px 0; }
.tv-data-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--tv-border); font-size: .85rem; }
.tv-data-row:last-child { border-bottom: none; }
.tv-data-row .label { color: var(--tv-text2); }
.tv-data-row .value { color: #fff; font-weight: 600; }

/* File upload area */
.tv-upload-area {
    display: block;
    border: 2px dashed var(--tv-border); border-radius: 10px; padding: 30px;
    text-align: center; cursor: pointer; transition: var(--tv-transition);
    margin: 15px 0;
}
.tv-upload-area:hover { border-color: var(--tv-gold); background: rgba(201,168,76,0.05); }
.tv-upload-area.has-file { border-color: var(--tv-green); background: rgba(45,80,22,0.1); }
.tv-upload-area input[type="file"] { display: none; }
.tv-upload-area .icon { font-size: 2rem; margin-bottom: 8px; }
.tv-upload-area p { margin: 0; font-size: .85rem; color: var(--tv-text2); }
.tv-upload-area .filename { color: var(--tv-gold); font-weight: 600; margin-top: 8px; }

/* Success view */
.tv-success { text-align: center; padding: 20px; }
.tv-success .check { font-size: 4rem; margin-bottom: 15px; }
.tv-success h3 { color: var(--tv-green-light); margin-bottom: 10px; }
.tv-pago-box {
    background: rgba(255,204,0,0.08); border: 1px solid rgba(255,204,0,0.2);
    border-radius: 10px; padding: 20px; margin: 15px 0; text-align: center;
}
.tv-pago-box img { max-width: 160px; margin-top: 10px; border-radius: 8px; pointer-events: auto; }

/* Scroll animation */
.tv-animate { opacity: 0; transform: translateY(30px); transition: opacity .6s ease-out, transform .6s ease-out; }
.tv-animate.visible { opacity: 1; transform: translateY(0); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .tv-hero { min-height: 80vh; }
    .tv-hero-logo { max-width: 200px; }
    .tv-hero-date { font-size: 1rem; letter-spacing: 1px; }
    .tv-hero-subtitle { font-size: .9rem; }
    .tv-section { padding: 30px 0; }
    .tv-section-title { margin-bottom: 25px; }
    .tv-section-title h2 { font-size: 1.4rem; }
    .tv-form-row { grid-template-columns: 1fr; }
    .tv-info-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tv-info-card { padding: 18px; }
    .tv-info-card .tv-icon { font-size: 1.6rem; }
    .tv-info-card h3 { font-size: .85rem; }
    .tv-benefits-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tv-benefit { padding: 12px; gap: 10px; }
    .tv-benefit p { font-size: .82rem; }
    .tv-costs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .tv-cost-card { padding: 18px; }
    .tv-cost-card .price { font-size: 1.4rem; }
    .tv-prizes-grid { grid-template-columns: 1fr; }
    .tv-sponsors-row { gap: 25px; }
    .tv-sponsors-row img { max-height: 100px; }
    .tv-avm img { max-width: 260px; }
    .tv-map-wrap { height: 250px; }
    .tv-modal { max-height: 95vh; border-radius: 10px; }
    .tv-modal-body { padding: 18px; }
    .tv-hero-cta { flex-direction: column; align-items: center; }
    .tv-btn { width: 100%; max-width: 280px; justify-content: center; }
    .tv-cta-final { padding: 30px 15px; }
    .tv-cta-final h2 { font-size: 1.3rem; }
    .tv-contact-person { margin: 15px 0; }
}

@media (max-width: 480px) {
    .tv-hero { min-height: 70vh; }
    .tv-hero-logo { max-width: 160px; }
    .tv-hero-date { font-size: .85rem; }
    .tv-dist-chip { padding: 6px 18px; font-size: .95rem; }
    .tv-container { padding: 0 12px; }
    .tv-section { padding: 25px 0; }
    .tv-section-title h2 { font-size: 1.2rem; }
    .tv-info-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .tv-info-card { padding: 14px; }
    .tv-info-card .tv-icon { font-size: 1.3rem; margin-bottom: 6px; }
    .tv-info-card h3 { font-size: .75rem; }
    .tv-info-card p { font-size: .8rem; }
    .tv-benefits-grid { grid-template-columns: 1fr; }
    .tv-costs-grid { grid-template-columns: 1fr; }
    .tv-sponsors-row img { max-height: 80px; }
    .tv-wa-link { font-size: .8rem; padding: 7px 14px; }
}

/* Scrollbar */
.tv-modal::-webkit-scrollbar { width: 6px; }
.tv-modal::-webkit-scrollbar-thumb { background: var(--tv-border); border-radius: 3px; }
.tv-modal::-webkit-scrollbar-track { background: transparent; }

/* ============ SIDEBAR EVENT BUTTON ============ */
.nav-item.tv-nav-btn {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 15px !important;
    margin: 0 10px 8px;
    background: linear-gradient(135deg, rgba(107,45,91,0.2), rgba(45,80,22,0.12));
    border: 1px solid rgba(107,45,91,0.35);
    border-radius: 10px;
    color: #fff !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.nav-item.tv-nav-btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 200%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201,168,76,0.12), transparent);
    animation: tvShimmer 4s infinite;
}
@keyframes tvShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}
.nav-item.tv-nav-btn:hover {
    background: linear-gradient(135deg, rgba(107,45,91,0.35), rgba(45,80,22,0.2));
    border-color: var(--tv-gold, #c9a84c);
    transform: translateX(3px);
}
.nav-item.tv-nav-btn img {
    height: 22px;
    width: auto;
    pointer-events: auto !important;
    filter: brightness(1.1);
}
