/* Typography */
b,
strong {
	font-weight: 600;
}

h1 {
	margin-top: 0;
	margin-bottom: 16px;
}

h2 {
	margin-top: 32px;
	margin-bottom: 16px;
}

h3 {
	margin-top: 32px;
	margin-bottom: 16px;
}

h4 {
	margin-top: 24px;
	margin-bottom: 16px;
}

p {
	margin-top: 0;
	margin-bottom: 12px;
}


/* Button: Secondary Accent */
.wp-block-button.is-style-secondary-accent .wp-block-button__link {
	background-color: transparent !important;
	color: var(--wp--preset--color--black) !important;
	border: 2px solid var(--wp--preset--color--accent);
	box-shadow: none;
}

.wp-block-button.is-style-secondary-accent .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--hover) !important;
	border-color: var(--wp--preset--color--hover);
	color: var(--wp--preset--color--black) !important;
}

/* Button: Secondary White */
.wp-block-button.is-style-secondary-white .wp-block-button__link {
	background-color: transparent !important;
	color: var(--wp--preset--color--black) !important;
	border: 2px solid var(--wp--preset--color--white);
	box-shadow: none;
}

.wp-block-button.is-style-secondary-white .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--white) !important;
	border-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--black) !important;
}

.has-global-padding > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* ── Single Post ─────────────────────────────────────────── */
.bisiesto-single-post__hero {
	padding: var(--wp--custom--margin--s);
	padding-top: calc(128px + 16px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--custom--gap--s);
}

.bisiesto-single-post__hero .wp-block-post-featured-image {
	margin-top: calc(var(--wp--custom--gap--m) - var(--wp--custom--gap--s));
	border-radius: var(--wp--custom--radius--s);
	overflow: hidden;
	width: 100%;
}

.bisiesto-single-post__category a,
.bisiesto-single-post__category a:visited,
.bisiesto-single-post__category a:hover {
	display: inline-block;
	background-color: var(--wp--preset--color--beige);
	color: var(--wp--preset--color--black) !important;
	border-radius: var(--wp--custom--radius--s);
	padding: 4px 6px;
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 600;
	line-height: var(--wp--custom--line-height--xs);
	text-transform: uppercase;
	letter-spacing: 0;
	text-decoration: none !important;
}

.bisiesto-single-post__category.wp-block-post-terms {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--custom--gap--xs);
}

.bisiesto-single-post__category .wp-block-post-terms__separator {
	display: none;
}

.bisiesto-single-post__content {
	padding: 0 var(--wp--custom--margin--s) var(--wp--custom--margin--m);
}

:root .bisiesto-single-post__content h2,
:root .bisiesto-single-post__content h3 {
	margin-top: 32px;
	margin-bottom: 16px;
}

:root .bisiesto-single-post__content h4 {
	margin-top: 24px;
	margin-bottom: 16px;
}

:root .bisiesto-single-post__content p {
	margin-bottom: 12px;
}

/* Título, imagen y fecha desde el cuerpo del post (eliminados del hero) */
:root .bisiesto-single-post__content .wp-block-post-content > h1:first-child,
:root .bisiesto-single-post__content .wp-block-post-content > h2:first-child,
:root .bisiesto-single-post__content .wp-block-post-content > .wp-block-heading:first-child,
:root .bisiesto-single-post__content .wp-block-post-content > .wp-block-post-title:first-child {
	font-size: var(--wp--preset--font-size--ml);
	font-weight: 300;
	letter-spacing: var(--wp--custom--letter-spacing--default);
	text-align: center;
	margin-top: 0;
	padding-bottom: var(--wp--custom--gap--s);
	line-height: var(--wp--custom--line-height--ml);
}

/* Imagen: <p> inmediatamente después del titular (estructura editor clásico) */
.bisiesto-single-post__content .wp-block-post-content > h1:first-child + p,
.bisiesto-single-post__content .wp-block-post-content > h2:first-child + p {
	max-width: 100% !important;
	width: 100%;
	border-radius: var(--wp--custom--radius--s);
	overflow: hidden;
	margin-top: calc(var(--wp--custom--gap--m) - var(--wp--custom--gap--s));
}

.bisiesto-single-post__content .wp-block-post-content > h1:first-child + p img,
.bisiesto-single-post__content .wp-block-post-content > h2:first-child + p img {
	width: 100%;
	height: auto;
	display: block;
}

/* Fecha: párrafo con text-align inline (estructura editor clásico) */
.bisiesto-single-post__content .wp-block-post-content > p[style*="text-align"] {
	font-size: var(--wp--preset--font-size--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
}

/* Compatibilidad Gutenberg: bloques wp:post-featured-image y wp:post-date */
.bisiesto-single-post__content .wp-block-post-content > .wp-block-post-featured-image,
.bisiesto-single-post__content .wp-block-post-content > figure.wp-block-image {
	max-width: 100% !important;
	width: 100%;
	border-radius: var(--wp--custom--radius--s);
	overflow: hidden;
	margin-top: calc(var(--wp--custom--gap--m) - var(--wp--custom--gap--s));
}

.bisiesto-single-post__content .wp-block-post-content > .wp-block-post-date {
	text-align: center;
	font-size: var(--wp--preset--font-size--xxs);
	letter-spacing: var(--wp--custom--letter-spacing--small);
}

@media (max-width: 768px) {
	.bisiesto-single-post__hero {
		padding-top: calc(104px + 16px);
	}
}


/* ── Página legal (política de privacidad, etc.) ────────────── */

.bisiesto-page-legal__content {
	padding: var(--wp--custom--margin--m) var(--wp--custom--margin--s);
}

:root .bisiesto-page-legal__content h1,
:root .bisiesto-page-legal__content h2,
:root .bisiesto-page-legal__content h3 {
	margin-top: 32px;
	margin-bottom: 16px;
}

:root .bisiesto-page-legal__content h4,
:root .bisiesto-page-legal__content h5,
:root .bisiesto-page-legal__content h6 {
	margin-top: 24px;
	margin-bottom: 16px;
}

:root .bisiesto-page-legal__content p {
	margin-bottom: 12px;
}

:root .bisiesto-page-legal__content ul,
:root .bisiesto-page-legal__content ol {
	margin-top: 0;
	margin-bottom: 16px;
}

/* ── 404 ─────────────────────────────────────────────────── */

.bisiesto-404 {
	background-color: var(--wp--preset--color--beige-light);
	padding: var(--wp--custom--margin--xl) var(--wp--custom--margin--m) var(--wp--custom--margin--l);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--wp--custom--gap--m);
}

.bisiesto-404 .wp-block-paragraph {
	max-width: var(--wp--style--global--content-size);
}

.bisiesto-404__imagen {
	width: 100%;
	overflow: hidden;
	margin: 0 !important;
}

.bisiesto-404__imagen img {
	display: block;
	width: 100%;
	height: 480px;
	object-fit: cover;
}

@media (max-width: 768px) {
	.bisiesto-404 {
		padding: var(--wp--custom--margin--xl) var(--wp--custom--margin--s) var(--wp--custom--margin--m);
	}

	.bisiesto-404__imagen img {
		height: 240px;
	}
}
