/**
 * Gutenberg – integración de bloques con el tema Redbee
 *
 * Alinea el sistema de bloques de WordPress con los tokens de diseño del tema:
 * tipografía DM Sans, colores #141414 / #f1f1ef / #D41717, y el grid global-inner.
 */

/* =============================================
   CONTENEDOR PRINCIPAL
   ============================================= */

.gutenberg-page {
	padding: 0;
}

.gutenberg-page__inner {
	margin: 0 auto;
	max-width: 100%;
	width: 100%;
}

/* Alineación wide: desborda el contenedor con un margen generoso */
.gutenberg-page__inner .alignwide {
	margin-left: calc(-80px);
	margin-right: calc(-80px);
	max-width: none;
	width: auto;
}

/* Alineación full: ocupa el 100% del viewport */
.gutenberg-page__inner .alignfull {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	max-width: 100vw;
	width: 100vw;
}

/* =============================================
   TIPOGRAFÍA DE BLOQUES
   ============================================= */

.gutenberg-page p,
.gutenberg-page li,
.gutenberg-page td,
.gutenberg-page th {
	font-family: "DM Sans", serif;
	font-size: 16px;
	line-height: 1.7;
	color: #141414;
}

.gutenberg-page h1,
.gutenberg-page h2,
.gutenberg-page h3,
.gutenberg-page h4,
.gutenberg-page h5,
.gutenberg-page h6 {
	font-family: "DM Sans", serif;
	font-weight: 700;
	line-height: 1.2;
	color: #141414;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}

.gutenberg-page h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.gutenberg-page h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
.gutenberg-page h3 { font-size: clamp(1.25rem, 2.5vw, 2rem); }
.gutenberg-page h4 { font-size: 1.25rem; }
.gutenberg-page h5 { font-size: 1.125rem; }
.gutenberg-page h6 { font-size: 1rem; }

.gutenberg-page a {
	color: #D41717;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: opacity 0.2s ease;
}
.gutenberg-page a:hover {
	opacity: 0.75;
}

.gutenberg-page p {
	margin-bottom: 1.25em;
}

.gutenberg-page ul,
.gutenberg-page ol {
	padding-left: 1.5em;
	margin-bottom: 1.25em;
}

.gutenberg-page ul {
	list-style: disc;
}

.gutenberg-page ol {
	list-style: decimal;
}

.gutenberg-page li {
	margin-bottom: 0.4em;
}

.gutenberg-page blockquote {
	border-left: 4px solid #D41717;
	margin: 2em 0;
	padding: 1em 1.5em;
	background: rgba(212, 23, 23, 0.04);
	font-style: italic;
}

.gutenberg-page blockquote p {
	margin: 0;
}

.gutenberg-page hr {
	border: none;
	border-top: 1px solid rgba(20, 20, 20, 0.15);
	margin: 2.5em 0;
}

/* =============================================
   BLOQUES CORE – IMAGEN
   ============================================= */

.gutenberg-page .wp-block-image {
	margin-bottom: 1.5em;
}

.gutenberg-page .wp-block-image img {
	height: auto;
	max-width: 100%;
	display: block;
}

.gutenberg-page .wp-block-image figcaption {
	font-size: 0.85em;
	color: rgba(20, 20, 20, 0.6);
	text-align: center;
	margin-top: 0.5em;
}

/* =============================================
   BLOQUES CORE – BOTONES
   ============================================= */

.gutenberg-page .wp-block-buttons {
	margin-bottom: 1.5em;
}

.gutenberg-page .wp-element-button,
.gutenberg-page .wp-block-button__link {
	background-color: #D41717;
	color: #fff;
	font-family: "DM Sans", serif;
	font-size: 15px;
	font-weight: 600;
	padding: 14px 32px;
	border-radius: 4px;
	border: 2px solid #D41717;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
	cursor: pointer;
	display: inline-block;
}

.gutenberg-page .wp-element-button:hover,
.gutenberg-page .wp-block-button__link:hover {
	background-color: transparent;
	color: #D41717;
}

/* Estilo outline */
.gutenberg-page .is-style-outline .wp-element-button,
.gutenberg-page .is-style-outline .wp-block-button__link {
	background-color: transparent;
	color: #D41717;
}

.gutenberg-page .is-style-outline .wp-element-button:hover,
.gutenberg-page .is-style-outline .wp-block-button__link:hover {
	background-color: #D41717;
	color: #fff;
}

/* =============================================
   BLOQUES CORE – COLUMNAS
   ============================================= */

.gutenberg-page .wp-block-columns {
	margin-bottom: 2em;
	gap: 2em;
}

/* =============================================
   BLOQUES CORE – COVER
   ============================================= */

.gutenberg-page .wp-block-cover {
	min-height: 400px;
	margin-bottom: 2em;
}

/* =============================================
   BLOQUES CORE – SEPARADOR / ESPACIADOR
   ============================================= */

.gutenberg-page .wp-block-separator {
	border: none;
	border-top: 1px solid rgba(20, 20, 20, 0.15);
	margin: 2.5em auto;
}

/* =============================================
   BLOQUES CORE – QUOTE / PULLQUOTE
   ============================================= */

.gutenberg-page .wp-block-quote {
	border-left: 4px solid #D41717;
	margin: 2em 0;
	padding: 1em 1.5em;
	background: rgba(212, 23, 23, 0.04);
}

.gutenberg-page .wp-block-quote p {
	font-style: italic;
}

.gutenberg-page .wp-block-quote cite {
	display: block;
	font-size: 0.85em;
	color: rgba(20, 20, 20, 0.6);
	margin-top: 0.5em;
}

.gutenberg-page .wp-block-pullquote {
	border-top: 4px solid #D41717;
	border-bottom: 4px solid #D41717;
	padding: 1.5em 0;
	margin: 2.5em 0;
	text-align: center;
}

.gutenberg-page .wp-block-pullquote p {
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	font-weight: 600;
	font-style: italic;
}

/* =============================================
   BLOQUES CORE – TABLA
   ============================================= */

.gutenberg-page .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5em;
}

.gutenberg-page .wp-block-table th,
.gutenberg-page .wp-block-table td {
	padding: 10px 14px;
	border: 1px solid rgba(20, 20, 20, 0.2);
	font-size: 15px;
}

.gutenberg-page .wp-block-table th {
	background-color: #141414;
	color: #fff;
	font-weight: 600;
}

/* =============================================
   BLOQUES CORE – CODE / PREFORMATEADO
   ============================================= */

.gutenberg-page .wp-block-code,
.gutenberg-page pre {
	background: #141414;
	color: #f1f1ef;
	font-size: 14px;
	padding: 1.25em 1.5em;
	border-radius: 4px;
	overflow-x: auto;
	margin-bottom: 1.5em;
}

.gutenberg-page code {
	background: rgba(20, 20, 20, 0.08);
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 0.9em;
}

/* =============================================
   ACCESIBILIDAD – REDUCCIÓN DE MOVIMIENTO
   ============================================= */

@media (prefers-reduced-motion: reduce) {
	.gutenberg-page * {
		animation: none !important;
		transition: none !important;
	}
}
