/* =========================================================
   FLG PUBLICACIONES + MODAL PUBLICIDAD HOME
   Archivo: assets/css/flg-posts-redesign.css
   Version: 20261002-10

   Objetivo:
   - Mantener la cabecera de publicaciones con el estilo general del sitio.
   - Mostrar publicaciones en cards tipo Facebook, 2 por fila en escritorio.
   - Evitar que las imágenes se estiren, se desborden o se desfases a la derecha.
   - Mantener el modal de publicidad del Home compacto.
   ========================================================= */

:root {
  --flg-post-bg: #fff8fb;
  --flg-post-card: #ffffff;
  --flg-post-ink: var(--ink, #261d22);
  --flg-post-muted: var(--ink-soft, #6d5d65);
  --flg-post-main: var(--lilac-900, #6f2145);
  --flg-post-main-2: var(--lilac-800, #96305f);
  --flg-post-pink: var(--pink-500, #e56d9d);
  --flg-post-soft: var(--pink-75, #fff2f7);
  --flg-post-line: rgba(150, 48, 95, .13);
  --flg-post-shadow: 0 18px 46px rgba(88, 25, 52, .11);
  --flg-post-shadow-soft: 0 10px 28px rgba(88, 25, 52, .075);
}

body.flg-posts-page,
body.flg-posts-compact {
  background:
    radial-gradient(circle at 12% 0%, rgba(249,217,230,.50), transparent 32rem),
    linear-gradient(180deg, #fffafb 0%, #fff7fa 38%, #ffffff 100%);
}

/* =========================================================
   CABECERA PUBLICACIONES: MISMA LOGICA VISUAL DEL SITIO
   ========================================================= */

body[data-page="posts"] .flg-posts-intro,
body[data-page="posts"] .posts-page-hero,
body[data-page="posts"] .flg-posts-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(5.4rem, 7vw, 7.1rem) 0 clamp(4.6rem, 6vw, 6.1rem) !important;
  color: var(--white, #fff) !important;
  background:
    radial-gradient(circle at 88% 4%, rgba(246,143,183,.22), transparent 24rem),
    radial-gradient(circle at 4% 100%, rgba(249,217,230,.22), transparent 20rem),
    var(--lilac-950, #4b1730) !important;
  isolation: isolate;
}

body[data-page="posts"] .flg-posts-intro::before,
body[data-page="posts"] .posts-page-hero::before,
body[data-page="posts"] .flg-posts-hero::before {
  content: '';
  position: absolute;
  width: 36rem;
  height: 36rem;
  right: -15rem;
  top: -20rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  pointer-events: none;
  z-index: -1;
}

body[data-page="posts"] .flg-posts-intro::after,
body[data-page="posts"] .posts-page-hero::after,
body[data-page="posts"] .flg-posts-hero::after {
  content: '';
  position: absolute;
  width: 22rem;
  height: 22rem;
  left: -11rem;
  bottom: -14rem;
  border-radius: 999px;
  background: rgba(246,143,183,.15);
  pointer-events: none;
  z-index: -1;
}

body[data-page="posts"] .flg-posts-intro__inner,
body[data-page="posts"] .flg-posts-hero__grid {
  width: min(calc(100% - 40px), var(--container, 1180px));
  max-width: var(--container, 1180px);
  margin-inline: auto;
}

body[data-page="posts"] .flg-posts-intro__inner {
  max-width: 1180px;
}

body[data-page="posts"] .flg-posts-breadcrumb,
body[data-page="posts"] .breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
  margin: 0 0 .8rem;
  color: rgba(255,255,255,.68) !important;
  font-size: .92rem;
}

body[data-page="posts"] .flg-posts-breadcrumb a:hover,
body[data-page="posts"] .breadcrumb a:hover {
  color: #fff !important;
}

body[data-page="posts"] .section-kicker--light,
body[data-page="posts"] .flg-posts-intro .section-kicker,
body[data-page="posts"] .posts-page-hero .section-kicker {
  color: var(--mint-100, #ffe7f0) !important;
}

body[data-page="posts"] .flg-posts-intro h1,
body[data-page="posts"] .posts-page-hero h1,
body[data-page="posts"] .flg-posts-hero h1 {
  max-width: 760px;
  margin: .65rem 0 .9rem !important;
  color: #fff !important;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.15rem, 4.2vw, 4.05rem) !important;
  line-height: 1.03 !important;
  letter-spacing: -.04em;
}

body[data-page="posts"] .flg-posts-intro p,
body[data-page="posts"] .posts-page-hero p,
body[data-page="posts"] .flg-posts-hero p {
  max-width: 720px;
  margin: 0 !important;
  color: rgba(255,255,255,.78) !important;
  font-size: 1.08rem;
}

/* Oculta elementos extra de versiones anteriores de publicaciones */
body[data-page="posts"] .flg-posts-feature-panel,
body[data-page="posts"] .flg-posts-hero__actions,
body[data-page="posts"] .flg-posts-toolbar,
body[data-page="posts"] .flg-posts-tools,
body[data-page="posts"] .post-ad-modal {
  display: none !important;
}

/* =========================================================
   FEED: 2 COLUMNAS, CENTRADO, SIN DESBORDES
   ========================================================= */

body[data-page="posts"] .flg-posts-section,
body[data-page="posts"] .posts-section {
  padding: clamp(2.6rem, 4vw, 4rem) 0 clamp(4.5rem, 7vw, 6.5rem) !important;
}

body[data-page="posts"] .flg-posts-container,
body[data-page="posts"] .posts-shell,
body[data-page="posts"] .flg-posts-shell {
  width: min(calc(100% - 40px), 1180px) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

body[data-page="posts"] .flg-posts-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

body[data-page="posts"] .flg-posts-heading span {
  display: block;
  color: var(--flg-post-main-2);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

body[data-page="posts"] .flg-posts-heading h2 {
  margin: .25rem 0 0;
  color: var(--flg-post-main);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 2.6vw, 2.35rem);
  line-height: 1.05;
}

body[data-page="posts"] .flg-posts-status,
body[data-page="posts"] .posts-feed-status {
  min-height: 1.4rem;
  margin: 0 0 1.1rem;
  color: var(--flg-post-muted);
  font-weight: 750;
}

body[data-page="posts"] .flg-posts-feed,
body[data-page="posts"] .posts-feed {
  width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(1.2rem, 2.4vw, 1.8rem) !important;
  align-items: start !important;
  justify-items: stretch !important;
  overflow: visible !important;
}

body[data-page="posts"] .posts-load-sentinel {
  width: 100%;
  height: 1px;
}

/* =========================================================
   CARD TIPO FACEBOOK
   ========================================================= */

body[data-page="posts"] .social-post-card {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border: 1px solid rgba(150,48,95,.12) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow: 0 14px 38px rgba(88,25,52,.09) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  box-sizing: border-box !important;
}

body[data-page="posts"] .social-post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(150,48,95,.20) !important;
  box-shadow: 0 20px 50px rgba(88,25,52,.13) !important;
}

body[data-page="posts"] .social-post-card[hidden],
body[data-page="posts"] .social-post-card.is-hidden,
body[data-page="posts"] .social-post-card.is-filtered {
  display: none !important;
}

body[data-page="posts"] .social-post-card::before {
  display: none !important;
}

body[data-page="posts"] .social-post-card__header {
  order: 1 !important;
  display: flex !important;
  align-items: center !important;
  gap: .75rem !important;
  min-width: 0 !important;
  padding: 1rem 1rem .45rem !important;
}

body[data-page="posts"] .social-post-card__avatar {
  width: 2.75rem !important;
  height: 2.75rem !important;
  flex: 0 0 2.75rem !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  border: 1px solid rgba(150,48,95,.12) !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: 0 8px 20px rgba(88,25,52,.08);
}

body[data-page="posts"] .social-post-card__avatar img {
  width: 78% !important;
  height: 78% !important;
  object-fit: contain !important;
}

body[data-page="posts"] .social-post-card__identity {
  min-width: 0 !important;
  display: grid !important;
  gap: .05rem !important;
}

body[data-page="posts"] .social-post-card__identity strong {
  overflow: hidden;
  color: var(--flg-post-main) !important;
  font-size: .98rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-page="posts"] .social-post-card__identity-meta {
  color: var(--flg-post-muted) !important;
  font-size: .78rem !important;
  line-height: 1.35 !important;
}

body[data-page="posts"] .social-post-card__location {
  color: var(--flg-post-main-2) !important;
  font-weight: 850 !important;
}

body[data-page="posts"] .social-post-card__body {
  order: 2 !important;
  min-width: 0 !important;
  padding: .55rem 1rem .85rem !important;
}

body[data-page="posts"] .social-post-card__badges {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .42rem !important;
  margin-bottom: .65rem !important;
}

body[data-page="posts"] .social-post-card__badge {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 1.45rem !important;
  padding: 0 .6rem !important;
  border-radius: 999px !important;
  color: var(--flg-post-main) !important;
  background: var(--flg-post-soft) !important;
  font-size: .63rem !important;
  font-weight: 900 !important;
  letter-spacing: .055em !important;
  text-transform: uppercase !important;
}

body[data-page="posts"] .social-post-card__badge--featured {
  color: #fff !important;
  background: linear-gradient(135deg, var(--flg-post-main-2), var(--flg-post-pink)) !important;
}

body[data-page="posts"] .social-post-card__title {
  margin: 0 0 .5rem !important;
  color: var(--flg-post-main) !important;
  font-family: 'DM Sans', system-ui, sans-serif !important;
  font-size: clamp(1.05rem, 1.55vw, 1.22rem) !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: -.018em !important;
  overflow-wrap: anywhere !important;
}

body[data-page="posts"] .social-post-card__subtitle {
  margin: 0 0 .55rem !important;
  color: var(--flg-post-main-2) !important;
  font-size: .95rem !important;
  font-weight: 850 !important;
  line-height: 1.45 !important;
}

body[data-page="posts"] .social-post-card__content {
  margin: 0 !important;
  color: var(--flg-post-ink) !important;
  font-size: .95rem !important;
  line-height: 1.52 !important;
  white-space: pre-line !important;
  overflow-wrap: anywhere !important;
}

body[data-page="posts"] .social-post-card__content.is-collapsed,
body[data-page="posts"] .social-post-card__content[data-collapsed="true"] {
  display: -webkit-box !important;
  -webkit-line-clamp: 4 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

body[data-page="posts"] .social-post-card__see-more,
body[data-page="posts"] .social-post-card__toggle {
  display: inline-flex !important;
  width: max-content !important;
  margin-top: .35rem !important;
  border: 0 !important;
  color: var(--flg-post-main-2) !important;
  background: transparent !important;
  padding: 0 !important;
  font-size: .92rem !important;
  font-weight: 900 !important;
}

/* =========================================================
   GALERIA DE LA CARD: NUNCA SE SALE DE LA CARD
   ========================================================= */

body[data-page="posts"] .social-post-card__media {
  order: 3 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 2px !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 1rem 1rem !important;
  box-sizing: border-box !important;
}

body[data-page="posts"] .social-post-card__media[data-count="1"],
body[data-page="posts"] .social-post-card__media:has(.social-post-card__media-item:only-child) {
  grid-template-columns: 1fr !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:first-child {
  grid-row: span 2;
}

body[data-page="posts"] .social-post-card__media-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 145px !important;
  max-height: 145px !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f7edf2 !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

body[data-page="posts"] .social-post-card__media[data-count="1"] .social-post-card__media-item,
body[data-page="posts"] .social-post-card__media:has(.social-post-card__media-item:only-child) .social-post-card__media-item {
  height: 235px !important;
  max-height: 235px !important;
  border-radius: 16px !important;
}

body[data-page="posts"] .social-post-card__media[data-count="2"] .social-post-card__media-item {
  height: 175px !important;
  max-height: 175px !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item {
  height: 118px !important;
  max-height: 118px !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:first-child {
  height: 238px !important;
  max-height: 238px !important;
}

body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item,
body[data-page="posts"] .social-post-card__media[data-count="5"] .social-post-card__media-item,
body[data-page="posts"] .social-post-card__media[data-count="6"] .social-post-card__media-item {
  height: 132px !important;
  max-height: 132px !important;
}

body[data-page="posts"] .social-post-card__media-item:first-child:nth-last-child(1) {
  border-radius: 16px !important;
}

body[data-page="posts"] .social-post-card__media-item:first-child:not(:only-child) {
  border-top-left-radius: 16px !important;
}

body[data-page="posts"] .social-post-card__media-item:nth-child(2) {
  border-top-right-radius: 16px !important;
}

body[data-page="posts"] .social-post-card__media-item:nth-last-child(2):nth-child(odd),
body[data-page="posts"] .social-post-card__media-item:last-child:nth-child(odd) {
  border-bottom-left-radius: 16px !important;
}

body[data-page="posts"] .social-post-card__media-item:last-child {
  border-bottom-right-radius: 16px !important;
}

body[data-page="posts"] .social-post-card__media-item img,
body[data-page="posts"] .social-post-card__media-item video {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  background: #f7edf2 !important;
  transition: transform .25s ease, filter .25s ease !important;
}

body[data-page="posts"] .social-post-card__media-item:hover img,
body[data-page="posts"] .social-post-card__media-item:hover video {
  transform: scale(1.025);
}

body[data-page="posts"] .social-post-card__play,
body[data-page="posts"] .social-post-card__media-more {
  position: absolute !important;
  z-index: 3 !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
  background: rgba(38, 29, 34, .62) !important;
  backdrop-filter: blur(9px) !important;
  -webkit-backdrop-filter: blur(9px) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.22) !important;
}

body[data-page="posts"] .social-post-card__play {
  left: 50% !important;
  top: 50% !important;
  width: 3rem !important;
  height: 3rem !important;
  border-radius: 999px !important;
  transform: translate(-50%, -50%) !important;
  font-size: 1rem !important;
}

body[data-page="posts"] .social-post-card__media-more {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  border-radius: inherit !important;
  font-size: clamp(1.7rem, 3vw, 2.5rem) !important;
  font-weight: 900 !important;
}

body[data-page="posts"] .social-post-card__media-item--audio {
  display: grid !important;
  place-items: center !important;
  height: 145px !important;
  max-height: 145px !important;
  background: linear-gradient(135deg, var(--flg-post-main), var(--flg-post-main-2)) !important;
}

body[data-page="posts"] .social-post-card__audio-card {
  display: grid !important;
  place-items: center !important;
  gap: .24rem !important;
  color: #fff !important;
  text-align: center !important;
}

body[data-page="posts"] .social-post-card__audio-icon,
body[data-page="posts"] .social-post-card__audio-card span {
  width: 3rem !important;
  height: 3rem !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.17) !important;
  font-size: 1.5rem !important;
}

/* =========================================================
   BOTONES DE ACCION CARD
   ========================================================= */

body[data-page="posts"] .social-post-card__actions {
  order: 4 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .55rem !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  padding: .8rem 1rem 1rem !important;
  border-top: 1px solid rgba(150,48,95,.08) !important;
  background: rgba(255,242,247,.42) !important;
  box-sizing: border-box !important;
}

body[data-page="posts"] .social-post-card__ctas,
body[data-page="posts"] .social-post-card__contact {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: .42rem !important;
  min-width: 0 !important;
}

body[data-page="posts"] .social-post-card__cta,
body[data-page="posts"] .social-post-card__contact-link {
  min-height: 2.05rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .35rem !important;
  border: 1px solid rgba(150,48,95,.14) !important;
  border-radius: 999px !important;
  color: var(--flg-post-main) !important;
  background: #fff !important;
  padding: 0 .68rem !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body[data-page="posts"] .social-post-card__cta--primary,
body[data-page="posts"] .social-post-card__contact-link--whatsapp {
  color: #fff !important;
  border-color: var(--flg-post-main-2) !important;
  background: var(--flg-post-main-2) !important;
}

body[data-page="posts"] .social-post-card__contact-icon {
  width: .95rem !important;
  height: .95rem !important;
  display: inline-grid !important;
  place-items: center !important;
}

body[data-page="posts"] .social-post-card__contact-icon svg {
  width: .95rem !important;
  height: .95rem !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

/* =========================================================
   LIGHTBOX PUBLICACIONES
   ========================================================= */

.post-lightbox {
  position: fixed;
  z-index: 13000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(32,12,22,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.post-lightbox[hidden] { display: none !important; }

.post-lightbox__backdrop {
  position: absolute;
  inset: 0;
}

.post-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1050px);
  height: min(86vh, 760px);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  border-radius: 1.35rem;
  background: rgba(15,8,12,.96);
  box-shadow: 0 32px 110px rgba(0,0,0,.42);
}

.post-lightbox__stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  background: #0b0508;
}

.post-lightbox__stage > img,
.post-lightbox__stage > video {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.post-lightbox__close,
.post-lightbox__arrow {
  position: absolute;
  z-index: 3;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(75,23,48,.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 14px 32px rgba(0,0,0,.24);
}

.post-lightbox__close {
  top: .9rem;
  right: .9rem;
  width: 2.7rem;
  height: 2.7rem;
  font-size: 1.6rem;
  line-height: 1;
}

.post-lightbox__arrow {
  top: 50%;
  width: 2.7rem;
  height: 2.7rem;
  transform: translateY(-50%);
  font-size: 1.15rem;
}

.post-lightbox__arrow--prev { left: .9rem; }
.post-lightbox__arrow--next { right: .9rem; }

.post-lightbox__counter {
  align-self: end;
  padding: .75rem 1rem;
  color: rgba(255,255,255,.78);
  text-align: center;
  font-size: .84rem;
  font-weight: 800;
  background: rgba(255,255,255,.06);
}

.post-lightbox__video-shell {
  position: relative;
  width: min(100%, 440px);
  height: min(100%, 760px);
  display: grid;
  place-items: center;
}

.post-lightbox__video-shell.is-landscape {
  width: min(100%, 900px);
  height: auto;
}

.post-lightbox__reel-video {
  width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 1rem;
  object-fit: contain;
  background: #000;
}

.post-lightbox__video-controls {
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,.48);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.post-lightbox__video-control,
.post-lightbox__video-overlay-play {
  border: 0;
  color: #fff;
  background: transparent;
}

.post-lightbox__video-control svg,
.post-lightbox__video-overlay-play svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.post-lightbox__video-progress {
  flex: 1 1 auto;
  min-width: 5rem;
}

.post-lightbox__video-time {
  min-width: 5.3rem;
  color: rgba(255,255,255,.82);
  font-size: .72rem;
  font-weight: 800;
}

.post-lightbox__video-overlay-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}

.post-lightbox__video-overlay-play[hidden] { display: none !important; }

.post-lightbox__audio-shell {
  width: min(100%, 460px);
  min-height: 240px;
  display: grid;
  place-items: center;
  gap: 1rem;
  color: #fff;
  padding: 2rem;
  text-align: center;
}

.post-lightbox__audio-shell audio { width: min(100%, 420px); }

.post-lightbox__audio-icon {
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--flg-post-main-2), var(--flg-post-pink));
  font-size: 2rem;
}

/* =========================================================
   MODAL PUBLICIDAD EN HOME: COMPACTO
   ========================================================= */

.flg-home-ad {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(.75rem, 2vw, 1.4rem);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.flg-home-ad.is-open {
  opacity: 1;
  pointer-events: auto;
}

.flg-home-ad__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(34,12,22,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.flg-home-ad__dialog {
  position: relative;
  z-index: 1;
  width: min(94vw, 860px);
  max-height: min(72vh, 560px);
  display: grid;
  grid-template-columns: minmax(240px, .82fr) minmax(280px, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 1.55rem;
  background: #fff;
  box-shadow: 0 26px 86px rgba(0,0,0,.32);
  transform: translateY(18px) scale(.985);
  transition: transform .22s ease;
}

.flg-home-ad.is-open .flg-home-ad__dialog { transform: none; }

.flg-home-ad__close {
  position: absolute;
  z-index: 5;
  top: .7rem;
  right: .7rem;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 999px;
  color: var(--flg-post-main);
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 22px rgba(0,0,0,.16);
  font-size: 1.35rem;
  line-height: 1;
}

.flg-home-ad__media {
  position: relative;
  height: min(72vh, 560px);
  min-height: 320px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #220c16, #4b1730);
}

.flg-home-ad__media img,
.flg-home-ad__media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090507;
}

.flg-home-ad__media.is-empty img {
  width: min(62%, 210px);
  height: auto;
  object-fit: contain;
  background: transparent;
  padding: 1.5rem;
}

.flg-home-ad__sound {
  position: absolute;
  left: .85rem;
  right: .85rem;
  bottom: .85rem;
  z-index: 4;
  min-height: 2.65rem;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  color: #fff;
  background: rgba(75,23,48,.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0 .9rem;
  font-size: .84rem;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(0,0,0,.23);
}

.flg-home-ad__audio {
  width: min(100%, 360px);
  display: grid;
  gap: .85rem;
  place-items: center;
  color: #fff;
  padding: 1.4rem;
  text-align: center;
}

.flg-home-ad__audio span {
  width: 4.4rem;
  height: 4.4rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
}

.flg-home-ad__audio span::before {
  content: '♫';
  font-size: 2rem;
}

.flg-home-ad__audio audio { width: 100%; }

.flg-home-ad__content {
  min-width: 0;
  max-height: min(72vh, 560px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.35rem, 3vw, 2.2rem);
}

.flg-home-ad__eyebrow {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  margin-bottom: .7rem;
  border-radius: 999px;
  color: var(--flg-post-main);
  background: var(--flg-post-soft);
  padding: 0 .68rem;
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.flg-home-ad__content h2 {
  margin: 0 0 .62rem;
  color: var(--flg-post-main);
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.flg-home-ad__subtitle {
  margin: 0 0 .65rem;
  color: var(--flg-post-main-2);
  font-weight: 850;
}

.flg-home-ad__copy {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: var(--flg-post-muted);
  font-size: .94rem;
  line-height: 1.55;
}

.flg-home-ad__ctas,
.flg-home-ad__contact {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1rem;
}

.flg-home-ad__cta,
.flg-home-ad__contact-link {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38rem;
  border: 1px solid rgba(150,48,95,.15);
  border-radius: 999px;
  color: var(--flg-post-main);
  background: #fff;
  padding: 0 .82rem;
  font-size: .8rem;
  font-weight: 900;
}

.flg-home-ad__cta--primary,
.flg-home-ad__contact-link--whatsapp {
  color: #fff;
  border-color: var(--flg-post-main-2);
  background: var(--flg-post-main-2);
}

.flg-home-ad__contact-icon {
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
}

.flg-home-ad__contact-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1020px) {
  body[data-page="posts"] .flg-posts-feed,
  body[data-page="posts"] .posts-feed {
    grid-template-columns: 1fr !important;
    width: min(100%, 680px) !important;
    margin-inline: auto !important;
  }

  .flg-home-ad__dialog {
    width: min(94vw, 620px);
    max-height: 86vh;
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .flg-home-ad__media {
    height: min(46vh, 360px);
    min-height: 240px;
  }

  .flg-home-ad__content {
    max-height: none;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body[data-page="posts"] .flg-posts-intro,
  body[data-page="posts"] .posts-page-hero,
  body[data-page="posts"] .flg-posts-hero {
    padding: 4.2rem 0 3.5rem !important;
  }

  body[data-page="posts"] .flg-posts-intro__inner,
  body[data-page="posts"] .flg-posts-hero__grid,
  body[data-page="posts"] .flg-posts-container,
  body[data-page="posts"] .posts-shell,
  body[data-page="posts"] .flg-posts-shell {
    width: min(calc(100% - 28px), 680px) !important;
  }

  body[data-page="posts"] .flg-posts-heading {
    display: block;
  }

  body[data-page="posts"] .social-post-card {
    border-radius: 18px !important;
  }

  body[data-page="posts"] .social-post-card__header {
    padding: .9rem .9rem .4rem !important;
  }

  body[data-page="posts"] .social-post-card__body {
    padding: .5rem .9rem .8rem !important;
  }

  body[data-page="posts"] .social-post-card__media {
    padding: 0 .9rem .9rem !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="1"] .social-post-card__media-item,
  body[data-page="posts"] .social-post-card__media:has(.social-post-card__media-item:only-child) .social-post-card__media-item {
    height: 220px !important;
    max-height: 220px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="2"] .social-post-card__media-item {
    height: 155px !important;
    max-height: 155px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item {
    height: 112px !important;
    max-height: 112px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:first-child {
    height: 226px !important;
    max-height: 226px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item,
  body[data-page="posts"] .social-post-card__media[data-count="5"] .social-post-card__media-item,
  body[data-page="posts"] .social-post-card__media[data-count="6"] .social-post-card__media-item {
    height: 118px !important;
    max-height: 118px !important;
  }

  body[data-page="posts"] .social-post-card__actions {
    padding: .75rem .9rem .9rem !important;
  }

  .post-lightbox__dialog {
    height: min(88vh, 720px);
  }

  .post-lightbox__arrow {
    width: 2.35rem;
    height: 2.35rem;
  }

  .post-lightbox__arrow--prev { left: .45rem; }
  .post-lightbox__arrow--next { right: .45rem; }
}

@media (max-width: 480px) {
  body[data-page="posts"] .social-post-card__media-item {
    height: 112px !important;
    max-height: 112px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="1"] .social-post-card__media-item,
  body[data-page="posts"] .social-post-card__media:has(.social-post-card__media-item:only-child) .social-post-card__media-item {
    height: 205px !important;
    max-height: 205px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="2"] .social-post-card__media-item {
    height: 138px !important;
    max-height: 138px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:first-child {
    height: 206px !important;
    max-height: 206px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item,
  body[data-page="posts"] .social-post-card__media[data-count="5"] .social-post-card__media-item,
  body[data-page="posts"] .social-post-card__media[data-count="6"] .social-post-card__media-item {
    height: 104px !important;
    max-height: 104px !important;
  }

  .flg-home-ad__dialog {
    width: min(96vw, 420px);
    border-radius: 1.15rem;
  }
}

/* =========================================================
   FIX DEFINITIVO 20261002-10 — SOLO CARDS DE PUBLICACIONES
   Objetivo:
   - Galería tipo Facebook, limpia y centrada.
   - Sin fondo rosado alrededor de las imágenes.
   - Sin desfase vertical ni horizontal.
   - 2 publicaciones por fila en escritorio.
   ========================================================= */

body[data-page="posts"] .posts-feed,
body[data-page="posts"] .flg-posts-feed {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(1.15rem, 2.2vw, 1.65rem) !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  overflow: visible !important;
}

body[data-page="posts"] .social-post-card {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

/* Contenedor de galería: ahora solo da aire interno, no crea una franja rosada */
body[data-page="posts"] .social-post-card__media {
  --flg-gallery-gap: 3px;
  --flg-gallery-radius: 16px;
  order: 3 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: var(--flg-gallery-gap) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  margin: .15rem 0 0 !important;
  padding: .55rem 1rem 1rem !important;
  overflow: hidden !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-sizing: border-box !important;
}

body[data-page="posts"] .social-post-card__media[data-count="1"] {
  grid-template-columns: 1fr !important;
  grid-template-rows: 270px !important;
}

body[data-page="posts"] .social-post-card__media[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: 178px !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, 132px) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="4"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(2, 132px) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:first-child {
  grid-row: 1 / span 2 !important;
}

body[data-page="posts"] .social-post-card__media-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: 100% !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #f5edf1 !important;
  box-sizing: border-box !important;
  cursor: pointer !important;
}

body[data-page="posts"] .social-post-card__media-item img,
body[data-page="posts"] .social-post-card__media-item video {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: 50% 50% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #f5edf1 !important;
  transform: none !important;
}

body[data-page="posts"] .social-post-card__media-item:hover img,
body[data-page="posts"] .social-post-card__media-item:hover video {
  transform: scale(1.018) !important;
}

/* Bordes redondeados correctos según cantidad */
body[data-page="posts"] .social-post-card__media[data-count="1"] .social-post-card__media-item {
  border-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="2"] .social-post-card__media-item:first-child {
  border-top-left-radius: var(--flg-gallery-radius) !important;
  border-bottom-left-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="2"] .social-post-card__media-item:nth-child(2) {
  border-top-right-radius: var(--flg-gallery-radius) !important;
  border-bottom-right-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:first-child {
  border-top-left-radius: var(--flg-gallery-radius) !important;
  border-bottom-left-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:nth-child(2) {
  border-top-right-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="3"] .social-post-card__media-item:nth-child(3) {
  border-bottom-right-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item:nth-child(1) {
  border-top-left-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item:nth-child(2) {
  border-top-right-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item:nth-child(3) {
  border-bottom-left-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media[data-count="4"] .social-post-card__media-item:nth-child(4) {
  border-bottom-right-radius: var(--flg-gallery-radius) !important;
}

body[data-page="posts"] .social-post-card__media-more {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  display: grid !important;
  place-items: center !important;
  width: 100% !important;
  height: 100% !important;
  border-radius: inherit !important;
  color: #fff !important;
  background: rgba(38, 29, 34, .58) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  font-size: clamp(1.55rem, 2.5vw, 2.25rem) !important;
  font-weight: 900 !important;
}

@media (max-width: 1020px) {
  body[data-page="posts"] .posts-feed,
  body[data-page="posts"] .flg-posts-feed {
    grid-template-columns: 1fr !important;
    width: min(100%, 680px) !important;
  }
}

@media (max-width: 720px) {
  body[data-page="posts"] .social-post-card__media {
    padding: .5rem .9rem .9rem !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="1"] {
    grid-template-rows: 225px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="2"] {
    grid-template-rows: 150px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="3"],
  body[data-page="posts"] .social-post-card__media[data-count="4"] {
    grid-template-rows: repeat(2, 112px) !important;
  }
}

@media (max-width: 480px) {
  body[data-page="posts"] .social-post-card__media[data-count="1"] {
    grid-template-rows: 205px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="2"] {
    grid-template-rows: 132px !important;
  }

  body[data-page="posts"] .social-post-card__media[data-count="3"],
  body[data-page="posts"] .social-post-card__media[data-count="4"] {
    grid-template-rows: repeat(2, 102px) !important;
  }
}
