/* WebVigo — estilos de componentes sobre bloques nativos.
   Valores tomados del WebVigo Design System (tokens en theme.json). */

:root {
	--wv-radius-sm: var(--wp--custom--radius--sm, 4px);
	--wv-radius-md: var(--wp--custom--radius--md, 8px);
	--wv-radius-lg: var(--wp--custom--radius--lg, 16px);
	--wv-shadow: var(--wp--custom--shadow--raise);
	--wv-c-brand: var(--wp--preset--color--brand);
	--wv-c-brand-ink: var(--wp--preset--color--brand-ink);
	--wv-c-line: var(--wp--preset--color--line);
	--wv-c-muted: var(--wp--preset--color--ink-muted);
	--wv-bars: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Crect x='0' y='0' width='4' height='14' rx='2' fill='%2365bc49'/%3E%3Crect x='7' y='4' width='4' height='10' rx='2' fill='%2365bc49'/%3E%3Crect x='14' y='0' width='4' height='14' rx='2' fill='%2365bc49'/%3E%3C/svg%3E");
	--wv-bars-inverse: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 14'%3E%3Crect x='0' y='0' width='4' height='14' rx='2' fill='%238dca55'/%3E%3Crect x='7' y='4' width='4' height='10' rx='2' fill='%238dca55'/%3E%3Crect x='14' y='0' width='4' height='14' rx='2' fill='%238dca55'/%3E%3C/svg%3E");
}

body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--wv-c-brand-ink); outline-offset: 2px; }
.screen-reader-text:focus { clip: auto !important; clip-path: none; height: auto; width: auto; z-index: 100000; }
img { height: auto; }

/* Salto al contenido */
.wv-skip { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--wp--preset--color--ink); color: #fff; padding: 8px 16px; border-radius: var(--wv-radius-sm); }
.wv-skip:focus { left: 8px; }

/* ---------- Tipografía ---------- */
p.is-style-eyebrow,
.wv-eyebrow {
	display: flex; align-items: center; gap: 8px;
	font-family: var(--wp--preset--font-family--mono); font-size: 13px; line-height: 16px; font-weight: 500;
	letter-spacing: 0.08em; text-transform: uppercase; color: var(--wv-c-brand-ink);
	margin-bottom: 0;
}
p.is-style-eyebrow::before,
.wv-eyebrow::before { content: ""; width: 18px; height: 14px; flex: none; background: var(--wv-bars) no-repeat center / contain; }
.has-surface-inverse-background-color p.is-style-eyebrow { color: var(--wp--preset--color--brand-on-inverse); }
.has-surface-inverse-background-color p.is-style-eyebrow::before { background-image: var(--wv-bars-inverse); }

p.is-style-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.6; color: var(--wv-c-muted); }
.has-surface-inverse-background-color p.is-style-lead { color: var(--wp--preset--color--ink-inverse); }
.wv-muted { color: var(--wv-c-muted); }
.wv-mono { font-family: var(--wp--preset--font-family--mono); font-variant-numeric: tabular-nums; }

/* ---------- Botones ---------- */
.wp-block-button__link { transition: background-color .15s ease, border-color .15s ease, color .15s ease; text-decoration: none; }
.wp-block-button.is-style-secondary .wp-block-button__link {
	background: transparent; color: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--line-strong);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover { border-color: var(--wp--preset--color--ink); background: transparent; }
.has-surface-inverse-background-color .wp-block-button.is-style-secondary .wp-block-button__link { color: var(--wp--preset--color--ink-inverse); border-color: var(--wp--preset--color--ink-inverse); }
.wp-block-button.is-style-ghost .wp-block-button__link {
	background: transparent; color: var(--wv-c-brand-ink); border-color: transparent; padding-left: 0; padding-right: 0;
}
.wp-block-button.is-style-ghost .wp-block-button__link::after { content: " →"; display: inline-block; transition: transform .15s ease; }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { text-decoration: underline; text-underline-offset: 4px; background: transparent; }
.wp-block-button.is-style-ghost .wp-block-button__link:hover::after { transform: translateX(3px); }
.wp-block-button.wv-lg .wp-block-button__link { font-size: 18px; padding: 16px 32px; }
.wp-block-button.wv-arrow .wp-block-button__link::after { content: " →"; }

/* ---------- Cabecera ---------- */
.wv-header {
	position: sticky; top: 0; z-index: 50;
	background: var(--wp--preset--color--surface);
	border-bottom: 1px solid var(--wv-c-line);
}
.admin-bar .wv-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .wv-header { top: 46px; } }
.wv-header .wp-block-site-logo img { height: 56px; width: auto; max-width: none; }
.wv-header .wp-block-navigation-item__content { padding-block: 8px; border-bottom: 2px solid transparent; text-decoration: none; }
.wv-header .wp-block-navigation-item__content:hover,
.wv-header .current-menu-item > .wp-block-navigation-item__content,
.wv-header .current-menu-ancestor > .wp-block-navigation-item__content { border-bottom-color: var(--wv-c-brand); }
.wv-header .wp-block-navigation__submenu-container { border: 1px solid var(--wv-c-line) !important; border-radius: var(--wv-radius-md); box-shadow: var(--wv-shadow); padding: 8px !important; min-width: 260px !important; }
.wv-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { border-bottom: 0; padding: 8px 12px; font-weight: 600; font-family: var(--wp--preset--font-family--text); }
.wv-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--surface-alt); border-radius: var(--wv-radius-sm); }
.wv-phone a { font-family: var(--wp--preset--font-family--mono); font-size: 14px; color: var(--wv-c-muted); text-decoration: none; white-space: nowrap; }
.wv-phone a:hover { color: var(--wp--preset--color--ink); }
@media (max-width: 960px) { .wv-header .wv-phone { display: none; } }
@media (max-width: 600px) { .wv-header .wp-block-buttons { display: none; } }

/* Migas de pan */
.yoast-breadcrumbs, .wv-breadcrumbs { font-size: 15px; color: var(--wv-c-muted); }
.yoast-breadcrumbs a { color: var(--wv-c-brand-ink); }
.home .yoast-breadcrumbs { display: none; }

/* ---------- Hero ---------- */
.wv-hero-art {
	min-height: 300px; height: 100%;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 344 300' preserveAspectRatio='xMaxYMax meet'%3E%3Crect x='0' y='66' width='56' height='234' rx='28' fill='%2365bc49'/%3E%3Crect x='72' y='132' width='56' height='168' rx='28' fill='%238dca55'/%3E%3Crect x='144' y='0' width='56' height='300' rx='28' fill='%2365bc49'/%3E%3Crect x='216' y='108' width='56' height='192' rx='28' fill='%23141a12'/%3E%3Crect x='288' y='180' width='56' height='120' rx='28' fill='%23eaf5e3'/%3E%3C/svg%3E") no-repeat right bottom / contain;
}
@media (max-width: 781px) { .wv-hero-art { min-height: 120px; background-position: left bottom; } }

/* Franja de clientes: carrusel continuo */
.wv-marquee {
	overflow: hidden;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.wv-marquee__track { display: flex; width: max-content; animation: wv-marquee var(--wv-marquee-duration, 120s) linear infinite; }
.wv-marquee:hover .wv-marquee__track,
.wv-marquee:focus-within .wv-marquee__track { animation-play-state: paused; }
.wv-clients { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: nowrap; gap: 48px; padding-right: 48px; font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 20px; white-space: nowrap; }
.wv-clients a { color: var(--wv-c-muted); text-decoration: none; transition: color .2s; }
.wv-clients a:hover, .wv-clients a:focus-visible { color: var(--wp--preset--color--brand-ink); }
@keyframes wv-marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
	.wv-marquee { -webkit-mask-image: none; mask-image: none; }
	.wv-marquee__track { animation: none; width: auto; }
	.wv-marquee .wv-clients { flex-wrap: wrap; gap: 12px 40px; padding-right: 0; white-space: normal; }
	.wv-marquee .wv-clients[aria-hidden] { display: none; }
}

/* ---------- Tarjetas y paneles ---------- */
.wp-block-group.is-style-card {
	position: relative; background: var(--wp--preset--color--surface);
	border: 1px solid var(--wv-c-line); border-radius: var(--wv-radius-md);
	padding: var(--wp--preset--spacing--40);
	transition: box-shadow .2s ease, border-color .2s ease;
}
.wp-block-group.is-style-card:hover { box-shadow: var(--wv-shadow); border-color: var(--wv-c-brand); }
.wp-block-group.is-style-card :is(h2, h3) a { color: inherit; text-decoration: none; }
.wp-block-group.is-style-card :is(h2, h3) a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.wp-block-group.is-style-card p { color: var(--wv-c-muted); }
.wp-block-group.is-style-card .wv-more { margin-top: auto; font-family: var(--wp--preset--font-family--display); font-weight: 700; color: var(--wv-c-brand-ink); }
.wp-block-group.is-style-panel { background: var(--wp--preset--color--surface-alt); border-radius: var(--wv-radius-lg); padding: var(--wp--preset--spacing--50); }
.has-surface-alt-background-color .wp-block-group.is-style-panel { background: var(--wp--preset--color--surface); }
.wv-icon { width: 40px; height: 40px; border-radius: var(--wv-radius-sm); background: var(--wp--preset--color--brand-tint); color: var(--wv-c-brand-ink); display: grid; place-items: center; margin: 0; }
.wv-icon svg { width: 22px; height: 22px; }

/* Rasgo con línea superior verde */
.wv-feature { border-top: 2px solid var(--wv-c-brand); padding-top: var(--wp--preset--spacing--30); }
.wv-feature p { color: var(--wv-c-muted); }

/* ---------- Listas ---------- */
ul.is-style-check { list-style: none; padding-left: 0; display: grid; gap: 12px; }
ul.is-style-check li { position: relative; padding-left: 34px; }
ul.is-style-check li::before {
	content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e6e22' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / contain;
}
ul.is-style-links { list-style: none; padding-left: 0; border-top: 1px solid var(--wv-c-line); margin-inline: 0; margin-bottom: 0; }
ul.is-style-links li { border-bottom: 1px solid var(--wv-c-line); }
ul.is-style-links a { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 600; }
ul.is-style-links a::after { content: "→"; color: var(--wv-c-brand-ink); transition: transform .15s ease; }
ul.is-style-links a:hover::after { transform: translateX(3px); }

/* Proceso numerado */
ol.wv-steps { list-style: none; padding: 0; margin-inline: 0; margin-bottom: 0; display: grid; gap: var(--wp--preset--spacing--40); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); counter-reset: step; }
ol.wv-steps > li { counter-increment: step; display: flex; flex-direction: column; gap: 8px; padding-top: 16px; border-top: 2px solid var(--wv-c-line); color: var(--wv-c-muted); }
ol.wv-steps > li:first-child { border-top-color: var(--wv-c-brand); }
ol.wv-steps > li::before { content: counter(step, decimal-leading-zero); font-family: var(--wp--preset--font-family--mono); font-size: 14px; color: var(--wv-c-brand-ink); }
ol.wv-steps > li strong { display: block; font-family: var(--wp--preset--font-family--display); font-size: 19px; line-height: 1.37; color: var(--wp--preset--color--ink); }

/* ---------- Preguntas frecuentes ---------- */
.wv-faq { border-top: 1px solid var(--wv-c-line); }
.wv-faq > * + * { margin-top: 0 !important; }
.wp-block-details.is-style-faq { border-bottom: 1px solid var(--wv-c-line); padding-block: 4px; }
.wp-block-details.is-style-faq summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px;
	padding-block: 14px; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 19px; line-height: 1.37;
}
.wp-block-details.is-style-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-faq summary::after { content: "+"; font-family: var(--wp--preset--font-family--mono); color: var(--wv-c-brand-ink); font-size: 20px; }
.wp-block-details.is-style-faq[open] summary::after { content: "−"; }
.wp-block-details.is-style-faq > :not(summary) { color: var(--wv-c-muted); margin-top: 0; margin-bottom: 16px; }

/* ---------- Casos (portfolio) ---------- */
.wv-cases .wp-block-post { display: flex; flex-direction: column; gap: 12px; position: relative; }
.wv-cases .wp-block-post-featured-image { margin: 0; }
.wv-cases .wp-block-post-featured-image img,
.wv-shot img,
.wp-block-image.is-style-screenshot img {
	width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top center;
	border-radius: var(--wv-radius-lg); border: 1px solid var(--wv-c-line); background: var(--wp--preset--color--surface-sunk);
}
.wp-block-image.is-style-screenshot.wv-tall img { aspect-ratio: auto; }
.wv-cases .wp-block-post-title a { color: inherit; text-decoration: none; }
.wv-cases .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; }
.wv-cases .wp-block-post:hover .wp-block-post-title a { text-decoration: underline; text-decoration-color: var(--wv-c-brand); text-underline-offset: 4px; }
.wv-cases .wp-block-post-excerpt { color: var(--wv-c-muted); margin: 0; }
.wv-cases .wp-block-post-excerpt__more-link { display: none; }

/* Etiquetas */
.wv-tags, .wp-block-post-terms { display: flex; flex-wrap: wrap; gap: 8px; }
.wv-tags a, .wv-tags span, .wp-block-post-terms a {
	display: inline-flex; padding: 2px 8px; border-radius: var(--wv-radius-sm);
	background: var(--wp--preset--color--brand-tint); color: var(--wv-c-brand-ink);
	font-family: var(--wp--preset--font-family--mono); font-size: 13px; line-height: 20px; font-weight: 500; text-decoration: none;
}
.wp-block-post-terms__separator { display: none; }

/* Filtros del portfolio */
.wv-filters { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.wv-filters a { display: inline-flex; padding: 8px 16px; border-radius: var(--wv-radius-md); border: 2px solid var(--wp--preset--color--line-strong); color: var(--wp--preset--color--ink); text-decoration: none; font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 15px; }
.wv-filters a:hover { border-color: var(--wp--preset--color--ink); }
.wv-filters a[aria-current="page"] { background: var(--wv-c-brand); border-color: var(--wv-c-brand); color: var(--wp--preset--color--on-brand); }

/* Ficha de proyecto */
.wv-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0; }
.wv-facts .wp-block-group { gap: 4px; }
.wv-facts > * { margin-block-start: 0 !important; }
.wv-facts p { margin: 0; }
.wv-facts .wv-fact-label { font-family: var(--wp--preset--font-family--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wv-c-brand-ink); }
.wv-facts .wv-fact-value { font-weight: 600; }

/* Equipo */
.wv-team img { filter: grayscale(1); aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--wv-radius-md); }
.wv-team .wv-lead-photo img { border-radius: var(--wv-radius-lg); }

/* Reseñas */
.wv-review { background: var(--wp--preset--color--surface); border-radius: var(--wv-radius-md); padding: var(--wp--preset--spacing--40); }
.wv-stars { color: var(--wv-c-brand-ink); letter-spacing: 2px; font-size: 18px; }

/* ---------- Bandas ---------- */
.wv-cta { border-radius: var(--wv-radius-lg); }
.wv-cta h2 { color: var(--wp--preset--color--ink-inverse); }
.wv-cta p:not(.is-style-eyebrow) { color: var(--wp--preset--color--ink-inverse); }

/* Datos destacados */
.wv-stat { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: clamp(32px, 4vw, 44px); line-height: 1.1; margin: 0; color: var(--wp--preset--color--ink); }

/* ---------- Pie ---------- */
.wv-footer a { color: var(--wp--preset--color--ink-inverse); text-decoration: none; }
.wv-footer a:hover { text-decoration: underline; }
.wv-footer h2 { font-family: var(--wp--preset--font-family--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--brand-on-inverse); font-weight: 500; margin: 0 0 12px; }
.wv-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wv-footer .wp-block-site-logo img, .wv-footer .wv-iso img { width: 48px; height: 48px; border-radius: var(--wv-radius-sm); }
.wv-footer .wv-legal { border-top: 1px solid var(--wv-c-muted); font-size: 15px; }

/* ---------- Blog ---------- */
.wv-posts .wp-block-post { display: flex; flex-direction: column; gap: 10px; position: relative; padding-bottom: 24px; border-bottom: 1px solid var(--wv-c-line); }
.wv-posts .wp-block-post-featured-image img { aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--wv-radius-md); }
.wv-posts .wp-block-post-title a { color: inherit; text-decoration: none; }
.wv-posts .wp-block-post-title a:hover { text-decoration: underline; text-decoration-color: var(--wv-c-brand); }
.wv-posts .wp-block-post-excerpt { color: var(--wv-c-muted); margin: 0; }
.wv-entry .wp-block-post-content > * { max-width: 760px; }
.wv-entry .wp-block-post-content img { border-radius: var(--wv-radius-md); }
.wv-entry .wp-block-post-content pre { background: var(--wp--preset--color--surface-sunk); padding: 16px; border-radius: var(--wv-radius-md); overflow-x: auto; font-family: var(--wp--preset--font-family--mono); font-size: 14px; }
.wv-entry .wp-block-post-content h2 { margin-top: 1.6em; }
.wv-old-notice { border-left: 3px solid var(--wp--preset--color--warning); background: #fdf6ea; padding: 12px 16px; border-radius: 0 var(--wv-radius-sm) var(--wv-radius-sm) 0; font-size: 15px; }
.wp-block-query-pagination { gap: 8px; font-family: var(--wp--preset--font-family--display); font-weight: 700; }
.wp-block-query-pagination a, .wp-block-query-pagination .current { padding: 6px 12px; border-radius: var(--wv-radius-sm); border: 1px solid var(--wv-c-line); text-decoration: none; }
.wp-block-query-pagination .current { background: var(--wv-c-brand); border-color: var(--wv-c-brand); }

/* Comentarios */
.wp-block-comments .wp-block-comment-template li { border-bottom: 1px solid var(--wv-c-line); padding-block: 16px; }
.wp-block-comment-author-name { font-weight: 600; }

/* ---------- Formularios (Contact Form 7) ---------- */
.wpcf7-form { display: grid; gap: 16px; }
.wpcf7-form p { margin: 0; }
.wpcf7-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 15px; }
.wpcf7-form :is(input[type="text"], input[type="email"], input[type="tel"], select, textarea) {
	font: inherit; font-weight: 400; color: var(--wp--preset--color--ink); background: #fff; width: 100%;
	border: 1px solid var(--wp--preset--color--line-strong); border-radius: var(--wv-radius-sm); padding: 12px;
}
.wpcf7-form textarea { min-height: 160px; resize: vertical; }
.wpcf7-form :is(input, select, textarea):focus-visible { outline: 2px solid var(--wv-c-brand-ink); outline-offset: 1px; border-color: var(--wv-c-brand-ink); }
.wpcf7-form .wv-form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wpcf7-form .wpcf7-checkbox, .wpcf7-form .wpcf7-acceptance { font-weight: 400; }
.wpcf7-form .wpcf7-list-item { margin: 0 24px 8px 0; display: inline-flex; gap: 8px; align-items: center; }
.wpcf7-form .wpcf7-list-item label { flex-direction: row; font-weight: 400; gap: 8px; align-items: center; }
.wpcf7-form input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--wv-c-brand-ink); }
.wpcf7-form .wpcf7-submit {
	font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 18px; cursor: pointer;
	background: var(--wv-c-brand); color: var(--wp--preset--color--on-brand); border: 0; border-radius: var(--wv-radius-md); padding: 16px 32px; justify-self: start;
}
.wpcf7-form .wpcf7-submit:hover { background: var(--wp--preset--color--brand-light); }
.wpcf7-not-valid { border-color: var(--wp--preset--color--danger) !important; border-width: 2px !important; }
.wpcf7-not-valid-tip { color: var(--wp--preset--color--danger); font-size: 15px; font-weight: 400; }
.wpcf7 form .wpcf7-response-output { margin: 0; border-radius: var(--wv-radius-sm); padding: 12px 16px; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--wv-c-brand); background: var(--wp--preset--color--brand-tint); }
.wv-legal-note { font-size: 13px; line-height: 20px; color: var(--wv-c-muted); }

/* Botón flotante de WhatsApp */
.wv-whatsapp {
	position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
	width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
	background: var(--wv-c-brand); color: var(--wp--preset--color--on-brand); box-shadow: var(--wv-shadow);
}
.wv-whatsapp:hover { background: var(--wp--preset--color--brand-light); }
.wv-whatsapp svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Secciones de página (sin estilos en línea, para que el editor no marque bloques inválidos) ---------- */
.wv-section { padding-top: var(--wp--preset--spacing--80); padding-bottom: var(--wp--preset--spacing--80); margin-top: 0 !important; }
.wv-section.wv-tight-top { padding-top: var(--wp--preset--spacing--40); }
.wv-section.wv-tight-bottom { padding-bottom: var(--wp--preset--spacing--40); }
.wv-section.wv-tight-both { padding-top: var(--wp--preset--spacing--40); padding-bottom: var(--wp--preset--spacing--40); }
.wv-section.wv-hero { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--70); }
.wv-border-top { border-top: 1px solid var(--wv-c-line); }
.wp-block-post-content > .wv-section:first-child { margin-top: 0; }
.wv-cta { padding: var(--wp--preset--spacing--60); }
.wv-cta-copy { max-width: 560px; }
.wv-hero-copy { gap: var(--wp--preset--spacing--40); }

/* Equipo: colaboradores */
.wv-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 24px; }
.wv-team-grid figure { margin: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; line-height: 1.4; }
.wv-team-grid img { width: 100%; height: auto; }
.wv-team .wv-lead-photo { margin: 0; }
.wv-team .wv-lead-photo img { width: 100%; max-width: 320px; height: auto; }
.wv-hero .is-style-panel.has-brand-background-color { grid-column: 1 / -1; }

/* Contact Form 7 sin su hoja de estilos */
.wpcf7 .hidden-fields-container { display: none; }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wpcf7-response-output:empty, .wpcf7 form.init .wpcf7-response-output { display: none; }
.wpcf7 .wv-fieldset { border: 0; padding: 0; margin: 0; }
.wpcf7 .wv-fieldset legend { font-weight: 600; font-size: 15px; padding: 0; margin-bottom: 8px; }
.wpcf7-spinner { display: none; }
.wpcf7 form.submitting .wpcf7-submit { opacity: .6; }
.wv-facts > .wp-block-group { align-self: start; justify-content: flex-start; }

/* Titular visual de portada (el H1 SEO va en el rótulo superior) */
.wv-display { font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.06; color: var(--wp--preset--color--ink); text-wrap: balance; margin: 0; }
h1.wv-eyebrow { font-size: 13px; line-height: 16px; letter-spacing: 0.08em; }

/* Ficha de proyecto: cabecera a ancho de lectura y datos en franja horizontal */
.wv-project-head > * { max-width: 820px; }
.wv-project-facts .wv-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 781px) {
	.wv-project-facts .wv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Migas de pan: una sola pieza (parts/migas.html) bajo la cabecera, misma posición en toda la web.
   El primer bloque del contenido arranca siempre a la misma distancia de las migas. */
.wv-crumbs { padding-top: var(--wp--preset--spacing--50); }
.wv-crumbs .yoast-breadcrumbs { margin: 0; }
.home .wv-crumbs-part { display: none; }
body:not(.home) .wv-crumbs-part + main { padding-top: 0 !important; margin-top: 0 !important; }
body:not(.home) .wv-crumbs-part + main > :first-child:not(.wp-block-post-content),
body:not(.home) .wv-crumbs-part + main > .wp-block-post-content > :first-child { padding-top: var(--wp--preset--spacing--40) !important; margin-top: 0 !important; }

/* Portada · bloques de servicios: las tarjetas comparten filas (icono, título, texto, enlaces)
   para que los enlaces empiecen a la misma altura aunque los textos ocupen distintas líneas. */
.wv-service-groups > .is-style-panel { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: var(--wp--preset--spacing--30); align-content: start; }
.wv-service-groups > .is-style-panel > * { margin-block: 0; }

/* Vídeos de YouTube (fachada sin cookies) */
.wv-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--wv-radius-lg, 16px); overflow: hidden; background: #000; margin-block: var(--wp--preset--spacing--40); }
.wv-video__play { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative; }
.wv-video__play img, .wv-video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.wv-video__play::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: var(--wp--preset--color--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23141a12'/%3E%3C/svg%3E") no-repeat 56% 50% / 32px; box-shadow: 0 4px 16px rgb(0 0 0 / .3); transition: transform .2s; }
.wv-video__play:hover::after, .wv-video__play:focus-visible::after { transform: scale(1.08); }
.wv-video__play:focus-visible { outline: 3px solid var(--wp--preset--color--brand); outline-offset: -3px; }
