/* Portada comercial. El menú circular sigue en hub.css. */
html:has(body.is-portada) {
  height: auto;
  overflow: auto;
  background: #f4f7fb;
}
body.is-portada {
  height: auto;
  overflow: auto;
  background: #f4f7fb;
  color: #1b2430;
}
html.want-hub,
html.want-hub body {
  height: auto;
  overflow: auto;
  background: #f4f7fb;
  color: #1b2430;
}
html.want-hub #portada-view { display: block !important; }
html.want-hub #hub-view { display: none !important; }

#portada-view.active {
  display: block;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  background: #f4f7fb;
  color: #1b2430;
}

.pt-top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e6ebf2;
}
.pt-top-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.pt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  margin-right: auto;
}
.pt-brand strong { display: block; font-size: 1.05rem; letter-spacing: -0.02em; }
.pt-brand small { display: none; color: #6b7785; }
.pt-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pt-session { position: relative; }
.pt-session-btn { gap: 8px; }
.pt-session-ava {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4293E1;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}
.pt-session-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 240px;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 32, 56, 0.16);
  padding: 8px;
  z-index: 40;
}
.pt-session-menu[hidden] { display: none !important; }
#pt-join[hidden] { display: none !important; }
.pt-session-menu p {
  margin: 0;
  padding: 8px 10px 4px;
  font-weight: 800;
}
.pt-session-menu small {
  display: block;
  padding: 0 10px 8px;
  color: #6b7785;
  font-weight: 650;
}
.pt-session-menu a,
.pt-session-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  font-weight: 700;
  color: #243041;
  text-decoration: none;
  cursor: pointer;
}
.pt-session-menu .pt-session-out { color: #9b2335; }
.pt-session-menu a:hover,
.pt-session-menu button:hover { background: #f4f7fb; }
.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d5deea;
  background: #fff;
  color: #243041;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.pt-btn-primary {
  background: #4293E1;
  border-color: #4293E1;
  color: #fff;
}

.pt-hero {
  position: relative;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 16px 64px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(16, 24, 36, 0.28), rgba(16, 24, 36, 0.38)),
    url("/assets/img/portada-hero.jpg?v=20261005home2") center 42% / cover no-repeat;
  overflow: visible;
}
.pt-hero h1,
.pt-hero p { position: relative; z-index: 1; }
.pt-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.pt-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.pt-slide.is-on { opacity: 1; }
.pt-hero-slides::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 24, 36, 0.32), rgba(16, 24, 36, 0.4));
}
.pt-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}
.pt-hero p {
  margin: 0 0 22px;
  font-size: 1.05rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}
.pt-search {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  background: #fff;
  color: #1b2430;
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 16px 40px rgba(16, 32, 56, 0.18);
}
.pt-search select,
.pt-search input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;
  box-shadow: none;
  background-color: #f4f7fb;
  background-image: none;
  border-radius: 10px;
  min-height: 46px;
  padding: 0 12px;
  font: inherit;
  color: inherit;
}
.pt-search select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23627484' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
}
.pt-search select:disabled {
  opacity: 0.55;
  cursor: default;
}
.pt-search select:focus,
.pt-search input:focus {
  outline: none;
  box-shadow: none;
}
.pt-search button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: #4293E1;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.pt-suggest {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 380px;
  overflow: auto;
  background: #fff;
  color: #1b2430;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 32, 56, 0.22);
  text-align: left;
}
.pt-suggest[hidden] { display: none !important; }
.pt-suggest a,
.pt-suggest p {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f6;
  text-decoration: none;
  color: inherit;
}
.pt-suggest a:last-child { border-bottom: 0; }
.pt-suggest a:hover,
.pt-suggest a:focus { background: #f4f8fc; }
.pt-suggest img,
.pt-suggest .pt-ph {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: contain;
  background: #f4f7fb;
}
.pt-suggest .pt-ph {
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-weight: 800;
}
.pt-suggest small {
  display: block;
  color: #4293E1;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.pt-suggest strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.25;
}
.pt-suggest em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: #6b7785;
  font-size: 0.82rem;
}
.pt-suggest p {
  display: block;
  color: #6b7785;
  font-size: 0.9rem;
}

.pt-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 8px 16px 110px;
}
.pt-cats {
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-margin-top: 72px;
  padding: 8px 0 16px;
}
.pt-cat-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pt-cat.is-join {
  background: #4293E1;
  color: #fff;
  border-color: #4293E1;
}
.pt-cat.is-join span { color: #fff; }
.pt-cat {
  flex: 0 0 86px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--ink, #fff);
  font-weight: 800;
  font-size: 0.78rem;
  line-height: 1.2;
  text-align: center;
  background: var(--cat, #2B6CB0);
  border: 0;
  border-radius: 16px;
  padding: 12px 8px 10px;
  box-shadow: 0 8px 16px rgba(16, 32, 56, 0.12);
  cursor: pointer;
  font-family: inherit;
}
.pt-cat span,
.pt-cat .pt-cat-ico-wrap {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  place-items: center;
  color: var(--ink, #fff);
}
.pt-cat svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pt-cat .pt-cat-ico {
  width: 42px;
  height: 42px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(16, 32, 56, 0.22));
}

.pt-ads h2 {
  margin: 8px 0 12px;
  font-size: 1.25rem;
}
.pt-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.pt-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(28, 45, 72, 0.05);
}
.pt-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f4f7fb center / cover no-repeat;
  overflow: hidden;
}
.pt-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.pt-card-body { padding: 12px 14px 14px; }
.pt-kicker {
  margin: 0 0 4px;
  color: #4293E1;
  font-size: 0.78rem;
  font-weight: 700;
}
.pt-card h3 { margin: 0; font-size: 1.05rem; }
.pt-place { margin: 4px 0 0; color: #6b7785; font-size: 0.9rem; }
.pt-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.pt-badge {
  flex: 0 0 auto;
  color: #4293E1;
  font-size: 0.78rem;
  font-weight: 800;
}
.pt-empty, .pt-loading { color: #6b7785; padding: 12px 0; }
.pt-foot {
  display: none;
  text-align: center;
  color: #6b7785;
  font-size: 0.82rem;
  padding: 8px 16px 24px;
}
.pt-foot a { color: #4293E1; }

.pt-tab {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: 0 10px 28px rgba(16, 32, 56, 0.16), 0 0 0 1px rgba(66, 147, 225, 0.08);
  padding: 6px;
}
.pt-tab a, .pt-tab button {
  border: 0;
  background: transparent;
  color: #4d5d6e;
  text-decoration: none;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 7px 0 5px;
  border-radius: 16px;
}
.pt-tab a span, .pt-tab button > span {
  line-height: 1.05;
  text-align: center;
}
.pt-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pt-tab .is-on {
  color: #4293E1;
  background: rgba(66, 147, 225, 0.14);
}
.pt-tab .gb-market {
  color: #8a7012;
}
.pt-tab .gb-market.is-on {
  color: #6b4f0a;
  background: rgba(201, 162, 39, 0.22);
}
.pt-tab .pt-tab-join {
  color: #4293E1;
  background: transparent;
  gap: 2px;
  padding-top: 0;
  padding-bottom: 4px;
}
.pt-tab a.pt-tab-join,
.pt-tab a.pt-tab-account {
  text-decoration: none;
}
.pt-tab .pt-plus {
  width: 52px;
  height: 52px;
  margin-top: -22px;
  border-radius: 50%;
  background: #4293E1;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(66, 147, 225, 0.38);
}
.pt-tab .pt-plus svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
}

@media (min-width: 900px) {
  .pt-brand small { display: block; }
  .pt-hero { min-height: 460px; padding: 72px 24px 80px; }
  .pt-hero.has-slides {
    background-image: none;
    background-color: #1c2836;
  }
  .pt-search {
    width: min(1400px, calc(100vw - 48px));
    max-width: 1400px;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.05fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.35fr) auto;
    grid-template-rows: auto;
    align-items: stretch;
    gap: 0;
    border-radius: 14px;
    padding: 6px;
  }
  .pt-search > select:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .pt-search > select:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .pt-search > select:nth-of-type(3) { grid-column: 3; grid-row: 1; }
  .pt-search > select:nth-of-type(4) { grid-column: 4; grid-row: 1; }
  .pt-search > input { grid-column: 5; grid-row: 1; }
  .pt-search > button { grid-column: 6; grid-row: 1; }
  .pt-search select,
  .pt-search input {
    background-color: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 16px;
  }
  .pt-search select {
    padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23627484' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px 8px;
  }
  .pt-search button {
    margin-left: 8px;
    padding: 0 28px;
    border-radius: 10px;
    white-space: nowrap;
  }
  .pt-cats {
    gap: 14px;
    overflow: visible;
    padding: 18px 0 22px;
  }
  .pt-cat-row {
    display: grid;
    overflow: visible;
    gap: 12px;
  }
  .pt-cat-row { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .pt-cat {
    flex: none;
    background: var(--cat, #2B6CB0);
    color: var(--ink, #fff);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(16, 32, 56, 0.12);
    min-height: 120px;
    padding: 12px 6px 10px;
    justify-content: center;
    font-size: 0.72rem;
  }
  .pt-cat.is-join {
    background: #4293E1;
    color: #fff;
    border-color: #4293E1;
  }
  .pt-cat span,
  .pt-cat .pt-cat-ico-wrap {
    width: auto;
    height: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    color: var(--ink, #fff);
  }
  .pt-cat .pt-cat-ico { width: 44px; height: 44px; }
  .pt-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
  }
  .pt-grid .pt-card:nth-child(n + 11) { display: none; }
  .pt-cover { aspect-ratio: 1 / 1; }
  .pt-tab { display: none; }
  .pt-wrap { padding-bottom: 48px; }
  .pt-foot { display: block; }
}
@media (max-width: 899px) {
  .pt-hero-slides { display: none; }
  .pt-cats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 8px;
  }
  .pt-cat-row {
    display: contents;
    overflow: visible;
    scroll-snap-type: none;
  }
  .pt-cat {
    flex: none;
    width: auto;
    min-width: 0;
    font-size: 0.62rem;
    line-height: 1.15;
    text-align: center;
    gap: 6px;
    padding: 10px 6px 8px;
  }
  .pt-cat span,
  .pt-cat .pt-cat-ico-wrap {
    width: auto;
    height: auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--ink, #fff);
  }
  .pt-cat .pt-cat-ico { width: 40px; height: 40px; }
  .pt-search {
    background: rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 14px 36px rgba(16, 32, 56, 0.18);
  }
  .pt-search select,
  .pt-search input {
    background-color: rgba(255, 255, 255, 0.78);
  }
  .pt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}
@media (max-width: 720px) {
  .pt-top-inner { padding: 10px 14px; }
  .pt-hero { min-height: 320px; padding: 36px 14px 42px; }
  .pt-hero h1 { font-size: 1.65rem; }
  .pt-wrap { padding: 4px 12px calc(108px + env(safe-area-inset-bottom)); }
  .pt-search { width: 100%; }
}

/* Contadores: ojito (marketing) + avión Telegram (reales) */
.pt-cover .poster-stats {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
}
.pt-cover .ps-views,
.pt-cover .ps-send {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  backdrop-filter: blur(4px);
}
.pt-cover .ps-views svg,
.pt-cover .ps-send svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}
.pt-cover .ps-views b,
.pt-cover .ps-send b {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.pt-cover .ps-send {
  color: #7ad3ff;
}
