/* v0.62 — Recomendados compactos, galerías progresivas y ficha pública de perfil más editorial. */

/* Evento recomendado: ya no debe estirarse indefinidamente por la altura del grid. */
.page-events .agenda-side-panel-event {
  align-self: start !important;
  min-height: 0 !important;
  height: clamp(560px, 58vw, 675px);
  max-height: 675px;
}

.page-events .agenda-side-panel-event .agenda-side-panel-copy,
.page-detail .event-detail-recommended-card .agenda-side-panel-copy {
  min-height: 0;
}

.page-events .agenda-side-panel-event .agenda-side-panel-body,
.page-detail .event-detail-recommended-card .agenda-side-panel-body {
  margin-top: auto;
}

.page-events .agenda-side-panel-event h2,
.page-detail .event-detail-recommended-card h2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-events .agenda-side-panel-event p:not(.eyebrow):not(.event-date):not(.event-location),
.page-detail .event-detail-recommended-card p:not(.eyebrow):not(.event-date):not(.event-location) {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-event-detail .event-detail-recommended-card,
.page-profile-detail .compact-recommended-card,
.page-tenencia-detail .tenencia-recommended-card {
  align-self: start !important;
  min-height: 0 !important;
  height: clamp(390px, 34vw, 460px);
  max-height: 460px;
}

.page-event-detail .event-detail-recommended-card h2,
.page-profile-detail .compact-recommended-card h2,
.page-tenencia-detail .tenencia-recommended-card h2 {
  font-size: clamp(1.18rem, 1.75vw, 1.45rem);
}

.page-event-detail .event-detail-recommended-card .agenda-side-panel-body,
.page-profile-detail .compact-recommended-card .agenda-side-panel-body,
.page-tenencia-detail .tenencia-recommended-card .agenda-side-panel-body {
  gap: .58rem;
  padding: .9rem;
}

/* Separación del botón Compartir respecto a las etiquetas del hero de tenencias y eventos. */
.detail-hero .tag-list + .hero-actions,
.detail-hero-content-rich .tag-list + .hero-actions {
  margin-top: 1rem;
}

.detail-hero .hero-actions,
.event-detail-hero .hero-actions,
.profile-hero-subhero .contact-actions {
  gap: .72rem;
}

/* Perfil público: subhero editorial semejante a fichas de tenencia, sin perder el CTA de contacto. */
.page-profile-detail .profile-hero-subhero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  color: #fff;
  background-image:
    linear-gradient(105deg, rgba(17, 26, 59, .96) 0%, rgba(24, 39, 79, .86) 46%, rgba(71, 61, 124, .42) 100%),
    var(--profile-hero-image);
  background-size: cover;
  background-position: center;
}

.page-profile-detail .profile-hero-subhero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  pointer-events: none;
}

.page-profile-detail .profile-hero-subhero .profile-hero-grid {
  position: relative;
  z-index: 1;
  min-height: 450px;
  padding-top: clamp(3.4rem, 8vw, 5.8rem);
  padding-bottom: clamp(3.2rem, 7vw, 5rem);
}

.page-profile-detail .profile-hero-subhero h1,
.page-profile-detail .profile-hero-subhero .breadcrumbs,
.page-profile-detail .profile-hero-subhero .breadcrumbs a,
.page-profile-detail .profile-hero-subhero .profile-location {
  color: #fff;
}

.page-profile-detail .profile-hero-subhero h1 {
  max-width: 720px;
  font-size: clamp(2.5rem, 6.5vw, 4.6rem);
  text-wrap: balance;
}

.page-profile-detail .profile-hero-subhero .profile-location {
  opacity: .88;
}

.page-profile-detail .profile-hero-subhero .verified {
  color: #c7ffd8;
}

.page-profile-detail .profile-hero-subhero .chip {
  color: #fff;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}

.page-profile-detail .profile-hero-subhero .button-outline,
.page-profile-detail .profile-hero-subhero .button-ghost {
  color: #fff;
  border-color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
}

.page-profile-detail .profile-hero-subhero .button-outline:hover,
.page-profile-detail .profile-hero-subhero .button-ghost:hover,
.page-profile-detail .profile-hero-subhero .button-outline:focus-visible,
.page-profile-detail .profile-hero-subhero .button-ghost:focus-visible {
  color: #17244d;
  background: #fff;
  border-color: #fff;
}

.page-profile-detail .profile-hero-subhero .profile-hero-image-button {
  border: 1px solid rgba(255,255,255,.38);
  box-shadow: 0 28px 70px rgba(6, 12, 32, .35);
}

.page-profile-detail .profile-hero-subhero .profile-hero-image-button img {
  min-height: 310px;
}

/* Galerías progresivas: no saturar al usuario; mostrar más solo cuando haga falta. */
.is-gallery-hidden {
  display: none !important;
}

.gallery-more-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}

.button-gallery-more {
  min-height: 42px;
  padding-inline: 1rem;
  border-radius: 999px;
  background: #fff;
}

.page-profile-detail .gallery-grid-clickable {
  grid-template-columns: repeat(auto-fill, minmax(150px, 170px));
  justify-content: start;
  align-items: start;
}

.page-profile-detail .gallery-grid-clickable .gallery-item img {
  aspect-ratio: 1.15;
}

.page-tenencia-detail .gallery-grid-featured figure:nth-child(n+6) {
  grid-row: auto;
}

/* Compartir: textos y botones mejor alineados. */
.share-action {
  grid-template-columns: 44px minmax(0, 1fr);
  min-height: 68px;
  align-items: center;
  align-content: center;
  gap: .82rem;
}

.share-action span {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.share-action strong {
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.share-action small {
  line-height: 1.3;
}

.share-action-native {
  min-height: 84px;
}

.share-action-native small,
.share-action-copy small {
  grid-column: 2;
}

/* Microajustes de cards públicas. */
.page-profile-detail .detail-layout {
  align-items: start;
}

@media (min-width: 980px) {
  .page-profile-detail .detail-layout {
    grid-template-columns: minmax(0, 1fr) 360px;
  }
}

@media (max-width: 1020px) {
  .page-events .agenda-side-panel-event,
  .page-event-detail .event-detail-recommended-card,
  .page-profile-detail .compact-recommended-card,
  .page-tenencia-detail .tenencia-recommended-card {
    height: 420px;
    max-height: none;
  }
}

@media (max-width: 860px) {
  .page-profile-detail .profile-hero-subhero .profile-hero-grid {
    min-height: 0;
  }
  .page-events .agenda-side-panel-event,
  .page-event-detail .event-detail-recommended-card,
  .page-profile-detail .compact-recommended-card,
  .page-tenencia-detail .tenencia-recommended-card {
    height: auto;
    min-height: 360px !important;
  }
  .page-profile-detail .gallery-grid-clickable {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .share-action {
    grid-template-columns: 42px minmax(0, 1fr);
  }
  .page-profile-detail .profile-hero-subhero .profile-hero-image-button img {
    min-height: 240px;
  }
}
