/**
 * Azul CIMA Blocks — estilos compartidos (frontend y editor).
 *
 * Tokens:
 *  --azul-bg, --azul-fg, --azul-muted, --azul-line,
 *  --azul-icon-bg, --azul-icon-fg, --azul-cta, --azul-accent
 *
 * Los radios asimétricos se aplican en línea desde el editor para que
 * cada tarjeta pueda tener su propia receta (30/12, 65/8, etc.).
 */

.azul-nota,
.azul-imagen,
.azul-pabellon,
.azul-rejilla,
.azul-nota *,
.azul-imagen *,
.azul-pabellon * {
	box-sizing: border-box;
}

/* ==========================================================================
   1. Tarjeta con icono (azul/nota)
   ========================================================================== */

.azul-nota {
	--azul-bg: #ffffff;
	--azul-fg: #16345c;
	--azul-muted: #61728a;
	--azul-line: #e1e8f4;
	--azul-icon-bg: #e8effc;
	--azul-icon-fg: #194fbc;
	--azul-cta: #194fbc;
	--azul-icon-radius: 20px 5px 20px 5px;
	--azul-arrow-line: rgba(22, 52, 92, 0.16);

	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 255px;
	padding: 27px;
	overflow: hidden;
	background: var(--azul-bg);
	color: var(--azul-fg);
	border: 1px solid var(--azul-line);
	text-decoration: none;
	font-family: inherit;
	line-height: 1.5;
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		border-color 0.25s ease;
}

a.azul-nota,
a.azul-nota:hover,
a.azul-nota:focus {
	color: var(--azul-fg);
	text-decoration: none;
}

.azul-nota:focus-visible {
	outline: 3px solid #00c0ff;
	outline-offset: 5px;
}

/* Tonos de tarjeta ------------------------------------------------------- */

.azul-nota--blue {
	--azul-bg: #194fbc;
	--azul-fg: #ffffff;
	--azul-muted: #e5efff;
	--azul-line: #194fbc;
	--azul-icon-bg: rgba(255, 255, 255, 0.1);
	--azul-icon-fg: #ffffff;
	--azul-cta: #e5efff;
	--azul-arrow-line: rgba(255, 255, 255, 0.38);
}

.azul-nota--ice {
	--azul-bg: #dbf4fc;
	--azul-line: #cfeefb;
	--azul-icon-bg: rgba(255, 255, 255, 0.55);
}

.azul-nota--lilac {
	--azul-bg: #e7e7fd;
	--azul-line: #dedefb;
	--azul-icon-bg: rgba(255, 255, 255, 0.6);
	--azul-icon-fg: #4a4ac9;
}

.azul-nota--mint {
	--azul-bg: #d8f5f1;
	--azul-line: #c9efea;
	--azul-icon-bg: rgba(255, 255, 255, 0.6);
	--azul-icon-fg: #14877a;
}

.azul-nota--lime {
	--azul-bg: #f0f7cf;
	--azul-line: #e6f0bd;
	--azul-icon-bg: rgba(255, 255, 255, 0.6);
	--azul-icon-fg: #6b7d00;
}

.azul-nota--sky {
	--azul-bg: #e0f3ff;
	--azul-line: #d2ecff;
	--azul-icon-bg: rgba(255, 255, 255, 0.6);
	--azul-icon-fg: #0a6ea8;
}

.azul-nota--sand {
	--azul-bg: #f5f1e6;
	--azul-line: #efe9da;
	--azul-icon-bg: rgba(255, 255, 255, 0.7);
	--azul-icon-fg: #8a6a2f;
}

/* Estructura interna ------------------------------------------------------ */

.azul-nota__top {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 24px;
}

.azul-nota__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 64px;
	height: 64px;
	background: var(--azul-icon-bg);
	color: var(--azul-icon-fg);
	border-radius: var(--azul-icon-radius);
}

.azul-nota__icon svg {
	display: block;
	width: 42px;
	height: 42px;
}

.azul-nota__arrow {
	display: grid;
	place-items: center;
	flex: none;
	width: 30px;
	height: 30px;
	color: var(--azul-icon-fg);
	border: 1px solid var(--azul-arrow-line);
	border-radius: 50%;
	font-size: 16px;
	line-height: 1;
	transition:
		background 0.25s ease,
		color 0.25s ease,
		border-color 0.25s ease,
		transform 0.25s ease;
}

.azul-nota__title {
	position: relative;
	z-index: 1;
	margin: 0 0 10px;
	color: inherit;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.4px;
}

.azul-nota__text {
	position: relative;
	z-index: 1;
	max-width: 24ch;
	margin: 0 0 24px;
	color: var(--azul-muted);
	font-size: 13px;
	line-height: 1.6;
}

.azul-nota__cta {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
	color: var(--azul-cta);
	font-size: 11px;
	font-weight: 700;
}

.azul-nota__cta-label {
	display: inline-block;
}

.azul-nota__cta-arrow {
	font-size: 13px;
	line-height: 1;
	transition: transform 0.25s ease;
}

.azul-nota__blob {
	position: absolute;
	z-index: 0;
	right: -40px;
	bottom: -45px;
	width: 130px;
	height: 130px;
	background: rgba(255, 255, 255, 0.13);
	border-radius: 45px 0 45px 0;
	transform: rotate(-18deg);
	pointer-events: none;
}

/* Interacción ------------------------------------------------------------- */

.azul-nota--lift:hover {
	transform: translateY(-6px);
	border-color: #b6cbed;
	box-shadow: 0 18px 40px rgba(25, 79, 188, 0.1);
}

.azul-nota--lift:hover .azul-nota__arrow {
	background: var(--azul-icon-fg);
	color: #ffffff;
	border-color: var(--azul-icon-fg);
	transform: rotate(45deg);
}

.azul-nota--lift:hover .azul-nota__cta-arrow {
	transform: translateX(3px);
}

.azul-nota--blue.azul-nota--lift:hover .azul-nota__arrow {
	background: #ffffff;
	color: #194fbc;
	border-color: #ffffff;
}

@media (prefers-reduced-motion: reduce) {
	.azul-nota,
	.azul-nota__arrow,
	.azul-nota__cta-arrow {
		transition: none;
	}

	.azul-nota--lift:hover {
		transform: none;
	}
}

/* ==========================================================================
   2. Imagen con marco (azul/marco-imagen)
   ========================================================================== */

.azul-imagen {
	margin: 0;
	font-family: inherit;
	line-height: 1.5;
}

.azul-imagen__media {
	position: relative;
	display: block;
	overflow: hidden;
	background: #eef2f8;
}

.azul-imagen__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.azul-imagen--aspect-auto .azul-imagen__img {
	height: auto;
}

.azul-imagen__link {
	display: block;
	text-decoration: none;
}

.azul-imagen--shadow-soft .azul-imagen__media {
	box-shadow: 0 18px 40px rgba(25, 79, 188, 0.1);
}

.azul-imagen--shadow-strong .azul-imagen__media {
	box-shadow: 0 28px 70px rgba(22, 52, 92, 0.22);
}

.azul-imagen__tint {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

/* Nota flotante sobre la imagen ------------------------------------------ */

.azul-imagen__note {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: min(290px, 82%);
	padding: 14px 17px;
	color: #16345c;
	background: #ffffff;
	border: 1px solid #ecf0f8;
	border-radius: 16px 16px 30px 16px;
	box-shadow: 0 15px 45px rgba(22, 52, 92, 0.075);
}

.azul-imagen__note--tr {
	top: 18px;
	right: 18px;
}

.azul-imagen__note--tl {
	top: 18px;
	left: 18px;
}

.azul-imagen__note--br {
	bottom: 18px;
	right: 18px;
}

.azul-imagen__note--bl {
	bottom: 18px;
	left: 18px;
}

.azul-imagen__note-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 38px;
	height: 38px;
	color: #194fbc;
	background: #dbf7ff;
	border-radius: 12px;
}

.azul-imagen__note-icon svg {
	display: block;
	width: 22px;
	height: 22px;
}

.azul-imagen__note-text {
	display: block;
	min-width: 0;
}

.azul-imagen__note-title {
	display: block;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.25;
}

.azul-imagen__note-sub {
	display: block;
	margin-top: 2px;
	color: #61728a;
	font-size: 10px;
	line-height: 1.35;
}

.azul-imagen__caption {
	margin-top: 12px;
	color: #61728a;
	font-size: 12px;
	line-height: 1.5;
}

/* ==========================================================================
   3. Tarjeta de pabellón (azul/pabellon)
   ========================================================================== */

.azul-pabellon {
	--azul-bg: #ffffff;
	--azul-accent: #194fbc;
	--azul-muted: #61728a;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	color: #16345c;
	background: var(--azul-bg);
	font-family: inherit;
	line-height: 1.5;
}

.azul-pabellon__media {
	overflow: hidden;
	background: #eef2f8;
}

.azul-pabellon__media img {
	display: block;
	width: 100%;
	height: var(--azul-media-h, 225px);
	max-width: none;
	object-fit: cover;
}

.azul-pabellon__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 28px;
}

.azul-pabellon__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 1.6px;
	line-height: 1.3;
	text-transform: uppercase;
}

.azul-pabellon__dot {
	flex: none;
	width: 8px;
	height: 8px;
	background: var(--azul-accent);
	border-radius: 2px;
}

.azul-pabellon__title {
	margin: 17px 0;
	color: inherit;
	font-size: 25px;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.4px;
}

.azul-pabellon__text {
	min-height: 72px;
	margin: 0;
	color: var(--azul-muted);
	font-size: 14px;
	line-height: 1.7;
}

.azul-pabellon--no-pill .azul-pabellon__title {
	margin-top: 0;
}

.azul-pabellon__details {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid rgba(22, 52, 92, 0.1);
}

.azul-pabellon__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: var(--azul-accent);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.azul-pabellon__summary::-webkit-details-marker {
	display: none;
}

.azul-pabellon__summary::after {
	content: "+";
	font-size: 16px;
	line-height: 1;
}

.azul-pabellon__details[open] .azul-pabellon__summary::after {
	content: "\2013";
}

.azul-pabellon__more {
	padding-top: 12px;
}

.azul-pabellon__more-text {
	margin: 0 0 12px;
	color: var(--azul-muted);
	font-size: 13px;
	line-height: 1.65;
}

.azul-pabellon__more-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--azul-accent);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.azul-pabellon__more-link:hover {
	text-decoration: underline;
}

/* ==========================================================================
   4. Rejilla (azul/rejilla)
   ========================================================================== */

.azul-rejilla {
	display: grid;
	grid-template-columns: repeat(var(--azul-cols, 3), minmax(0, 1fr));
	gap: var(--azul-gap, 24px);
}

.azul-rejilla > * {
	min-width: 0;
}

.azul-rejilla--stagger {
	padding-bottom: 20px;
}

.azul-rejilla--stagger > *:nth-child(3n + 2) {
	transform: translateY(20px);
}

.azul-rejilla--align-start {
	align-items: start;
}

.azul-rejilla--align-center {
	align-items: center;
}

@media (max-width: 950px) {
	.azul-rejilla {
		grid-template-columns: repeat(var(--azul-cols-t, 2), minmax(0, 1fr));
	}

	.azul-rejilla--stagger > * {
		transform: none;
	}
}

@media (max-width: 700px) {
	.azul-rejilla {
		grid-template-columns: repeat(var(--azul-cols-m, 1), minmax(0, 1fr));
	}
}
