/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

:root {
    --tej-font-heading: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body:not(.wp-admin) h1,
body:not(.wp-admin) h2,
body:not(.wp-admin) h3,
body:not(.wp-admin) h4,
body:not(.wp-admin) h5,
body:not(.wp-admin) h6,
body:not(.wp-admin) .entry-title,
body:not(.wp-admin) .widget-title,
body:not(.wp-admin) .footer-widgets .widget-title,
body:not(.wp-admin) .site-footer .widget-title,
body:not(.wp-admin) summary h1,
body:not(.wp-admin) summary h2,
body:not(.wp-admin) summary h3,
body:not(.wp-admin) summary h4,
body:not(.wp-admin) summary h5,
body:not(.wp-admin) summary h6 {
    font-family: var(--tej-font-heading);
}

/* 1Estilo base para el modal */
	.boton-modal-si {
		display: block;
    text-align: center;
    background: #44cb53;
    padding: 8px;
    font-weight: bold;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
	}
	.boton-modal-si:hover, .boton-modal-si:focus {
		background: #349e40;
	}
	.boton-modal-no {
		display: block;
    text-align: center;
    background: #d63838;
    padding: 8px;
    font-weight: bold;
    margin-top: 10px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
	}
	.boton-modal-no:hover, .boton-modal-no:focus {
		background: #b43030;
	}
	.texto-modal {
		font-size: 16px;
    text-align: center;
	}
	.modal-titulo {
		font-size: 20px;
    font-weight: bolder;
    text-align: center;
    display: block;
    margin-bottom: 10px;
	}
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Color de fondo con opacidad */
	  display: none;
    align-items: center;    /* Centramos verticalmente */
    justify-content: center;/* Centramos horizontalmente */
}
	.mostrar-modal {
    display: flex;
}

.modal-contenido {
    background-color: #fefefe;
    margin: 0;
    padding: 20px;
    border: 1px solid #888;
    width: 25%; /* Ancho del modal */
	  border-radius: 15px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
	  position: relative;
}

.modal-cerrar {
    color: #aaa;
    position: absolute;    /* Usamos posiciÃ³n absoluta para la "X" */
    top: -7px;             /* Desplazamiento desde la parte superior */
    right: 16px;           /* Desplazamiento desde la derecha */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;       /* Cambia el cursor a una mano al pasar por encima */
}

.modal-cerrar:hover, .modal-cerrar:focus {
    color: black;
}

/* Estilos responsivos */
@media screen and (max-width: 600px) {
    .modal-contenido {
        width: 85%;
    }
}

article.post footer.entry-meta {
    display: none;
}
/* Archivo común de categorías públicas. */
body.category .site-content {
	background: #f6f9fc;
}

.tej-category-archive {
	padding-bottom: 54px;
}

.tej-category-archive__hero {
	padding: 56px 0 50px;
	background: linear-gradient(135deg, #0d2b45 0%, #16476c 100%);
	color: #ffffff;
}

.tej-category-archive__hero-inner,
.tej-category-archive__branches,
.tej-category-archive__results {
	width: min(1120px, calc(100% - 40px));
	margin: 0 auto;
}

.tej-category-archive__breadcrumb {
	display: flex;
	gap: 8px;
	margin-bottom: 26px;
	color: #cde4f6;
	font-size: .82rem;
}

.tej-category-archive__breadcrumb a { color: inherit; text-decoration: none; }
.tej-category-archive__breadcrumb a:hover { color: #ffffff; text-decoration: underline; }

.tej-category-archive__eyebrow {
	margin: 0 0 7px;
	color: #5c8fc0;
	font-size: .76rem;
	font-weight: 800;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.tej-category-archive__hero .tej-category-archive__eyebrow { color: #86c7ff; }

.tej-category-archive h1,
.tej-category-archive h2,
.tej-category-archive h3 { color: #102c4b; }

.tej-category-archive__hero h1 {
	max-width: 740px;
	margin: 0 0 12px;
	color: #ffffff;
	font-size: clamp(2.15rem, 5vw, 3.5rem);
	line-height: 1.05;
}

.tej-category-archive__description { max-width: 670px; color: #d8e9f7; font-size: 1.04rem; line-height: 1.65; }
.tej-category-archive__description p:last-child { margin-bottom: 0; }

.tej-category-archive__branches,
.tej-category-archive__results { padding-top: 45px; }

.tej-category-archive__section-heading { margin-bottom: 18px; }
.tej-category-archive__section-heading h2 { margin: 0; font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; }

.tej-category-archive__branch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tej-category-archive__branch { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid #dce7f1; border-radius: 12px; background: #ffffff; color: #173b5c; font-weight: 750; text-decoration: none; }
.tej-category-archive__branch:hover { border-color: #8ac7f3; box-shadow: 0 8px 20px rgb(14 62 103 / 9%); color: #0c5f9d; }

.tej-category-archive__post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tej-category-archive__post { display: flex; flex-direction: column; min-width: 0; min-height: 214px; padding: 23px; border: 1px solid #dce7f1; border-radius: 14px; background: #ffffff; box-shadow: 0 4px 13px rgb(14 62 103 / 4%); }
.tej-category-archive__post:first-child { grid-column: span 2; background: linear-gradient(135deg, #eaf5ff, #ffffff 68%); }
.tej-category-archive__post h3 { margin: 0 0 10px; font-size: 1.08rem; line-height: 1.28; }
.tej-category-archive__post h3 a { color: inherit; text-decoration: none; }
.tej-category-archive__post h3 a:hover { color: #0d70b8; text-decoration: underline; }
.tej-category-archive__excerpt { margin: 0; color: #566b82; font-size: .88rem; line-height: 1.52; }
.tej-category-archive__read { display: inline-flex; gap: 7px; margin-top: auto; padding-top: 18px; color: #1269ad; font-size: .84rem; font-weight: 800; text-decoration: none; }
.tej-category-archive__read:hover span { transform: translateX(3px); }
.tej-category-archive__read span { transition: transform .18s ease; }
.tej-category-archive .nav-links { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 32px; }
.tej-category-archive .page-numbers { padding: 8px 11px; border: 1px solid #d5e2ee; border-radius: 7px; background: #ffffff; color: #173b5c; text-decoration: none; }
.tej-category-archive .page-numbers.current { border-color: #1269ad; background: #1269ad; color: #ffffff; }
.tej-category-archive__empty { padding: 24px; border: 1px dashed #b9cde0; border-radius: 12px; color: #536b84; }

@media screen and (max-width: 800px) {
	.tej-category-archive__hero { padding: 40px 0 36px; }
	.tej-category-archive__branch-grid,
	.tej-category-archive__post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tej-category-archive__post:first-child { grid-column: span 2; }
}

@media screen and (max-width: 520px) {
	.tej-category-archive__hero-inner,
	.tej-category-archive__branches,
	.tej-category-archive__results { width: min(100% - 28px, 540px); }
	.tej-category-archive__breadcrumb { margin-bottom: 20px; }
	.tej-category-archive__description { font-size: .94rem; }
	.tej-category-archive__branches,
	.tej-category-archive__results { padding-top: 31px; }
	.tej-category-archive__branch-grid,
	.tej-category-archive__post-grid { grid-template-columns: 1fr; }
	.tej-category-archive__post,
	.tej-category-archive__post:first-child { grid-column: span 1; min-height: 0; padding: 19px; }
}

/* Variante editorial clara para archivos de categoría. */
body.category .site-content { background: #ffffff; }
body.search .site-content { background: #ffffff; }
body.error404 .site-content { background: #ffffff; }
.tej-category-archive__hero { padding: 48px 0 28px; background: radial-gradient(circle at 18% 18%, #ffffff 0, transparent 26%), linear-gradient(135deg, #eef7ff 0%, #f9fcff 55%, #eaf5ff 100%); color: #102c4b; text-align: center; }
.tej-category-archive__breadcrumb { justify-content: center; margin-bottom: 18px; color: #6685a3; }
.tej-category-archive__breadcrumb a:hover { color: #1269ad; }
.tej-category-archive__hero .tej-category-archive__eyebrow { color: #3d79ae; }
.tej-category-archive__hero h1 { max-width: 760px; margin: 0 auto 9px; color: #0d3765; font-size: clamp(2.3rem, 5vw, 3.8rem); }
.tej-category-archive__description { max-width: 700px; margin: 0 auto; color: #516d8b; font-size: 1rem; line-height: 1.55; }
.tej-category-archive__search { display: flex; width: min(100%, 690px); height: 50px; margin: 22px auto 0; padding: 3px; border: 1px solid #b9d2e8; border-radius: 10px; background: #ffffff; box-shadow: 0 10px 24px rgb(26 91 145 / 9%); }
.tej-category-archive__search input { min-width: 0; flex: 1; border: 0 !important; outline: 0; background: transparent !important; color: #173b5c !important; box-shadow: none !important; font: inherit; }
.tej-category-archive__search input::placeholder { color: #758da5; opacity: 1; }
.tej-category-archive__search button { flex: 0 0 48px; border: 0; border-radius: 7px; background: #0d3765; color: #ffffff; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.tej-category-archive__branches, .tej-category-archive__results { padding-top: 37px; }
.tej-category-archive__section-heading { margin-bottom: 12px; }
.tej-category-archive__section-heading h2 { color: #102c4b; font-size: clamp(1.4rem, 3vw, 1.85rem); }
.tej-category-archive__branch-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.tej-category-archive__post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.tej-category-archive__branch, .tej-category-archive__post { --tej-archive-accent: #1976d2; position: relative; width: 100% !important; min-height: 164px; padding: 19px 17px 15px; border: 1px solid #dce7f1; border-top: 3px solid var(--tej-archive-accent); border-radius: 12px; background: linear-gradient(135deg, #f4f9ff 0%, #ffffff 72%); box-shadow: none; overflow: hidden; }
.tej-category-archive__post { float: none !important; }
.tej-category-archive__branch:nth-child(2n), .tej-category-archive__post:nth-child(2n) { --tej-archive-accent: #16875a; background: linear-gradient(135deg, #f1fbf5 0%, #ffffff 72%); }
.tej-category-archive__branch:nth-child(3n), .tej-category-archive__post:nth-child(3n) { --tej-archive-accent: #d27a0f; background: linear-gradient(135deg, #fff8ec 0%, #ffffff 72%); }
.tej-category-archive__branch:nth-child(4n), .tej-category-archive__post:nth-child(4n) { --tej-archive-accent: #7542c7; background: linear-gradient(135deg, #f8f2ff 0%, #ffffff 72%); }
.tej-category-archive__branch { display: flex; align-items: flex-start; justify-content: space-between; color: #173b5c; font-size: .92rem; }
.tej-category-archive__branch b { color: var(--tej-archive-accent); }
.tej-category-archive__branch { box-sizing: border-box; min-height: 64px; align-items: center; padding: 14px 17px; font-weight: 700; }
.tej-category-archive__branch span { padding-right: 14px; }
.tej-category-archive__branch b { font-size: 1rem; line-height: 1; }
.tej-category-archive__post:first-child { grid-column: span 1; background: linear-gradient(135deg, #f4f9ff 0%, #ffffff 72%); }
.tej-category-archive__post h3 { margin: 0 0 8px; color: #163b60; font-size: .94rem; line-height: 1.32; }
.tej-category-archive__excerpt { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; color: #5e7590; font-size: .76rem; line-height: 1.43; }
.tej-category-archive__read { padding-top: 12px; color: var(--tej-archive-accent); font-size: .72rem; }
.tej-category-archive__post { cursor: pointer; }
.tej-category-archive__post .tej-category-archive__read::after { position: absolute; inset: 0; content: ""; }
.tej-category-archive__post:hover, .tej-category-archive__branch:hover { border-color: var(--tej-archive-accent); box-shadow: 0 9px 20px rgb(20 72 116 / 10%); color: #173b5c; }
.tej-not-found__home { display: inline-flex; align-items: center; gap: 9px; min-height: 48px; padding: 12px 18px; border-radius: 9px; background: #0d3765; color: #ffffff; font-size: .86rem; font-weight: 800; text-decoration: none; }
.tej-not-found__home:hover { background: #145082; color: #ffffff; }

@media screen and (max-width: 900px) { .tej-category-archive__branch-grid, .tej-category-archive__post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media screen and (max-width: 520px) { .tej-category-archive__hero { padding-top: 36px; } .tej-category-archive__search { height: 48px; margin-top: 18px; } .tej-category-archive__search input { padding-left: 10px; font-size: .85rem; } .tej-category-archive__branch-grid, .tej-category-archive__post-grid { grid-template-columns: 1fr; } .tej-category-archive__branch, .tej-category-archive__post, .tej-category-archive__post:first-child { grid-column: span 1; min-height: 0; } }
@media screen and (max-width: 520px) {
	body.search .tej-category-archive__post {
		padding-inline: 19px;
	}
}
/* Tabla institucional: conserva la informacion completa sin desbordar en movil. */
.tej-institutional-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tej-institutional-table-wrap:focus-visible {
	outline: 3px solid #0d2b45;
	outline-offset: 3px;
}

.tej-institutional-table-wrap table {
	min-width: 48rem;
}

/* Ajuste final del hero editorial: sin tarjeta exterior y con beneficios en línea. */
body.tej-modern-page.separate-containers .inside-article,
body.tej-modern-page .inside-article {
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body.tej-modern-page .entry-header:has(.tej-editorial-hero) {
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

@media screen and (max-width: 768px) {
	body.tej-modern-page.separate-containers .inside-article,
	body.tej-modern-page .inside-article {
		padding: 0;
		border-radius: 0;
	}
}

/* Hero de artículos alineado con el fondo y el lenguaje de las categorías. */
body.tej-modern-page .site-content {
	background: #ffffff;
}

body.tej-modern-page .migas {
	display: none;
}

body.tej-modern-page.separate-containers .inside-article,
body.tej-modern-page .inside-article {
	overflow: visible;
}

body.tej-modern-page .entry-header:has(.tej-editorial-hero) {
	box-sizing: border-box;
	width: calc(100% + 100px);
	max-width: none;
	margin-left: -50px;
	padding: 40px 106px 34px;
	background: radial-gradient(circle at 18% 18%, #ffffff 0, transparent 26%), linear-gradient(135deg, #eef7ff 0%, #f9fcff 55%, #eaf5ff 100%);
	text-align: left;
}

body.tej-modern-page .tej-editorial-hero {
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "content" "benefits";
	row-gap: 24px;
}

body.tej-modern-page .tej-editorial-hero__content {
	max-width: 640px;
}

body.tej-modern-page .tej-editorial-hero__breadcrumb {
	display: flex;
	gap: 7px;
	margin: 0 0 16px;
	color: #6685a3;
	font-size: .76rem;
	line-height: 1.25;
}

body.tej-modern-page .tej-editorial-hero__breadcrumb a {
	color: inherit;
	text-decoration: none;
}

body.tej-modern-page .tej-editorial-hero__breadcrumb a:hover {
	color: #1269ad;
	text-decoration: underline;
}

body.tej-modern-page .tej-editorial-hero__breadcrumb .aioseo-breadcrumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

body.tej-modern-page .tej-editorial-hero__breadcrumb .aioseo-breadcrumb-separator {
	margin: 0;
}

body.tej-modern-page .tej-editorial-hero .entry-title.tej-page-title {
	gap: 10px;
	margin: 0;
}

body.tej-modern-page .tej-editorial-hero .tej-page-title__prefix {
	min-height: 0;
	padding: 0;
	background: transparent;
	color: #3d79ae;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: .1em;
	line-height: 1.2;
	text-transform: uppercase;
}

body.tej-modern-page .tej-editorial-hero .tej-page-title__topic {
	color: #0d3765;
	font-size: clamp(2.3rem, 5vw, 3.8rem);
	font-weight: 600;
	line-height: 1.12;
}

body.tej-modern-page .tej-editorial-hero__description {
	margin-top: 16px;
	font-weight: 400;
}

body.tej-modern-page .tej-editorial-hero__cta {
	margin-top: 20px;
}

body.tej-modern-page .tej-hero-benefits {
	gap: 28px;
}

body.tej-modern-page .tej-hero-benefit {
	font-weight: 400;
}

@media screen and (max-width: 900px) {
	body.tej-modern-page .entry-header:has(.tej-editorial-hero) {
		width: calc(100% + 32px);
		margin-left: -16px;
		padding-right: 32px;
		padding-left: 32px;
	}
}

@media screen and (max-width: 600px) {
	body.tej-modern-page .entry-header:has(.tej-editorial-hero) {
		width: calc(100% + 32px);
		margin-left: -16px;
		padding: 30px 32px 28px;
	}

	body.tej-modern-page .tej-editorial-hero__breadcrumb {
		margin-bottom: 13px;
	}

	body.tej-modern-page .tej-hero-benefits {
		gap: 12px;
	}
}

/* Apertura editorial: bloque de lectura suave con guía visual lateral. */
body.tej-modern-page .entry-content .tej-post-hero-intro {
	padding: 28px 30px;
	border: 1px solid #dce6f3;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 3px 13px rgb(21 57 102 / 5%);
}

body.tej-modern-page .entry-content .tej-post-hero-intro p {
	color: #193f67;
}

body.tej-modern-page .entry-content .tej-modern-content-wrapper.tej-visual-polish--pillar-clean > .tej-post-hero-section {
	margin-block-start: 0;
}

body.tej-modern-page .entry-content {
	padding-top: 26px;
}

@media screen and (max-width: 600px) {
	body.tej-modern-page .entry-content {
		padding-top: 22px;
	}

	body.tej-modern-page .entry-content .tej-post-hero-intro {
		padding: 22px 20px;
	}
}

/* Entradas heredadas: una sola columna de lectura, sin lateral de widgets. */
body.wp-singular:not(.tej-modern-page) #primary {
	float: none;
	width: 100%;
}

body.wp-singular:not(.tej-modern-page) #left-sidebar,
body.wp-singular:not(.tej-modern-page) #right-sidebar {
	display: none;
}

/* Imágenes educativas: escala de lectura compacta en escritorio.
 * Los microlotes actuales y futuros reutilizan .tej-educational-visuals. */
@media screen and (min-width: 901px) {
	body.wp-singular .entry-content .tej-educational-visuals {
		width: 100%;
		max-width: 504px;
		margin-inline: auto;
	}

	body.tej-modern-page .entry-content .tej-modern-content-wrapper > :has(+ .tej-educational-visuals) {
		margin-block-end: 24px;
	}
}

/* AdSense de inicio: reserva el espacio antes de que llegue la creatividad. */
.tej-adsense-slot--inicio {
	box-sizing: border-box;
	display: grid;
	width: 336px;
	min-width: 336px;
	max-width: 336px;
	min-height: 280px;
	margin: 32px auto;
	place-items: center;
	overflow: hidden;
}

.tej-adsense-slot--inicio .adsbygoogle {
	display: inline-block !important;
	width: 336px !important;
	height: 280px !important;
}

@media screen and (max-width: 600px) {
	.tej-adsense-slot--inicio {
		margin-block: 26px;
	}
}
