/*
 * Tarjeta de post estilo LinkedIn (social/_post_card.html).
 * Una sola tarjeta para posts de agencia, club y club amateur: cabecera con
 * autor, texto con "ver más", contenido (una foto/video o un carrusel si hay
 * varios) y barra de acciones.
 */
.gf-post {
    --gf-post-ink: #191f26;
    --gf-post-muted: #5e6b78;
    --gf-post-line: #e3e8ee;
    --gf-post-accent: #1f9d3a;
    position: relative;
    background: #fff;
    border: 1px solid var(--gf-post-line);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    margin-bottom: 16px;
    overflow: hidden;
    color: var(--gf-post-ink);
}

/* --- Cabecera ------------------------------------------------------------- */
.gf-post-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 6px; }
.gf-post-avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; background: #f1f4f7; border: 1px solid var(--gf-post-line); }
.gf-post-avatar.is-org { border-radius: 10px; }
.gf-post-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gf-post-avatar.is-org img { object-fit: contain; padding: 3px; background: #fff; }
.gf-post-who { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.gf-post-name { display: inline-block; max-width: 100%; font-size: .95rem; font-weight: 700; color: var(--gf-post-ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
a.gf-post-name:hover { color: var(--gf-post-accent); text-decoration: underline; }
.gf-post-headline { font-size: .78rem; color: var(--gf-post-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-post-headline a { color: inherit; font-weight: 600; text-decoration: none; }
.gf-post-headline a:hover { color: var(--gf-post-accent); text-decoration: underline; }
.gf-post-time { font-size: .74rem; color: var(--gf-post-muted); }
.gf-post-time i { font-size: .7rem; }
.gf-post-menu { flex: 0 0 auto; margin-left: auto; }

/* --- Texto --------------------------------------------------------------- */
.gf-post-text { padding: 4px 16px 0; font-size: .92rem; line-height: 1.5; color: var(--gf-post-ink); overflow-wrap: anywhere; }
.gf-post-text p { margin: 0 0 .5em; }
.gf-post-text p:last-child { margin-bottom: 0; }
.gf-post-text.is-clamped { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.gf-post-text.is-clamped p { display: inline; }
.gf-post-more { display: block; margin: 2px 16px 0 auto; padding: 0; border: 0; background: none; font-size: .85rem; font-weight: 600; color: var(--gf-post-muted); }
.gf-post-more:hover { color: var(--gf-post-accent); text-decoration: underline; }

/* --- Contenido y carrusel -------------------------------------------------- */
.gf-post-media { position: relative; margin-top: 10px; background: #0f1418; }
.gf-post-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gf-post-track::-webkit-scrollbar { display: none; }
.gf-post-slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; max-height: 560px; background: #0f1418; }
.gf-post-media:not(.is-carousel) .gf-post-slide { aspect-ratio: auto; min-height: 180px; }
.gf-post-slide > img { display: block; width: 100%; height: 100%; max-height: 560px; object-fit: contain; cursor: zoom-in; }
.gf-post-media:not(.is-carousel) .gf-post-slide > img { height: auto; }
.gf-post-video, .gf-post-slide iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; }
.gf-post-video img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.gf-post-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; color: #ff0000; text-shadow: 0 2px 12px rgba(0,0,0,.45); transition: transform .15s ease; }
.gf-post-play i { background: radial-gradient(circle, #fff 30%, transparent 32%); }
.gf-post-video:hover .gf-post-play { transform: scale(1.08); }

.gf-post-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: var(--gf-post-ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); transition: opacity .15s ease; }
.gf-post-nav.prev { left: 10px; }
.gf-post-nav.next { right: 10px; }
.gf-post-nav[disabled] { opacity: 0; pointer-events: none; }
.gf-post-nav:focus-visible { outline: 3px solid rgba(31,157,58,.6); outline-offset: 2px; }
.gf-post-count { position: absolute; top: 10px; right: 10px; z-index: 2; padding: 2px 9px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.gf-post-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gf-post-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.5); box-shadow: 0 0 2px rgba(0,0,0,.4); transition: background .15s ease, transform .15s ease; }
.gf-post-dots span.is-on { background: #fff; transform: scale(1.2); }
@media (hover: none) { .gf-post-nav { display: none; } }

/* --- Pie ------------------------------------------------------------------ */
.gf-post-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 12px 10px; margin-top: 8px; border-top: 1px solid var(--gf-post-line); }
.gf-post-media + .gf-post-foot { margin-top: 0; }
.gf-post-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gf-post-profile { font-size: .82rem; font-weight: 600; color: var(--gf-post-accent); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
.gf-post-profile:hover { background: #eef8f0; color: var(--gf-post-accent); }

/* --- Visor de imágenes ----------------------------------------------------- */
.gf-post-lightbox { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.88); padding: 16px; cursor: zoom-out; }
.gf-post-lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.gf-post-lightbox button { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 1.2rem; }

@media (max-width: 575.98px) {
    .gf-post { border-radius: 10px; }
    .gf-post-head { padding: 12px 12px 4px; }
    .gf-post-text { padding: 4px 12px 0; }
    .gf-post-slide { aspect-ratio: 1 / 1; }
}
@media (prefers-reduced-motion: reduce) {
    .gf-post-track { scroll-behavior: auto; }
    .gf-post-nav, .gf-post-dots span, .gf-post-play { transition: none; }
}
