/**
 * Hoja de estilos del tema hijo.
 *
 * Solo para el CSS propio que Elementor no cubra. Los tokens (colores,
 * tipografías, tamaños) son variables globales v4 del kit de Elementor
 * (`--color-primary`, `--font-body`…); aquí se usan con un valor de
 * respaldo por si el kit aún no ha impreso su CSS.
 *
 * Referencia: documentacion/auditoria-avada.md
 */

@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* -------------------------------------------------------------------------
 * Base (equivalente a la configuración global de Avada)
 * ---------------------------------------------------------------------- */
html,
body {
	background-image: none !important; /* Fusion Core inyecta el pattern de Avada mientras siga activo */
}

body {
	background-color: var(--color-bg-main, #f8f8f8);
	color: #333333;
	font-family: "Ubuntu", "PT Sans", sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--color-heading, #333333);
	font-family: var(--font-heading, "Antic Slab"), serif;
	font-weight: 400;
}

a {
	color: var(--color-heading, #333333);
}

a:hover,
a:focus {
	color: var(--color-primary, #f05858);
}

/* Texto de las entradas (custom CSS de Avada: `.post .post-content`) */
.elementor-widget-theme-post-content {
	font-size: 14px;
	font-family: "Ubuntu", "PT Sans", sans-serif;
}

.elementor-widget-theme-post-content p,
.e-con .elementor-widget-theme-post-content p {
	color: #333333;
	font-size: 14px;
	font-family: "Ubuntu", "PT Sans", sans-serif;
}

.elementor-widget-theme-post-content h1,
.elementor-widget-theme-post-content h2,
.elementor-widget-theme-post-content h3,
.elementor-widget-theme-post-content h4,
.elementor-widget-theme-post-content h5,
.elementor-widget-theme-post-content h6 {
	color: #333333;
	font-family: var(--font-heading, "Antic Slab"), serif;
}

/* -------------------------------------------------------------------------
 * Bloque "Subscriu-te" solo para móvil (venía del Customizer de Avada)
 * ---------------------------------------------------------------------- */
.suscripcionVersionMovil {
	display: none;
}

@media (max-width: 800px) {
	.suscripcionVersionMovil {
		display: block;
		background-color: #fff;
		margin-top: 20px;
		padding: 10px;
	}

	.suscripcionVersionMovil h2 {
		margin-bottom: 10px;
	}

	.suscripcionVersionMovil dt#name-label,
	.suscripcionVersionMovil dt#email-label {
		width: 18%;
		line-height: 2.2em;
		float: left;
	}

	.suscripcionVersionMovil dd#name-element,
	.suscripcionVersionMovil dd#email-element {
		width: 80%;
		float: left;
		margin-left: 0;
	}
}

/* -------------------------------------------------------------------------
 * Banner de cookies (GDPR Cookie Compliance) — venía del Customizer
 * ---------------------------------------------------------------------- */
#moove_gdpr_cookie_info_bar {
	z-index: 99999999;
	padding-top: 30px;
	padding-bottom: 30px;
}

.lity {
	z-index: 999999999 !important;
}

#moove_gdpr_cookie_info_bar .moove-gdpr-info-bar-container .moove-gdpr-info-bar-content button.mgbutton {
	color: #000;
	font-size: 16px;
}

#moove_gdpr_cookie_modal .moove-gdpr-modal-content .moove-gdpr-modal-footer-content .moove-gdpr-button-holder button.mgbutton.moove-gdpr-modal-save-settings {
	display: inline-block !important;
}

.moove-gdpr-infobar-allow-all {
	color: #fff !important;
}

/* Utilidad heredada para ocultar publicidad puntualmente */
.laveu-ocultar {
	display: none;
}

/* -------------------------------------------------------------------------
 * Posts relacionados: 4 columnas, ancho completo, más grandes
 * ---------------------------------------------------------------------- */
.elementor-posts--grid,
.elementor-posts-container {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 20px !important;
	width: 100% !important;
	padding: 0 !important;
}

.elementor-post,
.post-item,
.elementor-posts-container > div {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.elementor-post__text,
.post-item__text {
	padding: 20px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.elementor-post__title,
.post-item__title {
	font-size: 16px;
	margin-bottom: 10px;
	line-height: 1.4;
	font-weight: 600;
}

.elementor-post__excerpt,
.post-item__excerpt {
	font-size: 14px;
	line-height: 1.5;
	color: #666;
	flex-grow: 1;
}

.elementor-post__image,
.post-item__image {
	width: 100%;
	height: auto;
	display: block;
}

@media (max-width: 1200px) {
	.elementor-posts--grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
}

@media (max-width: 768px) {
	.elementor-posts--grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}

/* -------------------------------------------------------------------------
 * Paginación de Elementor: mostrar todos los botones y remover deshabilitado
 * ---------------------------------------------------------------------- */
.e-pagination-base {
	display: flex !important;
}

.e-pagination-next-base,
.e-pagination-prev-base,
.e-pagination-next,
.e-pagination-prev {
	display: flex !important;
	visibility: visible !important;
}

/* Remover el estado deshabilitado que oculta botones */
.e-pagination-prev-base.e--disabled,
.e-pagination-next-base.e--disabled {
	opacity: 0.5;
	pointer-events: none;
	/* Mantener visible aunque esté deshabilitado */
	display: flex !important;
}

/* Página "BOUS 2019": 3 galerías NextGEN en fila (sustituye a las columnas de Fusion) */
.laveu-ngg-row {
	display: flex;
	gap: 20px;
}

.laveu-ngg-col {
	flex: 1;
	min-width: 0;
}

@media (max-width: 767px) {
	.laveu-ngg-row {
		flex-direction: column;
	}
}



/* -------------------------------------------------------------------------
 * Header (site part "Header La Veu")
 * Réplica del header v5 de Avada: menú centrado Antic Slab 20px, ítem
 * activo en rojo con flecha, submenú rojo oscuro, barra sticky.
 * ---------------------------------------------------------------------- */
.elementor-location-header {
	position: sticky;
	top: var(--laveu-sticky-top, -9999px);
	z-index: 999;
}

.admin-bar .elementor-location-header {
	top: calc(var(--laveu-sticky-top, -9999px) + 32px);
}

.elementor-location-header.is-stuck {
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.elementor-location-header a {
	color: inherit;
}

.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu > li > a.elementor-item {
	position: relative;
	padding: 0 22px;
	line-height: 59px;
	font-family: var(--font-heading, "Antic Slab"), serif;
	font-size: var(--size-menu, 20px);
	font-weight: 400;
	color: var(--color-heading, #333333);
}

.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu > li > a.elementor-item:hover,
.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu > li > a.elementor-item.elementor-item-active {
	color: var(--color-primary, #f05858);
}

/* Flecha bajo el ítem activo (menu_highlight_style = arrow) */
.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu > li > a.elementor-item.elementor-item-active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -12px;
	width: 0;
	height: 0;
	margin-left: -12px;
	border-left: 12px solid transparent;
	border-right: 12px solid transparent;
	border-top: 12px solid var(--color-primary-dark, #dd353a);
	z-index: 2;
}

.elementor-location-header .elementor-nav-menu--main .elementor-nav-menu > li > a.elementor-item.elementor-item-active::before {
	content: "";
	position: absolute;
	left: 50%;
	bottom: -11px;
	width: 0;
	height: 0;
	margin-left: -11px;
	border-left: 11px solid transparent;
	border-right: 11px solid transparent;
	border-top: 11px solid var(--color-surface, #ffffff);
	z-index: 3;
}

/* Submenú (Opinió) */
.elementor-location-header .elementor-nav-menu--main .sub-menu {
	background-color: var(--color-primary-dark, #dd353a);
	min-width: 220px;
}

.elementor-location-header .elementor-nav-menu--main .sub-menu a.elementor-sub-item {
	padding: 10px 20px;
	font-family: var(--font-body, "PT Sans"), sans-serif;
	font-size: 14px;
	color: #ffffff;
	background: transparent;
}

.elementor-location-header .elementor-nav-menu--main .sub-menu a.elementor-sub-item:hover {
	background-color: var(--color-primary, #f05858);
	color: #ffffff;
}

/* Menú móvil "classic" de Avada: barra gris con hamburguesa a la derecha */
.elementor-location-header .elementor-menu-toggle {
	width: 100%;
	justify-content: flex-end;
	margin: 6px 0;
	padding: 8px 12px;
	background-color: var(--color-bg-main, #f8f8f8);
	border: 1px solid var(--color-border-form, #d2d2d2);
	color: #b0b0b0;
	font-size: 22px;
}

.elementor-location-header .elementor-nav-menu--dropdown {
	background-color: var(--color-bg-main, #f8f8f8);
	border: 1px solid var(--color-border-form, #d2d2d2);
	border-top: 0;
}

.elementor-location-header .elementor-nav-menu--dropdown a {
	padding: 10px 12px;
	border-bottom: 1px solid var(--color-border-form, #d2d2d2);
	font-family: var(--font-body, "PT Sans"), sans-serif;
	font-size: 12px;
	color: var(--color-heading, #333333);
	background-color: transparent;
}

.elementor-location-header .elementor-nav-menu--dropdown a:hover,
.elementor-location-header .elementor-nav-menu--dropdown a.elementor-item-active {
	color: var(--color-primary, #f05858);
	background-color: #ffffff;
}

/* Iconos sociales del secondary header */
.elementor-location-header .e-svg-base svg,
.elementor-location-header svg {
	fill: currentColor;
}

/* Avada no muestra indicador de submenú en el menú principal de escritorio */
.elementor-location-header .elementor-nav-menu--main .sub-arrow {
	display: none;
}

.elementor-location-header .elementor-nav-menu--dropdown.elementor-nav-menu__container {
	margin-top: 0;
}

/* -------------------------------------------------------------------------
 * Sidebar (widget v3 "Barra lateral" → sidebar laveu-sidebar)
 * Réplica de "Blog Sidebar" de Avada: widgets centrados, separados, sin fondo.
 * ---------------------------------------------------------------------- */
.elementor-widget-sidebar .laveu-widget {
	margin-bottom: 40px;
	font-size: var(--size-small, 13px);
	text-align: center;
	overflow: hidden;
}

.elementor-widget-sidebar .laveu-widget img {
	max-width: 100%;
	height: auto;
}

.elementor-widget-sidebar .laveu-widget iframe {
	max-width: 100%;
}

/* Widget AEMET: iframe con height="2000%" (pensado para una columna con altura fija
   en Avada). Sin esa referencia se dispara; se fija una altura razonable. */
.elementor-widget-sidebar .laveu-widget iframe[name^="iframe_aemet"] {
	width: 100% !important;
	height: 300px !important;
}

.elementor-widget-sidebar .widget-title,
.elementor-widget-sidebar .laveu-widget h3 {
	margin: 0 0 20px;
	font-family: var(--font-heading, "Antic Slab"), serif;
	font-size: 18px;
	color: var(--color-heading, #333333);
}

/* Buscador (widget "search" de WordPress con el aspecto del de Avada) */
.elementor-widget-sidebar .widget_search form,
.elementor-widget-sidebar .wp-block-search__inside-wrapper {
	display: flex;
	position: relative;
}

.elementor-widget-sidebar .widget_search input[type="search"],
.elementor-widget-sidebar .widget_search input[type="text"] {
	width: 100%;
	height: 29px;
	padding: 0 10px 0 30px;
	border: 1px solid var(--color-border-form, #d2d2d2);
	border-radius: 0;
	background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='%23aaa' d='M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z'/%3E%3C/svg%3E") no-repeat 10px center / 12px;
	font-size: 13px;
	color: var(--color-text, #747474);
}

.elementor-widget-sidebar .widget_search input[type="submit"],
.elementor-widget-sidebar .widget_search button,
.elementor-widget-sidebar .widget_search .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	border: 0;
	padding: 0;
}
