/**
 * Portal de la Graduación — timeline de micro-eventos.
 * Identidad: blanco / dorado (solo acento) / gris oscuro. Mobile-first.
 * Tipografía fluida con clamp(); hereda la fuente global del sitio y usa
 * serif (Georgia) solo en momentos ceremoniales, como el Plano 3 premium.
 */

.tbpet-timeline,
.tbpet-tickets {
    --tbpet-gold: #c9a227;
    --tbpet-gold-soft: #f3e9c9;
    --tbpet-gold-deep: #a8841c;
    --tbpet-ink: #2b2b30;
    --tbpet-ink-soft: #6b6b72;
    --tbpet-paper: #ffffff;
    --tbpet-shadow-sm: 0 1px 2px rgba(30, 30, 35, 0.06), 0 2px 8px rgba(30, 30, 35, 0.06);
    --tbpet-shadow-lg: 0 4px 10px rgba(30, 30, 35, 0.08), 0 14px 34px rgba(30, 30, 35, 0.12);

    max-width: 760px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 32px) clamp(12px, 3vw, 20px) clamp(32px, 6vw, 64px);
    color: var(--tbpet-ink);
}

.tbpet-timeline-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4.5vw, 2.1rem);
    text-align: center;
    color: var(--tbpet-ink);
    margin: 0 0 clamp(20px, 5vw, 40px);
    text-wrap: balance;
}
.tbpet-timeline-title::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--tbpet-gold-soft), var(--tbpet-gold), var(--tbpet-gold-soft));
}

/* Línea vertical del camino */
.tbpet-timeline-track {
    position: relative;
    padding-left: 34px;
}
.tbpet-timeline-track::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: linear-gradient(180deg, var(--tbpet-gold), var(--tbpet-gold-soft));
    border-radius: 2px;
}

/* Card */
.tbpet-card {
    position: relative;
    margin-bottom: clamp(18px, 4vw, 28px);
}

.tbpet-card-marker {
    position: absolute;
    left: -34px;
    top: 22px;
}
.tbpet-marker-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--tbpet-paper);
    border: 2px solid var(--tbpet-gold);
    font-size: 12px;
    color: var(--tbpet-gold-deep);
    box-shadow: 0 0 0 4px var(--tbpet-paper);
}
.tbpet-marker-done {
    background: var(--tbpet-gold);
    color: #fff;
    font-weight: 700;
}

.tbpet-card-body {
    background: var(--tbpet-paper);
    border: 1px solid #ececec;
    border-radius: 18px;
    padding: clamp(14px, 3.5vw, 22px);
    box-shadow: var(--tbpet-shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.tbpet-card-body:active {
    transform: scale(0.995);
}

/* Jerarquía por estado: el presente elevado, el pasado sereno */
.tbpet-card--current .tbpet-card-body {
    border: 1px solid var(--tbpet-gold);
    box-shadow: var(--tbpet-shadow-lg);
}
.tbpet-card--past .tbpet-card-body {
    background: #fcfcfb;
}
.tbpet-card--past .tbpet-card-title {
    color: var(--tbpet-ink-soft);
}

/* Cabecera de card */
.tbpet-card-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.tbpet-card-datebox {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 6px 8px;
    border-radius: 12px;
    background: linear-gradient(160deg, #fdf9ec, var(--tbpet-gold-soft));
    border: 1px solid #e8d9a6;
}
.tbpet-datebox-day {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    line-height: 1.1;
    color: var(--tbpet-gold-deep);
}
.tbpet-datebox-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--tbpet-ink-soft);
}

.tbpet-card-headings { min-width: 0; }
.tbpet-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 0 0 4px;
    font-size: 0.75rem;
    color: var(--tbpet-ink-soft);
}
.tbpet-card-tipo {
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid var(--tbpet-gold);
    color: var(--tbpet-gold-deep);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.tbpet-card-now {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--tbpet-ink);
    color: var(--tbpet-gold-soft);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
}
.tbpet-card-title {
    font-size: clamp(1.05rem, 3.4vw, 1.3rem);
    line-height: 1.25;
    margin: 0;
    color: var(--tbpet-ink);
    text-wrap: balance;
}
.tbpet-card-lugar {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--tbpet-ink-soft);
}

.tbpet-card-desc {
    margin-top: 12px;
    font-size: clamp(0.9rem, 2.8vw, 0.98rem);
    line-height: 1.6;
    color: #3d3d44;
}
.tbpet-card-desc p { margin: 0 0 0.6em; }
.tbpet-card-desc p:last-child { margin-bottom: 0; }

/* Video con facade (el iframe carga solo al tocar) */
.tbpet-video {
    position: relative;
    margin-top: 14px;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000;
    box-shadow: var(--tbpet-shadow-sm);
}
.tbpet-video img,
.tbpet-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}
.tbpet-video-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: rgba(20, 20, 25, 0.55);
    color: var(--tbpet-gold-soft);
    font-size: 22px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.tbpet-video-play:hover { background: rgba(20, 20, 25, 0.75); transform: scale(1.06); }

/* Galería: fila con scroll horizontal (patrón natural en móvil) */
.tbpet-gallery {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
}
.tbpet-gallery-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--tbpet-shadow-sm);
}
.tbpet-gallery-item img {
    display: block;
    width: clamp(120px, 38vw, 180px);
    height: clamp(90px, 28vw, 130px);
    object-fit: cover;
}

/* Recursos / enlaces de entrega */
.tbpet-recursos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}
.tbpet-recurso {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px; /* área táctil mínima */
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.3;
}
.tbpet-recurso-ico { flex: 0 0 auto; font-size: 1rem; }

.tbpet-recurso--ok {
    background: var(--tbpet-ink);
    color: var(--tbpet-gold-soft);
    box-shadow: var(--tbpet-shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tbpet-recurso--ok:hover {
    color: #fff;
    box-shadow: var(--tbpet-shadow-lg);
    transform: translateY(-1px);
}

.tbpet-recurso--locked {
    background: #f7f7f5;
    border: 1px dashed #d9d9d4;
    color: var(--tbpet-ink-soft);
    cursor: default;
}
.tbpet-recurso--locked em {
    display: block;
    font-style: normal;
    font-weight: 400;
    font-size: 0.78rem;
    color: #9a9aa0;
}
a.tbpet-recurso--locked { cursor: pointer; }
a.tbpet-recurso--locked:hover { border-color: var(--tbpet-gold); }

/* Aparición al hacer scroll (JS añade .is-visible) */
.tbpet-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.tbpet-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Sin JS o con movimiento reducido: todo visible y quieto */
@media (prefers-reduced-motion: reduce) {
    .tbpet-reveal { opacity: 1; transform: none; transition: none; }
    .tbpet-card-body, .tbpet-recurso--ok, .tbpet-video-play { transition: none; }
}
.no-js .tbpet-reveal { opacity: 1; transform: none; }

/* Pantallas amplias: más aire, misma columna vertical */
@media (min-width: 700px) {
    .tbpet-timeline-track { padding-left: 44px; }
    .tbpet-card-marker { left: -44px; }
}

/* ==========================================================================
 * Sección "Paquetes y Entradas" (venta — la acción principal, va arriba)
 * ======================================================================== */

.tbpet-tickets {
    padding-bottom: 0;
}
.tbpet-tickets-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 640px) {
    .tbpet-tickets-grid { grid-template-columns: 1fr 1fr; }
}

.tbpet-ticket-card {
    display: flex;
    flex-direction: column;
    background: var(--tbpet-paper);
    border: 1px solid #ececec;
    border-top: 3px solid var(--tbpet-gold);
    border-radius: 18px;
    padding: clamp(16px, 4vw, 22px);
    box-shadow: var(--tbpet-shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.tbpet-ticket-card:hover {
    box-shadow: var(--tbpet-shadow-lg);
    transform: translateY(-2px);
}

.tbpet-ticket-name {
    font-size: clamp(1rem, 3.2vw, 1.15rem);
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--tbpet-ink);
    text-wrap: balance;
}
.tbpet-ticket-desc {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #3d3d44;
    margin-bottom: 12px;
}
.tbpet-ticket-desc p { margin: 0 0 0.5em; }
.tbpet-ticket-desc p:last-child { margin-bottom: 0; }

.tbpet-ticket-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.tbpet-ticket-price {
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.15rem, 4vw, 1.35rem);
    color: var(--tbpet-gold-deep);
    margin-right: auto;
}
.tbpet-ticket-price del { color: #b5b5ba; font-size: 0.8em; margin-right: 6px; }

.tbpet-ticket-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 26px;
    border-radius: 12px;
    background: var(--tbpet-ink);
    color: var(--tbpet-gold-soft);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-decoration: none;
    box-shadow: var(--tbpet-shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tbpet-ticket-buy:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--tbpet-shadow-lg);
}

.tbpet-ticket-deadline {
    flex-basis: 100%;
    font-size: 0.75rem;
    color: var(--tbpet-ink-soft);
    text-align: right;
}
.tbpet-ticket-closed {
    padding: 8px 18px;
    border-radius: 12px;
    background: #f2f2f0;
    color: #9a9aa0;
    font-weight: 600;
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .tbpet-ticket-buy { flex: 1 1 100%; }
    .tbpet-ticket-price { margin-right: 0; flex: 1 1 100%; }
}
