/*
 * Tarjeta de red social (LinkedIn, Instagram, Facebook).
 *
 *   Contenedor con enlace (Avanzado → Enlace) → social-card social-card--li | --ig | --fb
 *     Contenedor superior                     → social-card__top
 *       Ícono de la red                       → social-card__icon
 *       Contenedor                            → social-card__id
 *         Título + texto                      → social-card__name / social-card__handle
 *       Ícono flecha                          → social-card__go
 *     Publicación destacada (LinkedIn/Facebook):
 *       Contenedor                            → social-card__post  (+ social-card__post--wide en Facebook)
 *         Imagen                              → social-card__post-photo
 *         Contenedor con título y texto       → social-card__caption
 *           Título / texto                    → social-card__caption-title / social-card__caption-text
 *     Grilla de 6 fotos (Instagram):
 *       Contenedor                            → social-card__grid
 *         6 imágenes                          → social-card__thumb (+ social-card__thumb--left)
 *     Editor de texto                         → social-card__text
 *     Editor de texto (parece botón)          → social-card__btn
 *
 * Los efectos hover usan ".social-card:hover .elemento": es estado de la tarjeta completa.
 */

.social-card {
	--card-color: #1877F2;
	--card-icon-bg: var(--card-color);
	display: flex;
	gap: 16px;
	min-width: 0;
	padding: clamp(18px, 1.8vw, 24px);
	border: 1px solid var(--color-line);
	border-radius: var(--radius-lg);
	background: #fff;
	color: var(--color-ink);
	text-decoration: none;
	scroll-snap-align: center;
	box-shadow: 0 0 0 rgba(41, 33, 31, 0);
}
.social-card--li { --card-color: #0A66C2; }
.social-card--ig {
	--card-color: #E1306C;
	--card-icon-bg: radial-gradient(circle at 30% 107%, #FDF497 0%, #FD5949 45%, #D6249F 60%, #285AEB 90%);
}
.social-card--fb { --card-color: #1877F2; }

/* Hover con "translate" (no "transform") para no chocar con la animación .anim, que usa transform. */
.js-anim .social-card {
	transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out), translate .3s var(--ease-out), box-shadow .3s, border-color .3s;
}
.social-card:hover {
	border-color: var(--card-color);
	translate: 0 -4px;
	box-shadow: 0 18px 40px rgba(41, 33, 31, .1);
}

.social-card__top {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
}

.social-card__icon {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 14px;
	background: var(--card-icon-bg);
	color: #fff;
}
/* Apunta al ícono interno del widget. */
.social-card__icon .elementor-icon,
.social-card__go .elementor-icon {
	display: block;
	line-height: 1;
	color: inherit;
}
.social-card__icon .elementor-icon { font-size: 22px; }

.social-card__id { gap: 0; min-width: 0; }
.social-card__name { margin: 0; }
.social-card__name .elementor-heading-title {
	margin: 0;
	font-size: 18px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -.01em;
}
.social-card__handle p {
	margin: 0;
	overflow: hidden;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--color-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.social-card__go {
	display: grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--color-line);
	border-radius: 50%;
	color: var(--card-color);
	transition: background .3s, color .3s, transform .3s;
}
.social-card__go .elementor-icon { font-size: 14px; }
.social-card:hover .social-card__go {
	background: var(--card-color);
	color: #fff;
	transform: rotate(-45deg);
}

/* Publicación destacada con título sobre la foto */
.social-card__post {
	position: relative;
	gap: 0;
	aspect-ratio: 4 / 3.2;
	border-radius: 18px;
	overflow: hidden;
}
/* Apunta al <img> interno del widget. */
.social-card__post-photo {
	position: absolute !important; /* Elementor da position: relative a sus widgets */
	inset: 0;
	margin: 0 !important;
}
.social-card__post-photo img,
.social-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform .8s var(--ease-out);
}
.social-card:hover .social-card__post-photo img,
.social-card:hover .social-card__thumb img { transform: scale(1.05); }

.social-card__caption {
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	gap: 0;
	padding: 44px 16px 14px;
	background: linear-gradient(0deg, rgba(24, 15, 12, .82), rgba(24, 15, 12, 0));
	color: #fff;
}
.social-card__caption-title { margin: 0; }
.social-card__caption-title .elementor-heading-title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.25;
	color: #fff;
}
.social-card__caption-text p {
	margin: 3px 0 0;
	font-size: 13.5px;
	line-height: 1.4;
	color: rgba(255, 255, 255, .85);
}

/* Grilla de 6 fotos (Instagram) */
.social-card__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-template-rows: repeat(2, minmax(0, 1fr));
	gap: 6px;
	aspect-ratio: 4 / 3.2;
}
.social-card__thumb {
	min-height: 0;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
}
.social-card__thumb .elementor-widget-container { height: 100%; }
.social-card__thumb--left img { object-position: 30% center; }

.social-card__text { flex: 1; }
.social-card__text p {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.55;
	color: var(--color-muted);
}

.social-card__btn p {
	display: flex;
	justify-content: center;
	margin: 0;
	padding: 12px 18px;
	border: 2px solid var(--card-color);
	border-radius: var(--radius-pill);
	font-weight: 700;
	line-height: 1.55;
	color: var(--card-color);
	transition: background .3s, color .3s;
}
.social-card:hover .social-card__btn p { background: var(--card-color); color: #fff; }

/* Tablet: Facebook ocupa las dos columnas y su foto es apaisada. */
@media (min-width: 768px) and (max-width: 1024px) {
	.social-card--fb { grid-column: 1 / -1; }
	.social-card__post--wide { aspect-ratio: 16 / 7; }
}

@media (prefers-reduced-motion: reduce) {
	.social-card:hover { translate: none; }
	.social-card:hover .social-card__post-photo img,
	.social-card:hover .social-card__thumb img { transform: none; }
}
