/*
 Theme Name: GeneratePress Child
 Theme URI: https://codigo-vital.dev3.prometeoinnovations.com
 Description: Tema hijo para el blog Código Vital (GeneratePress).
 Author: Enrique Granda
 Version: 1.0.0
 Template: generatepress
 Text Domain: generatepress-child
*/

/* ================================================
   ESTRUCTURA PERSONALIZADA PARA ENTRADAS DE BLOG
   ================================================ */

/* Categoría encima del título */
.entry-category-top {
	margin-bottom: 10px;
}

.entry-category-top .entry-category {
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: #0066cc;
	text-decoration: none;
	transition: color 0.3s ease;
}

.entry-category-top .entry-category:hover {
	color: #004d99;
	text-decoration: underline;
}

.entry-category-top .category-separator {
	color: #666;
	font-weight: normal;
}

/* Título del artículo (H1) */
.single .entry-header .entry-title {
	font-size: 2.5rem;
	line-height: 1.3;
	margin-bottom: 15px;
	color: #1a1a1a;
}

/* Metadatos personalizados (Por Autor | Fecha) */
.entry-meta-custom {
	font-size: 15px;
	color: #666;
	margin-bottom: 25px;
	font-style: italic;
}

.entry-meta-custom .entry-author {
	font-weight: 500;
}

.entry-meta-custom .meta-separator {
	margin: 0 8px;
}

/* Imagen destacada a ancho completo de la columna de contenido */
.single .post-image {
	margin-bottom: 30px;
}

.single .post-image img {
	/* width: 100%;
	height: auto;
	border-radius: 4px; */
	max-height: 720px;
	max-width: 100%;
	width: auto;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Contenido del artículo */
.entry-content {
	font-size: 18px;
	line-height: 1.8;
	color: #333;
}

/* Primer párrafo en negrita (entradilla) - solo en posts, no en páginas */
/* .single-post .entry-content>p:first-of-type {
	font-weight: 600;
	font-size: 1.1em;
	color: #1a1a1a;
} */

/* Subtítulos H2 y H3 */
.entry-content h2 {
	font-size: 1.8rem;
	font-weight: 700;
	margin-top: 2em;
	margin-bottom: 0.8em;
	color: #1a1a1a;
}

.entry-content h3 {
	font-size: 1.4rem;
	font-weight: 600;
	margin-top: 1.5em;
	margin-bottom: 0.6em;
	color: #333;
}

/* Citas destacadas (blockquotes) */
.entry-content blockquote {
	border-left: 4px solid #0066cc;
	background-color: #f5f9fc;
	padding: 20px 25px;
	margin: 2em 0;
	font-style: italic;
	font-size: 1.1em;
	color: #1a1a1a;
}

/* ================================================
   BOTONES DE COMPARTIR EN REDES SOCIALES
   ================================================ */

/* Agregar "Compartir:" antes de los botones de AddToAny */
.addtoany_content_bottom::before {
	content: "Compartir: ";
	font-weight: 600;
	font-size: 16px;
	color: #333;
	margin-right: 15px;
	display: inline-block;
	user-select: text;
	-webkit-user-select: text;
	-moz-user-select: text;
	-ms-user-select: text;
}

/* Contenedor de AddToAny con etiqueta Compartir */
.addtoany_content_bottom {
	display: flex !important;
	align-items: center !important;
}

/* ================================================
   BLOQUE CTA (LLAMADA A LA ACCIÓN) DESPUÉS DEL CONTENIDO
   ================================================ */

.cta-separator {
	margin: 40px 0 30px 0;
	border: none;
	border-top: 1px solid #e0e0e0;
}

.cta-content {
	color: #333;
}

.cta-content .cta-intro strong {
	font-weight: 700;
}

.cta-content .cta-link {
	color: #0066cc;
	font-weight: 600;
	text-decoration: underline;
	transition: color 0.3s ease;
}

.cta-content .cta-link:hover {
	color: #004d99;
	text-decoration: none;
}

/* ================================================
   DISEÑO DE CATEGORÍAS EN LA PÁGINA DE INICIO (GRID 2x2)
   ================================================ */

/* Grid de categorías en inicio */
.categorias-inicio {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important;
	gap: 24px !important;
	margin: 40px 0 !important;
	padding: 0 !important;
}

/* Tarjeta individual de categoría */
.categorias-inicio .wp-block-tiptip-hyperlink-group-block {
	background: #ffffff;
	border-radius: 12px;
	padding: 32px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	text-decoration: none;
	display: block;
}

.categorias-inicio .wp-block-tiptip-hyperlink-group-block:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Ajustar las columnas dentro de cada tarjeta */
.categorias-inicio .wp-block-columns {
	margin: 0 !important;
	gap: 24px !important;
	align-items: center !important;
}

/* Columna del icono */
/* .categorias-inicio .wp-block-column:first-child {
	flex-basis: auto !important;
	flex-grow: 0 !important;
} */

/* Contenedor del SVG */
.categorias-inicio .safe-svg-cover {
	margin: 0 !important;
}

.categorias-inicio .safe-svg-inside svg {
	fill: #0066cc;
	transition: fill 0.3s ease;
}

.categorias-inicio .wp-block-tiptip-hyperlink-group-block:hover .safe-svg-inside svg {
	fill: #004d99;
}

/* Columna del contenido */
.categorias-inicio .wp-block-column:last-child {
	flex-grow: 1 !important;
}

/* Título de la categoría */
.categorias-inicio .wp-block-heading {
	font-size: 20px !important;
	line-height: 1.3 !important;
	margin: 0 0 8px 0 !important;
	color: #1a1a1a !important;
}

/* Descripción de la categoría */
.categorias-inicio p {
	font-size: 15px !important;
	line-height: 1.5 !important;
	color: #666 !important;
	margin: 0 !important;
}

/* ================================================
   DISEÑO DE ENTRADAS EN LA PÁGINA DE INICIO (GRID)
   ================================================ */

/* Grid de entradas en inicio */
.entrada-inicio {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 30px !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 40px 0 !important;
}

/* Tarjeta individual de entrada */
.entrada-inicio .wp-block-post {
	background: #ffffff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	display: flex;
	flex-direction: column;
}

.entrada-inicio .wp-block-post:hover {
	transform: translateY(-5px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Imagen destacada */
.entrada-inicio .wp-block-post-featured-image {
	margin: 0 !important;
	width: 100%;
	aspect-ratio: 1;
	overflow: hidden;
}

.entrada-inicio .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.entrada-inicio .wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.05);
}

/* Título de la entrada */
.entrada-inicio .wp-block-post-title {
	font-size: 18px !important;
	line-height: 1.4;
	margin: 15px 20px 10px 20px !important;
	font-weight: 600;
}

.entrada-inicio .wp-block-post-title a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.3s ease;
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
}

.entrada-inicio .wp-block-post-title a:hover {
	color: #0066cc;
}

/* Fecha de publicación */
.entrada-inicio .wp-block-post-date {
	font-size: 14px;
	color: #666;
	margin: 0 20px 10px 20px;
}

.entrada-inicio .wp-block-post-date a {
	color: #666;
	text-decoration: none;
}

/* Extracto del contenido */
.entrada-inicio .wp-block-post-excerpt {
	font-size: 15px !important;
	line-height: 1.6;
	color: #555;
	margin: 0 20px 20px 20px !important;
	flex-grow: 1;
}

.entrada-inicio .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.entrada-inicio .wp-block-post-excerpt__more-link {
	color: #0066cc;
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s ease;
}

.entrada-inicio .wp-block-post-excerpt__more-link:hover {
	color: #004d99;
	text-decoration: underline;
}


/* ================================================
   AJUSTES GENERALES
   ================================================ */

/* Asegurar que el contenido principal tiene suficiente ancho */
.single .inside-article {
	max-width: 100%;
	margin: 0 auto;
}

/* Ocultar elementos no deseados según la estructura */
.comments-area,
.single .entry-meta,
.single .footer-meta {
	display: none;
}

/* Ocultar la imagen destacada que genera GeneratePress automáticamente */
.single-post .featured-image.page-header-image-single {
	display: none;
}

/* Ocultar el título en la página de inicio */
/* .home .entry-title,
.blog .entry-title {
	display: none;
} */

/* ================================================
   DISEÑO DE ENTRADAS EN ARCHIVO (CATEGORÍAS, ETC.)
   ================================================ */

/* Contenedor de cada entrada en archivo */
.archive-entry {
	margin-bottom: 60px;
	border-bottom: 1px solid #e0e0e0;
	padding-bottom: 40px;
	background-color: #ffffff;
}

.archive-entry:last-child {
	border-bottom: none;
}

/* Wrapper con flexbox */
.archive-entry-wrapper {
	display: flex;
	gap: 40px;
	align-items: flex-start;
	padding: 30px;
}

/* Imagen destacada (542x542) */
.archive-entry-image {
	flex-shrink: 0;
	width: 542px;
}

.archive-entry-image .archive-thumbnail {
	width: 542px;
	height: 542px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

/* Contenido (título, metadatos, extracto) */
.archive-entry-content {
	flex: 1;
	min-width: 0;
}

.archive-entry-content .entry-title {
	font-size: 2rem;
	line-height: 1.3;
	margin-bottom: 15px;
	margin-top: 0;
}

.archive-entry-content .entry-title a {
	color: #1a1a1a;
	text-decoration: none;
	transition: color 0.3s ease;
}

.archive-entry-content .entry-title a:hover {
	color: #0066cc;
}

.archive-entry-content .entry-summary {
	font-size: 16px;
	line-height: 1.6;
	color: #666;
	margin-bottom: 20px;
}

/* Entradas pares: imagen a la derecha */
.archive-entry-even .archive-entry-wrapper {
	flex-direction: row-reverse;
}

/* ================================================
   FOOTER PERSONALIZADO
   ================================================ */

/* Aplicar color de fondo al contenedor del footer */
.site-footer {
	background-color: #1e315c !important;
}

.site-footer .site-info {
	background-color: inherit !important;
}

.footer-copyright-custom {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 15px;
	padding: 20px 0;
	text-align: center;
}

/* Iconos de redes sociales */
.footer-social-icons {
	display: flex;
	align-items: center;
	gap: 15px;
}

.footer-social-icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	transition: color 0.3s ease, transform 0.2s ease;
	text-decoration: none;
}

.footer-social-icons a:hover {
	color: #4da6ff;
	transform: translateY(-2px);
}

.footer-social-icons svg {
	width: 24px;
	height: 24px;
}

/* Separadores */
.footer-separator {
	color: #a0b4d4;
	font-size: 12px;
}

/* Enlaces legales */
.footer-legal-links {
	font-size: 14px;
	color: #d4dce9;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
}

.footer-legal-links a {
	color: #d4dce9;
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer-legal-links a:hover {
	color: #ffffff;
	text-decoration: underline;
}

/* Texto de copyright */
.footer-copyright-text {
	font-size: 14px;
	color: #d4dce9;
}

@media (max-width: 1200px) {
	.entrada-inicio {
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 25px !important;
	}
}

@media (max-width: 1024px) {
	.archive-entry-image {
		width: 400px;
	}

	.archive-entry-image .archive-thumbnail {
		width: 400px;
		height: 400px;
	}

	.archive-entry-wrapper {
		gap: 30px;
	}
}

@media (max-width: 900px) {
	.entrada-inicio {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 20px !important;
	}

	.categorias-inicio {
		grid-template-columns: 1fr !important;
		gap: 20px !important;
	}

	.categorias-inicio .wp-block-tiptip-hyperlink-group-block {
		padding: 24px;
	}

	.categorias-inicio .safe-svg-inside {
		width: 64px !important;
		height: 64px !important;
	}
}

@media (max-width: 768px) {
	.archive-entry-wrapper {
		flex-direction: column !important;
		gap: 20px;
	}

	.archive-entry-image {
		width: 100%;
	}

	.archive-entry-image .archive-thumbnail {
		width: 100%;
		height: auto;
		aspect-ratio: 1;
	}

	.archive-entry-content .entry-title {
		font-size: 1.5rem;
	}

	.footer-copyright-custom {
		gap: 12px;
		padding: 15px 10px;
	}

	.footer-social-icons {
		gap: 12px;
	}

	.footer-legal-links {
		font-size: 13px;
		gap: 8px;
	}

	.footer-copyright-text {
		font-size: 13px;
	}
}

@media (max-width: 600px) {
	.entrada-inicio {
		grid-template-columns: 1fr !important;
		gap: 20px !important;
	}

	.entrada-inicio .wp-block-post-title {
		font-size: 20px !important;
	}
}