/* =========================================================================
   MARTOS ARANDA V2 - TRABAJOS Y CASOS REALES (PORTFOLIO ENGINE)
   Layout: 2 Columnas de Cards + Barra Lateral (Sidebar)
   ========================================================================= */

/* Unified Hero Heading */
.v2i-servicios-hero--compact h1,
.v2i-servicios-hero h1,
.v2i-trabajos-hub .v2i-servicios-hero h1,
.v2i-caso-detalle .v2i-servicios-hero h1,
.single-services .v2i-servicios-hero h1,
.single-case .v2i-servicios-hero h1 {
	font-family: var(--v2-font-heading, 'Syne', sans-serif) !important;
	font-size: clamp(2.1rem, 2.8vw, 2.75rem) !important;
	line-height: 1.16 !important;
	letter-spacing: -0.03em !important;
	margin-top: 0 !important;
	margin-bottom: 16px !important;
	font-weight: 600 !important;
	color: #ffffff !important;
}

/* Espaciado & Aire Generoso en Hero de Singles de Trabajos */
.v2i-caso-detalle .v2i-servicios-hero--compact,
.single-services .v2i-servicios-hero--compact,
.single-case .v2i-servicios-hero--compact {
	padding: clamp(126px, 10vw, 146px) 0 clamp(64px, 6vw, 86px) !important;
}

.v2i-caso-detalle .v2i-servicios-hero__grid,
.single-services .v2i-servicios-hero__grid,
.single-case .v2i-servicios-hero__grid {
	gap: clamp(40px, 5vw, 68px) !important;
	align-items: center !important;
}

.v2i-caso-detalle .v2i-breadcrumb,
.single-services .v2i-breadcrumb,
.single-case .v2i-breadcrumb {
	margin-bottom: 16px !important;
}

.v2i-caso-detalle .v2i-servicios-hero__badge,
.single-services .v2i-servicios-hero__badge,
.single-case .v2i-servicios-hero__badge {
	margin-bottom: 18px !important;
}

.v2i-caso-detalle .v2i-servicios-hero__lead,
.single-services .v2i-servicios-hero__lead,
.single-case .v2i-servicios-hero__lead {
	margin-bottom: 22px !important;
	line-height: 1.72 !important;
	font-size: 1.05rem !important;
}

.v2i-caso-detalle .v2i-single-hero__thumb,
.single-services .v2i-single-hero__thumb,
.single-case .v2i-single-hero__thumb {
	max-width: 560px !important;
	height: 350px !important;
	border-radius: 26px !important;
}

@media (max-width: 768px) {
	.v2i-caso-detalle .v2i-servicios-hero--compact,
	.single-services .v2i-servicios-hero--compact,
	.single-case .v2i-servicios-hero--compact {
		padding: 110px 0 46px !important;
	}
	.v2i-caso-detalle .v2i-single-hero__thumb,
	.single-services .v2i-single-hero__thumb,
	.single-case .v2i-single-hero__thumb {
		height: 240px !important;
	}
}

/* =========================================================================
   1. ESTRUCTURA PRINCIPAL: PORTFOLIO + SIDEBAR
   ========================================================================= */
.v2-portfolio-layout-section {
	padding: 40px 0 28px;
	background: #ffffff;
}

.v2-portfolio-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px;
	align-items: start;
}

.v2-portfolio-main {
	min-width: 0;
}

.v2-portfolio-main .v2-portfolio-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px;
}

/* =========================================================================
   2. BARRA LATERAL (SIDEBAR) & WIDGETS
   ========================================================================= */
.v2-portfolio-sidebar {
	display: flex;
	flex-direction: column;
	gap: 30px;
	position: sticky;
	top: 90px;
	align-self: flex-start;
}

.v2-portfolio-widget {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 24px;
	padding: 26px;
	box-shadow: 0 4px 20px rgba(11, 31, 51, 0.04);
}

.v2-portfolio-widget__title {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: 1.12rem;
	font-weight: 700;
	color: #0b1f33;
	margin: 0 0 18px;
	padding-bottom: 12px;
	border-bottom: 1.5px solid #f1f5f9;
	display: flex;
	align-items: center;
	gap: 8px;
}

.v2-portfolio-widget__title::before {
	content: "";
	display: inline-block;
	width: 4px;
	height: 18px;
	background: #0169fa;
	border-radius: 2px;
}

/* Widget: Buscador */
.v2-portfolio-search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.v2-portfolio-search-input {
	width: 100%;
	height: 48px;
	padding: 0 48px 0 18px;
	border-radius: 999px;
	border: 1.5px solid #e2e8f0;
	background: #f8fafc;
	font-size: 0.92rem;
	color: #0b1f33;
	font-family: var(--v2-font-primary, 'Inter', sans-serif);
	outline: none;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
}

.v2-portfolio-search-input:focus {
	border-color: #0169fa;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(1, 105, 250, 0.1);
}

.v2-portfolio-search-btn {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: none;
	background: #0169fa;
	color: #ffffff;
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.v2-portfolio-search-btn:hover {
	background: #0152c7;
	transform: translateY(-50%) scale(1.05);
}

/* Widget: Lista de Categorías de Proyectos */
.v2-portfolio-cat-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.v2-portfolio-cat-item a {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 14px;
	border-radius: 12px;
	color: #334155;
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 600;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.v2-portfolio-cat-item a:hover {
	background: rgba(1, 105, 250, 0.06);
	color: #0169fa;
	transform: translateX(4px);
}

.v2-portfolio-cat-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 7px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #64748b;
	font-size: 0.76rem;
	font-weight: 700;
	transition: background 0.2s ease, color 0.2s ease;
}

.v2-portfolio-cat-item a:hover .v2-portfolio-cat-count {
	background: #0169fa;
	color: #ffffff;
}

/* Widget: Proyectos Destacados / Recientes */
.v2-portfolio-recent-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.v2-portfolio-recent-item {
	display: flex;
	gap: 14px;
	align-items: center;
	text-decoration: none;
	transition: transform 0.2s ease;
}

.v2-portfolio-recent-thumb {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f1f5f9;
}

.v2-portfolio-recent-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.v2-portfolio-recent-item:hover .v2-portfolio-recent-thumb img {
	transform: scale(1.08);
}

.v2-portfolio-recent-info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.v2-portfolio-recent-title {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: 0.88rem;
	font-weight: 600;
	color: #0b1f33;
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.v2-portfolio-recent-item:hover .v2-portfolio-recent-title {
	color: #0169fa;
}

/* Widget: Banner CTA */
.v2-portfolio-widget--cta {
	background: radial-gradient(circle at 100% 0%, rgba(1, 105, 250, 0.35), transparent 60%), linear-gradient(135deg, #071a2d 0%, #0b1f33 100%);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.12);
	position: relative;
	overflow: hidden;
}

.v2-portfolio-widget--cta .v2-portfolio-widget__title {
	color: #ffffff;
	border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
}

.v2-portfolio-widget--cta .v2-portfolio-widget__title::before {
	background: #39d040;
}

.v2-portfolio-widget--cta p {
	font-size: 0.92rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.82);
	margin: 0 0 20px;
}

/* Widget: Tags de Tecnologías */
.v2-portfolio-tags-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.v2-portfolio-tag-pill {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f1f5f9;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.2s ease;
}

.v2-portfolio-tag-pill:hover {
	background: #0169fa;
	border-color: #0169fa;
	color: #ffffff;
	transform: translateY(-2px);
}

/* =========================================================================
   3. RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
	.v2-portfolio-layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.v2-portfolio-sidebar {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 768px) {
	.v2-portfolio-layout-section {
		padding: 36px 0 60px;
	}
	.v2-portfolio-main .v2-portfolio-grid {
		grid-template-columns: 1fr;
	}
	.v2-portfolio-sidebar {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.v2-home-blog-card {
		grid-template-columns: 1fr;
		padding: 20px 18px;
		border-radius: 22px;
	}
	.v2-home-blog-card__thumb {
		height: 180px;
		border-radius: 16px;
	}
	.v2-home-blog-card__title {
		font-size: 1.18rem;
	}
}
