/* Página TrapBag Project — misma paleta del sitio (azul #003366, turquesa #00a79d) */

.tbp {
  --tb-azul: var(--color-azul, #003366);
  --tb-azul-2: #0a4a7a;
  --tb-turquesa: var(--color-turquesa, #00a79d);
  --tb-gris: var(--color-gris, #f4f4f4);
  --tb-sans: 'Verdana', sans-serif;
}

body { margin-bottom: 0; }

.tbp-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.tbp h1, .tbp h2, .tbp h3 { font-family: var(--tb-sans); margin: 0; }

.tbp-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--tb-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tb-turquesa);
}

.tbp-title {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.15;
  color: var(--tb-azul);
  margin-bottom: 0.75rem !important;
}

.tbp-lead {
  max-width: 60ch;
  margin: 0 0 2rem;
  color: #335577;
}

/* ===== Botones ===== */
.tbp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  font-family: var(--tb-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.tbp-btn:hover { transform: translateY(-2px); }
.tbp-btn:focus-visible { outline: 3px solid var(--tb-turquesa); outline-offset: 3px; }

.tbp-btn--primary {
  background: var(--tb-turquesa);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(0, 167, 157, 0.6);
  animation: tbp-glow 2s ease-out infinite;
}
.tbp-btn--ghost { border: 2px solid rgba(255, 255, 255, 0.6); color: #fff; }
.tbp-btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
.tbp-btn--ghost-dark { border: 2px solid var(--tb-azul); color: var(--tb-azul); }
.tbp-btn--ghost-dark:hover { background: var(--tb-azul); color: #fff; }

.tbp-arrow { display: inline-block; animation: tbp-nudge 1.2s ease-in-out infinite; }

/* ===== Hero ===== */
.tbp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(5rem, 10vw, 7rem);
  background: radial-gradient(ellipse at 80% 20%, #0e5c94 0%, transparent 55%),
              linear-gradient(160deg, var(--tb-azul) 0%, var(--tb-azul-2) 100%);
  color: #fff;
}

.tbp-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.tbp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(0, 167, 157, 0.6);
  border-radius: 999px;
  background: rgba(0, 167, 157, 0.12);
  font-family: var(--tb-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7fe0d9;
}
.tbp-badge__dot {
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--tb-turquesa);
  animation: tbp-blink 1.2s ease-in-out infinite;
}

.tbp-hero__title {
  margin: 1.2rem 0 1rem !important;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  color: #fff;
}
.tbp-hero__title span { color: var(--tb-turquesa); }

.tbp-hero__subtitle {
  max-width: 34ch;
  margin: 0 0 2rem;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: rgba(255, 255, 255, 0.85);
}

.tbp-hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.tbp-hero__brand {
  position: relative;
  padding: 2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  animation: tbp-float 4s ease-in-out infinite;
}
.tbp-hero__brand::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.18) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: tbp-shine 3.5s ease-in-out infinite;
  pointer-events: none;
}
.tbp-hero__brand img { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 1.5rem; }

.tbp-hero__stats {
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem 2.5rem;
  text-align: center;
}
.tbp-hero__stats strong {
  display: block;
  font-family: var(--tb-sans);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--tb-turquesa);
}
.tbp-hero__stats span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); line-height: 1.2; display: block; }

/* Olas animadas al pie del hero */
.tbp-hero__waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 90px; }
.tbp-hero__waves svg { position: absolute; bottom: 0; width: 200%; height: 100%; }
.tbp-hero__waves svg:first-child { fill: rgba(0, 167, 157, 0.35); animation: tbp-wave 14s linear infinite; }
.tbp-hero__waves svg:last-child { fill: #fff; animation: tbp-wave 9s linear infinite reverse; }

/* ===== Alerta ===== */
.tbp-alert { padding: 1.5rem 0 0; }
.tbp-alert__inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--tb-turquesa);
  border-radius: 0.5rem;
  background: #e0f2f1;
  font-size: 25pt;
}
.tbp-alert__inner p { margin: 0; }
.tbp-alert__icon {
  flex: none;
  display: grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--tb-turquesa); color: #fff;
  font-family: var(--tb-sans); font-weight: 700;
  font-size: 1.6rem; line-height: 1;
  animation: tbp-glow 2s ease-out infinite;
}

/* ===== Secciones ===== */
.tbp-section { padding: clamp(3rem, 7vw, 5rem) 0; }
.tbp-section--tint { background: var(--tb-gris); }
.tbp-section--dark { background: linear-gradient(160deg, var(--tb-azul) 0%, var(--tb-azul-2) 100%); color: #fff; }
.tbp-section--dark .tbp-title { color: #fff; }

/* ===== Visor de la presentación ===== */
.tbp-viewer {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--tb-azul);
  box-shadow: 0 20px 50px rgba(0, 51, 102, 0.3);
}
.tbp-viewer__stage { position: relative; aspect-ratio: 4 / 3; max-height: 80vh; margin: 0 auto; background: #001a33; }
.tbp-viewer__slide {
  display: block; width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity 0.35s ease;
}
.tbp-viewer__slide.is-fading { opacity: 0; }

.tbp-viewer__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 3rem; border: none; border-radius: 50%;
  background: rgba(0, 51, 102, 0.75); color: #fff;
  font-size: 1.2rem; cursor: pointer;
  opacity: 0.8; transition: opacity 0.2s ease, background 0.2s ease;
}
.tbp-viewer__nav:hover { opacity: 1; background: var(--tb-turquesa); }
.tbp-viewer__nav--prev { left: 1rem; }
.tbp-viewer__nav--next { right: 1rem; }

.tbp-viewer__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, 0.15); }
.tbp-viewer__progress span { display: block; height: 100%; width: 0; background: var(--tb-turquesa); }

.tbp-viewer__bar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: #fff; font-family: var(--tb-sans); font-size: 0.85rem;
}
.tbp-viewer__counter b { color: var(--tb-turquesa); }
.tbp-viewer__spacer { flex: 1; }
.tbp-viewer__btn {
  display: inline-grid; place-items: center;
  min-width: 2.4rem; height: 2.4rem; padding: 0 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 0.4rem;
  background: transparent; color: #fff;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
}
.tbp-viewer__btn:hover { background: var(--tb-turquesa); border-color: var(--tb-turquesa); }

.tbp-viewer__thumbs {
  display: flex; gap: 0.5rem;
  padding: 0 1rem 1rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.tbp-viewer__thumb {
  flex: none; width: 96px; padding: 0;
  border: 2px solid transparent; border-radius: 0.35rem;
  background: none; cursor: pointer; opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.tbp-viewer__thumb img { display: block; width: 100%; border-radius: 0.2rem; }
.tbp-viewer__thumb:hover { opacity: 0.9; }
.tbp-viewer__thumb.is-active { opacity: 1; border-color: var(--tb-turquesa); }

.tbp-viewer:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.tbp-viewer:fullscreen .tbp-viewer__stage { flex: 1; max-height: none; width: 100%; aspect-ratio: auto; }

/* ===== Tarjetas ===== */
.tbp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.tbp-card {
  padding: 1.75rem;
  border-radius: 0.75rem;
  background: #fff;
  border-top: 4px solid var(--tb-turquesa);
  box-shadow: 0 6px 18px rgba(0, 51, 102, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tbp-card:hover { transform: translateY(-6px); box-shadow: 0 14px 30px rgba(0, 51, 102, 0.16); }
.tbp-card__num { font-family: var(--tb-sans); font-size: 0.8rem; font-weight: 700; color: var(--tb-turquesa); }
.tbp-card h3 { margin: 0.4rem 0 0.5rem !important; font-size: 1.15rem; color: var(--tb-azul); }
.tbp-card p { margin: 0; font-size: 1.05rem; color: #335577; }

/* ===== Chips de aplicaciones ===== */
.tbp-chips { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.tbp-chips li {
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--tb-azul);
  border-radius: 999px;
  font-family: var(--tb-sans); font-size: 0.9rem; font-weight: 700;
  color: var(--tb-azul);
  transition: background 0.2s ease, color 0.2s ease;
}
.tbp-chips li:hover { background: var(--tb-azul); color: #fff; }

/* ===== Videos ===== */
.tbp-videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.tbp-video { margin: 0; }
.tbp-video__play, .tbp-video iframe {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  padding: 0; border: none; border-radius: 0.6rem; overflow: hidden;
  background: #001a33; cursor: pointer;
}
.tbp-video__play img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.tbp-video__play::after {
  content: "\25B6";
  position: absolute; inset: 0; margin: auto;
  display: grid; place-items: center;
  width: 3.5rem; height: 3.5rem; border-radius: 50%;
  background: var(--tb-turquesa); color: #fff; font-size: 1.2rem;
  box-shadow: 0 0 0 0 rgba(0, 167, 157, 0.6);
  animation: tbp-glow 2s ease-out infinite;
}
.tbp-video__play:hover img { transform: scale(1.05); }
.tbp-video figcaption { margin-top: 0.6rem; font-size: 1rem; line-height: 1.35; color: rgba(255, 255, 255, 0.9); }

/* ===== Contacto ===== */
.tbp-contact__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.tbp-contact .tbp-lead { margin-bottom: 0; }
.tbp-contact__links { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .tbp-alert__inner { font-size: 18pt; }
  .tbp-hero__inner { grid-template-columns: 1fr; gap: 2rem; }
  .tbp-viewer__nav { width: 2.4rem; height: 2.4rem; font-size: 1rem; }
  .tbp-viewer__nav--prev { left: 0.5rem; }
  .tbp-viewer__nav--next { right: 0.5rem; }
}

/* ===== Animaciones ===== */
@keyframes tbp-glow {
  0%   { box-shadow: 0 0 0 0 rgba(0, 167, 157, 0.6); }
  100% { box-shadow: 0 0 0 14px rgba(0, 167, 157, 0); }
}
@keyframes tbp-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@keyframes tbp-blink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.75); } }
@keyframes tbp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes tbp-shine { 0% { transform: translateX(-120%); } 60%, 100% { transform: translateX(120%); } }
@keyframes tbp-wave { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .tbp *, .tbp *::before, .tbp *::after { animation: none !important; transition: none !important; }
}
