/* =========================================================
   La Fiebre del Lúpulo — estilos personalizados
   Se carga después de main.min.css (ver functions.php)
   ========================================================= */

/* ---------- Bloque magazine del home ---------- */

/* Quitar el subrayado al pasar el cursor sobre los títulos */
.newsx-magazine-widget .newsx-grid-title a,
.newsx-magazine-widget .newsx-grid-title a:hover,
.newsx-magazine-widget .newsx-grid-title a:focus,
.newsx-magazine-widget .newsx-underline-hover,
.newsx-magazine-widget .newsx-underline-hover:hover {
  text-decoration: none !important;
}
/* En su lugar, un cambio sutil de color */
.newsx-magazine-widget .newsx-grid-title a {
  transition: color .2s ease, opacity .2s ease;
}
.newsx-magazine-widget .newsx-grid-item:hover .newsx-grid-title a {
  opacity: .85;
}

/* Títulos de las notas secundarias (todas menos la principal).
   Sin :is() a propósito: los navegadores viejos ignoran la regla completa. */
.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h1,
.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h2,
.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h3,
.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h4 {
  font-size: 18px !important;
  line-height: 1.25 !important;
  margin: 0 !important;
  /* Máximo 3 líneas; si es más largo, termina en "…" */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h1,
  .newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h2,
  .newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h3,
  .newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h4 {
    font-size: 16px !important;
  }
}

/* ---------- Modal de newsletter ---------- */
html.lfl-modal-open { overflow: hidden; }
.lfl-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .2s ease;
}
.lfl-modal[hidden] { display: none; }
.lfl-modal.is-open { opacity: 1; }
.lfl-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 50, .7);
  cursor: pointer;
}
.lfl-modal__box {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 10px;
  border-top: 6px solid #76B62B;
  padding: 32px 28px 24px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
  transform: translateY(12px);
  transition: transform .2s ease;
}
.lfl-modal.is-open .lfl-modal__box { transform: none; }
.lfl-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #1B2C6F;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lfl-modal__close:hover { color: #76B62B; }
.lfl-modal__title {
  margin: 0 0 8px !important;
  color: #1B2C6F;
  font-size: 24px;
}
.lfl-modal__text {
  margin: 0 0 18px;
  color: #444;
  font-size: 15px;
}
.lfl-modal__form .wpforms-container { margin: 0 !important; }
.lfl-modal__form .wpforms-submit {
  background-color: #1B2C6F !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 10px 24px !important;
  font-weight: 600;
}
.lfl-modal__form .wpforms-submit:hover { background-color: #76B62B !important; }

/* ---------- Mega menú «Noticias» ---------- */

/* En escritorio, ocultar el submenú normal de «Noticias» (se usa el panel) */
.wpr-nav-menu-container .lfl-mega > ul,
.wpr-nav-menu-container .lfl-mega > .wpr-sub-menu {
  display: none !important;
}

.lfl-mm {
  --lfl-mm-blue: #1B2C6F;
  --lfl-mm-green: #76B62B;
  --lfl-mm-text: #2b2f36;
  --lfl-mm-muted: #6b7280;
  --lfl-mm-line: #e5e7eb;
  --lfl-mm-soft: #EEF1F8;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 9990;
  background: #fff;
  border-top: 3px solid var(--lfl-mm-green);
  box-shadow: 0 18px 40px rgba(16, 24, 40, .16);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.lfl-mm[hidden] { display: none; }
.lfl-mm.is-open { opacity: 1; transform: none; }

.lfl-mm-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 20px 26px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 240px 240px minmax(0, 1fr);
}

.lfl-mm-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--lfl-mm-muted);
  margin: 0 0 10px;
}
.lfl-mm-heading b { color: var(--lfl-mm-blue); font-weight: 600; }

/* Columna 1: secciones */
.lfl-mm-sections { padding-right: 20px; display: flex; flex-direction: column; gap: 2px; }
.lfl-mm-sections .lfl-mm-heading { margin-left: 14px; }
.lfl-mm a.lfl-mm-sec {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-left: 3px solid transparent;
  border-radius: 0 4px 4px 0;
  color: #3a3f47;
  font-size: 15px;
  line-height: 1.25;
  text-decoration: none !important;
  transition: background-color .15s, color .15s;
}
.lfl-mm a.lfl-mm-sec.is-active,
.lfl-mm a.lfl-mm-sec:focus-visible {
  background: var(--lfl-mm-soft);
  color: var(--lfl-mm-blue);
  border-left-color: var(--lfl-mm-green);
  font-weight: 600;
}
.lfl-mm-arrow { color: #9aa1ac; font-size: 18px; line-height: 1; }

/* Columna 2: subcategorías */
.lfl-mm-subcol {
  padding: 0 22px;
  border-left: 1px solid var(--lfl-mm-line);
  border-right: 1px solid var(--lfl-mm-line);
}
.lfl-mm-subs { display: flex; flex-direction: column; gap: 2px; }
.lfl-mm-subs[hidden] { display: none; }
.lfl-mm a.lfl-mm-sub {
  display: block;
  padding: 9px 12px;
  border-radius: 4px;
  color: #3a3f47;
  font-size: 14px;
  line-height: 1.3;
  text-decoration: none !important;
  transition: background-color .15s, color .15s;
}
.lfl-mm a.lfl-mm-sub.is-active,
.lfl-mm a.lfl-mm-sub:hover,
.lfl-mm a.lfl-mm-sub:focus-visible {
  background: var(--lfl-mm-soft);
  color: var(--lfl-mm-blue);
  font-weight: 600;
}
.lfl-mm-hint { margin: 0; font-size: 13px; line-height: 1.5; color: var(--lfl-mm-muted); }

/* Columna 3: notas */
.lfl-mm-postcol { padding-left: 26px; min-width: 0; }
.lfl-mm-group[hidden] { display: none; }
.lfl-mm-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 14px;
}
.lfl-mm-group-head .lfl-mm-heading { margin: 0; }
.lfl-mm a.lfl-mm-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--lfl-mm-blue);
  text-decoration: none !important;
  white-space: nowrap;
}
.lfl-mm a.lfl-mm-all:hover { color: var(--lfl-mm-green); }

.lfl-mm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lfl-mm a.lfl-mm-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--lfl-mm-text);
  text-decoration: none !important;
}
.lfl-mm-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  overflow: hidden;
  background: #e5e7eb;
  margin-bottom: 4px;
}
.lfl-mm-thumb img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  transition: transform .3s ease;
}
.lfl-mm a.lfl-mm-card:hover .lfl-mm-thumb img { transform: scale(1.04); }
.lfl-mm-noimg { display: block; width: 100%; height: 100%; }
.lfl-mm-cat {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #4f8a1c;
}
.lfl-mm-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--lfl-mm-blue);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lfl-mm a.lfl-mm-card:hover .lfl-mm-title { color: #4f8a1c; }
.lfl-mm-date { font-size: 12px; color: var(--lfl-mm-muted); }
.lfl-mm-empty { margin: 0; font-size: 14px; color: var(--lfl-mm-muted); }

/* Pantallas medianas: 3 notas */
@media (max-width: 1280px) {
  .lfl-mm-inner { grid-template-columns: 220px 220px minmax(0, 1fr); }
  .lfl-mm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lfl-mm-grid > .lfl-mm-card:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lfl-mm, .lfl-mm-thumb img { transition: none; }
}

/* Descripción de la categoría cuando la sección no tiene subcategorías */
.lfl-mm-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #3a3f47;
}

/* ---------- Selector de idioma (GTranslate, estilo «Nice dropdown with flags») ---------- */

/* Alinear el selector y el buscador al centro del header, y que la lista quede por encima del menú */
.e-con:has(> .elementor-widget-shortcode .gtranslate_wrapper) > .elementor-element { align-self: center !important; }
.e-con:has(.gtranslate_wrapper) { z-index: 50; }
/* Respaldo sin :has() (navegadores viejos): contenedores del header que llevan el selector */
.elementor-element-c82b1d2, .elementor-element-9963a59, .elementor-element-1093b4d,
.elementor-element-6a828e2, .elementor-element-e813754, .elementor-element-dbf2415 { position: relative; z-index: 50; }

.gtranslate_wrapper .gt_switcher {
  position: relative;
  width: auto !important;
  min-width: 150px;
  overflow: visible !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.2 !important;
}
.gtranslate_wrapper .gt_switcher .gt_selected { background: transparent !important; border-radius: 9px; }

/* Botón: mismo alto, borde y radio que el buscador */
.gtranslate_wrapper .gt_switcher .gt_selected a {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 8px;
  width: auto !important;
  height: 39px;
  box-sizing: border-box;
  padding: 0 36px 0 12px !important;
  border: 1px solid #344AA2 !important;
  border-radius: 9px;
  background: transparent !important;
  color: #fff !important;
  font-size: 14px !important;
  text-decoration: none !important;
  transition: border-color .2s;
}
.gtranslate_wrapper .gt_switcher .gt_selected a:hover { border-color: #76B62B !important; background: transparent !important; }

/* Flecha verde */
.gtranslate_wrapper .gt_switcher .gt_selected a:after {
  content: '' !important;
  background: none !important;
  position: absolute !important;
  right: 15px;
  top: 50% !important;
  width: 7px !important;
  height: 7px !important;
  margin-top: -6px;
  border-right: 2px solid #76B62B;
  border-bottom: 2px solid #76B62B;
  transform: rotate(45deg);
  transition: transform .2s;
}
.gtranslate_wrapper .gt_switcher .gt_selected a.open:after { transform: rotate(-135deg); margin-top: -2px; }

.gtranslate_wrapper .gt_switcher img { width: 18px !important; height: auto !important; border-radius: 2px; margin: 0 !important; opacity: 1 !important; }

/* Lista de idiomas */
.gtranslate_wrapper .gt_switcher .gt_option {
  position: absolute !important;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9999;
  width: 200px !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
  box-sizing: border-box;
  padding: 6px !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .22);
}
.gtranslate_wrapper .gt_switcher .gt_option a {
  display: flex !important;
  align-items: center;
  gap: 10px;
  padding: 9px 10px !important;
  border-radius: 6px;
  background: transparent !important;
  color: #1B2C6F !important;
  font-size: 14px !important;
  text-decoration: none !important;
}
.gtranslate_wrapper .gt_switcher .gt_option a:hover { background: #EEF1F8 !important; }
.gtranslate_wrapper .gt_switcher .gt_option a.gt_current { font-weight: 600; color: #4f8a1c !important; }

/* Móvil: botón compacto */
@media (max-width: 767px) {
  .gtranslate_wrapper .gt_switcher { min-width: 0; }
}

/* ---------- Página Columnistas (ID 630): sección EQUIPO con GS Team ---------- */

/* El contenedor de Elementor que envuelve el shortcode de GS Team tiene «Ajuste: envolver»
   (flex-wrap: wrap) en columna. Con esa combinación el navegador calcula la altura del widget
   antes de que las tarjetas tomen su ancho final, el contenedor se queda corto y las tarjetas
   se enciman sobre la sección «Columnistas y colaboradores». Sin «wrap» crece a su altura real. */
.e-con:has(> .elementor-widget-shortcode .gs_team_area) {
	flex-wrap: nowrap;
}

@media (max-width: 767px) {
	/* Las tarjetas de GS Team se salían 6 px de la pantalla (márgenes negativos de su grilla) */
	.gs_team_area .gs-containeer > .gs-roow {
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	.gs_team_area.gs-grid-style-five .single-member-div {
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	/* Títulos «EQUIPO» y «COLUMNISTAS Y COLABORADORES»: a 3em «COLABORADORES» no cabía
	   y toda la página se desplazaba hacia los lados */
	.elementor-630 .elementor-element.elementor-element-4153a80 .elementor-heading-title,
	.elementor-630 .elementor-element.elementor-element-de66e4f .elementor-heading-title {
		font-size: 2em;
		line-height: 1.15;
	}
}

/* ---------- Mega menú «Noticias» en el menú móvil (acordeón de Royal) ---------- */
/* Sección abierta y sus subcategorías sobre fondo suave; «Ver todo …» en verde */
.wpr-mobile-nav-menu .lfl-mega-child.wpr-mobile-sub-open > a {
	background-color: #EEF1F8 !important;
	font-weight: 700 !important;
}
.wpr-mobile-nav-menu .lfl-mega-child > .wpr-mobile-sub-menu {
	padding-bottom: 6px;
}
.wpr-mobile-nav-menu .lfl-mega-child > .wpr-mobile-sub-menu,
.wpr-mobile-nav-menu .lfl-mega-child .lfl-mega-child,
.wpr-mobile-nav-menu .lfl-mega-child .lfl-mega-child > a {
	background-color: #EEF1F8 !important;
}
.wpr-mobile-nav-menu .lfl-mega-child .lfl-mega-child > a {
	text-transform: none !important;
	font-size: 14px !important;
	letter-spacing: 0 !important;
	color: #3a3f47 !important;
}
.wpr-mobile-nav-menu .lfl-mega-child .lfl-mega-all > a {
	color: #4f8a1c !important;
	font-weight: 700 !important;
}

/* ---------- Archivos (categoría, etiqueta, autor, búsqueda) ---------- */

/* La columna de notas ocupa siempre el espacio disponible. Sin notas medía 0 px
   y el sidebar derecho se recorría a la izquierda. */
.newsx-archive-page-inner > .content-area {
	flex: 1 1 0;
	min-width: 0;
}

/* Mensaje cuando no hay notas */
.newsx-posts-feed:has(> .lfl-empty-feed) {
	display: block;
}
.lfl-empty-feed {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 10px;
	padding: 56px 24px;
	background: #F5F7FB;
	border: 1px dashed #C9D1E4;
	border-radius: 10px;
}
.lfl-empty-feed__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 68px;
	height: 68px;
	margin-bottom: 6px;
	border-radius: 50%;
	background: #fff;
	color: #76B62B;
	box-shadow: 0 2px 8px rgba(27, 44, 111, .08);
}
.lfl-empty-feed .lfl-empty-feed__title {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
	color: #1B2C6F;
}
.lfl-empty-feed .lfl-empty-feed__text {
	margin: 0;
	font-size: 16px;
	line-height: 1.5;
	color: #4b5563;
}
.lfl-empty-feed a.lfl-empty-feed__btn {
	margin-top: 12px;
	padding: 10px 22px;
	border-radius: 4px;
	background: #1B2C6F;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background-color .2s ease;
}
.lfl-empty-feed a.lfl-empty-feed__btn:hover,
.lfl-empty-feed a.lfl-empty-feed__btn:focus-visible {
	background: #76B62B;
}
@media (max-width: 767px) {
	.lfl-empty-feed { padding: 40px 18px; }
	.lfl-empty-feed .lfl-empty-feed__title { font-size: 20px; }
}

/* ------------------------------------------------------------------
 * Home — widget «NewsX: Lista de categorías» (Style 2)
 * Una sola fila con 3 o 4 categorías (las de nota más reciente).
 * ---------------------------------------------------------------- */
.newsx-s2.newsx-category-list.lfl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.newsx-s2.newsx-category-list.lfl-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1024px) {
	.newsx-s2.newsx-category-list.lfl-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.newsx-s2.newsx-category-list.lfl-cols-3,
	.newsx-s2.newsx-category-list.lfl-cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Header: buscador (Royal Addons). Texto claro sobre el fondo azul. */
.elementor-9 .wpr-search-form-input {
	color: #fff !important;
	caret-color: #fff;
}
/* ------------------------------------------------------------------
 * Header + portada en pantallas medianas (netbooks 1366×768 con
 * escala de Windows al 125% ≈ 1093 px) y navegadores desactualizados.
 * Usa los IDs de Elementor en lugar de :has() para no depender de
 * selectores modernos.
 * ---------------------------------------------------------------- */

/* Todo este bloque aplica solo arriba de 768 px: en móvil manda el diseño
   responsive del tema (dynamic-css.php usa max-width: 768px). */
@media (min-width: 769px) {
	/* Buscador + idioma: siempre en una sola línea */
	.elementor-element-1093b4d {
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-end !important;
		min-width: 0;
	}
	.elementor-element-1093b4d > .elementor-element {
		min-width: 0;
		align-self: center !important;
	}
	.elementor-element-642c19a { flex: 0 1 auto; }   /* buscador: puede encogerse */
	.elementor-element-c13141b { flex: 0 0 auto; }   /* idioma: tamaño fijo */
	.elementor-element-c13141b .gtranslate_wrapper .gt_switcher { min-width: 0; }

	/* Portada (magazine 1-4): las columnas nunca crecen más que su espacio */
	.newsx-row-inner > .newsx-main-content,
	.newsx-magazine-widget,
	.newsx-magazine-layout-1-4 > .newsx-grid-item {
		min-width: 0;
	}
	.newsx-magazine-layout-1-4 {
		grid-template-columns: minmax(0, 50%) minmax(0, 1fr) minmax(0, 1fr);
	}
	.newsx-magazine-layout-1-4 img {
		max-width: 100%;
	}
}

/* Entre tablet y 1280 px: buscador más angosto */
@media (min-width: 769px) and (max-width: 1280px) {
	.elementor-element-642c19a { width: auto !important; max-width: 180px; }
	.elementor-element-642c19a .wpr-search-form-input { min-width: 0; width: 100%; }
}
/* Por debajo de 1150 px el selector muestra solo la bandera */
@media (min-width: 769px) and (max-width: 1150px) {
	.elementor-element-c13141b .gt_switcher .gt_selected a {
		font-size: 0 !important;
		padding: 0 30px 0 12px !important;
	}
}

/* Notas secundarias de la portada en laptops medianas (769–1200 px):
   mismo tratamiento que en celular para que el texto no tape la imagen —
   título a 16 px, sin etiquetas de categoría y solo la fecha. */
@media (min-width: 769px) and (max-width: 1200px) {
	.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h1,
	.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h2,
	.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h3,
	.newsx-magazine-widget .newsx-magazine-layout article.newsx-grid-item:not(:first-child) .newsx-grid-title h4 {
		font-size: 16px !important;
		line-height: 1.25 !important;
	}
	.newsx-magazine-layout-1-4 > .newsx-grid-item:not(:first-child) .newsx-grid-categories,
	.newsx-magazine-layout-1-4 > .newsx-grid-item:not(:first-child) .newsx-grid-author {
		display: none !important;
	}
}
