/*
 * Kukinas — widget "Nota — Detalle". El cuerpo viene del editor de bloques:
 * acá se le da el estilo editorial de Pencil a párrafos, subtítulos,
 * listas, imágenes con epígrafe, citas, botones y enlaces.
 */

.kk-note {
	background: var(--kk-canvas);
}

/* ---------- Cabecera ---------- */

.kk-note__header {
	display: flex;
	flex-direction: column;
	gap: 26px;
	padding-block: 48px 40px;
}

.kk-note__titles {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 1060px;
}

.kk-note__titles > * {
	margin: 0;
}

.kk-note__date {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--kk-ink-2);
	font-size: 13px;
	line-height: 1.7;
}

.kk-note__date .kk-icon {
	width: 16px;
	height: 16px;
}

/* ---------- Cuerpo ---------- */

.kk-note__body {
	padding-block: 56px 64px;
}

.kk-note__content {
	display: flex;
	flex-direction: column;
	gap: 32px;
	color: var(--kk-ink);
	font-size: 17px;
	line-height: 1.7;
}

.kk-note__content > * {
	margin: 0 !important;
	max-width: 100%;
}

.kk-note__content p {
	font-size: 17px;
	line-height: 1.7;
}

/* Párrafo de apertura con filete rojo. */
.kk-note__content > p:first-child {
	padding-left: 24px;
	border-left: 3px solid var(--kk-brand);
	color: var(--kk-cocoa);
	font-size: 19px;
}

.kk-note__content h2,
.kk-note__content h3,
.kk-note__content h4 {
	color: var(--kk-ink);
	font-family: var(--kk-font-display);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -1px;
}

.kk-note__content h2 {
	font-size: 40px;
}

.kk-note__content h3 {
	font-size: 28px;
	letter-spacing: -0.6px;
}

.kk-note__content h4 {
	font-size: 22px;
	letter-spacing: -0.4px;
}

.kk-note__content a:not(.wp-block-button__link) {
	color: var(--kk-brand-text);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.kk-note__content strong {
	font-weight: 700;
}

/* Listas: viñeta roja y separador, como "Lista editorial de variedades". */
.kk-note__content ul,
.kk-note__content ol {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 0;
	list-style: none;
	counter-reset: kk-note-list;
}

.kk-note__content li {
	position: relative;
	padding: 0 0 20px 23px;
	border-bottom: 1px solid var(--kk-border);
}

.kk-note__content ul > li::before {
	content: "•";
	position: absolute;
	left: 0;
	top: 0;
	color: var(--kk-brand-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.7;
}

.kk-note__content ol > li {
	padding-left: 36px;
}

.kk-note__content ol > li::before {
	counter-increment: kk-note-list;
	content: counter(kk-note-list);
	position: absolute;
	left: 0;
	top: 2px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--kk-brand);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

/* Un ítem que empieza en negrita usa ese texto como título del ítem. */
.kk-note__content li > strong:first-child {
	display: block;
	margin-bottom: 4px;
	color: var(--kk-cocoa);
	font-family: var(--kk-font-display);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
}

.kk-note__content li ul,
.kk-note__content li ol {
	margin-top: 12px;
}

/* Imágenes: marco rosa cuadriculado + epígrafe opcional. */
.kk-note__content .wp-block-image,
.kk-note__content figure.wp-caption {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.kk-note .kk-note__content .wp-block-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 428px;
	padding: 24px;
	box-sizing: border-box;
	object-fit: cover;
	border-radius: 12px 56px 12px 56px;
	background-color: var(--kk-pink-50);
	background-image:
		linear-gradient(90deg, rgba(229, 43, 47, 0.08) 1px, transparent 1px),
		linear-gradient(rgba(229, 43, 47, 0.08) 1px, transparent 1px);
	background-size: 32px 32px;
}

.kk-note__content .wp-block-image figcaption,
.kk-note__content .wp-element-caption {
	margin: 0;
	color: var(--kk-ink-2);
	font-size: 13px;
	line-height: 1.6;
	text-align: left;
}

.kk-note__content .wp-block-gallery img {
	padding: 0;
	background: none;
	border-radius: 12px;
}

.kk-note__content blockquote,
.kk-note__content .wp-block-quote,
.kk-note__content .wp-block-pullquote {
	margin: 0;
	padding: 28px;
	border: 0;
	border-radius: 8px 28px 8px 28px;
	background: var(--kk-pink-50);
	text-align: left;
}

.kk-note__content blockquote p {
	color: var(--kk-brand-text);
	font-family: var(--kk-font-hand);
	font-size: 27px;
	line-height: 1.2;
}

.kk-note__content blockquote cite {
	display: block;
	margin-top: 8px;
	color: var(--kk-ink-2);
	font-size: 14px;
	font-style: normal;
}

.kk-note__content .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.kk-note__content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 14px 22px;
	border-radius: 999px;
	background: var(--kk-brand);
	color: #fff;
	font-family: var(--kk-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
}

.kk-note__content .wp-block-button__link::after {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kk-note__content .wp-block-button__link:hover {
	background: var(--kk-brand-text);
	color: #fff;
}

.kk-note__content .is-style-outline .wp-block-button__link {
	background: var(--kk-surface);
	border: 1px solid var(--kk-border);
	color: var(--kk-ink);
}

.kk-note__content .wp-block-embed iframe,
.kk-note__content video {
	width: 100%;
	border-radius: 16px;
}

.kk-note__content hr {
	width: 100%;
	border: 0;
	border-top: 1px solid var(--kk-border);
}

/* ---------- Tablet / celular ---------- */

@media (max-width: 1024px) {
	.kk-note__content h2 {
		font-size: 34px;
	}
}

@media (max-width: 767px) {
	.kk-note__header {
		gap: 20px;
		padding-block: 28px 28px;
	}

	.kk-note__titles {
		gap: 16px;
	}

	.kk-note .kk-nov-lead {
		font-size: 16px;
	}

	.kk-note__date {
		font-size: 16px;
	}

	.kk-note__body {
		padding-block: 36px 48px;
	}

	.kk-note__content {
		gap: 24px;
	}

	.kk-note__content p,
	.kk-note__content > p:first-child {
		font-size: 17px;
	}

	.kk-note__content > p:first-child {
		padding-left: 16px;
	}

	.kk-note__content h2 {
		font-size: 30px;
	}

	.kk-note__content h3,
	.kk-note__content li > strong:first-child {
		font-size: 22px;
	}

	.kk-note .kk-note__content .wp-block-image img {
		max-height: none;
		padding: 12px;
		border-radius: 10px 32px 10px 32px;
		background-size: 24px 24px;
	}

	.kk-note__content .wp-block-image figcaption,
	.kk-note__content .wp-element-caption {
		font-size: 16px;
	}

	.kk-note__content .wp-block-button__link {
		font-size: 16px;
	}
}
