/* ============================================================
   Tejineros — Fiestas de Tejina
   Diseño mobile-first, festivo y sencillo.
   ============================================================ */

:root {
  --rojo: #d62828;
  --rojo-osc: #a41d1d;
  --naranja: #f77f00;
  --amarillo: #fcbf49;
  --crema: #fff8ef;
  --mar: #2a9d8f;
  --mar-osc: #1f776c;
  --azul: #1d6fb8;
  --tinta: #2b2118;
  --gris: #6b6157;
  --linea: #ece0d0;
  --blanco: #ffffff;
  --sombra: 0 6px 20px rgba(43, 33, 24, 0.10);
  --sombra-fuerte: 0 10px 30px rgba(43, 33, 24, 0.18);
  --radio: 16px;
  --max: 640px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tinta);
  background: var(--crema);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Cabecera ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--rojo) 0%, var(--naranja) 62%, var(--amarillo) 100%);
  color: var(--blanco);
  padding: 30px 16px 26px;
  text-align: center;
  border-radius: 0 0 26px 26px;
  box-shadow: 0 6px 18px rgba(214, 40, 40, 0.18);
}
.hero .corazon { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.hero h1 {
  margin: 6px 0 2px;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 6px rgba(0,0,0,.22);
}
.hero .sub { margin: 0; font-size: .92rem; opacity: .95; font-weight: 600; }
.hero .fechas {
  display: inline-block; margin-top: 10px; padding: 4px 12px;
  background: rgba(255,255,255,.22); border-radius: 999px;
  font-size: .8rem; font-weight: 700; backdrop-filter: blur(2px);
}

/* ---------- Navegación por pestañas ---------- */
.tabs {
  position: sticky; top: 0; z-index: 50;
  background: var(--crema);
  padding: 12px 16px 10px;
  max-width: var(--max); margin: 0 auto;
}
.tabs-track {
  display: flex; gap: 4px;
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 15px;
  padding: 5px;
  box-shadow: var(--sombra);
}
.tab {
  flex: 1; min-width: 0; border: none; cursor: pointer;
  padding: 11px 6px; border-radius: 11px;
  font-size: .88rem; font-weight: 800;
  background: transparent; color: var(--gris);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .2s ease, color .2s ease, transform .12s ease, box-shadow .2s ease;
}
.tab .ic { font-size: 1.05rem; }
.tab.activo {
  background: var(--rojo); color: var(--blanco);
  box-shadow: 0 4px 12px rgba(214, 40, 40, 0.32);
}
.tab:active { transform: scale(.96); }

/* ---------- Secciones ---------- */
.seccion { display: none; padding: 18px 0 90px; }
.seccion.activa { display: block; animation: aparece .25s ease; }
@keyframes aparece { from { opacity:0; transform: translateY(6px);} to {opacity:1; transform:none;} }

.titulo-seccion { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 4px 0 12px; }
.titulo-seccion h2 { font-size: 1.24rem; margin: 0; font-weight: 800; }
.titulo-seccion .cuenta { font-size: .8rem; color: var(--gris); font-weight: 700; white-space: nowrap; flex-shrink: 0; }

/* ---------- Aviso ---------- */
.aviso {
  background: #fff3cd; border: 1px solid #ffe08a; color: #7a5b00;
  border-radius: 12px; padding: 10px 12px; margin: 0 0 14px;
  font-size: .84rem; font-weight: 600;
  display: flex; gap: 8px; align-items: flex-start;
}
.aviso .ic { font-size: 1.1rem; }

/* ---------- Filtros del programa ---------- */
.filtros {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.filtros::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; border: 1.5px solid var(--linea); background: var(--blanco);
  border-radius: 999px; padding: 8px 14px; font-size: .82rem; font-weight: 700;
  color: var(--gris); cursor: pointer; white-space: nowrap;
  transition: all .15s ease;
}
.chip.activo { background: var(--tinta); color: var(--blanco); border-color: var(--tinta); }
.chip:active { transform: scale(.96); }

/* ---------- Selector de fecha rápido ---------- */
.fecha-bar { display:flex; gap:8px; align-items:center; margin-bottom: 14px; }
.fecha-bar input[type="date"] {
  flex:1; padding: 11px 12px; border-radius: 12px; border: 1.5px solid var(--linea);
  font-size: .95rem; font-family: inherit; color: var(--tinta); background: var(--blanco);
}
.fecha-bar button {
  border:none; background: var(--mar); color: #fff; font-weight: 800;
  padding: 11px 14px; border-radius: 12px; font-size: .85rem; cursor: pointer;
}

/* ---------- Botón ver días pasados ---------- */
.ver-pasados {
  display: block; width: 100%; margin: 0 0 16px; cursor: pointer;
  border: 1.5px dashed var(--linea); background: var(--blanco); color: var(--gris);
  border-radius: 12px; padding: 11px; font-size: .85rem; font-weight: 800;
  font-family: inherit; transition: background .2s ease;
}
.ver-pasados:active { background: var(--crema); }

/* ---------- Día del programa ---------- */
.badge-hoy {
  display: inline-block; margin-top: 2px; margin-right: 4px; font-size: .7rem; font-weight: 800;
  background: var(--mar); color: #fff; padding: 2px 9px; border-radius: 999px;
  vertical-align: middle;
}
.dia.hoy .dia-num { background: var(--mar); box-shadow: 0 4px 12px rgba(42, 157, 143, .4); }
.dia.hoy .dia-cabecera { background: linear-gradient(var(--crema) 70%, transparent); }

.dia { margin-bottom: 22px; scroll-margin-top: 84px; }
.dia-cabecera {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  position: sticky; top: 70px; z-index: 10; padding: 4px 0;
  background: linear-gradient(var(--crema) 70%, transparent);
}
.dia-num {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 14px;
  background: var(--rojo); color: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: var(--sombra); line-height: 1;
}
.dia-num .d { font-size: 1.3rem; font-weight: 800; }
.dia-num .m { font-size: .6rem; text-transform: uppercase; letter-spacing: .04em; opacity:.9; }
.dia-txt h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.dia-txt h3::first-letter { text-transform: uppercase; }
.dia-txt .badge-dia {
  display:inline-block; margin-top:2px; font-size:.7rem; font-weight:800;
  background: var(--amarillo); color: #6b4a00; padding: 2px 8px; border-radius: 999px;
}
.dia.destacado .dia-num { background: linear-gradient(135deg, var(--rojo), var(--naranja)); }

/* ---------- Acto ---------- */
.acto {
  display: flex; gap: 12px; padding: 12px; margin-bottom: 8px;
  background: var(--blanco); border-radius: 14px; box-shadow: var(--sombra);
  border-left: 5px solid var(--gris);
}
.acto .hora {
  flex: 0 0 auto; min-width: 48px; font-weight: 800; font-size: .9rem; color: var(--tinta);
}
.acto .cuerpo { flex: 1; min-width: 0; }
.acto .tipo-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  padding: 2px 8px; border-radius: 999px; margin-bottom: 4px;
}
.acto p { margin: 2px 0 6px; font-size: .92rem; }
.acto .lugar {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .8rem; font-weight: 700; color: var(--azul);
  text-decoration: none;
}
.acto .lugar:active { opacity: .6; }

/* Colores por tipo (borde + pill) */
.t-religioso  { border-left-color:#8e44ad; } .p-religioso{ background:#f3e8fb; color:#7d3ca6;}
.t-musica     { border-left-color:var(--rojo);} .p-musica{ background:#fde3e3; color:var(--rojo-osc);}
.t-deporte    { border-left-color:#2a9d8f;} .p-deporte{ background:#d9f2ee; color:var(--mar-osc);}
.t-cultura    { border-left-color:#1d6fb8;} .p-cultura{ background:#dcecfa; color:#155a95;}
.t-infantil   { border-left-color:#f4a259;} .p-infantil{ background:#fdeede; color:#b5661a;}
.t-gastronomia{ border-left-color:#e07a1a;} .p-gastronomia{ background:#fbe7d2; color:#9a520d;}
.t-corazones  { border-left-color:#e63946;} .p-corazones{ background:#ffe0e3; color:#b81f2c;}
.t-pirotecnia { border-left-color:#f4b400;} .p-pirotecnia{ background:#fff2cc; color:#8a6d00;}
.t-solidario  { border-left-color:#c0392b;} .p-solidario{ background:#fbe0dc; color:#96271a;}
.t-feria      { border-left-color:#6a994e;} .p-feria{ background:#e6f0dd; color:#4a6d36;}

/* ---------- Ventorrillos ---------- */
.grid-vent { display: grid; gap: 14px; }
.vent {
  background: var(--blanco); border-radius: var(--radio); overflow: hidden;
  box-shadow: var(--sombra); display: flex; flex-direction: column;
}
.vent-foto {
  position: relative; aspect-ratio: 16/10; background: linear-gradient(135deg,#ffe9d0,#ffd0a3);
  display:flex; align-items:center; justify-content:center;
}
.vent-foto img { width:100%; height:100%; object-fit: cover; display:block; }
.vent-foto .sinfoto { font-size: 3rem; opacity:.5; }
.vent-tipo {
  position:absolute; top:10px; left:10px; font-size:.72rem; font-weight:800;
  padding: 4px 10px; border-radius: 999px; color:#fff; text-transform: uppercase;
  letter-spacing:.03em; box-shadow: var(--sombra);
  display:flex; align-items:center; gap:4px;
}
.vent-tipo.carne { background: var(--rojo); }
.vent-tipo.pescado { background: var(--mar); }
.vent-cuerpo { padding: 14px; display:flex; flex-direction:column; gap: 8px; flex:1; }
.vent-cuerpo h3 { margin:0; font-size: 1.12rem; font-weight: 800; }
.vent-esp { margin:0; font-size:.9rem; color: var(--tinta); }
.vent-nota { margin:0; font-size:.82rem; color: var(--gris); font-style: italic; }
.vent-meta { display:flex; flex-wrap:wrap; gap:6px; }
.vent-meta span {
  font-size:.75rem; font-weight:700; background: var(--crema);
  border:1px solid var(--linea); padding: 3px 9px; border-radius: 999px; color: var(--gris);
}
.vent-precio { color: var(--naranja) !important; border-color:#fcd9ac !important; background:#fff5e8 !important; }
.btn-mapa {
  margin-top: auto; display:flex; align-items:center; justify-content:center; gap:8px;
  background: var(--mar); color:#fff; text-decoration:none; font-weight:800;
  padding: 12px; border-radius: 12px; font-size: .92rem;
  transition: transform .12s ease;
}
.btn-mapa:active { transform: scale(.97); background: var(--mar-osc); }

/* Tarjeta "¿falta alguno?" */
.vent-add {
  border: 2px dashed var(--linea); background: transparent; box-shadow:none;
  align-items:center; justify-content:center; text-align:center; padding: 26px 16px; gap:6px;
}
.vent-add .ic { font-size: 2rem; }
.vent-add h3 { margin:0; font-size: 1rem; }
.vent-add p { margin:0; font-size:.85rem; color: var(--gris); }

/* ---------- Publicidad / patrocinadores ---------- */
.patro {
  margin: 18px 0; padding: 14px; border-radius: var(--radio);
  background: var(--blanco); box-shadow: var(--sombra); text-align:center;
}
.patro .etq { font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; color:#b7ac9c; }
.patro-slot {
  margin-top: 8px; min-height: 90px; border-radius: 12px;
  background: repeating-linear-gradient(45deg,#faf3e8,#faf3e8 10px,#f4ead9 10px,#f4ead9 20px);
  display:flex; align-items:center; justify-content:center; text-align:center;
  color: var(--gris); font-size:.82rem; font-weight:700; padding: 12px;
  border: 1px solid var(--linea);
}
.patro-slot a { color: var(--azul); }

/* Banner patrocinador real (cuando lo pongas) */
.patro-slot img { max-width:100%; height:auto; border-radius: 8px; }

/* ---------- Contacto ---------- */
.contacto-card {
  background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra);
  padding: 26px 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 12px;
}
.contacto-avatar {
  width: 68px; height: 68px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rojo), var(--naranja));
  color: #fff; font-weight: 800; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--sombra); letter-spacing: .02em;
}
.contacto-intro { margin: 0; font-size: .96rem; color: var(--tinta); max-width: 34ch; }
.contacto-persona { margin: 0; font-size: 1.05rem; }
.contacto-persona strong { color: var(--rojo-osc); }
.contacto-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; max-width: 320px;
  background: var(--rojo); color: #fff; text-decoration: none; font-weight: 800;
  padding: 15px; border-radius: 14px; font-size: 1.05rem;
  box-shadow: var(--sombra-fuerte); transition: transform .12s ease, background .2s ease;
}
.contacto-btn:active { transform: scale(.97); background: var(--rojo-osc); }
.contacto-email {
  font-size: .9rem; font-weight: 700; color: var(--azul); text-decoration: none;
  word-break: break-all;
}
.contacto-motivos {
  list-style: none; padding: 14px 0 0; margin: 6px 0 0; width: 100%;
  border-top: 1px solid var(--linea); text-align: left;
}
.contacto-motivos li { padding: 7px 0; font-size: .9rem; font-weight: 600; color: var(--gris); }

/* ---------- Vacío ---------- */
.vacio { text-align:center; padding: 40px 16px; color: var(--gris); }
.vacio .ic { font-size: 2.4rem; }

/* ---------- Pie ---------- */
footer {
  background: var(--tinta); color: #f0e6d8; text-align:center;
  padding: 26px 16px 32px; font-size:.82rem;
}
footer .redes { display:flex; gap:14px; justify-content:center; margin: 10px 0 14px; }
footer .redes a {
  color:#fff; text-decoration:none; font-weight:700; font-size:.85rem;
  background: rgba(255,255,255,.12); padding: 8px 14px; border-radius: 999px;
}
footer .cafe {
  display:inline-flex; align-items:center; gap:6px; margin-top: 6px;
  background: var(--amarillo); color:#5a3d00; font-weight:800; text-decoration:none;
  padding: 9px 16px; border-radius: 999px; font-size:.85rem;
}
footer small { display:block; margin-top: 14px; opacity:.6; line-height:1.6; }

/* ---------- Botón flotante de compartir ---------- */
.fab-share {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: none; font-family: inherit; font-weight: 800; font-size: .95rem;
  color: #fff; background: #25D366;
  padding: 13px 18px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  transition: transform .12s ease, box-shadow .2s ease;
}
.fab-share:active { transform: scale(.95); }
.fab-ic { font-size: 1.15rem; line-height: 1; }

.share-op {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; border: none; cursor: pointer; font-family: inherit;
  font-weight: 800; font-size: 1rem; padding: 14px; border-radius: 12px;
  margin-top: 10px; text-decoration: none; transition: transform .12s ease, background .2s ease;
}
.share-op:active { transform: scale(.97); }
.share-op.wa { background: #25D366; color: #fff; }
.share-op.copy { background: var(--crema); color: var(--tinta); border: 1.5px solid var(--linea); }
.share-op.copy.copiado { background: #e3f6ea; border-color: #b7e4c7; color: #2f7a4a; }

/* ---------- Modal del café (Bizum) ---------- */
.cafe { border: none; cursor: pointer; font-family: inherit; }
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-fondo { position: absolute; inset: 0; background: rgba(30, 20, 12, 0.6); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 360px;
  background: var(--blanco); color: var(--tinta); border-radius: 20px;
  padding: 28px 22px 24px; text-align: center; box-shadow: var(--sombra-fuerte);
  animation: subeModal .22s ease;
}
@keyframes subeModal { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-x {
  position: absolute; top: 12px; right: 12px; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%; background: var(--crema);
  color: var(--gris); font-size: .9rem; font-weight: 800;
}
.modal-emoji { font-size: 3rem; line-height: 1; }
.modal-card h3 { margin: 8px 0 4px; font-size: 1.3rem; font-weight: 800; }
.modal-txt { margin: 0 0 16px; font-size: .92rem; color: var(--gris); }
.bizum-box {
  background: linear-gradient(135deg, #fff5e8, #ffe9d0);
  border: 1px solid #fcd9ac; border-radius: 14px; padding: 14px; margin-bottom: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.bizum-etq { font-size: .78rem; font-weight: 700; color: var(--gris); }
.bizum-num { font-size: 1.7rem; font-weight: 800; letter-spacing: .04em; color: var(--rojo-osc); }
.bizum-copiar {
  width: 100%; border: none; cursor: pointer; font-family: inherit;
  background: var(--mar); color: #fff; font-weight: 800; font-size: 1rem;
  padding: 14px; border-radius: 12px; transition: background .2s ease, transform .12s ease;
}
.bizum-copiar:active { transform: scale(.97); }
.bizum-copiar.copiado { background: #3a9e57; }

/* ---------- Escritorio (secundario) ---------- */
@media (min-width: 700px) {
  .hero h1 { font-size: 2.2rem; }
  .grid-vent { grid-template-columns: 1fr 1fr; }
  .vent-add { grid-column: 1 / -1; }
}
