/**
 * TES FlipBox Custom - Frontend Styles
 * Replica exacta de OurPeople.tsx (project_flipbox_tes)
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ===================================
   CONTAINER & GRID
   =================================== */

.tfb-container {
	width: 100%;
	background: #f5faff;
	padding: 64px 0;
}

.tfb-grid {
	max-width: 1600px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 32px;
}

/* Mobile: 1 coluna */
@media (min-width: 640px) {
	.tfb-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 40px;
		padding: 0 48px;
	}
}

/* Tablet: 2 columnas */
@media (min-width: 1024px) {
	.tfb-grid-2 {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.tfb-grid-3 {
		grid-template-columns: repeat(3, 1fr);
	}
	
	.tfb-grid-4 {
		grid-template-columns: repeat(4, 1fr);
	}
	
	.tfb-grid-5 {
		grid-template-columns: repeat(5, 1fr);
	}
}

/* ===================================
   FLIPBOX CARD - 3D EFFECT
   =================================== */

.tfb-card-wrapper {
	perspective: 1000px;
	height: 400px;
	width: 100%;
}

.tfb-card {
	position: relative;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: transform 0.7s ease;
	cursor: pointer;
}

.tfb-card-wrapper:hover .tfb-card {
	transform: rotateY(180deg);
}

/* ===================================
   FRONT SIDE
   =================================== */

.tfb-card-front,
.tfb-card-back {
	position: absolute;
	inset: 0;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
	border-radius: 15px;
	overflow: hidden;
}

.tfb-card-front {
	z-index: 2;
}

.tfb-card-front-inner {
	position: relative;
	width: 100%;
	height: 100%;
}

/* Image */
.tfb-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tfb-image-placeholder {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, #01458c 0%, #0093dd 100%);
}

/* Blue tint overlay — replica exacta del mix-blend-color */
.tfb-blue-tint {
	position: absolute;
	inset: 0;
	background: #559be2;
	mix-blend-mode: color;
	pointer-events: none;
}

/* Gradient overlay — replica exacta */
.tfb-gradient-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(1, 69, 140, 0.9) 0%,
		rgba(1, 69, 140, 0.4) 27%,
		rgba(85, 155, 226, 0) 55%
	);
	pointer-events: none;
}

/* Front content — name at bottom */
.tfb-front-content {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	padding: 24px;
	z-index: 10;
}

.tfb-front-name {
	font-family: 'Poppins', sans-serif;
	font-size: 22px;
	font-weight: 600;
	color: #ffffff;
	margin: 0;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.tfb-front-name {
		font-size: 24px;
	}
}

/* ===================================
   BACK SIDE
   =================================== */

.tfb-card-back {
	transform: rotateY(180deg);
	background: linear-gradient(
		to top,
		#0093dd 0%,
		rgba(0, 147, 221, 0.95) 50%,
		rgba(1, 69, 140, 0.9) 100%
	);
	z-index: 1;
}

.tfb-card-back-inner {
	position: relative;
	width: 100%;
	height: 100%;
	padding: 32px;
	display: flex;
	flex-direction: column;
}

/* Back name */
.tfb-back-name {
	font-family: 'Poppins', sans-serif;
	font-size: 22px;
	font-weight: 600;
	color: #ffffff;
	margin: 0 0 12px;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.tfb-back-name {
		font-size: 24px;
	}
}

/* Back position */
.tfb-back-position {
	font-family: 'Poppins', sans-serif;
	font-size: 17px;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 0 24px;
	line-height: 1.3;
}

@media (min-width: 768px) {
	.tfb-back-position {
		font-size: 18px;
	}
}

/* Back description */
.tfb-back-description {
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	color: #ffffff;
	margin: 0 0 auto;
	line-height: 1.75;
	flex: 1;
}

@media (min-width: 768px) {
	.tfb-back-description {
		font-size: 17px;
	}
}

/* ===================================
   SOCIAL ICONS
   =================================== */

.tfb-social-icons {
	display: flex;
	gap: 16px;
	margin-top: 24px;
}

.tfb-social-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	transition: background 0.3s ease;
	text-decoration: none;
}

.tfb-social-icon:hover {
	background: rgba(255, 255, 255, 0.3);
}

.tfb-social-icon svg {
	width: 24px;
	height: 24px;
	color: #ffffff;
	stroke-width: 1.5;
}

/* ===================================
   NO RESULTS MESSAGE
   =================================== */

.tfb-no-results {
	font-family: 'Poppins', sans-serif;
	font-size: 18px;
	color: #6b6b6b;
	text-align: center;
	padding: 60px 20px;
	background: #ffffff;
	border-radius: 12px;
	border: 2px dashed #e5e5e5;
	margin: 40px auto;
	max-width: 600px;
}

/* ===================================
   MOBILE OPTIMIZATIONS
   =================================== */

@media (max-width: 639px) {
	.tfb-container {
		padding: 48px 0;
	}
	
	.tfb-card-wrapper {
		height: 380px;
	}
	
	.tfb-card-back-inner {
		padding: 24px;
	}
	
	.tfb-social-icons {
		gap: 12px;
	}
	
	.tfb-social-icon {
		width: 48px;
		height: 48px;
	}
}

/* ===================================
   ACCESSIBILITY
   =================================== */

@media (prefers-reduced-motion: reduce) {
	.tfb-card {
		transition: none;
	}
	
	.tfb-card-wrapper:hover .tfb-card {
		transform: none;
	}
	
	/* Fallback: show both sides stacked on hover */
	.tfb-card-wrapper:hover .tfb-card-front {
		opacity: 0;
	}
	
	.tfb-card-wrapper:hover .tfb-card-back {
		transform: none;
		opacity: 1;
	}
}

/* Touch devices: tap to flip */
@media (hover: none) {
	.tfb-card-wrapper.flipped .tfb-card {
		transform: rotateY(180deg);
	}
}
