/*
Theme Name:  Hello TecnoFen
Description: Tema hijo de Hello Elementor para TecnoFen. Reemplaza el diseño de XStore: estilos base, noticia individual, listados de noticias, búsqueda y página 404.
Template:    hello-elementor
Version:     1.0.0
Text Domain: hello-tecnofen
*/

/* ===== Fuente APOLLO (antes la declaraba XStore; los archivos están en uploads/custom-fonts) ===== */
@font-face { font-family: "APOLLO"; src: url("../../uploads/custom-fonts/2023/10/APOLLO.otf") format("opentype"); font-display: swap; }
@font-face { font-family: "APOLLOItalic"; src: url("../../uploads/custom-fonts/2023/10/APOLLOItalic.otf") format("opentype"); font-display: swap; }

/* ===== Estilos base (los que antes ponía XStore) ===== */
/* XStore usa 14px como base de las unidades rem (Hello usa 16px); el CSS propio de las páginas está hecho con esa base */
html { font-size: 14px; }
body { font-family: Inter, sans-serif; font-size: 1rem; line-height: 1.4286; color: #6b6b6b; background: #fff; } /* 14px, o 13px en celular */
/* Tamaños de títulos de XStore */
h1 { font-size: 2.5714rem; }
h2, h3 { font-size: 1.7142rem; }
h4 { font-size: 1.2857rem; }
h5 { font-size: 1rem; }
h6 { font-size: .8571rem; }
.title h1, .title h2 { text-transform: uppercase; }
/* Listas dentro del contenido de las páginas (XStore las aplicaba a todo su contenedor ".content") */
.page-content :is(ul, ol) { margin-top: 0; padding-left: 20px; }
.page-content ul { margin-bottom: 1.43em; }
.page-content ol { margin-bottom: 10px; }
.page-content li { margin-bottom: .5em; line-height: 1.8; font-size: 1.14rem; }
a { color: #222; }
a:hover, a:active { color: #105677; }
/* Hello subraya los enlaces dentro de las páginas; XStore no lo hacía */
.page-content a { text-decoration: none; }
h1, h2, h3, h4, h5, h6 { font-family: "APOLLO", serif; font-weight: 400; color: #105677; line-height: 1.2; margin-top: 0; margin-bottom: 9.8px; }
::selection { background: #f2f2f2; }
p { margin: 0 0 1.43rem; }
/* XStore (css/elementor.min.css): los párrafos dentro de los widgets heredan letra y color del widget */
.elementor-widget-container p { color: inherit; font-size: inherit; font-family: inherit; line-height: inherit; }
/* Listas dentro de las noticias */
.tf-single-contenido :is(ul, ol) { margin: 0 0 10px; padding-left: 28px; }
.tf-single-contenido li { font-size: 15.96px; line-height: 1.8; margin-bottom: .5em; }
img { max-width: 100%; height: auto; }

/* Contenedor de XStore (Bootstrap): 15px de margen a cada lado; 750px en tableta, 970px hasta 1199px y máximo 1500px.
   Se aplica al contenido de las páginas (.page-content) y a las plantillas propias (.tf-contenedor) */
.page-content, .tf-contenedor { margin-left: auto; margin-right: auto; padding-left: 15px; padding-right: 15px; box-sizing: border-box; max-width: 100%; }
@media (min-width: 768px)  { .page-content, .tf-contenedor { width: 750px; } }
@media (min-width: 992px)  { .page-content, .tf-contenedor { width: 970px; } }
@media (min-width: 1200px) { .page-content, .tf-contenedor { width: 100%; max-width: 1500px; } }
/* En celulares XStore baja la base de las unidades rem a 13px */
@media only screen and (max-width: 480px) { html { font-size: 13px; } }

/* ===== Noticia individual ===== */
.tf-single { padding-bottom: 60px; }
/* (selector reforzado: Hello limita la imagen destacada a 500px con ".post .wp-post-image") */
.tf-single .tf-single-imagen img { display: block; width: 100%; height: auto; max-height: 640px; object-fit: cover; }
.tf-single-titulo-caja { position: relative; background: #fff; text-align: center; padding: 40px 0; margin: clamp(-253px, -16.5vw, -40px) 70px 0; }
.tf-single--sin-imagen .tf-single-titulo-caja { margin-top: 30px; }
.tf-single-titulo { font-size: 24px; line-height: 1.2; margin: 0 0 8px; color: #105677; }
.tf-single-meta { font-size: 16px; line-height: 23px; color: #888; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.tf-single-meta a { color: #888; text-decoration: none; }
.tf-single-meta svg { width: 14px; height: 14px; fill: currentColor; vertical-align: -2px; }
.tf-single-contenido { position: relative; background: #fff; padding: 0 100px 75px; font-size: 16px; line-height: 25.6px; color: #6b6b6b; text-align: justify; }
.tf-single-contenido p { margin: 0 0 20px; }
.tf-single-contenido img { max-width: 100%; height: auto; }
.tf-single-contenido a { text-decoration: underline; }

.tf-compartir { display: flex; justify-content: center; align-items: center; gap: 18px; padding: 21px 0; border-top: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1; margin: 0 0 80px; }
.tf-compartir span { font-size: 14px; color: #222; }
.tf-compartir a { color: #222; display: inline-flex; }
.tf-compartir a:hover { color: #74BC1F; }
.tf-compartir svg { width: 16px; height: 16px; fill: currentColor; }

.tf-relacionadas-titulo { text-align: center; font-size: 24px; margin: 0 0 16.8px; }

/* ===== Tarjetas de los listados (archivo, búsqueda y noticias relacionadas) ===== */
.tf-lista { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 30px; align-items: start; }
@media (max-width: 1024px) { .tf-lista { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .tf-lista { grid-template-columns: minmax(0, 1fr); } }
.tf-item-imagen { display: block; overflow: hidden; margin-bottom: 20px; }
.tf-item-imagen img { display: block; width: 100%; height: auto; object-fit: cover; transition: transform .6s ease; }
.tf-relacionadas .tf-item-imagen img { aspect-ratio: 3 / 2; }
.tf-item:hover .tf-item-imagen img { transform: scale(1.05); }
.tf-item-titulo { font-size: 17px; line-height: 1.25; margin: 0 0 12px; }
.tf-item-titulo a { color: #105677; text-decoration: none; }
.tf-item-titulo a:hover { color: #74BC1F; }
.tf-item-texto { font-size: 14px; line-height: 22px; color: #6b6b6b; margin: 0 0 18px; }
.tf-item-boton { display: inline-block; background: #105677; color: #fff !important; font: 700 12px/12px Inter, sans-serif; padding: 11px 30px; text-decoration: none; transition: background .2s; }
.tf-item-boton:hover { background: #000; }
.tf-relacionadas .tf-item { text-align: center; }
.tf-relacionadas .tf-lista { padding: 0 15px; gap: 30px; }
.tf-relacionadas .tf-item-imagen { margin-bottom: 18px; }

/* ===== Archivo y búsqueda ===== */
.tf-archivo { padding: 0 0 79px; }
.search .tf-archivo { padding-top: 40px; }
/* Tarjetas del listado, como las de XStore: imagen sin recortar, título APOLLO 18px, texto 16px y botón azul */
.tf-archivo .tf-lista { gap: 30px; }
.tf-archivo .tf-item-imagen { margin-bottom: 22px; }
:is(.tf-archivo, .tf-relacionadas) .tf-item-titulo { font-size: 1.3rem; line-height: 1.2; margin: 0 0 16.5px; }
:is(.tf-archivo, .tf-relacionadas) .tf-item-texto { font-size: 16px; line-height: 25.6px; margin: 0; }
:is(.tf-archivo, .tf-relacionadas) .tf-item-boton { margin-top: 15px; padding: 10.5px 30.8px; font: 700 14px/14px Inter, sans-serif; border-radius: 3px; }
.tf-relacionadas .tf-item-titulo { margin-bottom: 20.5px; }
.tf-archivo-titulo { font-size: 32px; text-align: center; margin: 0 0 35px; }
.tf-archivo-titulo small { display: block; font-family: Inter, sans-serif; font-size: 14px; color: #6b6b6b; margin-bottom: 6px; }
.tf-paginacion { margin-top: 50px; text-align: center; }
.tf-paginacion .nav-links { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; }
.tf-paginacion .page-numbers { display: inline-block; min-width: 38px; padding: 9px 12px; border: 1px solid #e1e1e1; color: #222; text-decoration: none; box-sizing: border-box; }
.tf-paginacion .page-numbers.current, .tf-paginacion .page-numbers:hover { background: #105677; border-color: #105677; color: #fff; }
.tf-sin-resultados { text-align: center; font-size: 16px; }

/* ===== Búsqueda (formulario) y 404 ===== */
.tf-buscador { display: flex; max-width: 420px; margin: 20px auto 0; }
.tf-buscador input[type=search] { flex: 1; min-width: 0; border: 1px solid #e1e1e1; border-right: 0; padding: 9px 14px; font: 400 14px Inter, sans-serif; color: #222; border-radius: 0; }
.tf-buscador button { border: 0; background: #105677; color: #fff; padding: 0 16px; cursor: pointer; border-radius: 0; }
.tf-buscador button:hover { background: #000; }
.tf-404 { text-align: center; padding: 90px 15px 110px; }
.tf-404 .tf-404-numero { font-family: "APOLLO", serif; font-size: 110px; line-height: 1; color: #222; margin: 0; }
.tf-404-titulo { font-size: 22px; text-transform: uppercase; margin: 10px 0 8px; }
.tf-404 p { font-size: 14px; margin: 0; }
.tf-404-inicio { display: inline-block; margin-top: 25px; color: #105677; }

/* ===== Traído del CSS adicional del Personalizador de XStore Child ===== */
/* Ocultar el título de la imagen en el visor (lightbox) de Elementor */
.elementor-slideshow__title { display: none; }
/* Ventana emergente de Hustle centrada y con alto según su contenido */
#hustle-popup-id-1 { justify-content: center !important; }
.hustle-ui.hustle_module_id_1[data-id="1"] .hustle-main-wrapper { height: fit-content !important; }

/* ===== Celular y tableta ===== */
@media (max-width: 1024px) {
  .tf-single-titulo-caja { margin-left: 30px; margin-right: 30px; }
  .tf-single-contenido { padding: 0 40px 40px; }
  .tf-compartir { margin: 0 40px 40px; }
}
@media (max-width: 767px) {
  .tf-single-titulo-caja { margin: -30px 10px 0; padding: 25px 15px; }
  .tf-single-titulo { font-size: 21px; }
  .tf-single-meta { font-size: 14px; }
  .tf-single-contenido { padding: 0 5px 30px; text-align: left; }
  .tf-compartir { margin: 0 0 35px; flex-wrap: wrap; }
  .tf-archivo-titulo { font-size: 26px; }
}

/* Espacio al final del contenido que XStore dejaba en las páginas donde no se había quitado (Contacto y Postula) */
.page-id-4705 .page-content, .page-id-5673 .page-content { padding-bottom: 79px; }
