/* Harel Base: shared CSS for the three Harel-group sites.
   Rules: logical properties only (works in RTL and LTR), colors only from theme.json presets,
   one radius (--wp--custom--radius), no borders around cards, tap targets >= 48px. */

:root {
	--h-radius: var(--wp--custom--radius, 6px);
	--h-tap: var(--wp--custom--tap, 48px);
	--h-wide: var(--wp--style--global--wide-size, 1200px);
	--h-gutter: clamp(16px, 4vw, 24px);
	--h-section: var(--wp--custom--section--mobile, 56px);
	/* the group bar + the header above the first section (44 + 76; 44 + 100 from 1024px; 44 + 84 on a short laptop
	   screen). sections.css fits the whole first section into the screen height left under them. */
	--h-chrome: 120px;
	--c-brand: var(--wp--preset--color--brand);
	--c-ink: var(--wp--preset--color--ink);
	--c-text: var(--wp--preset--color--text);
	--c-muted: var(--wp--preset--color--muted);
	--c-line: var(--wp--preset--color--line);
	--c-paper: var(--wp--preset--color--paper);
	--c-tint: var(--wp--preset--color--tint);
	--c-link: var(--wp--preset--color--link);
	--c-focus: var(--wp--preset--color--focus);
	--c-cta: var(--wp--preset--color--cta-bg);
	--c-cta-fg: var(--wp--preset--color--cta-fg);
	--c-cta-hover: var(--wp--preset--color--cta-hover);
	--c-btn: var(--wp--preset--color--brand-btn);
	--c-btn-hover: var(--wp--preset--color--brand-btn-hover);
	--c-hero: var(--wp--preset--color--hero-bg);
	--c-band: var(--wp--preset--color--band);
	--c-accent-dark: var(--wp--preset--color--accent-on-dark);
	--c-icon: var(--wp--preset--color--icon);
	--c-group: var(--wp--preset--color--group);
	--c-error: var(--wp--preset--color--error);
	--c-success: var(--wp--preset--color--success);
	--h-ease: cubic-bezier(.2, .8, .2, 1);
}
@media (min-width: 1024px) {
	:root { --h-section: var(--wp--custom--section--desktop, 96px); }
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-wrap: break-word; }
img, svg, video { max-inline-size: 100%; block-size: auto; }
:lang(he) { letter-spacing: 0; }
p, li { max-inline-size: 70ch; }
.h-num, .h-mono, code { font-family: var(--wp--preset--font-family--mono); }
/* phone numbers and prices keep their order inside RTL text */
.h-ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; white-space: nowrap; } /* and never split at a hyphen */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--c-focus);
	outline-offset: 2px;
	border-radius: 2px;
}
/* on a dark or brand-coloured surface the brand focus colour would vanish: white there */
:is(.h-on-dark, .h-band, .h-price__cta) :where(a, button, summary, input):focus-visible { outline-color: #fff; }
a, button, summary, input, select, textarea, label { touch-action: manipulation; }

.skip-link.screen-reader-text:focus { inset-inline-start: 8px; inset-block-start: 8px; z-index: 100000; }

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

.h-container { inline-size: min(100% - 2 * var(--h-gutter), var(--h-wide)); margin-inline: auto; }
/* WordPress puts its 24px block gap between the template parts and between our section blocks;
   the sections carry their own rhythm, and the gap showed as a stripe of page colour between them. */
.wp-site-blocks > *,
.wp-block-post-content > :is(.h-hero2, .h-band2, .h-sec, .h-section, .h-container) { margin-block-start: 0; }
.h-visually-hidden { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.h-main { padding-block-end: var(--h-section); }
/* a page that ends with a full section (the contact band, the form) already has its own bottom space */
.h-main:has(> .wp-block-post-content > :is(.h-section, .h-sec):last-child, > :is(.h-section, .h-sec):last-child) { padding-block-end: 0; }

/* ---------- buttons ---------- */
.h-btn, .wp-element-button, .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	box-sizing: border-box; min-block-size: var(--h-tap); padding-block: 12px; padding-inline: 24px;
	border: 0; border-radius: var(--h-radius); cursor: pointer;
	font: 600 var(--wp--preset--font-size--body)/1.2 var(--wp--preset--font-family--plex);
	text-decoration: none; transition: background-color 160ms var(--h-ease), color 160ms var(--h-ease), box-shadow 200ms var(--h-ease), transform 160ms var(--h-ease);
}
.h-btn:active, .wp-element-button:active, .wp-block-button__link:active { transform: scale(.97); }
.h-btn--cta { background: var(--c-cta); color: var(--c-cta-fg); }
.h-btn--cta:hover { background: var(--c-cta-hover); color: var(--c-cta-fg); }
.h-btn--brand { background: var(--c-btn); color: #fff; }
.h-btn--brand:hover { background: var(--c-btn-hover); color: #fff; }
.h-btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.h-btn--ghost:hover { background: rgba(255, 255, 255, .08); }
.h-btn svg { inline-size: 20px; block-size: 20px; flex: none; }

/* ---------- group bar (identical on all three sites) ---------- */
.h-groupbar { background: var(--c-group); color: #fff; font-size: 15px; line-height: 1.4; }
.h-groupbar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-block-size: 44px; }
.h-groupbar a { color: #fff; text-decoration: none; }
.h-groupbar a:hover { text-decoration: underline; text-underline-offset: 6px; }
.h-groupbar__home { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; min-block-size: 44px; }
.h-groupbar__home svg { inline-size: 22px; block-size: 22px; }
/* on the group's own site the group link is the current one: the same underline the current company gets */
.h-groupbar__home[aria-current] span { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.h-groupbar__list { display: none; list-style: none; margin: 0; padding: 0; align-items: center; }
.h-groupbar__list li { display: flex; align-items: center; }
/* dots between the companies, like one line with a stop each */
.h-groupbar__list li + li::before { content: ""; inline-size: 4px; block-size: 4px; border-radius: 50%; background: currentColor; opacity: .55; margin-inline: 4px; }
.h-groupbar__list a { display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: 10px; opacity: .8; transition: opacity 160ms var(--h-ease); }
.h-groupbar__list a:hover { opacity: 1; }
.h-groupbar__list a[aria-current] { opacity: 1; font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 7px; }
.h-groupbar__more summary { display: inline-flex; align-items: center; gap: 6px; min-block-size: 44px; cursor: pointer; list-style: none; white-space: nowrap; }
.h-groupbar__more summary svg { inline-size: 16px; block-size: 16px; }
.h-groupbar__more summary::-webkit-details-marker { display: none; }
.h-groupbar__more[open] .h-groupbar__drop { display: grid; }
.h-groupbar__drop { display: none; position: absolute; inset-inline: 0; z-index: 60; background: var(--c-group); padding: 8px var(--h-gutter) 16px; gap: 4px; }
.h-groupbar__drop a { min-block-size: var(--h-tap); display: flex; align-items: center; }
.h-groupbar__drop a[aria-current] { font-weight: 600; }
@media (min-width: 768px) {
	.h-groupbar__list { display: flex; }
	.h-groupbar__more { display: none; }
}
/* the group's name is one line; on the narrowest phones (320px) it fits beside "the group's companies" with tighter gaps */
.h-groupbar__home span { white-space: nowrap; }
@media (max-width: 380px) {
	.h-groupbar__in { gap: 8px; }
	.h-groupbar__home { gap: 6px; }
}

/* ---------- header ---------- */
/* the header sits on the page colour, so header and hero read as one canvas */
.h-header { background: transparent; position: relative; z-index: 50; }
.h-header__in { display: flex; align-items: center; gap: 16px; min-block-size: 76px; }
.h-header__logo { display: inline-flex; flex: none; }
.h-header__logo img { block-size: 48px; inline-size: auto; min-inline-size: 140px; object-fit: contain; }
.h-nav { order: 3; } /* phones: the menu button sits at the far end */
.h-nav-desk { display: none; } /* phones use the <details> menu; desktop shows this one (min-width 1024px) */
.h-header__tools { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
.h-header__phone { display: none; align-items: center; min-block-size: 44px; color: var(--c-ink); font-weight: 600; text-decoration: none; }
.h-header__client, .h-lang a { display: inline-flex; align-items: center; min-block-size: 44px; color: var(--c-ink); font-size: 15px; text-decoration: none; }
.h-header__client:hover, .h-lang a:hover { text-decoration: underline; }
.h-lang { display: inline-flex; align-items: center; min-block-size: var(--h-tap); }
.h-lang a { min-inline-size: 44px; justify-content: center; } /* "עברית" is short: still a finger's width */
/* a narrow phone: the header row keeps the logo and the menu button; the client login and the language switch move
   into the phone menu (layout-blocks.php, .h-nav__extra), so the row never runs past the screen */
.h-nav__extra { display: none; align-items: center; min-block-size: 48px; font-size: 17px; color: var(--c-ink); }
@media (max-width: 599px) {
	.h-header__tools .h-header__client, .h-header__tools .h-lang { display: none; }
	.h-nav__extra { display: flex; }
}
.h-header__cta { display: none; }
/* the shop (a site with a catalog, shop.php): a button in the header on a desktop, the first link of the phone menu */
.h-header__shop { display: none; }
.h-nav__shop { display: flex; align-items: center; gap: 10px; min-block-size: 52px; margin-block-start: 8px; font-weight: 600; }
.h-header__shop svg, .h-nav__shop svg { inline-size: 20px; block-size: 20px; flex: none; }
/* the narrowest phones: logo, client link and menu button on one row */
@media (max-width: 380px) {
	.h-header__in { gap: 8px; }
	.h-header__logo { min-block-size: 44px; align-items: center; }
	.h-header__logo img { block-size: 36px; min-inline-size: 0; }
	.h-header__client { font-size: 14px; white-space: nowrap; }
}

.h-nav > summary { display: inline-flex; align-items: center; justify-content: center; inline-size: var(--h-tap); block-size: var(--h-tap); cursor: pointer; list-style: none; border-radius: var(--h-radius); color: var(--c-ink); }
.h-nav > summary::-webkit-details-marker { display: none; }
.h-nav > summary svg { inline-size: 26px; block-size: 26px; }
.h-nav__panel { display: none; }
.h-nav[open] .h-nav__panel { display: block; position: absolute; inset-inline: 0; inset-block-start: 100%; background: #fff; padding: 8px var(--h-gutter) 24px; box-shadow: var(--wp--custom--shadow-float); }
.h-menu { list-style: none; margin: 0; padding: 0; }
.h-menu a { display: flex; align-items: center; min-block-size: var(--h-tap); color: var(--c-ink); font-weight: 500; text-decoration: none; }
.h-menu a:hover, .h-menu .current-menu-item > a, .h-menu .current-menu-ancestor > a { color: var(--c-link); }
.h-menu .sub-menu { list-style: none; padding-inline-start: 16px; margin: 0; }
.h-nav__panel .h-btn { inline-size: 100%; margin-block-start: 12px; }
/* phone menu: the current page (and its parent) in the link colour, bold, with the brand's mark before it
   (a short bar here; each brand.css reshapes it like its desktop marker) */
.h-nav__panel .h-menu :is(.current-menu-item, .current-menu-ancestor) > a { color: var(--c-link); font-weight: 700; }
.h-nav__panel .h-menu :is(.current-menu-item, .current-menu-ancestor) > a::before { content: ""; flex: none; inline-size: 4px; block-size: 20px; border-radius: 4px; background: var(--c-accent, var(--c-link)); margin-inline-end: 10px; }

@media (min-width: 1024px) {
	:root { --h-chrome: 144px; }
	.h-header__in { min-block-size: 100px; gap: 28px; }
	.h-header__logo img { block-size: 58px; }
	/* desktop: the plain <nav> menu; the phone <details> menu is not displayed at all */
	.h-nav { display: none; }
	.h-nav-desk { display: block; }
	.h-nav-desk .h-menu { display: flex; gap: 6px; }
	.h-nav-desk .h-menu > li { position: relative; }
	.h-nav-desk .h-menu > li > a { position: relative; padding-inline: 16px; font-size: 19px; font-weight: 500; }
	/* the current/hovered item gets the brand's mark under it (a line by default; each brand.css can reshape it) */
	.h-nav-desk .h-menu > li > a::after { content: ""; position: absolute; inset-inline: 16px; inset-block-end: 6px; block-size: 3px; border-radius: 3px; background: var(--c-accent, var(--c-link)); transform: scaleX(0); transition: transform 220ms var(--h-ease); }
	.h-nav-desk .h-menu > li > a:hover::after, .h-nav-desk .h-menu > .current-menu-item > a::after, .h-nav-desk .h-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }
	.h-header__cta { min-block-size: 52px; padding-inline: 26px; font-size: 17px; }
	/* dropdowns: on hover and on keyboard focus inside the item */
	.h-nav-desk .h-menu .sub-menu { display: none; position: absolute; inset-inline-start: 0; inset-block-start: 100%; min-inline-size: 240px; background: #fff; padding: 8px; border-radius: var(--h-radius); box-shadow: var(--wp--custom--shadow-float); }
	.h-nav-desk .h-menu li:hover > .sub-menu, .h-nav-desk .h-menu li:focus-within > .sub-menu { display: block; }
	.h-nav-desk .h-menu .sub-menu a { padding-inline: 12px; border-radius: var(--h-radius); }
	.h-nav-desk .h-menu .sub-menu a:hover { background: var(--c-tint); }
	.h-header__phone { display: inline-flex; }
	.h-header__cta { display: inline-flex; }
	.h-header__shop { display: inline-flex; align-items: center; gap: 8px; min-block-size: 52px; padding-inline: 20px; font-size: 17px; white-space: nowrap; }
	/* a header item never breaks over two lines */
	.h-nav-desk .h-menu > li > a, .h-header__phone, .h-header__client, .h-header__cta { white-space: nowrap; }
}
/* a short laptop screen (1366x768, 1920x1080 at 125%): a lower header, so the first section has room */
@media (min-width: 1024px) and (max-height: 760px) {
	:root { --h-chrome: 128px; }
	.h-header__in { min-block-size: 84px; }
	.h-header__logo img { block-size: 52px; }
}
/* small desktops: a tighter menu */
@media (min-width: 1024px) and (max-width: 1199px) {
	.h-header__in { gap: 20px; }
	.h-nav-desk .h-menu { gap: 2px; }
	.h-nav-desk .h-menu > li > a { padding-inline: 11px; font-size: 17px; }
}

/* ---------- page head / breadcrumbs ---------- */
.h-pagehead { padding-block: 40px 24px; }
.h-crumbs { font-size: var(--wp--preset--font-size--small); color: var(--c-muted); margin-block-end: 8px; }
.h-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.h-crumbs li + li::before { content: "/"; margin-inline-end: 6px; color: var(--c-line); }
.h-crumbs a { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; min-inline-size: 44px; color: var(--c-muted); } /* a finger's target */
.h-meta { color: var(--c-muted); font-size: var(--wp--preset--font-size--small); }

/* ---------- the old sites' articles and Koriz's projects, back at their addresses (1.12) ---------- */
.h-post-more { margin-block-start: 32px; padding: 16px 20px; background: var(--c-tint); border-radius: var(--h-card-radius, var(--h-radius)); }
.h-post-more a { font-weight: 600; }
.h-post-back { margin-block-start: 12px; }
.h-prjcard p { margin: 0; }
.h-prjcard .h-prjcard__tags { margin-block-start: auto; padding-block-start: 8px; color: var(--c-muted); }

/* ---------- sections and cards (patterns) ---------- */
.h-section { padding-block: var(--h-section); }
.h-section--tint { background: var(--c-tint); }
.h-section--paper { background: var(--c-paper); }
.h-section--dark { background: var(--c-hero); color: #fff; }
.h-section--dark :where(h1, h2, h3, h4) { color: #fff; }
.h-section--dark a:not(.h-btn) { color: #fff; }
.h-eyebrow { font-size: var(--wp--preset--font-size--label); font-weight: 500; color: var(--c-muted); margin: 0 0 8px; }
.h-section--dark .h-eyebrow { color: var(--c-accent-dark); }
.h-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.6; }

.h-card { background: var(--c-tint); border-radius: var(--h-radius); padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.h-section--tint .h-card { background: #fff; }
.h-card__icon { inline-size: 48px; block-size: 48px; color: var(--c-icon); }
.h-card__title { font-size: var(--wp--preset--font-size--h-3); margin: 0; }
.h-card__title a { color: var(--c-ink); text-decoration: none; }
.h-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.h-card:has(.h-card__title a) { position: relative; }
.h-card:has(.h-card__title a):hover { box-shadow: var(--wp--custom--shadow-float); }
.h-card .wp-block-post-featured-image img { border-radius: var(--h-radius); }
.h-card--group { background: #fff; }
.h-card--group .h-eyebrow { color: var(--c-group); }

/* ---------- the group companies, each in its own colour and mark ----------
   Wherever a sister company appears (group cards, group links, the group page's company list), it speaks in its
   own brand: the colours below are each company's tokens (brand/<company>/tokens.css), the mark echoes its logo
   (Koriz: a sensor dot; K-Telecom: a data line with a teal dot; Harel: the tilted square).
   "html" in front: these must speak over the current site's own icon rules in brand.css. */
[data-company="harel-tech"] { --co: #1868B0; --co-mark: #1C81F5; }
[data-company="koriz"] { --co: #273673; --co-mark: #EB9C3B; }
[data-company="k-telecom"] { --co: #2F7A16; --co-mark: #00A79E; }
[data-company="sedcom"] { --co: #2467D6; --co-mark: #5FA5E6; }
html [data-company] .h-co-ico { position: relative; display: inline-grid; place-items: center; flex: none; justify-self: start; inline-size: 56px; block-size: 56px; border-radius: 12px; background: var(--co); color: #fff; rotate: 0deg; box-shadow: none; }
html [data-company] .h-co-ico svg { inline-size: 28px; block-size: 28px; color: #fff; rotate: 0deg; }
html [data-company] .h-co-ico::before, html [data-company] .h-co-ico::after { content: none; inset: auto; }
html [data-company="koriz"] .h-co-ico { border-radius: 10px; }
html [data-company="koriz"] .h-co-ico::after { content: ""; position: absolute; inset-block-start: -6px; inset-inline-end: -6px; inline-size: 16px; block-size: 16px; border-radius: 50%; background: var(--co-mark); box-shadow: 0 0 0 3px #fff; }
html [data-company="k-telecom"] .h-co-ico { border-radius: 18px; }
/* in a card (room beside the icon): a data line and a teal dot flowing into it, like the rows into the K */
html :is(.h-card--group, .h-inc)[data-company="k-telecom"] .h-co-ico::before,
html :is(.h-card--group, .h-inc)[data-company="k-telecom"] .h-co-ico::after { content: ""; position: absolute; inset-block-start: 50%; translate: 0 -50%; block-size: 8px; border-radius: 8px; }
html :is(.h-card--group, .h-inc)[data-company="k-telecom"] .h-co-ico::after { inset-inline-start: calc(100% + 8px); inline-size: 30px; background: #58AD2B; }
html :is(.h-card--group, .h-inc)[data-company="k-telecom"] .h-co-ico::before { inset-inline-start: calc(100% + 46px); inline-size: 8px; background: var(--co-mark); }
html [data-company="harel-tech"] .h-co-ico { border-radius: 15px; rotate: -8deg; background: var(--co-mark); box-shadow: 0 10px 20px -10px rgba(28, 129, 245, .7); }
html [data-company="harel-tech"] .h-co-ico svg { rotate: 8deg; }

.h-grid.h-groupcards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.h-card--group { position: relative; gap: 10px; padding: 28px; border-radius: var(--h-card-radius, var(--h-radius)); transition: transform .25s var(--h-ease), box-shadow .25s var(--h-ease); }
.h-card--group .h-card__icon { margin-block-end: 8px; }
.h-card--group .h-eyebrow { font-size: 15px; font-weight: 600; color: var(--c-muted); }
.h-card--group .h-card__title a { color: var(--co, var(--c-ink)); }
.h-card--group p { margin: 0; color: var(--c-text); }
.h-card__go { margin-block-start: auto; padding-block-start: 8px; font-weight: 600; color: var(--co, var(--c-link)); }
.h-card--group:hover, .h-card--group:has(a:focus-visible) { transform: translateY(-3px); box-shadow: 0 18px 36px -22px rgba(15, 23, 42, .45); }
/* the group section: on the brand's tint, the heading like every section title */
.h-section--paper:has(.h-groupcards) { background: var(--c-tint); }
.h-section > .wp-block-heading { font-size: var(--wp--preset--font-size--h-2); line-height: 1.12; margin-block: 0 28px; text-wrap: balance; color: var(--c-ink); }

.h-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }

/* hexagon line pattern: background only, in the company color, never a frame */
.h-hexbg { position: relative; isolation: isolate; overflow: hidden; }
.h-hexbg::before {
	content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09; pointer-events: none;
	background-color: currentColor;
	-webkit-mask: url("../img/hex-pattern.svg") repeat center / 120px auto;
	mask: url("../img/hex-pattern.svg") repeat center / 120px auto;
}

/* ---------- contact band ---------- */
.h-band { background: var(--c-band); color: #fff; border-radius: var(--h-radius); padding: 32px 24px; display: grid; gap: 16px; }
.h-band h2 { color: #fff; margin: 0; }
.h-band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.h-band .h-btn--cta { background: #fff; color: var(--c-ink); }
.h-band .h-btn--cta:hover { background: var(--c-tint); }
.h-band p { margin: 8px 0 0; color: rgba(255, 255, 255, .9); }
/* phones: the actions stack full width, like the hero's */
@media (max-width: 767px) {
	.h-band__actions { flex-direction: column; }
	.h-band__actions .h-btn { inline-size: 100%; min-block-size: 52px; }
}
@media (min-width: 768px) {
	.h-band { grid-template-columns: 1fr auto; align-items: center; padding: 40px 48px; }
}

/* ---------- footer ---------- */
.h-footer { background: var(--c-hero); color: #fff; font-size: 16px; } /* running text: 16px at least (the English lines are longer) */
.h-footer a { color: #fff; }
.h-footer__main { display: grid; gap: 32px; padding-block: 56px 40px; }
.h-footer__logo img { block-size: 52px; inline-size: auto; }
.h-footer h2 { color: #fff; font-size: 16px; margin: 0 0 12px; }
/* footer links are tap targets: 44px tall, 8px apart (a finger never lands between two) */
.h-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.h-footer ul a { display: inline-flex; align-items: center; min-block-size: 44px; text-decoration: none; }
.h-footer ul a:hover { text-decoration: underline; }
.h-footer address { font-style: normal; display: grid; gap: 4px; }
.h-footer address a { display: inline-flex; align-items: center; justify-self: start; min-block-size: 44px; }
.h-footer address a + a { margin-block-start: 4px; }
.h-footer__bottom { border-block-start: 1px solid rgba(255, 255, 255, .15); padding-block: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: rgba(255, 255, 255, .8); }
@media (min-width: 768px) { .h-footer__main { grid-template-columns: 1.4fr 1fr 1fr; } }

.h-groupfoot { background: var(--c-group); color: #fff; }
.h-groupfoot__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 20px; }
.h-groupfoot__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.h-groupfoot__brand svg { inline-size: 32px; block-size: 32px; }
.h-groupfoot__tag { color: rgba(255, 255, 255, .8); }
.h-groupfoot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; margin-inline-start: auto; }
.h-groupfoot a { color: #fff; display: inline-flex; min-block-size: 44px; align-items: center; }

/* ---------- quick contact: bottom bar on phones, floating WhatsApp on desktop ---------- */
.h-quick { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 70; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: #fff; box-shadow: 0 -2px 12px rgba(15, 23, 42, .12); padding-block-end: env(safe-area-inset-bottom); }
.h-quick a { display: flex; align-items: center; justify-content: center; gap: 8px; min-block-size: 56px; padding-inline: 8px; font-weight: 600; text-decoration: none; color: var(--c-ink); white-space: nowrap; }
.h-quick a + a { border-inline-start: 1px solid var(--c-line); }
.h-quick svg { inline-size: 22px; block-size: 22px; }
/* phones: room for the bar under the last content. The group footer (always last) grows under the bar,
   so the page ends in its colour instead of a stripe of page background. */
body.has-quick { padding-block-end: calc(56px + env(safe-area-inset-bottom)); }
body.has-quick:has(.h-groupfoot) { padding-block-end: 0; }
body.has-quick .h-groupfoot { padding-block-end: calc(56px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
	body.has-quick .h-groupfoot { padding-block-end: 0; }
	body.has-quick { padding-block-end: 0; }
	.h-quick { inset-inline: auto 24px; inset-block-end: 24px; grid-template-columns: auto; background: transparent; box-shadow: none; transition: opacity .25s var(--h-ease), transform .25s var(--h-ease), visibility .25s; }
	.h-quick__call { display: none !important; }
	.h-quick--nowa { display: none; }
	.h-quick__wa { box-sizing: border-box; inline-size: 56px; block-size: 56px; padding: 0; border-radius: 50%; background: #1E7B34; color: #fff !important; box-shadow: var(--wp--custom--shadow-float); }
	.h-quick__wa:hover { background: #17632A; }
	.h-quick__wa span { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
	/* while the hero is on screen the bubble steps aside (layout-blocks.php): the hero has its own WhatsApp button */
	.h-quick.is-tucked { opacity: 0; visibility: hidden; transform: translateY(16px); }
	/* at the page's foot the bubble (24px + 56px from the edge) sits over the group footer's last company link where the
	   page margin is narrower than it (below 1392px): that end of the footer keeps 96px clear of the edge. Wider screens'
	   margin already does, so their footer is unchanged. */
	.h-groupfoot { container-type: inline-size; }
	body:has(.h-quick:not(.h-quick--nowa)) .h-groupfoot__in { box-sizing: border-box; padding-inline-end: max(0px, 96px - max(var(--h-gutter), (100cqi - var(--h-wide)) / 2)); }
}

/* ---------- forms ---------- */
.h-form { display: grid; gap: 20px; }
.h-field { display: grid; gap: 6px; }
.h-field label { font-weight: 500; color: var(--c-ink); }
.h-field input, .h-field select, .h-field textarea {
	box-sizing: border-box; inline-size: 100%; min-block-size: var(--h-tap); padding: 10px 12px; font: inherit; color: var(--c-text);
	background: var(--c-paper); border: 0; border-block-end: 2px solid var(--c-line); border-radius: var(--h-radius) var(--h-radius) 0 0;
}
.h-field input:focus, .h-field select:focus, .h-field textarea:focus { border-block-end-color: var(--c-link); outline: none; box-shadow: 0 2px 0 0 var(--c-link); }
.h-field [aria-invalid="true"] { border-block-end-color: var(--c-error); }
.h-field__error { color: var(--c-error); font-size: var(--wp--preset--font-size--small); }
/* phones: the error sits between the label and its field. When a phone scrolls a focused field into view it stops at
   the keyboard's top edge, so an error under the field falls behind the keyboard; above it, the error shows whenever
   the field does. Visual order only: the field still names its error (aria-describedby). */
@media (max-width: 767px) {
	.h-field > label { order: -2; }
	.h-field__error { order: -1; }
}
.h-field__hint { color: var(--c-muted); font-size: 16px; }
.h-hp { position: absolute !important; inset-inline-start: -10000px; inline-size: 1px; block-size: 1px; overflow: hidden; }
.h-form__notice { padding: 16px; border-radius: var(--h-radius); background: var(--c-tint); }
.h-form__notice--error { background: #FDECEA; color: var(--c-error); }

/* ---------- pattern details ---------- */
.h-hero { padding-block: clamp(56px, 9vw, 112px); }
.h-hero .h-hero__title { font-size: var(--wp--preset--font-size--display); line-height: 1.1; font-weight: 700; max-inline-size: 18ch; }
.h-hero .h-lead { max-inline-size: 52ch; color: rgba(255, 255, 255, .88); }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: var(--c-ink); box-shadow: inset 0 0 0 2px currentColor; }
.h-section--dark .wp-block-button.is-style-ghost .wp-block-button__link, .h-band .wp-block-button.is-style-ghost .wp-block-button__link { color: #fff; }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: rgba(127, 127, 127, .12); }
.h-steps { list-style: none; counter-reset: step; display: grid; gap: 16px; padding: 0; margin: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.h-steps > li { counter-increment: step; background: #fff; border-radius: var(--h-radius); padding: 24px; max-inline-size: none; }
.h-steps > li::before { content: counter(step); display: grid; place-items: center; inline-size: 40px; block-size: 40px; border-radius: 50%; background: var(--c-brand); color: #fff; font-weight: 700; margin-block-end: 12px; font-family: var(--wp--preset--font-family--mono); }
.h-steps > li strong { display: block; color: var(--c-ink); }
.h-faq .wp-block-details { background: var(--c-paper); border-radius: var(--h-radius); padding: 0 20px; margin-block: 8px; }
.h-faq .wp-block-details summary { min-block-size: var(--h-tap); display: flex; align-items: center; font-weight: 600; color: var(--c-ink); cursor: pointer; padding-block: 12px; }
.h-faq .wp-block-details[open] { padding-block-end: 16px; }
/* the lead form: a white card on the page, its fields on the light paper; it lines up with the page's
   container like every other section (WordPress centres constrained children with !important margins) */
.h-contact .h-form { background: #fff; border-radius: var(--h-card-radius, var(--h-radius)); padding: clamp(20px, 4vw, 40px); box-shadow: 0 22px 44px -30px rgba(15, 23, 42, .4); }
.h-contact.h-contact > .h-form { max-inline-size: 760px; margin-inline: max(0px, (100% - var(--h-wide)) / 2) auto !important; }
.h-contact .h-form .h-btn--cta { min-block-size: 56px; font-size: 18px; }
/* contact details read as a short list, not as prose */
.wp-block-post-content:has(> .h-contact) > .h-sec--text .h-prose p { margin-block: 0 10px; }
/* desktop contact page: the details beside the form, so the form is in the first scroll.
   Columns: page edge | details | form | page edge; the hero and anything else keep the full width.
   Not on an English page of stage 1 (it shows the details as cards, .h-sec--details), nor on the group site's English
   home (the companies, .h-cos, then the form; the group has no details to show): their sections run in source order. */
@media (min-width: 1024px) {
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) {
		display: grid; align-items: start;
		grid-template-columns: [full-start] minmax(var(--h-gutter), 1fr) [main-start] minmax(0, calc(var(--h-wide) * .44)) [split] minmax(0, calc(var(--h-wide) * .56)) [main-end] minmax(var(--h-gutter), 1fr) [full-end];
	}
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) > * { grid-column: full; margin-block-start: 0; }
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) > .h-hero2 { grid-row: 1; }
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) > .h-sec--text { grid-column: main-start / split; }
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) > .h-sec--text > .h-container { inline-size: auto; margin: 0; padding-inline-end: clamp(32px, 4vw, 56px); }
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) > .h-section.h-contact.h-contact { grid-column: split / main-end; grid-row: 2 / span 8; padding-block: clamp(40px, 5vw, 64px) var(--h-section); padding-inline: 0; }
	.wp-block-post-content:has(> .h-contact):not(:has(> .h-sec--details, > .h-cos)) > .h-contact > .h-form { max-inline-size: none; margin: 0 !important; }
}
.h-form__title { margin: 0; }

/* ---------- search form (404, search) ---------- */
/* WordPress wraps the field in its <label>, so the label is the flex item. Both may shrink below the field's intrinsic
   width (size="20"); on phones the label takes the row's room and the field fills it, so the form never pushes a 320px
   phone sideways. Wider screens keep the field at its intrinsic width, as before. */
.search-form, .wp-block-search__inside-wrapper { display: flex; gap: 8px; max-inline-size: 520px; margin-block: 24px; }
.search-form label { display: flex; min-inline-size: 0; }
.search-form input[type=search], .wp-block-search__input { flex: 1; min-inline-size: 0; min-block-size: var(--h-tap); padding-inline: 14px; font: inherit; border: 0; border-radius: var(--h-radius); background: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-line); }
@media (max-width: 767px) {
	.search-form label { flex: 1; }
	.search-form input[type=search] { inline-size: 100%; box-sizing: border-box; }
}
.search-form input[type=submit], .wp-block-search__button { min-block-size: var(--h-tap); padding-inline: 20px; border: 0; border-radius: var(--h-radius); background: var(--c-btn); color: #fff; font: 600 16px var(--wp--preset--font-family--plex); cursor: pointer; }

/* ---------- 404 / empty ---------- */
.h-404 { padding-block: var(--h-section); }
.h-empty { padding-block: 24px; color: var(--c-muted); }
