/*
 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;
}
/* 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;
	}
}
