/* Experience v2 Stylesheet - Bodega Viejo Molino */
:root {
  --gold-primary: #dfb76c;
  --gold-glow: #f7e0a3;
  --wine-dark: #1b0907;
  --wine-panel: #27120e;
  --wine-card: #200e0a;
}

/* 1. Welcome Topbar & Language Selector */
.welcome-topbar {
  display: flex;
  flex-direction: row;          /* idioma y logotipo en una sola fila baja, a la izquierda */
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
  position: relative;
  padding: 8px 18px;
  background: #140907;
  border-bottom: 1px solid rgba(223, 183, 108, 0.18);
  z-index: 30;
}

.lang-pill-wrap {
  position: relative;
}

.lang-pill-btn {
  background: rgba(30, 15, 12, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(223, 183, 108, 0.45);
  color: #fff;
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-pill-btn:hover {
  background: rgba(45, 20, 16, 0.9);
  border-color: var(--gold-primary);
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #1e0f0c;
  border: 1px solid rgba(223, 183, 108, 0.5);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  min-width: 140px;
  overflow: hidden;
  z-index: 50;
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  color: #e2d7cb;
  text-decoration: none;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.15s ease;
}

.lang-option:last-child {
  border-bottom: none;
}

.lang-option:hover, .lang-option.current {
  background: rgba(223, 183, 108, 0.15);
  color: var(--gold-glow);
}

.btn-skip-pill {
  min-height: 40px;
  background: rgba(30, 15, 12, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(223, 183, 108, 0.45);
  color: var(--gold-primary);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-skip-pill:hover {
  background: rgba(50, 22, 17, 0.9);
  color: #fff;
}

/* Pantalla de bienvenida: cabecera / video limpio / controles / ficha */
.screen.welcome.active {
  display: flex;
  flex-direction: column;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #140907;
}
.welcome:before { display: none; }
.screen.welcome.active { animation: none; }
.welcome > * { position: relative; }

.welcome-logo { flex: 0 0 auto; }

/* Video Container & Background (nada superpuesto) */
.video-container {
  flex: 1 1 0;
  min-height: 230px;
  max-height: 58vh;
  position: relative;
  overflow: hidden;
  background: #140907;
  container-type: size;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-container .intro-embed {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  opacity: 1;                       /* siempre visible desde el primer momento */
  transition: opacity 0.12s ease;
}
@supports (width: 1cqw) {
  .video-container .intro-embed {
    width: max(100cqw, 177.78cqh);  /* 16:9 cubriendo el recuadro */
    height: max(56.25cqw, 100cqh);
  }
}
.video-container .intro-embed.is-ready { opacity: 1; }
/* En pausa se oculta el reproductor (YouTube pinta ahi sus controles); queda el fondo oscuro de la pagina */
.video-container .intro-embed.is-paused { opacity: 0; }
/* El iframe jamas recibe toques ni hover: todo pasa por .video-tap */
.video-container .intro-embed { pointer-events: none !important; }

/* Video horizontal: recuadro 16:9 completo, sin recortes */
.video-container.is-landscape {
  flex: none;
  aspect-ratio: 16 / 9;
  min-height: 0;
  max-height: none;
}
/* Video vertical (Shorts): de borde a borde, formato 9:16 con alto maximo 80% de la pantalla.
   Si el alto se limita, el video se escala tipo "cover" (recorta un poco arriba/abajo). Se agranda
   ~8% anclado arriba para dejar fuera la barra roja de progreso de YouTube en la base. */
.video-container.is-vertical {
  flex: none;
  min-height: 0;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 80vh;
  max-height: 80dvh;
  background-color: #140907;
}
.video-container.is-vertical .intro-embed {
  width: 341.3%;
  height: 108%;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
@supports (width: 1cqw) {
  .video-container.is-vertical .intro-embed {
    width: max(192cqh, 341.3cqw);
    height: max(108cqh, 192cqw);
  }
}

/* Capa transparente de toque: pausa / reanuda sin mostrar controles de YouTube */
.video-tap {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.video-bar {
  position: relative;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
}

.origin-sub {
  color: var(--gold-primary);
  font-size: 0.74rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 500;
}

.btn-audio-subtle {
  background: rgba(223, 183, 108, 0.08);
  border: 1px solid rgba(223, 183, 108, 0.4);
  color: var(--gold-glow);
  padding: 9px 16px;
  border-radius: 22px;
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-audio-subtle:hover {
  background: rgba(223, 183, 108, 0.18);
  border-color: var(--gold-primary);
}

/* Welcome Card Bottom Content */
.welcome-card-content {
  position: relative;
  padding: 2px 20px 22px;
  text-align: center;
}

/* Aviso de ubicación / privacidad */
.privacy-notice {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(440px, calc(100% - 20px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(24, 12, 9, 0.97);
  border: 1px solid rgba(223, 183, 108, 0.45);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  color: #e5d8cb;
}
.privacy-notice.hide { display: none; }
.privacy-notice p {
  flex: 1;
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
}
.privacy-accept {
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(135deg, #c2964b 0%, #815620 100%);
  border: 1px solid #e3bd75;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(129, 86, 32, 0.4);
}
.privacy-accept:active { transform: scale(0.97); }
body.privacy-open .welcome-card-content { padding-bottom: var(--privacy-h, 96px); }

.wine-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  margin: 0 0 2px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  text-transform: uppercase;
}

.wine-vintage {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--gold-primary);
  margin: 0 0 8px;
  font-weight: 500;
  letter-spacing: 1px;
}

.wine-short-desc {
  font-size: 0.85rem;
  line-height: 1.45;
  color: #e5d8cb;
  max-width: 320px;
  margin: 0 auto 10px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.lot-pill {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--gold-primary);
  border: 1px solid rgba(223, 183, 108, 0.35);
  background: rgba(0, 0, 0, 0.4);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.btn-cta-gold {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #c2964b 0%, #815620 100%);
  border: 1px solid #e3bd75;
  color: #ffffff;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(129, 86, 32, 0.4);
  transition: transform 0.15s ease;
}

.btn-cta-gold:active {
  transform: scale(0.98);
}

/* 2. Menu Clean Topbar & Grid */
.menu-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-loc-tag {
  font-size: 0.75rem;
  color: var(--gold-primary);
  background: rgba(223, 183, 108, 0.1);
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid rgba(223, 183, 108, 0.25);
}

.menu-intro-clean {
  text-align: center;
  padding: 32px 18px 24px;
}

.menu-intro-clean span {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold-primary);
}

.menu-intro-clean h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.65rem;
  line-height: 1.25;
  margin: 10px 0 8px;
  color: #fff;
}

.menu-intro-clean p {
  font-size: 0.8rem;
  color: #bfaea0;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px 24px;
}

.menu-card-item {
  background: linear-gradient(145deg, #2b1713, #180b09);
  border: 1px solid rgba(223, 183, 108, 0.25);
  border-radius: 14px;
  padding: 18px 12px;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  min-height: 110px;
  transition: all 0.2s ease;
}

.menu-card-item:hover, .menu-card-item:active {
  background: linear-gradient(145deg, #3d211b, #22100d);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
}

.menu-card-item .card-icon {
  font-style: normal;
  font-size: 1.6rem;
  color: var(--gold-primary);
  margin-bottom: 6px;
}

.menu-card-item span {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.25;
}

.menu-card-item.highlight-card {
  border-color: rgba(223, 183, 108, 0.6);
  background: linear-gradient(145deg, #3a1b14, #1e0c08);
}

/* 3. Desafíos (Gamificación & Lead Capture) */
.trivia-container {
  padding: 18px;
}

.game-register-card, .game-play-card, .game-result-card {
  background: #200e0a;
  border: 1px solid rgba(223, 183, 108, 0.35);
  border-radius: 16px;
  padding: 22px 18px;
}

.trophy-badge, .congrats-icon {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 8px;
}

.game-register-card h3, .game-result-card h3 {
  font-family: 'Playfair Display', Georgia, serif;
  text-align: center;
  color: var(--gold-primary);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.game-register-card p, .game-result-card p {
  text-align: center;
  font-size: 0.8rem;
  color: #c9b9aa;
  margin-bottom: 20px;
  line-height: 1.45;
}

.lead-form .input-field {
  margin-bottom: 14px;
}

.lead-form label {
  display: block;
  font-size: 0.75rem;
  color: var(--gold-primary);
  margin-bottom: 5px;
  font-weight: 500;
}

.lead-form input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 8px;
  background: #140806;
  border: 1px solid rgba(223, 183, 108, 0.3);
  color: #fff;
  font-size: 0.85rem;
  outline: none;
}

.lead-form input:focus {
  border-color: var(--gold-primary);
}

.input-field-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-start-game, .btn-next-step, .btn-replay {
  width: 100%;
  background: linear-gradient(135deg, #c2964b, #815620);
  border: 1px solid #e3bd75;
  color: #fff;
  padding: 13px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
}

.game-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 0.8rem;
  color: var(--gold-primary);
}

.score-pill {
  background: rgba(223, 183, 108, 0.15);
  padding: 4px 10px;
  border-radius: 14px;
  border: 1px solid rgba(223, 183, 108, 0.3);
}

.question-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 20px;
}

.options-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.option-btn {
  background: #190906;
  border: 1px solid rgba(223, 183, 108, 0.3);
  color: #f3ece4;
  padding: 13px 15px;
  border-radius: 10px;
  text-align: left;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
}

.option-btn:hover {
  background: #2b130e;
  border-color: var(--gold-primary);
}

.option-btn.correct {
  background: #14532d !important;
  border-color: #22c55e !important;
  color: #fff;
}

.option-btn.wrong {
  background: #7f1d1d !important;
  border-color: #ef4444 !important;
  color: #fff;
}

.feedback-box {
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(223, 183, 108, 0.1);
  border: 1px solid rgba(223, 183, 108, 0.3);
  font-size: 0.8rem;
  color: #f7e0a3;
  line-height: 1.4;
  margin-bottom: 15px;
}

.promo-box {
  background: #140705;
  border: 1px dashed var(--gold-primary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
}

.promo-code-pill {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-glow);
  margin: 8px 0;
  font-family: monospace;
}

.promo-instruction {
  font-size: 0.72rem;
  color: #9f8e81;
}

/* 4. Virtual Tour & Musical Video */
.virtual-tour-module {
  padding: 18px;
}

.tour-station-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.station-chip {
  flex: 0 0 auto;
  background: #25120e;
  border: 1px solid rgba(223, 183, 108, 0.3);
  color: #e2d7cb;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.station-chip.active {
  background: var(--gold-primary);
  color: #1a0806;
  font-weight: 700;
  border-color: var(--gold-primary);
}

.tour-viewport-wrap {
  width: 100%;
  height: 52vh;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #000;
  border: 1px solid rgba(223, 183, 108, 0.3);
}

.tour-video-player, .tour-video-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tour-panorama-view {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
}

.panorama-drag-hint span {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 16px;
}

.tour-caption {
  margin-top: 14px;
  text-align: center;
}

.tour-caption h4 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--gold-primary);
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.tour-caption p {
  color: #bfaea0;
  font-size: 0.78rem;
}

/* 5. Food & Recipe Enhancements */
.pairing-tabs {
  display: flex;
  margin: 0 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pairing-tabs .tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #a49488;
  padding: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.pairing-tabs .tab-btn.active {
  color: var(--gold-primary);
  border-bottom-color: var(--gold-primary);
}

.cards-deck {
  display: grid;
  gap: 14px;
  padding: 0 18px 24px;
}

.food-card {
  background: #200e0a;
  border: 1px solid rgba(223, 183, 108, 0.25);
  border-radius: 14px;
  overflow: hidden;
}

.food-media {
  height: 160px;
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 10px;
}

.category-badge {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  color: var(--gold-primary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(223, 183, 108, 0.3);
}

.food-body {
  padding: 14px;
}

.food-body h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 5px;
}

.food-body p {
  font-size: 0.8rem;
  color: #c9b9aa;
  line-height: 1.45;
  margin-bottom: 8px;
}

.food-body small {
  color: var(--gold-primary);
  font-size: 0.75rem;
}

.recipe-card {
  background: #200e0a;
  border: 1px solid rgba(223, 183, 108, 0.25);
  border-radius: 16px;
  overflow: hidden;
  margin: 0 18px 24px;
}

.recipe-hero {
  height: 180px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.recipe-meta-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.recipe-meta-tags span {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.72rem;
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.recipe-content {
  padding: 18px;
}

.recipe-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 6px;
}

.recipe-desc {
  font-size: 0.8rem;
  color: #c9b9aa;
  line-height: 1.45;
  margin-bottom: 14px;
}

.recipe-details {
  background: #190906;
  border: 1px solid rgba(223, 183, 108, 0.2);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}

.recipe-details summary {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold-primary);
  cursor: pointer;
}

.checklist-items, .steps-numbered, .subs-list {
  padding: 0 16px 14px;
  font-size: 0.8rem;
  color: #dfd3c7;
  line-height: 1.55;
}

.checklist-items {
  list-style: none;
  padding-left: 14px;
}

.check-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}

.sommelier-tip {
  margin-top: 14px;
  background: rgba(223, 183, 108, 0.08);
  border-left: 3px solid var(--gold-primary);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  font-size: 0.78rem;
  color: #f7e0a3;
  line-height: 1.45;
}

/* 6. Story Deck */
.story-deck-wrapper {
  padding: 18px;
}

.story-slide {
  display: none;
  background: linear-gradient(160deg, #2b120c, #160705);
  border: 1px solid rgba(223, 183, 108, 0.35);
  border-radius: 18px;
  padding: 28px 22px;
  min-height: 55vh;
  position: relative;
  text-align: center;
}

.story-slide.show {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.story-header-pill {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border: 1px solid rgba(223, 183, 108, 0.4);
  padding: 4px 12px;
  border-radius: 16px;
  margin-bottom: 18px;
}

.story-slide h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 14px;
  line-height: 1.25;
}

.story-slide p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #f5e4d2;
  max-width: 320px;
}

.story-accent-grapes {
  font-size: 2.5rem;
  margin-top: 20px;
}

.story-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.story-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #27120e;
  border: 1px solid rgba(223, 183, 108, 0.4);
  color: var(--gold-primary);
  font-size: 1.4rem;
  cursor: pointer;
}

.story-indicator {
  font-size: 0.85rem;
  color: var(--gold-primary);
  font-weight: 600;
}

/* 9. Mini-Juego Personalizado (.JS) */
.game-custom-card {
  background: var(--wine-panel);
  border: 1px solid rgba(223, 183, 108, 0.3);
  border-radius: 16px;
  padding: 16px;
  margin-top: 15px;
}

.custom-game-stage {
  min-height: 320px;
  background: #110504;
  border-radius: 12px;
  border: 1px dashed rgba(223, 183, 108, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.custom-game-stage canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn-exit-game {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #d1b5a5;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 0.75rem;
  cursor: pointer;
}

.btn-exit-game:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.badge-wine-subtle {
  background: rgba(223, 183, 108, 0.15);
  color: var(--gold-primary);
  border: 1px solid rgba(223, 183, 108, 0.3);
  border-radius: 12px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

