/* Residual site styles. Color, fonts, buttons, header and footer inherit Astra. */
:root {
	--sc-content: var(--ast-container-width, 1200px);
	--sc-gutter: clamp(20px, 4vw, 56px);
}
::selection { background: var(--ast-global-color-0); color: var(--ast-global-color-2); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
[id] { scroll-margin-top: 96px; }
.entry-content p { text-wrap: pretty; }
.entry-content a:not([class]), .sc-legal a { text-underline-offset: .2em; }
.entry-content a:hover { text-decoration-thickness: 2px; }
.entry-content h1, .entry-content h2, .entry-content h3 { overflow-wrap: normal; }

/* Astra's builder keeps its regular minimum height after native sticky shrink. */
#masthead .ast-primary-header-bar.ast-sticky-active .site-primary-header-wrap {
	min-height: 60px;
}
#masthead #ast-mobile-header .ast-primary-header-bar.ast-sticky-active {
	min-height: 56px;
}
#masthead .ast-primary-header-bar.ast-sticky-active .ast-site-identity {
	padding-block: 8px;
}

/* Keep the current section and hovered link gold in Astra's sticky header. */
#masthead #ast-desktop-header .ast-primary-header-bar.ast-sticky-active .main-header-menu > .menu-item:is(.current-menu-item, .current-menu-ancestor, .current-menu-parent, :hover, :focus-within) > .menu-link,
#masthead #ast-desktop-header .ast-primary-header-bar.ast-sticky-active .main-header-menu .sub-menu > .menu-item:is(.current-menu-item, .current-menu-ancestor, :hover, :focus-within) > .menu-link {
	color: var(--ast-global-color-0);
}

/* Keep Astra's off-canvas navigation comfortable on tablet as well as phone. */
@media (max-width: 921px) {
	#ast-mobile-header .main-header-menu-toggle { min-width: 44px; min-height: 44px; }
	#ast-mobile-popup .ast-mobile-popup-inner { max-width: 420px; }
}

/* The optional video control is not part of Spectra's Container settings. */
.sc-hero.wp-block-uagb-container .uagb-container__video-wrap.sc-video-with-poster { background-position: center; background-size: cover; background-repeat: no-repeat; }
/* Spectra dims the video with opacity. Only show its poster when it is hidden. */
.sc-hero.wp-block-uagb-container .uagb-container__video-wrap.sc-video-show-poster { background-image: var(--sc-video-poster); }
.sc-video-with-poster.sc-video-show-poster video { visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
	.sc-hero.wp-block-uagb-container .uagb-container__video-wrap.sc-video-with-poster:has(video:not([data-sc-video-user-play])) { background-image: var(--sc-video-poster); }
	.sc-video-with-poster video:not([data-sc-video-user-play]) { visibility: hidden; }
}
.sc-video-toggle {
	position: absolute; z-index: 3; right: var(--sc-gutter); bottom: 24px;
	min-height: 44px; padding: 10px 18px; border-radius: 999px;
	background: var(--ast-global-color-2); color: var(--ast-global-color-5);
	border: 1px solid var(--ast-global-color-5); font-size: 14px;
}

/* Media crops are section variations; spacing and layout stay in Spectra. */
.sc-service .wp-block-uagb-image,
.sc-service .wp-block-uagb-image__figure,
.sc-service .wp-block-uagb-image__figure a { width: 100%; margin: 0; display: block; }
.sc-service img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--sc-radius-media); }
.sc-principle img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--sc-radius-media); }
.sc-materia img { width: 100%; max-height: 560px; object-fit: cover; }
.entry-content .wp-block-uagb-image a { text-decoration: none; }
.entry-content .sc-service a:not(:has(img)),
.entry-content .sc-link a { display: inline-flex; align-items: center; min-height: 44px; }
.entry-content .sc-service a:not(:has(img)),
.entry-content .sc-link a { color: var(--ast-global-color-2); }
.entry-content .sc-service a:not(:has(img)):is(:hover, :focus-visible),
.entry-content .sc-link a:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: .2em; }

/* Distinct calls to action need a visible pause between their dark panels. */
body.page-id-24 .sc-cta + .sc-cta { margin-top: 48px; }

/* Astra's footer builder currently has no horizontal inset. Match the site grid. */
.site-footer .ast-builder-grid-row-container-inner { padding-inline: 24px; }

/* Project post shell: blocks compose the page and ACF supplies their media and facts. */
body.single-proyecto {
	--sc-project-page-bg: #f3ecdd;
	background-color: var(--sc-project-page-bg);
}
body.single-proyecto .site-content,
body.single-proyecto .sc-project-single .entry-content,
body.single-proyecto .site-primary-footer-wrap,
body.single-proyecto .site-below-footer-wrap {
	background-color: var(--sc-project-page-bg);
}
.sc-project-single { max-width: var(--sc-content); margin: 0 auto; padding: 40px var(--sc-gutter) 64px; }
.sc-project-taxonomy-intro { max-width: 72ch; margin: 0 0 36px; color: var(--ast-global-color-3); font-size: 18px; line-height: 1.65; }
.sc-project-single .entry-content > p { max-width: 70ch; font-size: 18px; line-height: 1.65; }
.sc-project-single .entry-content > p.sc-project-back { max-width: none; font-size: 16px; }
.sc-project-single .entry-content > p.sc-project-nav {
	max-width: none; display: flex; flex-wrap: wrap; gap: 24px;
	justify-content: space-between; border-top: 1px solid var(--ast-global-color-4);
	padding-top: 24px; margin-top: 64px;
}
.sc-project-single .entry-content > p.sc-project-nav a,
.sc-project-single .entry-content > p.sc-project-back a { display: inline-flex; min-height: 44px; align-items: center; }
.sc-project-card:focus-visible { outline-offset: 8px; }
.sc-project-listing a.sc-project-card,
.sc-project-listing a.sc-project-card:is(:hover, :focus-visible),
.sc-project-card__title,
.sc-project-card__meta { text-decoration: none; }

/* Legal pages use core blocks and a readable text measure. */
.sc-legal { width: 100%; max-width: 760px !important; margin-inline: auto; padding: 64px 24px 96px; }
.sc-legal p, .sc-legal li { line-height: 1.75; }
.sc-legal .wp-block-table { overflow-x: auto; }
.sc-legal a { overflow-wrap: anywhere; }

/* A real process image makes the structures page useful beyond its hero. */
.sc-structure-process .sc-structure-process__inner { width: min(1200px, 100%); margin: auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: clamp(48px, 9vw, 136px); align-items: center; }
.sc-structure-process .sc-structure-process__eyebrow { color: var(--ast-global-color-1); font-size: 12px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.sc-structure-process h2 { max-width: 14ch; margin: 20px 0 24px; color: var(--ast-global-color-2); font-weight: 600; font-size: clamp(36px, 4vw, 56px); line-height: 1.1; letter-spacing: -.035em; }
.sc-structure-process p:not(.sc-structure-process__eyebrow):not(.sc-structure-process__caption) { max-width: 48ch; color: var(--ast-global-color-3); font-size: 18px; line-height: 1.65; }
.sc-structure-process a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; border-bottom: 1px solid currentColor; color: var(--ast-global-color-2); font-weight: 600; text-decoration: none; }
.sc-structure-process figure { margin: 0; }
.sc-structure-process img { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; object-position: center 58%; border-radius: 18px; }
.sc-structure-process .sc-structure-process__caption { padding-top: 12px; color: var(--ast-global-color-3); font-size: 13px; }

@media (max-width: 767px) {
  .sc-structure-process .sc-structure-process__inner { grid-template-columns: 1fr; gap: 28px; }
	.sc-structure-process img { aspect-ratio: 3/2; }
	.sc-project-single { padding-block: 32px 48px; }
	.sc-legal { padding-inline: 20px; }
	body.page-id-24 .sc-cta + .sc-cta { margin-top: 32px; }
	.site-footer .ast-builder-grid-row-container-inner { padding-inline: 20px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.site-footer .ast-builder-grid-row-container-inner { padding-inline: 40px; }
}
@media (prefers-reduced-motion: reduce) {
	.sc-service, .sc-project-card__media img { transition: none; }
	.sc-project-card:hover .sc-project-card__media img { transform: none; }
}
