/* ==========================================================================
   Templates (templates/*.html, parts/sidebar-blog.html)
   Reference values measured on the original: implementation plan, M5 notes.
   ========================================================================== */

/* --- Main area ---------------------------------------------------------- */

.ineuro-main {
	margin-block-start: 0;
}

/* Inner pages: content starts 70px below the header; the last block (often
   the full-width CTA band) sits directly on the footer. MailPoet appends its
   floating forms (slide-in, D19) to the content; they do not count as the
   last block. */
.ineuro-main--page {
	padding-top: 70px;
}

.ineuro-main--page > .wp-block-post-content > :nth-last-child(1 of :not(.mailpoet_form, .mailpoet_form_popup_overlay)):not(.ineuro-cta-band) {
	margin-bottom: 70px;
}

.ineuro-main--listing {
	padding-top: 60px;
	padding-bottom: 60px;
}

/* The services archive (/servicios/) starts 30px below the header. */
.ineuro-main--listing.ineuro-main--services {
	padding-top: 30px;
}

.ineuro-main--single {
	padding-bottom: 60px;
}

/* Blocks inside the main area start flush; spacing comes from the content. */
.ineuro-main > .wp-block-post-content,
.ineuro-main > .ineuro-title-band,
.ineuro-main > .ineuro-listing {
	margin-block-start: 0;
}

/* View counter under posts (plugin ineuro-post-views, D14): 14/26 grey with
   the bar-chart icon, 10px under the content (the last paragraph's margin
   on the original; core drops it inside post-content). Hidden when the
   plugin is not active (the bound paragraph stays empty). */
.ineuro-main--single > .ineuro-post-views {
	margin-block-start: 10px;
}

.ineuro-post-views::before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	margin: 0 6px 0 2px;
	vertical-align: -2px;
	background-color: currentColor;
	/* Dashicons "chart-bar" (GPL-2.0+, ships with WordPress). */
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M18 18V2h-4v16h4zm-6 0V7H8v11h4zm-6 0v-6H2v6h4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ineuro-post-views:empty {
	display: none;
}

/* --- Single post: sage title band ---------------------------------------
   54px padding, breadcrumbs 12/22, white 36/45 title with a white bar. */

.ineuro-title-band.wp-block-group {
	margin-bottom: 30px;
	padding-top: 54px;
	padding-bottom: 54px;
	background-color: var(--wp--preset--color--sage);
}

.ineuro-title-band > * {
	margin-block: 0;
}

.ineuro-title-band .wp-block-breadcrumbs {
	margin-bottom: 6px;
	font-size: 12px;
	line-height: 22px;
	color: var(--wp--preset--color--deep);
}

.ineuro-title-band .wp-block-breadcrumbs a {
	font-weight: 500;
	color: var(--wp--preset--color--deep);
}

/* The original shows the site name capitalised ("Ineuro"). */
.ineuro-title-band .wp-block-breadcrumbs li:first-child a {
	text-transform: capitalize;
}

.ineuro-title-band .wp-block-breadcrumbs li:not(:last-child)::after {
	margin: 0 6px;
	color: rgba(15, 46, 67, 0.5);
}

.ineuro-title-band .wp-block-post-title {
	margin-bottom: 23px;
	padding-top: 10px;
	font-size: 36px;
	line-height: 45px;
	color: var(--wp--preset--color--deep);
}

.ineuro-title-band .wp-block-post-title.is-style-ineuro-underline::after {
	margin-top: 9px;
	background-color: var(--wp--preset--color--deep);
}

/* Post content is mostly classic HTML: paragraphs and lists are spaced as
   on the original (0 0 10px) instead of with the block gap. */
.ineuro-post-content > * {
	margin-block: 0 10px;
}

/* Core drops the last block's bottom margin; keep doing it when MailPoet
   appends its floating forms (slide-in, D19) after the last block. */
.ineuro-post-content > :nth-last-child(1 of :not(.mailpoet_form, .mailpoet_form_popup_overlay)) {
	margin-block-end: 0;
}

/* Content headings get the sage bar, with spacing growing per level as in
   the original theme (padding-top / bar offset: h2 10/9 … h6 31/17). */
.ineuro-post-content > :is(h2, h3, h4, h5, h6) {
	margin-bottom: 23px;
	color: var(--wp--preset--color--contrast);
}

.ineuro-post-content > :is(h2, h3, h4, h5, h6)::after {
	content: "";
	display: block;
	width: 35px;
	height: 6px;
	background-color: var(--wp--preset--color--sage);
}

.ineuro-post-content > h2 { padding-top: 10px; }
.ineuro-post-content > h2::after { margin-top: 9px; }
.ineuro-post-content > h3 { padding-top: 17px; }
.ineuro-post-content > h3::after { margin-top: 11px; }
.ineuro-post-content > h4 { padding-top: 23px; }
.ineuro-post-content > h4::after { margin-top: 13px; }
.ineuro-post-content > h5 { padding-top: 28px; }
.ineuro-post-content > h5::after { margin-top: 16px; }
.ineuro-post-content > h6 { padding-top: 31px; }
.ineuro-post-content > h6::after { margin-top: 17px; }

/* --- Post grid (blog index, archives, search) -----------------------------
   Three 255px cards per row in the 825px column; image, sage bar, title,
   date with a clock. */

.ineuro-post-grid .wp-block-post-template {
	gap: 39px 30px;
}

.ineuro-post-grid .wp-block-post-template > li {
	margin: 0;
}

.ineuro-post-card__image.wp-block-post-featured-image {
	margin: 0 0 30px;
}

.ineuro-post-card__image img {
	display: block;
}

/* Hover, as the original: the image darkens (black at 60%) and a white "+"
   appears in the centre. */
.ineuro-post-card__image a {
	position: relative;
	display: block;
}

.ineuro-post-card__image a::before,
.ineuro-post-card__image a::after {
	content: "";
	position: absolute;
	z-index: 1;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.ineuro-post-card__image a::before {
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.ineuro-post-card__image a::after {
	top: 50%;
	left: 50%;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	background:
		linear-gradient(#fff, #fff) center / 100% 2px no-repeat,
		linear-gradient(#fff, #fff) center / 2px 100% no-repeat;
}

.ineuro-post-card__image a:hover::before,
.ineuro-post-card__image a:hover::after,
.ineuro-post-card__image a:focus-visible::before,
.ineuro-post-card__image a:focus-visible::after {
	opacity: 1;
}

/* Core's post title breaks long words (word-break: break-word); the original
   keeps them whole, even when one is wider than a narrow card. */
.ineuro-post-card__title.wp-block-post-title {
	word-break: normal;
	margin: 0 0 14px;
	font-size: 18px;
	font-weight: 700;
	line-height: 22px;
	color: var(--wp--preset--color--contrast);
}

.ineuro-post-card__title::before {
	content: "";
	display: block;
	width: 47px;
	height: 5px;
	margin-bottom: 20px;
	border-radius: 3px;
	background-color: var(--wp--preset--color--sage);
}

.ineuro-post-card__title a {
	font-weight: 500;
	color: var(--wp--preset--color--dark);
}

.ineuro-post-card__title a:hover {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

/* The original date sits in a 26px line box, which sets its distance from
   the title. */
.ineuro-post-card__date.wp-block-post-date {
	margin: 0;
	font-size: 13px;
	line-height: 26px;
	color: var(--wp--preset--color--muted);
}

.ineuro-post-card__date::before {
	content: "";
	display: inline-block;
	width: 15px;
	height: 15px;
	margin-right: 5px;
	vertical-align: -3px;
	background-color: var(--wp--preset--color--sage);
	-webkit-mask: url("../icons/clock.svg") no-repeat center / contain;
	mask: url("../icons/clock.svg") no-repeat center / contain;
}

/* Below 992px the original hides the sidebar and lets the cards grow. */
@media (max-width: 991px) {
	.ineuro-listing__sidebar.wp-block-column {
		display: none;
	}

	.ineuro-listing__posts.wp-block-column {
		flex-basis: 100% !important;
	}
}

@media (max-width: 599px) {
	.ineuro-post-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr;
	}

	/* On phones the original listings show images at their 350px crop size
	   (the home page news grid shows them full width). */
	.ineuro-post-grid .ineuro-post-card__image.wp-block-post-featured-image {
		max-width: 350px;
	}
}

/* --- Pagination: 40px squares, the current page outlined ---------------- */

.ineuro-pagination.wp-block-query-pagination {
	gap: 11px;
	margin: 30px 0 40px;
}

.ineuro-pagination .wp-block-query-pagination-numbers {
	display: flex;
	gap: 11px;
}

.ineuro-pagination .page-numbers,
.ineuro-pagination .wp-block-query-pagination-previous,
.ineuro-pagination .wp-block-query-pagination-next {
	display: block;
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 11px 5px 0;
	border: 2px solid transparent;
	font-size: 16px;
	font-weight: 600;
	line-height: 16px;
	text-align: center;
	color: var(--wp--preset--color--dark);
}

.ineuro-pagination .page-numbers.current {
	border-color: var(--wp--preset--color--dark);
}

/* Prev/next show a Font Awesome chevron instead of core's "«" / "»". */
.ineuro-pagination .wp-block-query-pagination-previous,
.ineuro-pagination .wp-block-query-pagination-next {
	position: relative;
	overflow: hidden;
	font-size: 0;
}

.ineuro-pagination .wp-block-query-pagination-previous::before,
.ineuro-pagination .wp-block-query-pagination-next::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 14px;
	margin: -7px 0 0 -5px;
	background-color: var(--wp--preset--color--dark);
	-webkit-mask: var(--ineuro-chevron) no-repeat center / contain;
	mask: var(--ineuro-chevron) no-repeat center / contain;
}

.ineuro-pagination .wp-block-query-pagination-previous { --ineuro-chevron: url("../icons/chevron-left.svg"); }
.ineuro-pagination .wp-block-query-pagination-next { --ineuro-chevron: url("../icons/chevron-right.svg"); }

/* --- Blog sidebar (parts/sidebar-blog.html) ------------------------------- */

.ineuro-listing__sidebar > .wp-block-template-part > * {
	margin-block: 0;
}

.ineuro-sidebar-search .wp-block-search__inside-wrapper {
	position: relative;
	padding: 0;
	border: 0;
}

.ineuro-sidebar-search .wp-block-search__input {
	height: 44px;
	padding: 13px 50px 13px 15px;
	border: 0;
	border-radius: 0;
	font-size: 13px;
	line-height: 18px;
	color: var(--wp--preset--color--contrast);
	background-color: #cacaca;
}

.ineuro-sidebar-search .wp-block-search__button {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: var(--wp--preset--color--base);
	background-color: var(--wp--preset--color--dark);
}

.ineuro-sidebar-search .wp-block-search__button svg {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.ineuro-widget-title.wp-block-heading {
	margin: 40px 0 25px;
	padding-top: 28px;
	border-top: 3px solid var(--wp--preset--color--dark);
	font-size: 18px;
	line-height: 22px;
	color: var(--wp--preset--color--contrast);
}

.ineuro-widget-title.is-style-ineuro-underline::after {
	margin-top: 16px;
}

.wp-block-categories.ineuro-category-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ineuro-category-list li {
	border-bottom: 1px solid var(--wp--preset--color--base);
	font-size: 14px;
	font-weight: 600;
	line-height: 22px;
	background-color: var(--wp--preset--color--light);
}

.ineuro-category-list li a {
	display: block;
	padding: 14px 23px 14px 18px;
	font-weight: 500;
	color: var(--wp--preset--color--dark);
}

.wp-block-tag-cloud.ineuro-tag-cloud a {
	display: inline-block;
	margin: 0 6px 7px 0;
	padding: 5px 8px 6px;
	border: 1px solid #ccc;
	font-size: 13px !important; /* Override the tag cloud's inline sizes. */
	font-weight: 500;
	line-height: 26px;
	text-transform: lowercase;
	color: var(--wp--preset--color--muted);
}

/* --- 404 ------------------------------------------------------------------
   Full-screen page without header or footer: a large "404" above a dark
   band with a message and a "homepage" button. The original's background
   photo is theme demo material and is not reused
   (docs/deliberate-differences.md D13). */

.ineuro-404.wp-block-group {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	background-color: #dcf0fb;
}

.ineuro-404__top.wp-block-group {
	display: flex;
	flex: 1;
	align-items: flex-end;
	margin: 0;
}

.ineuro-404__code.wp-block-heading {
	margin: 0 0 0 -11px;
	font-size: 230px;
	line-height: 132px;
	color: var(--wp--preset--color--dark);
}

.ineuro-404__band.wp-block-group {
	margin: 0;
	padding-top: 66px;
	padding-bottom: 66px;
	background-color: var(--wp--preset--color--dark);
}

.ineuro-404__band .wp-block-group {
	align-items: center;
}

.ineuro-404__text {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 30px;
	color: var(--wp--preset--color--base);
}

.ineuro-404__button.is-style-ineuro-arrow .wp-block-button__link {
	border-color: var(--wp--preset--color--sage);
	color: var(--wp--preset--color--deep);
	background-color: var(--wp--preset--color--sage);
}

.ineuro-404__button.is-style-ineuro-arrow .wp-block-button__link::after {
	background-color: var(--wp--preset--color--dark);
}

@media (max-width: 767px) {
	.ineuro-404__code.wp-block-heading {
		font-size: 158px;
		line-height: 113px;
		text-align: center;
	}
}

/* --- Inner page layout (page fixtures) ------------------------------------
   825px content + 255px sidebar, as the original's 9/3 Bootstrap columns
   (vc_col-sm-*). Below 768px the columns stack, as on the original. */

.ineuro-page-columns.wp-block-columns {
	margin-block: 0 100px;
}

.ineuro-page-columns__sidebar > * {
	margin-block: 0;
}

.ineuro-page-columns__sidebar > .wp-block-navigation,
.ineuro-page-columns__sidebar > .wp-block-block > .wp-block-navigation {
	margin-bottom: 30px;
}

/* Column widths as Bootstrap computes them (each column a percentage of the
   row, which is 30px wider than the content, minus 30px of padding), so they
   also match at the narrower container widths. With 30px between columns:
   9/3 = 75% - 7.5px and 25% - 22.5px (825 + 255 at 1110px); 8/4 = 66.667% -
   10px and 33.333% - 20px (730 + 350). The fixtures write the 1110px widths
   inline, hence !important. */
@media (min-width: 768px) {
	.ineuro-page-columns > .wp-block-column[style*="flex-basis:825px"] {
		flex-basis: calc(75% - 7.5px) !important;
	}

	.ineuro-page-columns > .wp-block-column[style*="flex-basis:255px"] {
		flex-basis: calc(25% - 22.5px) !important;
	}

	.ineuro-page-columns > .wp-block-column[style*="flex-basis:730px"] {
		flex-basis: calc(66.667% - 10px) !important;
	}

	.ineuro-page-columns > .wp-block-column[style*="flex-basis:350px"] {
		flex-basis: calc(33.333% - 20px) !important;
	}
}

@media (max-width: 767px) {
	.ineuro-page-columns.wp-block-columns {
		flex-wrap: wrap !important;
		row-gap: 0;
	}

	.ineuro-page-columns.wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
	}

	/* Where the sidebar comes after the content (Historia, Know-how, Centros,
	   Escuela NEF) the last block of the content ended flush against the
	   sidebar menu (D74). The pages with the sidebar first are not touched. */
	.ineuro-page-columns__main + .ineuro-page-columns__sidebar {
		margin-top: 40px;
	}
}

/* Intro sentence above the timeline/know-how boxes. The original requests
   Montserrat 16px #444 but never loads it (D6), so Poppins is used. */
.ineuro-intro {
	margin-block: 0 35px;
	font-size: 16px;
	line-height: 26px;
	letter-spacing: -0.4px;
	color: #444;
}

/* On Historia the timeline starts 50px below the intro. The margins
   collapse, so the larger one (50px) applies. */
.ineuro-intro + .ineuro-timeline {
	margin-top: 50px;
}

/* On Know-how the icon boxes start 35px below the intro (the intro's own
   margin, not the 50px paragraph-to-block gap), and the last row keeps its
   10px bottom margin, which shows below 992px where the sidebar follows. */
.ineuro-page-columns__main > .ineuro-intro + .ineuro-icon-box-row {
	margin-top: 35px;
}

.ineuro-page-columns__main > .ineuro-intro ~ .ineuro-icon-box-row:last-child {
	margin-bottom: 10px;
}

/* Measured on the original (390px): the sidebar testimonial leaves 43px more
   than the 100px column margin before the CTA band. */
.ineuro-page-columns__sidebar .ineuro-testimonial {
	margin-bottom: 43px;
}

/* Centros oficiales: the original row uses WPBakery's "full height" option,
   which stretches it to the bottom of the viewport (min-height: 100vh minus
   its 210px offset), so the CTA band sits at the bottom of the screen. */
.ineuro-page-columns.is-full-height {
	min-height: calc(100vh - 210px);
	margin-bottom: 0;
}

/* Its sidebar column has 40px bottom padding and the testimonial row a 30px
   bottom margin. They only show when the columns stack (below 768px), where
   the sidebar is the last thing before the CTA band. */
.ineuro-page-columns.is-full-height > .ineuro-page-columns__sidebar {
	padding-bottom: 70px;
}

.ineuro-page-columns .wp-block-tabs {
	margin-top: 20px;
}

.wp-block-tabs > *,
.wp-block-tab-panel > * {
	margin-block-start: 0;
}

/* Centre logos above the centre's name (D46); the hospital's name goes below
   the Viamed logo because the official logo has no hospital name. */
.ineuro-centre__logo {
	margin-bottom: 25px;
}

.ineuro-centre__logo img {
	width: auto;
	height: 90px;
}

.ineuro-centre__logo-caption {
	margin: 6px 0 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--wp--preset--color--primary-dark, #0b4468);
}

.ineuro-centre .is-style-ineuro-underline + p {
	margin-top: 30px;
}

/* Text spacing in the main column, as WPBakery text blocks on the original:
   15px between paragraphs, 50px from a paragraph to the next heading (the
   margins collapse, so the heading's 50px top margin applies). */
.ineuro-page-columns__main > p:not(.ineuro-subtitle) {
	margin-block: 0 15px;
}

.ineuro-page-columns__main > p:not(.ineuro-subtitle) + :not(p) {
	margin-top: 50px;
}

.ineuro-page-columns__main > p:last-child {
	margin-bottom: 50px;
}

/* --- Pages generated from the original WPBakery markup (.is-wpb) ----------
   Each WPBakery element is a group carrying its own margins (taken from the
   original's per-element vc_custom rules, default 35px), so the core block
   gap is removed and only those margins apply. */

.is-wpb > *,
.is-wpb .ineuro-wpb > * {
	margin-block-start: 0;
}

.is-wpb .ineuro-wpb-text > p,
.is-wpb .ineuro-wpb-text > .wp-block-quote > p {
	margin-block: 0 15px;
}

.is-wpb .ineuro-wpb-text > :last-child,
.is-wpb .ineuro-wpb-text > .wp-block-quote > :last-child {
	margin-bottom: 0;
}

.is-wpb .wp-block-quote {
	margin: 0;
}

.is-wpb > .wp-block-list,
.is-wpb .ineuro-wpb-text > .wp-block-list {
	margin-block: 0 10px;
}

.is-wpb .wp-block-list > li {
	margin: 0;
}

/* WPBakery toggles: 22px apart, 35px after the last one. */
.is-wpb > .is-style-ineuro-toggles {
	margin-bottom: 22px;
}

.is-wpb > .is-style-ineuro-toggles:not(:has(+ .is-style-ineuro-toggles)) {
	margin-bottom: 35px;
}

.is-wpb .is-style-ineuro-toggles .wp-block-accordion-item {
	margin-bottom: 0;
}

/* Service pages start 10px higher than other inner pages (no spacer row). */
.ineuro-page-columns.is-service {
	margin-top: -10px;
}

.ineuro-page-columns + .ineuro-page-section {
	margin-block-start: 0;
}

/* Headings whose original container has "no_stripe" (e.g. "Contacto" on
   NeuroBase and Peritajes): the bar sits at the foot of the line box instead
   of adding height, and the separator below overlaps it. */
.wp-block-heading.is-style-ineuro-underline.ineuro-bar-inline {
	position: relative;
}

.wp-block-heading.is-style-ineuro-underline.ineuro-bar-inline::after {
	position: absolute;
	bottom: 0;
	left: 0;
	margin-top: 0;
}

/* WPBakery drops the bottom margin of the last element in each column; the
   generated groups carry it inline, hence !important. */
.ineuro-page-columns__main.is-wpb > :last-child {
	margin-bottom: 0 !important;
}

/* Service pages below 992px: the original hides the sidebar on pages whose
   sidebar column has WPBakery's vc_hidden-sm/xs (all services except
   Atención Clínica), and the main column (vc_col-sm-12) takes the full width. */
@media (max-width: 991px) {
	.ineuro-page-columns.is-sidebar-hidden-mobile > .ineuro-page-columns__sidebar {
		display: none;
	}

	.ineuro-page-columns.is-sidebar-hidden-mobile > .ineuro-page-columns__main {
		flex-basis: 100% !important;
	}
}

/* Below 768px the original slider header is 540px tall with smaller text
   (title 35/35, label 20/26), measured at 390px. The cover block writes its
   desktop height inline, hence !important. */
@media (max-width: 767px) {
	.is-service .ineuro-service-hero.wp-block-cover,
	.is-service .ineuro-service-hero--circle.wp-block-group {
		min-height: 540px !important;
		padding: 134px 20px 30px 34px;
	}

	.is-service .ineuro-service-hero--circle.wp-block-group {
		padding-top: 37px;
	}

	.is-service .ineuro-service-hero__title {
		font-size: 35px !important;
		line-height: 35px !important;
		letter-spacing: -0.02em !important; /* was -2.1px for Poppins (D35) */
	}

	.is-service .ineuro-service-hero--circle .ineuro-service-hero__label {
		margin-left: 19px;
		font-size: 20px;
		line-height: 26px;
	}

	.is-service .ineuro-service-hero--circle .ineuro-service-hero__title {
		margin-top: 71px;
	}
}

/* --- Home page (bin/fixtures/pages/inicio.html) --------------------------
   Measured on the original at 1440px: "Servicios" row from 620px with 53px
   top padding; "Últimas noticias" title 45/45 #222 with a 31px row margin;
   news grid of 4 x 255px cards, 30px apart, image 255x127. */

.ineuro-main--front > .wp-block-post-content > * {
	margin-block: 0;
}

.ineuro-home-news > .wp-block-heading {
	margin-bottom: 54px; /* 23px heading margin + 31px row margin */
	line-height: 45px;
	color: var(--wp--preset--color--contrast);
}

.ineuro-news-grid .wp-block-post-template {
	gap: 30px;
}

/* 30px card margin + 32px row margin + 60px main padding on the original. */
.ineuro-home-news.wp-block-group {
	padding-top: 53px; /* the news now follow the hero directly (Servicios removed, Pablo 2026-11-12); same top gap as that section had */
	padding-bottom: 122px;
}

.ineuro-news-grid .wp-block-post-template > li {
	margin: 0;
}

.ineuro-news-grid .ineuro-post-card__title.wp-block-post-title {
	margin-bottom: 17px;
}

/* Four per row down to 668px, then one, as the original's news list. */
@media (max-width: 667px) {
	.ineuro-news-grid .wp-block-post-template.is-layout-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Plain-content pages (legal texts) ------------------------------------
   The original starts them 40px higher than other inner pages (no spacer
   row), spaces paragraphs 10px apart and uses borderless layout tables. */
.ineuro-main--page > .wp-block-post-content > .ineuro-plain-page:first-child {
	margin-top: -40px;
}

.is-wpb.ineuro-plain-page .ineuro-wpb-text > p,
.ineuro-plain-page > p {
	margin-block: 0 10px;
}

/* Text that sits loose in a text column on the original, outside any <p>. */
.is-wpb.ineuro-plain-page .ineuro-wpb-text > p.ineuro-loose-text {
	margin-bottom: 0;
}

.ineuro-plain-page .wp-block-table {
	margin: 0;
}

.ineuro-plain-page .wp-block-table table,
.ineuro-plain-page .wp-block-table td,
.ineuro-plain-page .wp-block-table th {
	border: 0;
}

.ineuro-plain-page .wp-block-table td {
	padding: 0;
	vertical-align: middle;
}

/* Paragraphs and list items inside a cell (core table cells only hold inline
   content); spaced like the original's <p> and <ul> with a 10px margin. */
.ineuro-plain-page .ineuro-cell-p,
.ineuro-plain-page .ineuro-cell-li {
	display: block;
	margin-top: 10px;
}

.ineuro-plain-page .ineuro-cell-li {
	display: list-item;
	margin-left: 40px;
	list-style: disc;
}

.ineuro-plain-page td > :is(.ineuro-cell-p, .ineuro-cell-li):last-child {
	margin-bottom: 10px;
}

/* A table that was a core table on the original: core's borders and padding,
   inside the browser's default <figure> margins. */
.ineuro-plain-page .wp-block-table.ineuro-table-core {
	margin: 14px 40px;
}

.ineuro-plain-page .ineuro-table-core td {
	padding: 0.5em;
	border: 1px solid;
}

/* --- Placeholder page (Equipo humano, "en construcción") ------------------
   Centred title, sentence and buttons, with room above the footer. */
.ineuro-placeholder-page.wp-block-group {
	padding-block: 60px 120px;
}

.ineuro-placeholder-page__text {
	margin-block: 30px;
	font-size: 16px;
}

.ineuro-placeholder-page .wp-block-buttons {
	gap: 20px;
}

/* --- Newsletter forms (MailPoet, D19): blog sidebar and slide-in ----------
   The forms themselves (texts, colours, sizes) is set in MailPoet
   (bin/fixtures/seed-newsletter.php). Current MailPoet versions force Arial
   on form text; the original's version let the theme font through, so
   headings and paragraphs inherit Poppins again. The e-mail field keeps
   Arial, as on the original. */
.ineuro-newsletter .mailpoet_form_html {
	margin: 0;
}

.ineuro-listing__sidebar > .wp-block-template-part > .ineuro-newsletter {
	margin-bottom: 40px;
}

.ineuro-newsletter .mailpoet_form_html :is(h2, p) {
	font-family: var(--wp--preset--font-family--poppins);
	font-synthesis: initial;
}

/* The form's headings follow the site headings (D35). */
:is(.ineuro-newsletter .mailpoet_form_html, .mailpoet_form_slide_in) .mailpoet-heading {
	font-family: var(--wp--preset--font-family--quicksand);
	-webkit-text-stroke: 0.02em currentColor;
}

.ineuro-newsletter .mailpoet_text::placeholder,
.mailpoet_form_slide_in .mailpoet_text::placeholder {
	color: #222;
	opacity: 1;
}

/* Buttons in the site font (D23): the original asks for Montserrat, never
   loaded, and falls back to the browser's default font. */
:is(.ineuro-newsletter, .mailpoet_form_slide_in) .mailpoet_submit {
	font-family: var(--wp--preset--font-family--poppins);
}

.ineuro-newsletter .mailpoet-heading {
	margin: 0;
}

.ineuro-newsletter .mailpoet_form_image {
	margin: 0;
}

.ineuro-newsletter .mailpoet_form_paragraph a {
	color: inherit;
}

/* --- Single post: comments (D39) -----------------------------------------
   Measured on the original: heading 20/28 bold #222; each comment has a 1px
   #ddd line above it, 30px padding and 30px margin; 87px avatar with a 32px
   gap; author 14 bold #333; date 11 uppercase #aaa on the right; text 14/22
   #222; replies indented 30px. */
.ineuro-main--single > .ineuro-comments {
	margin-block-start: 30px;
}

.ineuro-comments .wp-block-comments-title {
	margin: 0 0 20px;
	padding-top: 23px;
	font-size: 20px;
	line-height: 28px;
	font-weight: 700;
	color: var(--wp--preset--color--contrast);
	text-transform: lowercase;
}

.ineuro-comments .wp-block-comment-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ineuro-comments .wp-block-comment-template li {
	margin: 0 0 30px;
	padding: 30px 0 0;
	border-top: 1px solid #ddd;
}

.ineuro-comments .wp-block-comment-template ol {
	margin: 30px 0 0 30px;
	padding: 0;
	list-style: none;
}

.ineuro-comment {
	display: flex;
	align-items: flex-start;
	gap: 32px;
}

.ineuro-comment__avatar {
	flex: 0 0 87px;
	margin: 0;
}

.ineuro-comment__avatar img {
	display: block;
	width: 87px;
	height: 87px;
	border-radius: 0;
}

.ineuro-comment__main {
	flex: 1 1 auto;
	min-width: 0;
}

/* Groups add a block gap above every child; the comment lays out its own. */
.ineuro-comment__main > *,
.ineuro-comment > * {
	margin-block-start: 0;
}

.ineuro-comment__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 15px;
}

.ineuro-comment__head .wp-block-comment-author-name {
	margin: 0;
	font-size: 14px;
	line-height: 26px;
	font-weight: 600;
	color: #333;
}

.ineuro-comment__head .wp-block-comment-author-name a {
	color: var(--wp--preset--color--primary);
	text-decoration: none;
}

.ineuro-comment__head .wp-block-comment-date {
	margin: 0;
	font-size: 11px;
	line-height: 26px;
	font-weight: 500;
	text-transform: uppercase;
	color: #aaa;
}

.ineuro-comment__head .wp-block-comment-date a {
	color: inherit;
	text-decoration: none;
}

.ineuro-comments .wp-block-comment-content {
	font-size: 14px;
	line-height: 22px;
	color: var(--wp--preset--color--contrast);
}

.ineuro-comments .wp-block-comment-content p {
	margin: 0 0 10px;
}

@media (max-width: 600px) {
	.ineuro-comment {
		gap: 16px;
	}

	.ineuro-comment__avatar,
	.ineuro-comment__avatar img {
		flex-basis: 48px;
		width: 48px;
		height: 48px;
	}

	.ineuro-comment__head {
		flex-wrap: wrap;
		gap: 0 16px;
	}
}

/* Centros (D55): in the narrow columns at tablet widths a long word used to be
   cut anywhere, mid-syllable ("Neuroquirúrgic/as"). Words of 15 letters or more
   (only "Neuroquirúrgicas" on this page) are now hyphenated by syllable when
   they do not fit (lang="es"); shorter words just wrap as before, and the
   email is never hyphenated (it breaks at its dots and at the @). */
.ineuro-centre :is(h3, h4, p, li) {
	hyphens: auto;
	hyphenate-limit-chars: 15 5 5;
	overflow-wrap: break-word;
}

.ineuro-centre a[href^="mailto:"] {
	hyphens: none;
}

/* D56: soft hyphens (functions.php, ineuro_soft_hyphens) are only for the narrow
   columns between 600 and 1100px, where the review of 2026-11-18 found words cut
   in the middle. Elsewhere they would break words that fit on the next line, so
   they are switched off. */
@media (max-width: 599px), (min-width: 1101px) {
	:is(p, h1, h2, h3, h4, h5, h6, li),
	.ineuro-centre :is(h3, h4, p, li) {
		hyphens: none;
	}
}

/* Between 768 and 1100px the contact card of a centre leaves the address only
   about 120px, so "NEUROPSICO-LOGÍA" could not even break at its soft hyphen
   (D61). Less side padding gives the column room for the first half. */
@media (min-width: 768px) and (max-width: 1100px) {
	.ineuro-centre .ineuro-contact-card.wp-block-group {
		padding-inline: 28px;
	}
}
