/*
Theme Name: EBengineering 2026
Description: Tema a medida para EBengineering (ebengineering.eu). Ligero, sin maquetador.
Author: Dinan
Version: 1.0.0
Requires PHP: 8.0
Text Domain: ebeng
*/

:root {
	--eb-dark: #144f59;
	--eb-dark-2: #0d3a42;
	--eb-green: #02af8d;
	--eb-green-d: #018a6f;
	--eb-ink: #14262b;
	--eb-text: #33474c;
	--eb-muted: #5f7378;
	--eb-line: #dbe5e6;
	--eb-soft: #f2f7f7;
	--eb-white: #fff;
	--eb-radius: 10px;
	--eb-shadow: 0 1px 2px rgba(20, 79, 89, .06), 0 8px 24px rgba(20, 79, 89, .08);
	--eb-wrap: 1200px;
	--eb-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	font-family: var(--eb-font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--eb-text);
	background: var(--eb-white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--eb-green-d); text-underline-offset: 3px; }
a:hover { color: var(--eb-dark); }
h1, h2, h3, h4 { color: var(--eb-dark); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--eb-green); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 14px; border-radius: 6px; }

.eb-wrap { max-width: var(--eb-wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Cabecera ---------- */
.eb-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--eb-line); backdrop-filter: saturate(1.4) blur(6px); }
.eb-header__in { display: flex; align-items: center; gap: 28px; min-height: 76px; }
.eb-logo { flex: 0 0 auto; }
.eb-logo img { width: 230px; height: auto; }
.eb-nav { flex: 1 1 auto; }
.eb-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; justify-content: center; }
.eb-nav a { display: block; padding: 10px 14px; border-radius: 8px; color: var(--eb-ink); text-decoration: none; font-weight: 600; font-size: .97rem; }
.eb-nav a:hover { background: var(--eb-soft); color: var(--eb-dark); }
.eb-nav .current-menu-item > a, .eb-nav .current_page_item > a { color: var(--eb-green-d); box-shadow: inset 0 -2px 0 var(--eb-green); border-radius: 8px 8px 0 0; }
.eb-tools { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.eb-lang { display: flex; gap: 2px; font-size: .85rem; font-weight: 700; }
.eb-lang a, .eb-lang span { padding: 4px 7px; border-radius: 6px; text-decoration: none; color: var(--eb-muted); }
.eb-lang .is-current { color: var(--eb-dark); background: var(--eb-soft); }
.eb-yt { display: inline-flex; color: var(--eb-muted); }
.eb-yt:hover { color: #e00; }
.eb-yt svg { width: 26px; height: 26px; }
.eb-toggle { display: none; background: none; border: 1px solid var(--eb-line); border-radius: 8px; padding: 8px 10px; cursor: pointer; color: var(--eb-dark); }
.eb-toggle svg { width: 22px; height: 22px; display: block; }

/* ---------- Botones ---------- */
.eb-btn, .wp-block-button__link {
	display: inline-flex; align-items: center; gap: .5em;
	padding: 13px 24px; border-radius: 8px; border: 2px solid var(--eb-green);
	background: var(--eb-green); color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.eb-btn:hover, .wp-block-button__link:hover { background: var(--eb-green-d); border-color: var(--eb-green-d); color: #fff; }
.eb-btn--ghost, .is-style-outline .wp-block-button__link { background: transparent; color: var(--eb-dark); border-color: var(--eb-dark); }
.eb-btn--ghost:hover, .is-style-outline .wp-block-button__link:hover { background: var(--eb-dark); border-color: var(--eb-dark); color: #fff; }
.eb-btn--sm { padding: 8px 14px; font-size: .88rem; }
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 0; }

/* ---------- Banner foto ---------- */
.eb-banner { position: relative; background: var(--eb-dark-2); }
.eb-banner img { width: 100%; height: clamp(150px, 20.8vw, 400px); object-fit: cover; }
.eb-banner::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, var(--eb-dark), var(--eb-green)); }

/* ---------- Secciones (bloques Group con clase) ---------- */
/* En temas clásicos WP envuelve el contenido de cada Group en un div interno: lo hacemos "transparente". */
.wp-block-group__inner-container { display: contents; }
.entry-content > * { max-width: var(--eb-wrap); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.entry-content > .eb-section { max-width: none; padding: clamp(48px, 6vw, 84px) 0; margin: 0; }
.eb-section > *, .eb-section > .wp-block-group__inner-container > * { max-width: var(--eb-wrap); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
.eb-card > .wp-block-group__inner-container > *:last-child { margin-bottom: 0; }
.eb-section--soft { background: var(--eb-soft); }
.eb-section--dark { background: var(--eb-dark); color: #d9ecec; }
.eb-section--dark h2, .eb-section--dark h3 { color: #fff; }
.eb-section--tight { padding-top: 0 !important; }
.eb-intro { padding-top: clamp(40px, 5vw, 64px) !important; }
.eb-kicker { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--eb-green-d); margin-bottom: .8em; }
.eb-lead { font-size: clamp(1.05rem, 1rem + .35vw, 1.25rem); color: var(--eb-text); max-width: 60ch; }
.eb-section > .eb-measure, .eb-section > .wp-block-group__inner-container > .eb-measure { max-width: calc(74ch + 48px); margin-left: max(0px, calc((100% - var(--eb-wrap)) / 2)); }
.eb-seal img, .eb-footer__seal img { background: #fff; padding: 6px; border-radius: 12px; }
.eb-sectors { color: var(--eb-muted); font-size: .95rem; }
.eb-sectors strong { color: var(--eb-dark); }

/* Columnas */
.wp-block-columns { display: flex; gap: 28px; flex-wrap: wrap; margin: 1.5em auto 0; }
.wp-block-column { flex: 1 1 0; min-width: 0; }
@media (max-width: 860px) { .wp-block-columns { flex-direction: column; } }

/* Tarjetas */
.eb-card { background: #fff; border: 1px solid var(--eb-line); border-radius: var(--eb-radius); padding: 26px 26px 20px; box-shadow: var(--eb-shadow); position: relative; height: 100%; }
.eb-card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--eb-green); border-radius: var(--eb-radius) var(--eb-radius) 0 0; }
.eb-card h3 { margin-bottom: .4em; }
.eb-card p:last-child { margin-bottom: 0; }
.eb-card__num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--eb-soft); color: var(--eb-dark); font-weight: 800; font-size: .9rem; margin-bottom: 12px; }
.eb-card--featured { background: var(--eb-dark); border-color: var(--eb-dark); color: #d9ecec; }
.eb-card--featured h3 { color: #fff; }
.eb-card--featured::before { background: var(--eb-green); }

.eb-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 1.5em; }
.eb-grid--2 { grid-template-columns: repeat(2, 1fr); }
.eb-split .eb-grid--2 { grid-template-columns: 1fr; }
@media (max-width: 760px) { .eb-grid--2 { grid-template-columns: 1fr; } }

/* Rasgos (features) */
.eb-feature { position: relative; padding: 18px 18px 18px 66px; background: #fff; border: 1px solid var(--eb-line); border-radius: var(--eb-radius); }
.eb-feature::before { content: ""; position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 9px; background: rgba(2, 175, 141, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23018a6f' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.eb-feature h3 { font-size: 1.02rem; margin: 0 0 .25em; }
.eb-feature p { margin: 0; font-size: .95rem; }
.eb-split { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-top: 2em; }
@media (max-width: 960px) { .eb-split { grid-template-columns: 1fr; } }
.eb-split h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .06em; color: var(--eb-muted); }
.eb-split .eb-grid { margin-top: 0; }

/* Sello */
.eb-seal { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.eb-seal img { width: 190px; }

/* Metodología */
.eb-steps { list-style: none; margin: 1.5em auto 0; padding: 0; counter-reset: s; display: grid; gap: 0; }
.eb-steps li { counter-increment: s; display: grid; grid-template-columns: 56px 220px 1fr; gap: 18px; align-items: start; padding: 22px 0; border-top: 1px solid var(--eb-line); }
.eb-steps li:last-child { border-bottom: 1px solid var(--eb-line); }
.eb-steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--eb-green); color: #fff; font-weight: 800; display: grid; place-items: center; }
.eb-steps strong { color: var(--eb-dark); font-size: 1.05rem; padding-top: 9px; }
.eb-steps span { padding-top: 9px; }
@media (max-width: 760px) { .eb-steps li { grid-template-columns: 44px 1fr; } .eb-steps span { grid-column: 2; padding-top: 0; } }

/* CTA */
.eb-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.eb-cta h2 { margin-bottom: .3em; }
.eb-cta p { margin: 0; max-width: 62ch; }
.eb-section--dark .eb-btn--ghost { color: #fff; border-color: #fff; }

/* Badges */
.eb-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2em; }
.eb-badges span { font-size: .82rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--eb-line); color: var(--eb-dark); }
.eb-section--dark .eb-badges span { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }

/* Héroe de producto con vídeo */
.eb-hero-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .eb-hero-split { grid-template-columns: 1fr; } }

/* Vídeo YouTube diferido */
.eb-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--eb-radius); overflow: hidden; background: #000; box-shadow: var(--eb-shadow); }
.eb-video img, .eb-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.eb-video button { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.eb-video button::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,.55)); }
.eb-video__play { position: absolute; left: 50%; top: 50%; width: 76px; height: 54px; transform: translate(-50%, -50%); border-radius: 14px; background: rgba(20, 79, 89, .92); display: grid; place-items: center; transition: background .15s, transform .15s; }
.eb-video button:hover .eb-video__play { background: var(--eb-green); transform: translate(-50%, -50%) scale(1.06); }
.eb-video__play::after { content: ""; border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.eb-video__cap { position: absolute; left: 16px; right: 16px; bottom: 12px; color: #fff; font-weight: 700; font-size: .92rem; text-align: left; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* Documentación */
.eb-docs details { background: #fff; border: 1px solid var(--eb-line); border-radius: var(--eb-radius); margin-bottom: 14px; box-shadow: var(--eb-shadow); }
.eb-docs summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--eb-dark); }
.eb-docs summary::-webkit-details-marker { display: none; }
.eb-docs summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.eb-docs details[open] summary::after { transform: rotate(-135deg); }
.eb-docs summary small { font-weight: 600; color: var(--eb-muted); }
.eb-docs ol { list-style: none; margin: 0; padding: 0 12px 12px; counter-reset: d; }
.eb-docs li { border-top: 1px solid var(--eb-line); }
.eb-doc { display: flex; align-items: center; gap: 14px; padding: 13px 10px; text-decoration: none; color: var(--eb-ink); border-radius: 8px; }
a.eb-doc:hover { background: var(--eb-soft); color: var(--eb-dark); }
.eb-doc__ico { flex: 0 0 34px; height: 40px; border-radius: 5px; background: #fdecec; color: #c62828; font-size: .62rem; font-weight: 800; display: grid; place-items: center; }
.eb-doc__t { flex: 1 1 auto; font-weight: 600; line-height: 1.35; }
.eb-doc__t small { display: block; font-weight: 500; color: var(--eb-muted); font-size: .82rem; }
.eb-doc__dl { color: var(--eb-green-d); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.eb-doc img { width: 92px; height: auto; }

/* FAQ */
.eb-faq__tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.2em 0 1.4em; border-bottom: 1px solid var(--eb-line); }
.eb-faq__tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; font: inherit; font-weight: 700; font-size: .95rem; color: var(--eb-muted); cursor: pointer; margin-bottom: -1px; }
.eb-faq__tab:hover { color: var(--eb-dark); }
.eb-faq__tab[aria-selected="true"] { color: var(--eb-dark); border-bottom-color: var(--eb-green); }
.eb-faq__tab span { display: inline-block; min-width: 22px; padding: 1px 6px; margin-left: 6px; border-radius: 999px; background: var(--eb-soft); font-size: .78rem; }
.eb-faq__panel h3 { font-size: 1.05rem; color: var(--eb-muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 1em; }
.js .eb-faq__panel h3 { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.js .eb-faq__panel[hidden] { display: none; }
.eb-faq details { border: 1px solid var(--eb-line); border-radius: var(--eb-radius); background: #fff; margin-bottom: 10px; }
.eb-faq details[open] { border-color: rgba(2, 175, 141, .45); box-shadow: var(--eb-shadow); }
.eb-faq summary { list-style: none; cursor: pointer; padding: 17px 52px 17px 20px; position: relative; font-weight: 700; color: var(--eb-ink); }
.eb-faq summary::-webkit-details-marker { display: none; }
.eb-faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; background: var(--eb-soft); color: var(--eb-dark); display: grid; place-items: center; font-weight: 700; }
.eb-faq details[open] summary::after { content: "–"; background: var(--eb-green); color: #fff; }
.eb-faq__a { padding: 0 20px 18px; }
.eb-faq__a p:last-child { margin-bottom: 0; }
.eb-faq__a ul { margin: 0 0 1em; padding-left: 1.2em; }

/* Testimonios */
.eb-quote { margin: 0; background: #fff; border: 1px solid var(--eb-line); border-radius: var(--eb-radius); padding: 26px; box-shadow: var(--eb-shadow); display: flex; flex-direction: column; height: 100%; }
.eb-quote blockquote { margin: 0 0 18px; font-size: 1.02rem; color: var(--eb-ink); position: relative; padding-top: 26px; }
.eb-quote blockquote::before { content: "\201C"; position: absolute; top: -14px; left: -4px; font-size: 4rem; line-height: 1; color: var(--eb-green); font-family: Georgia, serif; }
.eb-quote figcaption { margin-top: auto; font-weight: 700; color: var(--eb-dark); }
.eb-quote figcaption span { display: block; font-weight: 500; color: var(--eb-muted); font-size: .88rem; }
.eb-countries { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.2em; }
.eb-countries span { font-size: .85rem; padding: 4px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--eb-line); }

/* Contacto */
.eb-contact { display: grid; grid-template-columns: 1.25fr .75fr; gap: 36px; align-items: start; }
@media (max-width: 960px) { .eb-contact { grid-template-columns: 1fr; } }
.eb-aside { display: grid; gap: 18px; }
.eb-aside .eb-card h2 { font-size: 1.2rem; }
.eb-dl { margin: 0; display: grid; gap: 10px; }
.eb-dl dt { font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--eb-muted); }
.eb-dl dd { margin: 0 0 6px; color: var(--eb-ink); }
.eb-partner { padding: 12px 0; border-top: 1px solid var(--eb-line); }
.eb-partner:first-of-type { border-top: 0; padding-top: 0; }
.eb-partner b { display: block; color: var(--eb-dark); }
.eb-partner small { font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--eb-green-d); }

/* Formulario */
.eb-form { background: #fff; border: 1px solid var(--eb-line); border-radius: var(--eb-radius); padding: clamp(22px, 3vw, 34px); box-shadow: var(--eb-shadow); }
.eb-form h2 { font-size: 1.45rem; }
.eb-field { margin-bottom: 18px; }
.eb-field label, .eb-field legend { display: block; font-weight: 700; color: var(--eb-ink); margin-bottom: 6px; font-size: .95rem; }
.eb-field .req { color: #c62828; }
.eb-field input[type=text], .eb-field input[type=email], .eb-field select, .eb-field textarea {
	width: 100%; font: inherit; font-size: 1rem; color: var(--eb-ink); background: #fff;
	border: 1px solid #b9c9cb; border-radius: 8px; padding: 12px 14px;
}
.eb-field textarea { min-height: 150px; resize: vertical; }
.eb-field input:focus, .eb-field select:focus, .eb-field textarea:focus { border-color: var(--eb-green); outline: 3px solid rgba(2, 175, 141, .2); outline-offset: 0; }
.eb-field .hint { font-size: .85rem; color: var(--eb-muted); margin-top: 6px; }
.eb-field.has-error input, .eb-field.has-error select, .eb-field.has-error textarea { border-color: #c62828; }
.eb-field .err { color: #c62828; font-size: .85rem; margin-top: 6px; font-weight: 600; }
.eb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .eb-row { grid-template-columns: 1fr; } }
.eb-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.eb-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--eb-green); }
.eb-hp { position: absolute !important; left: -9999px !important; }
.eb-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-weight: 600; }
.eb-alert--ok { background: #e6f7f2; color: #0b5d4b; border: 1px solid #a7e2d3; }
.eb-alert--err { background: #fdecec; color: #8e1c1c; border: 1px solid #f3b5b5; }
.eb-form__legal { font-size: .8rem; color: var(--eb-muted); margin-top: 14px; }

/* ---------- Pie ---------- */
.eb-footer { background: var(--eb-soft); border-top: 1px solid var(--eb-line); margin-top: 0; font-size: .95rem; }
.eb-footer__in { display: grid; grid-template-columns: 1.3fr 1fr .9fr; gap: 40px; padding: 56px 24px 40px; }
@media (max-width: 900px) { .eb-footer__in { grid-template-columns: 1fr; gap: 28px; } }
.eb-footer h2 { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--eb-muted); margin-bottom: 1em; }
.eb-footer .eb-logo img { width: 220px; margin-bottom: 14px; }
.eb-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.eb-footer a { color: var(--eb-dark); }
.eb-footer__seal img { width: 170px; margin-top: 14px; }
.eb-bottom { background: var(--eb-dark); color: #c6dcdc; font-size: .85rem; }
.eb-bottom__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 24px; }
.eb-bottom a { color: #fff; text-decoration: none; }
.eb-bottom a:hover { text-decoration: underline; }
.eb-bottom nav { display: flex; gap: 18px; }

/* Páginas legales / genéricas */
.eb-page-title { padding: clamp(36px, 5vw, 60px) 0 10px; }
.eb-prose { max-width: 820px !important; padding-bottom: 60px; }
.eb-prose h2 { font-size: 1.35rem; margin-top: 1.6em; }

/* ---------- Responsive cabecera ---------- */
@media (max-width: 1080px) {
	.eb-logo img { width: 190px; }
	.eb-nav a { padding: 10px 10px; }
	.eb-tools .eb-btn { display: none; }
}
@media (max-width: 900px) {
	.eb-toggle { display: inline-flex; }
	.eb-header__in { flex-wrap: wrap; gap: 12px; min-height: 66px; }
	.eb-logo { margin-right: auto; }
	.eb-nav { order: 10; flex-basis: 100%; display: none; padding-bottom: 14px; }
	.eb-nav.is-open { display: block; }
	.eb-nav ul { flex-direction: column; }
	.eb-nav .current-menu-item > a { box-shadow: inset 3px 0 0 var(--eb-green); border-radius: 0 8px 8px 0; }
	.eb-tools .eb-btn { display: inline-flex; }
	.eb-nav .eb-nav__extra { display: block; margin-top: 10px; }
}
.eb-nav__extra { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
