/* =========================================================================
   MARTOS ARANDA V2 - MOTOR EDITORIAL DEL BLOG
   Layout: 2 Columnas de Cards + Barra Lateral (Sidebar)
   ========================================================================= */

/* Barra superior de lectura */
.v2-reading-bar {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	background: linear-gradient(90deg, #0169fa, #39d040);
	z-index: 9999;
	width: 0%;
	transition: width .1s ease;
}

/* Unified Hero Heading */
.v2i-servicios-hero--compact h1,
.v2i-servicios-hero h1,
.v2i-blog-hub .v2i-servicios-hero h1,
.single-post .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 Blog */
.v2i-blog-single .v2i-servicios-hero--compact,
.single-post .v2i-servicios-hero--compact {
	padding: clamp(126px, 10vw, 146px) 0 clamp(64px, 6vw, 86px) !important;
}

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

.v2i-blog-single .v2i-breadcrumb,
.single-post .v2i-breadcrumb {
	margin-bottom: 16px !important;
}

.v2i-blog-single .v2i-servicios-hero__badge,
.single-post .v2i-servicios-hero__badge {
	margin-bottom: 18px !important;
}

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

.v2i-blog-single .v2i-single-hero__thumb,
.single-post .v2i-single-hero__thumb {
	max-width: 560px !important;
	height: 350px !important;
	border-radius: 26px !important;
}

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

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

.v2-blog-related-section {
	background: #ffffff;
	padding: 24px 0 24px;
	border-top: 1px solid #edf2f7;
}

.v2-blog-related-section .v2-section-head {
	margin-bottom: 22px;
}

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

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

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

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

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

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

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

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

.v2-blog-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-blog-search-input:focus {
	border-color: #0169fa;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(1, 105, 250, 0.1);
}

.v2-blog-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-blog-search-btn:hover {
	background: #0152c7;
	transform: translateY(-50%) scale(1.05);
}

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

.v2-blog-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.9rem;
	font-weight: 600;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.v2-blog-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.74rem;
	font-weight: 700;
	transition: background 0.2s ease, color 0.2s ease;
}

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

/* Widget: Artículos Destacados / Recientes */
.v2-blog-recent-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

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

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

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

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

.v2-blog-recent-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.v2-blog-recent-meta,
.v2-blog-recent-date {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 0.74rem;
	color: #94a3b8 !important;
	font-weight: 500;
	text-decoration: none !important;
}

.v2-blog-recent-meta span {
	color: #94a3b8 !important;
	font-size: 0.74rem;
	font-weight: 500;
}

.v2-blog-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-blog-recent-item:hover .v2-blog-recent-title {
	color: #0169fa;
}

.v2-blog-recent-item:hover .v2-blog-recent-meta,
.v2-blog-recent-item:hover .v2-blog-recent-meta span,
.v2-blog-recent-item:hover .v2-blog-recent-date {
	color: #94a3b8 !important;
}

/* Widget: Banner CTA */
.v2-blog-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-blog-widget--cta .v2-blog-widget__title {
	color: #ffffff;
	border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
}

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

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

/* Widget: Nube de Etiquetas */
.v2-blog-tags-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

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

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

/* =========================================================================
   BARRA DE COMPARTIR SOCIAL EN ARTÍCULOS
   ========================================================================= */
.v2-share-section {
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid #edf2f7;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 18px;
}

.v2-share-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.v2-share-label {
	font-weight: 700;
	color: #0b1f33;
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	margin-right: 4px;
}

.v2-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	color: #475569 !important;
	transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
	line-height: 1;
	flex-shrink: 0;
	box-shadow: 0 2px 8px rgba(11, 31, 51, 0.04);
}

.v2-share-btn svg {
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.v2-share-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(11, 31, 51, 0.08);
}

.v2-share-btn:hover svg {
	transform: scale(1.1);
}

/* Redes Específicas */
.v2-share-btn--wa:hover {
	background: #25D366;
	border-color: #25D366;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32);
}

.v2-share-btn--li:hover {
	background: #0077B5;
	border-color: #0077B5;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(0, 119, 181, 0.32);
}

.v2-share-btn--x:hover {
	background: #000000;
	border-color: #000000;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.32);
}

.v2-share-btn--fb:hover {
	background: #1877F2;
	border-color: #1877F2;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(24, 119, 242, 0.32);
}

.v2-share-btn--ig:hover {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
	border-color: transparent;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(214, 36, 159, 0.35);
}

.v2-share-btn--tg:hover {
	background: #229ED9;
	border-color: #229ED9;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(34, 158, 217, 0.32);
}

.v2-share-btn--email:hover {
	background: #0b1f33;
	border-color: #0b1f33;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(11, 31, 51, 0.28);
}

.v2-share-btn--copy:hover {
	background: #0169fa;
	border-color: #0169fa;
	color: #ffffff !important;
	box-shadow: 0 6px 18px rgba(1, 105, 250, 0.32);
}

.v2-share-btn--copied {
	background: #10b981 !important;
	border-color: #10b981 !important;
	color: #ffffff !important;
}

.v2-share-tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.v2-share-tag {
	padding: 6px 13px;
	border-radius: 999px;
	background: #f1f5f9;
	color: #475569 !important;
	font-size: 0.8rem;
	text-decoration: none !important;
	font-weight: 600;
	transition: all 0.2s ease;
	border: 1px solid transparent;
}

.v2-share-tag:hover {
	background: #0169fa;
	color: #ffffff !important;
	transform: translateY(-1px);
}

/* Widget: TOC en Sidebar */
.v2-blog-widget--toc {
	display: block;
}

.v2-sidebar-toc-nav ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.v2-sidebar-toc-link {
	display: block;
	padding: 7px 11px;
	border-radius: 9px;
	color: #475569;
	font-size: 0.84rem;
	font-weight: 500;
	line-height: 1.45;
	text-decoration: none;
	border-left: 2.5px solid transparent;
	transition: all 0.2s ease;
}

.v2-sidebar-toc-link:hover {
	color: #0169fa;
	background: #f8fafc;
	border-left-color: rgba(1, 105, 250, 0.4);
	padding-left: 14px;
}

.v2-sidebar-toc-link.is-active {
	color: #0169fa;
	font-weight: 600;
	background: rgba(1, 105, 250, 0.07);
	border-left-color: #0169fa;
	padding-left: 14px;
}

/* =========================================================================
   3. ESTILOS EDITORIALES DEL ARTÍCULO (.v2-article-body)
   ========================================================================= */
.v2-article-body {
	font-size: 1.05rem;
	line-height: 1.82;
	color: #334155;
	font-family: var(--v2-font-primary, 'Inter', sans-serif);
}

.v2-article-body > *:first-child {
	margin-top: 0;
}

.v2-article-body h2 {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: clamp(1.38rem, 1.85vw, 1.7rem);
	font-weight: 600;
	color: #0b1f33;
	margin: 2.4rem 0 1rem;
	line-height: 1.28;
	letter-spacing: -0.02em;
	scroll-margin-top: 120px;
}

.v2-article-body h3 {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: clamp(1.15rem, 1.4vw, 1.32rem);
	font-weight: 600;
	color: #0b1f33;
	margin: 1.8rem 0 0.8rem;
	line-height: 1.35;
	scroll-margin-top: 120px;
}

.v2-article-body h4 {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: 1.02rem;
	font-weight: 600;
	color: #0b1f33;
	margin: 1.4rem 0 0.6rem;
	line-height: 1.4;
}

.v2-article-body p {
	margin: 0 0 1.5rem;
}

.v2-article-body p a {
	color: #0169fa;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: rgba(1, 105, 250, 0.35);
	text-underline-offset: 3px;
	transition: all 0.2s ease;
}

.v2-article-body p a:hover {
	color: #004ecc;
	text-decoration-color: #0169fa;
}

.v2-article-body ul,
.v2-article-body ol {
	margin: 0 0 1.6rem;
	padding-left: 1.5rem;
}

.v2-article-body li {
	margin-bottom: 0.6rem;
	line-height: 1.75;
}

.v2-article-body blockquote {
	margin: 2.2rem 0;
	padding: 22px 28px;
	border-left: 4px solid #0169fa;
	background: #f8fafc;
	border-radius: 0 18px 18px 0;
	font-style: italic;
	color: #1e293b;
	font-size: 1.04rem;
	line-height: 1.7;
}

.v2-article-body img {
	max-width: 100%;
	height: auto;
	border-radius: 18px;
	margin: 1.8rem 0;
	box-shadow: 0 12px 32px rgba(11, 31, 51, 0.07);
	display: block;
}

.v2-article-body table {
	width: 100%;
	margin: 1.8rem 0;
	border-collapse: collapse;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 4px 18px rgba(11, 31, 51, 0.04);
}

.v2-article-body th,
.v2-article-body td {
	padding: 12px 16px;
	border: 1px solid #e2e8f0;
	text-align: left;
	font-size: 0.92rem;
}

.v2-article-body th {
	background: #f1f5f9;
	color: #0b1f33;
	font-weight: 600;
}

/* Tarjetas de Lista de Artículos */
.v2-home-blog-card__title {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: 1.12rem;
	font-weight: 600;
	color: #0b1f33;
	line-height: 1.35;
	margin: 0 0 8px;
}

.v2-home-blog-card__title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease;
}

.v2-home-blog-card__title a:hover {
	color: #0169fa;
}

.v2-post-nav-card:hover {
	border-color: #0169fa !important;
	background: #ffffff !important;
	transform: translateY(-3px);
	box-shadow: 0 10px 24px rgba(1, 105, 250, 0.1);
}


/* =========================================================================
   4. RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
	.v2-blog-layout {
		grid-template-columns: 1fr;
		gap: 40px;
	}
	.v2-blog-sidebar {
		position: static;
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
	.v2-blog-widget--toc {
		display: none;
	}
	.v2-toc-mobile-card {
		display: block !important;
	}
}

@media (max-width: 768px) {
	.v2-blog-layout-section {
		padding: 36px 0 60px;
	}
	.v2-blog-main .v2-blog-grid {
		grid-template-columns: 1fr;
	}
	.v2-blog-sidebar {
		grid-template-columns: 1fr;
	}
	.v2-article-body {
		font-size: 1.02rem;
		line-height: 1.75;
	}
}

/* =========================================================================
   5. CTA COMPACTO Y DISCRETO PARA BLOG & ARTÍCULOS
   ========================================================================= */
.v2-blog-cta-compact {
	padding: 24px 0 54px;
}

.v2-blog-cta-compact__card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 20px;
	padding: 24px 30px;
	box-shadow: 0 4px 18px rgba(11, 31, 51, 0.04);
}

.v2-blog-cta-compact__text {
	max-width: 620px;
}

.v2-blog-cta-compact__title {
	font-family: var(--v2-font-heading, 'Syne', sans-serif);
	font-size: 1.2rem;
	font-weight: 600;
	color: #0b1f33;
	margin: 0 0 4px;
	line-height: 1.3;
}

.v2-blog-cta-compact__desc {
	font-size: 0.88rem;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}

.v2-blog-cta-compact__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.v2-blog-cta-compact__actions .v2-button-glass {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #0b1f33 !important;
}

.v2-blog-cta-compact__actions .v2-button-glass:hover {
	background: #0b1f33;
	color: #ffffff !important;
	border-color: #0b1f33;
}

@media (max-width: 768px) {
	.v2-blog-cta-compact__card {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
		padding: 20px;
	}
	.v2-blog-cta-compact__actions {
		width: 100%;
		flex-wrap: wrap;
	}
	.v2-blog-cta-compact__actions .v2-button-gradient,
	.v2-blog-cta-compact__actions .v2-button-glass {
		width: 100%;
		justify-content: center;
	}
}

@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;
	}
	.v2-author-box {
		flex-direction: column;
		text-align: center;
	}
}

