/* Gutenberg / classic content: typography, buttons, quotes, lists, tables */

.entry-content,
.editor-styles-wrapper,
.mce-content-body {
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.56;
}

.entry-content > *:first-child,
.mce-content-body > *:first-child {
	margin-top: 0;
}

.entry-content > p + p,
.entry-content > p + .wp-block-buttons,
.entry-content > .wp-block-buttons + blockquote,
.entry-content > .wp-block-buttons + .wp-block-quote,
.entry-content > blockquote + ol,
.entry-content > blockquote + ul,
.entry-content > .wp-block-quote + ol,
.entry-content > .wp-block-quote + ul,
.entry-content > ol + ul,
.entry-content > ul + ol,
.entry-content > p + blockquote,
.entry-content > p + .wp-block-quote,
.entry-content > p + ol,
.entry-content > p + ul,
.entry-content > ol + p,
.entry-content > ul + p,
.mce-content-body > p + p,
.mce-content-body > p + blockquote,
.mce-content-body > blockquote + ol,
.mce-content-body > blockquote + ul,
.mce-content-body > ol + ul,
.mce-content-body > ul + ol {
	margin-top: 18px;
}

.entry-content > h1,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.editor-styles-wrapper .block-editor-block-list__layout > h1,
.editor-styles-wrapper .block-editor-block-list__layout > h2,
.editor-styles-wrapper .block-editor-block-list__layout > h3,
.editor-styles-wrapper .block-editor-block-list__layout > h4,
.mce-content-body > h1,
.mce-content-body > h2,
.mce-content-body > h3,
.mce-content-body > h4 {
	margin: 0;
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-weight: 700;
}

.entry-content > h2,
.editor-styles-wrapper .block-editor-block-list__layout > h2,
.mce-content-body > h2 {
	margin-top: 58px;
	margin-bottom: 26px;
	font-size: 32px;
	line-height: 38px;
}

.entry-content > h2:first-child,
.entry-content > .hero + h2,
.entry-content > .wp-block-shortcode:has(.hero) + h2,
.mce-content-body > h2:first-child {
	margin-top: 0;
}

.entry-content > .latam-brands-block + h2,
.entry-content > .wp-block-shortcode:has(.latam-brands-block) + h2 {
	margin-top: 58px;
}

.entry-content > h3,
.editor-styles-wrapper .block-editor-block-list__layout > h3,
.mce-content-body > h3 {
	font-size: 22px;
	line-height: 1.12;
}

.entry-content > h4,
.editor-styles-wrapper .block-editor-block-list__layout > h4,
.mce-content-body > h4 {
	font-size: 22px;
	line-height: 1.12;
}

/* Keep hero titles white / ExtraBold even inside .entry-content */
.entry-content .hero__title {
	color: var(--latam-hero-text, #fff);
	font-weight: 800;
}

.entry-content .hero__description,
.entry-content .hero__description p,
.entry-content .hero__author-name,
.entry-content .hero__pill {
	color: var(--latam-hero-text, #fff);
}

.entry-content p,
.editor-styles-wrapper p,
.mce-content-body p {
	margin: 0;
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.56;
}

.entry-content p + p,
.editor-styles-wrapper p + p,
.mce-content-body p + p {
	margin-top: 14px;
}

/* Inline links (not CTA buttons) */
.entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.latam-brand-hero__button):not(.latam-brand__button):not(.latam-brand__cta),
.editor-styles-wrapper a:not(.wp-block-button__link):not(.wp-element-button),
.mce-content-body a:not(.wp-block-button__link):not(.wp-element-button) {
	color: var(--latam-accent, #3666db);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.entry-content table tbody tr td a:not(.wp-block-button__link):not(.wp-element-button):not(.latam-brand-hero__button):not(.latam-brand__button):not(.latam-brand__cta) {
	font-weight: 700;
}

.entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.latam-brand-hero__button):not(.latam-brand__button):not(.latam-brand__cta):hover,
.entry-content a:not(.wp-block-button__link):not(.wp-element-button):not(.latam-brand-hero__button):not(.latam-brand__button):not(.latam-brand__cta):focus-visible,
.editor-styles-wrapper a:not(.wp-block-button__link):not(.wp-element-button):hover,
.mce-content-body a:not(.wp-block-button__link):not(.wp-element-button):hover {
	color: var(--latam-accent-hover, #21144b);
}

.wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 14px 0 0;
}

.wp-block-button {
	margin: 0;
}

.wp-block-button .wp-block-button__link,
.entry-content .wp-element-button,
.editor-styles-wrapper .wp-element-button,
.mce-content-body .wp-block-button__link,
.mce-content-body .wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 0;
	padding: 8px 28px;
	border: 0;
	border-radius: 8px;
	background: var(--latam-accent, #3666db);
	color: #fff !important;
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	line-height: 1.56 !important;
	text-decoration: none !important;
	text-align: center;
	white-space: nowrap;
	box-shadow: none;
	transition: background 0.2s ease;
}

.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus-visible,
.entry-content .wp-element-button:hover,
.entry-content .wp-element-button:focus-visible,
.editor-styles-wrapper .wp-element-button:hover,
.editor-styles-wrapper .wp-element-button:focus-visible,
.mce-content-body .wp-block-button__link:hover,
.mce-content-body .wp-element-button:hover {
	background: #2b56c7;
	color: #fff !important;
	text-decoration: none !important;
}

/* Figma Btn = solid fill only; treat outline the same */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	border: 0;
	background: var(--latam-accent, #3666db) !important;
	color: #fff !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-block-button__link:focus-visible {
	background: #2b56c7 !important;
}

/* Accent callout = classic blockquote / quote block */
.entry-content blockquote,
.editor-styles-wrapper blockquote,
.mce-content-body blockquote,
.wp-block-quote,
.wp-block-pullquote {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 18px 26px;
	border: 1px solid #21144b;
	border-radius: 8px;
	background: var(--latam-accent-soft, rgba(54, 102, 219, 0.08));
	box-shadow: none;
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 1.56;
}

.entry-content blockquote::before,
.editor-styles-wrapper blockquote::before,
.mce-content-body blockquote::before,
.wp-block-quote::before,
.wp-block-pullquote::before {
	content: "";
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	margin: 0;
	background: no-repeat center / contain;
}

.entry-content blockquote p,
.editor-styles-wrapper blockquote p,
.mce-content-body blockquote p,
.wp-block-quote p,
.wp-block-pullquote p {
	margin: 0;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.entry-content blockquote p + p,
.editor-styles-wrapper blockquote p + p,
.mce-content-body blockquote p + p,
.wp-block-quote p + p,
.wp-block-pullquote p + p {
	margin-top: 0.45em;
}

.wp-block-quote cite,
.wp-block-quote .wp-block-quote__citation,
.wp-block-pullquote cite,
.entry-content blockquote cite {
	display: block;
	margin-top: 0.55rem;
	color: var(--latam-muted, #797979);
	font-size: 14px;
	font-style: normal;
	font-weight: 500;
	line-height: 1.25;
}

.wp-block-quote.is-style-plain,
.wp-block-quote.has-text-align-right,
.wp-block-quote.has-text-align-center {
	text-align: left;
}

/* Lists */
.entry-content ul.wp-block-list,
.entry-content ol.wp-block-list,
.entry-content ul:not([class]),
.entry-content ol:not([class]),
.editor-styles-wrapper ul.wp-block-list,
.editor-styles-wrapper ol.wp-block-list,
.editor-styles-wrapper .block-editor-block-list__layout > ul,
.editor-styles-wrapper .block-editor-block-list__layout > ol,
.mce-content-body ul,
.mce-content-body ol {
	list-style: none;
	margin: 0;
	padding: 0;
}

.entry-content ol.wp-block-list,
.entry-content ol:not([class]),
.editor-styles-wrapper ol.wp-block-list,
.editor-styles-wrapper .block-editor-block-list__layout > ol,
.mce-content-body ol {
	counter-reset: latam-ol;
}

.entry-content ul.wp-block-list > li,
.entry-content ul:not([class]) > li,
.editor-styles-wrapper ul.wp-block-list > li,
.editor-styles-wrapper .block-editor-block-list__layout > ul > li,
.mce-content-body ul > li {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 0 0 0 22px;
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.56;
}

.entry-content ul.wp-block-list > li + li,
.entry-content ul:not([class]) > li + li,
.editor-styles-wrapper ul.wp-block-list > li + li,
.mce-content-body ul > li + li {
	margin-top: 8px;
}

.entry-content ul.wp-block-list > li::before,
.entry-content ul:not([class]) > li::before,
.editor-styles-wrapper ul.wp-block-list > li::before,
.editor-styles-wrapper .block-editor-block-list__layout > ul > li::before,
.mce-content-body ul > li::before {
	content: "";
	position: absolute;
	top: 5px;
	left: 0;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background-color: transparent;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
}

.entry-content ol.wp-block-list > li,
.entry-content ol:not([class]) > li,
.editor-styles-wrapper ol.wp-block-list > li,
.editor-styles-wrapper .block-editor-block-list__layout > ol > li,
.mce-content-body ol > li {
	counter-increment: latam-ol;
	position: relative;
	margin: 0;
	padding: 0 0 0 28px;
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.56;
}

.entry-content ol.wp-block-list > li + li,
.entry-content ol:not([class]) > li + li,
.editor-styles-wrapper ol.wp-block-list > li + li,
.mce-content-body ol > li + li {
	margin-top: 8px;
}

.entry-content ol.wp-block-list > li::before,
.entry-content ol:not([class]) > li::before,
.editor-styles-wrapper ol.wp-block-list > li::before,
.editor-styles-wrapper .block-editor-block-list__layout > ol > li::before,
.mce-content-body ol > li::before {
	content: counter(latam-ol);
	position: absolute;
	top: 1px;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 20px;
	height: 23px;
	border-radius: 0;
	background: var(--latam-accent, #3666db);
	color: #fff;
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.25;
}

.entry-content ul.wp-block-list ul,
.entry-content ol.wp-block-list ul,
.entry-content ul:not([class]) ul,
.entry-content ol:not([class]) ul,
.entry-content ul.wp-block-list ol,
.entry-content ol.wp-block-list ol,
.entry-content ul:not([class]) ol,
.entry-content ol:not([class]) ol {
	margin: 8px 0 0;
	padding-left: 0;
}

.entry-content .wp-block-list li > p,
.entry-content ul:not([class]) li > p,
.entry-content ol:not([class]) li > p,
.entry-content .wp-block-list li > div,
.entry-content ul:not([class]) li > div,
.entry-content ol:not([class]) li > div,
.mce-content-body li > p,
.mce-content-body li > div {
	margin: 0;
	font: inherit;
	color: inherit;
}

/* Restore vertical rhythm after list margin reset */
.entry-content > p + ol,
.entry-content > p + ul,
.entry-content > .wp-block-buttons + ol,
.entry-content > .wp-block-buttons + ul,
.entry-content > blockquote + ol,
.entry-content > blockquote + ul,
.entry-content > .wp-block-quote + ol,
.entry-content > .wp-block-quote + ul,
.entry-content > ol + ul,
.entry-content > ul + ol,
.entry-content > ol + p,
.entry-content > ul + p,
.entry-content > ol + blockquote,
.entry-content > ul + blockquote,
.entry-content > ol + .wp-block-quote,
.entry-content > ul + .wp-block-quote,
.entry-content > ol + .wp-block-buttons,
.entry-content > ul + .wp-block-buttons,
.entry-content > table + ol,
.entry-content > table + ul,
.entry-content > ol + table,
.entry-content > ul + table,
.mce-content-body > p + ol,
.mce-content-body > p + ul,
.mce-content-body > blockquote + ol,
.mce-content-body > blockquote + ul,
.mce-content-body > ol + ul,
.mce-content-body > ul + ol {
	margin-top: 18px;
}

.entry-content table,
.editor-styles-wrapper table,
.mce-content-body table {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border: 1px solid var(--Black-White-Opacity-8, rgba(4, 2, 13, 0.08));
	border-radius: 8px;
	background: var(--latam-paper, #fff);
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	line-height: 1.56;
}

.entry-content table thead tr th {
	padding: 6px 20px !important;
	background: rgba(54, 102, 219, 0.08) !important;
	color: #797979 !important;
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif) !important;
	font-size: 16px !important;
	font-style: normal !important;
	font-weight: 500 !important;
	line-height: 1.56 !important;
	vertical-align: middle;
}

.entry-content table tbody tr td {
	height: 58px;
	padding: 8px 20px !important;
	color: #04020d !important;
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif) !important;
	font-size: 16px !important;
	font-style: normal !important;
	font-weight: 700 !important;
	line-height: 1.56 !important;
	vertical-align: middle;
}

.entry-content th,
.entry-content td,
.editor-styles-wrapper th,
.editor-styles-wrapper td,
.mce-content-body th,
.mce-content-body td {
	padding: 8px 20px;
	border-bottom: 1px solid var(--Black-White-Opacity-8, rgba(4, 2, 13, 0.08));
	border-right: 1px solid var(--Black-White-Opacity-8, rgba(4, 2, 13, 0.08));
	text-align: left;
	vertical-align: middle;
}

.entry-content th:last-child,
.entry-content td:last-child,
.editor-styles-wrapper th:last-child,
.editor-styles-wrapper td:last-child,
.mce-content-body th:last-child,
.mce-content-body td:last-child {
	border-right: 0;
}

.entry-content tr:last-child td,
.editor-styles-wrapper tr:last-child td,
.mce-content-body tr:last-child td {
	border-bottom: 0;
}

.entry-content th,
.editor-styles-wrapper th,
.mce-content-body th {
	padding: 6px 20px;
	background: rgba(54, 102, 219, 0.08);
	color: #797979;
	font-size: 16px;
	font-weight: 500;
}

/* Horizontal scroll on the table itself at ≤600px */
@media (max-width: 600px) {
	.entry-content .wp-block-table,
	.entry-content table {
		display: block;
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
	}

	.entry-content .wp-block-table table {
		display: table;
		width: max-content;
		min-width: 100%;
		overflow: visible;
	}

	.entry-content table th,
	.entry-content table td {
		white-space: nowrap;
	}
}

.latam-media {
	display: flex;
	align-items: stretch;
	gap: 26px;
	width: 100%;
	margin: 0;
}

.latam-media--reverse {
	flex-direction: row-reverse;
}

.latam-media__media {
	flex: 0 0 382px;
	width: 382px;
	max-width: 382px;
	height: 294px;
	overflow: hidden;
	border-radius: 16px;
	background: #04020d;
}

.latam-media__media a {
	display: block;
	height: 100%;
	color: inherit;
	font-weight: inherit;
	text-decoration: none;
}

.latam-media__media img,
.latam-media__media figure,
.latam-media__media .wp-caption {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 16px;
}

.latam-media__media img {
	max-width: none;
	height: 294px;
	object-fit: cover;
}

.latam-media__media p,
.latam-media__media > div {
	display: contents;
}

.latam-media__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 14px;
	min-width: 0;
}

.latam-media__body > * {
	margin: 0;
}

.latam-media__body p,
.latam-media__body > div {
	color: var(--latam-ink, #04020d);
	font-family: var(--latam-hero-font, "42dot Sans", sans-serif);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.56;
}

.latam-media__body .wp-block-buttons,
.latam-media__body > div {
	margin: 0;
}

@media (max-width: 768px) {
	.entry-content > h2,
	.editor-styles-wrapper .block-editor-block-list__layout > h2,
	.mce-content-body > h2 {
		font-size: 30px;
		line-height: 1.2;
	}

	.entry-content > h3,
	.entry-content > h4,
	.editor-styles-wrapper .block-editor-block-list__layout > h3,
	.editor-styles-wrapper .block-editor-block-list__layout > h4,
	.mce-content-body > h3,
	.mce-content-body > h4 {
		font-size: 20px;
		line-height: 1.2;
	}
}

@media (max-width: 640px) {
	.entry-content,
	.editor-styles-wrapper,
	.mce-content-body {
		font-size: 14px;
		line-height: 1.42;
	}

	.entry-content > h2,
	.editor-styles-wrapper .block-editor-block-list__layout > h2,
	.mce-content-body > h2 {
		font-size: 28px;
		line-height: 1.04;
	}

	.entry-content > h3,
	.entry-content > h4,
	.editor-styles-wrapper .block-editor-block-list__layout > h3,
	.editor-styles-wrapper .block-editor-block-list__layout > h4,
	.mce-content-body > h3,
	.mce-content-body > h4 {
		font-size: 16px;
		line-height: 1.2;
	}

	.entry-content p,
	.editor-styles-wrapper p,
	.mce-content-body p,
	.entry-content ul.wp-block-list > li,
	.entry-content ul:not([class]) > li,
	.entry-content ol.wp-block-list > li,
	.entry-content ol:not([class]) > li,
	.latam-media__body p,
	.latam-media__body > div {
		font-size: 14px;
		line-height: 1.42;
	}

	.entry-content blockquote,
	.editor-styles-wrapper blockquote,
	.mce-content-body blockquote,
	.wp-block-quote,
	.wp-block-pullquote {
		padding: 16px 14px;
		font-size: 14px;
		line-height: 1.42;
	}

	.wp-block-button .wp-block-button__link,
	.entry-content .wp-element-button,
	.mce-content-body .wp-block-button__link,
	.mce-content-body .wp-element-button {
		font-size: 14px !important;
		line-height: 1.42 !important;
	}
}

@media (max-width: 800px) {
	.latam-media,
	.latam-media--reverse {
		flex-direction: column;
	}

	.latam-media__media {
		width: 100%;
		max-width: none;
		flex: none;
		height: auto;
		min-height: 220px;
	}

	.latam-media__media img {
		height: 220px;
	}
}

body.latam-theme-dark .entry-content,
body.latam-theme-dark .entry-content p,
body.latam-theme-dark .entry-content > h2,
body.latam-theme-dark .entry-content > h3,
body.latam-theme-dark .entry-content > h4,
body.latam-theme-dark .entry-content ul:not([class]) > li,
body.latam-theme-dark .entry-content ol:not([class]) > li,
body.latam-theme-dark .entry-content blockquote,
body.latam-theme-dark .latam-media__body p {
	color: var(--latam-ink, #ffffff);
}

body.latam-theme-dark .entry-content table {
	background: var(--latam-paper, #14151f);
	border-color: var(--latam-line, rgba(255, 255, 255, 0.12));
}

body.latam-theme-dark .entry-content th,
body.latam-theme-dark .entry-content td {
	border-color: var(--latam-line, rgba(255, 255, 255, 0.12));
}

body.latam-theme-dark .entry-content th {
	background: rgba(50, 77, 199, 0.18);
	color: var(--latam-ink, #ffffff);
}

body.latam-theme-dark .entry-content table tbody tr td {
	color: var(--latam-ink, #ffffff) !important;
}

body.latam-theme-dark .entry-content blockquote,
body.latam-theme-dark .wp-block-quote {
	border-color: rgba(255, 255, 255, 0.12);
	background: rgba(54, 102, 219, 0.08);
}
