/* ===========================================================================
   ADAGIO — Widget "Adagio – Entradas del blog"
   Cargado por el plugin "Adagio Vistas (Blog y Contacto)".

   Sólo contiene la base visual del widget (según el diseño del FigJam).
   Todo se puede ajustar desde Elementor en la pestaña Estilo del widget:
   esos ajustes sobrescriben estas variables. Los estilos de las páginas
   (Contacto, Nosotros, encabezados) viven en Elementor, no aquí.
   =========================================================================== */

@keyframes adagioFadeUp {
	from {
		opacity: 0;
		transform: translate3d(0, 22px, 0);
	}

	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

.adg-blog {
	--adg-cols: 3;
	--adg-gap: 28px;
	--adg-radius: 20px;
	--adg-card-bg: #ffffff;
	--adg-border: #e3e6ed;
	--adg-media-bg: #eef1f8;
	--adg-accent: #344f9c;
	--adg-title: #333333;
	--adg-text: #626a7b;
	--adg-meta: #626a7b;
	--adg-ratio: 2 / 1;
	--adg-lift: -4px;
	--adg-reveal-duration: 750ms;
	--adg-shadow: none;
	--adg-shadow-hover: 0 12px 30px rgba(35, 54, 106, 0.07);

	display: flex;
	flex-direction: column;
	gap: var(--adg-gap);
	font-family: Arial, Helvetica, sans-serif;
}

.adg-blog__grid {
	display: grid;
	grid-template-columns: repeat(var(--adg-cols), minmax(0, 1fr));
	gap: var(--adg-gap);
}

/* Tarjeta */
.adg-blog .adg-post {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--adg-card-bg);
	border: 1px solid var(--adg-border);
	border-radius: var(--adg-radius);
	box-shadow: var(--adg-shadow);
	transition: transform 250ms ease, box-shadow 250ms ease;
}

.adg-blog .adg-post:hover {
	transform: translateY(var(--adg-lift));
	box-shadow: var(--adg-shadow-hover);
}

/* Imagen: completa y sin recorte, sobre fondo claro */
.adg-post__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: var(--adg-media-bg);
}

.adg-blog .adg-post__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	object-fit: contain;
}

.adg-blog--img-cover .adg-post--card .adg-post__media {
	aspect-ratio: var(--adg-ratio);
}

.adg-blog--img-cover .adg-post--card .adg-post__img {
	height: 100%;
	object-fit: cover;
}

/* Mientras la entrada no tenga "Imagen destacada" */
.adg-post__placeholder {
	display: block;
	width: 100%;
	aspect-ratio: 2 / 1;
	background: linear-gradient(135deg, #e7ecf7 0%, #f4f6fb 100%);
	position: relative;
}

.adg-post__placeholder::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	transform: translate(-50%, -50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab7d6' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Texto */
.adg-post__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 25px;
}

.adg-blog .adg-post__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 0 0 16px;
	color: var(--adg-meta);
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.adg-post__date {
	font-weight: 400;
}

.adg-blog .adg-post__title {
	margin: 0 0 14px;
	color: var(--adg-title);
	font-family: inherit;
	font-size: 24px;
	font-weight: 400;
	line-height: 30px;
}

.adg-blog .adg-post__title a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
}

/* Toda la tarjeta abre el artículo (un solo enlace, extendido con ::after). */
.adg-post__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}

.adg-post__link:focus {
	outline: none;
}

.adg-post__link:focus-visible::after {
	box-shadow: inset 0 0 0 3px #87b6ef;
	border-radius: var(--adg-radius);
}

.adg-blog .adg-post__excerpt {
	margin: 0 0 4px;
	color: var(--adg-text);
	font-size: 16px;
	line-height: 24px;
}

.adg-post__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-top: auto;
	padding-top: 18px;
	color: var(--adg-accent);
}

.adg-post__more {
	font-size: 14px;
	font-weight: 700;
	line-height: normal;
}

.adg-post__arrow {
	font-size: 22px;
	line-height: 1;
}

/* Nota destacada: imagen a la izquierda, texto a la derecha. */
.adg-blog .adg-post--featured {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	align-items: stretch;
}

.adg-post--featured .adg-post__body {
	align-self: center;
	padding: 32px;
}

.adg-blog .adg-post--featured .adg-post__title {
	font-size: 32px;
	line-height: 40px;
}

/* Entrada de las tarjetas: fade in + 22 px, 750 ms, una sola vez. */
.adg-js .adg-blog--reveal .adg-post:not(.is-visible) {
	opacity: 0;
}

.adg-blog--reveal .adg-post.is-visible {
	animation: adagioFadeUp var(--adg-reveal-duration) ease var(--adg-delay, 0ms) backwards;
}

/* Paginación, vacío y aviso del editor */
.adg-blog__pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 10px;
}

.adg-blog__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--adg-border);
	border-radius: 20px;
	background: #ffffff;
	color: var(--adg-accent);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

.adg-blog__pagination a.page-numbers:hover,
.adg-blog__pagination a.page-numbers:focus-visible {
	border-color: var(--adg-accent);
}

.adg-blog__pagination .page-numbers.current {
	border-color: var(--adg-accent);
	background: var(--adg-accent);
	color: #ffffff;
}

.adg-blog__pagination .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

.adg-blog__empty,
.adg-blog__notice {
	margin: 0;
	color: #626a7b;
	font-size: 15px;
	text-align: center;
}

.adg-blog__notice {
	padding: 10px 14px;
	border: 1px dashed #b9c3dc;
	border-radius: 8px;
	background: #ffffff;
	font-size: 13px;
}

@media (max-width: 1024px) {
	.adg-blog {
		--adg-cols: 2;
	}

	.adg-blog .adg-post--featured {
		grid-template-columns: 1fr 1fr;
	}

	.adg-blog .adg-post--featured .adg-post__title {
		font-size: 28px;
		line-height: 36px;
	}
}

@media (max-width: 767px) {
	.adg-blog {
		--adg-cols: 1;
		--adg-gap: 22px;
	}

	.adg-blog .adg-post--featured {
		display: flex;
		flex-direction: column;
	}

	.adg-post--featured .adg-post__body {
		padding: 25px;
	}

	.adg-blog .adg-post--featured .adg-post__title {
		font-size: 27px;
		line-height: 34px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.adg-blog .adg-post {
		transition: box-shadow 250ms ease;
	}

	.adg-blog .adg-post:hover {
		transform: none;
	}

	.adg-js .adg-blog--reveal .adg-post:not(.is-visible) {
		opacity: 1;
	}

	.adg-blog--reveal .adg-post.is-visible {
		animation: none;
	}
}

/* ---------------------------------------------------------------------
 * Teléfono internacional (selector de país con bandera y lada) en los
 * formularios de Elementor. Lo agrega assets/js/adagio-vistas.js con
 * intl-tel-input; aquí se ajusta al estilo de los campos del sitio.
 * ------------------------------------------------------------------ */
.elementor-form .iti {
	display: block;
	width: 100%;
	--iti-hover-color: rgba(52, 79, 156, 0.08);
	--iti-border-color: #D8DDEA;
	--iti-dialcode-color: #333333;
	--iti-dropdown-bg: #FFFFFF;
	--iti-arrow-color: #344F9C;
}

.elementor-form .iti input.elementor-field-textual {
	width: 100%;
	background-image: none;
}

.elementor-form .iti__selected-country {
	border-radius: 8px 0 0 8px;
	font-family: Arial, Helvetica, sans-serif;
}

.elementor-form .iti__selected-country:focus-visible {
	outline: 3px solid #87B6EF;
	outline-offset: -3px;
}

.elementor-form .iti__selected-dial-code {
	color: #333333;
	font-size: 15px;
}

.elementor-form .iti__dropdown-content {
	z-index: 30;
	border: 1px solid #D8DDEA;
	border-radius: 10px;
	box-shadow: 0 12px 30px -12px rgba(20, 20, 40, 0.25);
	color: #333333;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	text-align: left;
}

.elementor-form .iti__search-input {
	padding: 10px 12px 10px 34px;
	border: 0;
	border-bottom: 1px solid #E0E3EC;
	border-radius: 0;
	font-size: 14px;
}

.elementor-form .iti__country.iti__highlight {
	background-color: #EDF1FB;
}

.elementor-form .iti__dial-code {
	color: #5F6A85;
}

/* Ventana de países a pantalla completa en móvil */
.iti--fullscreen-popup .iti__dropdown-content {
	font-family: Arial, Helvetica, sans-serif;
	color: #333333;
}
