/* apex - site frame: header, footer, page layout. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 110px; }
body { margin: 0; background: #fff; }
img { max-width: 100%; height: auto; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; padding: 10px 16px; }
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; transition: box-shadow .25s; }
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.06); }
.site-header__inner { display: flex; align-items: center; gap: 30px; height: 100px; padding: 0 clamp(16px, 7vw, 120px); }
.site-brand { flex: 0 0 auto; display: block; line-height: 0; }
.site-brand img { width: auto; height: 62px; }
.site-nav { display: flex; align-items: center; flex: 1 1 auto; justify-content: flex-end; gap: 30px; }

.primary-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.primary-nav .menu > li { position: relative; }
.primary-nav a { display: block; padding: 10px 12px; white-space: nowrap; font-family: Arimo, sans-serif; font-size: 12.5px; letter-spacing: 1.5px; text-transform: uppercase; color: #1b1b1b; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current-menu-ancestor > a, .primary-nav .current-page-ancestor > a { color: var(--apex-accent); }
.primary-nav .sub-menu { list-style: none; margin: 0; padding: 10px 0; position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.08); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s, transform .2s, visibility .2s; }
.primary-nav .sub-menu a { text-transform: none; letter-spacing: .3px; font-family: Catamaran, sans-serif; font-size: 15px; padding: 7px 22px; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu, .primary-nav li.is-open > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .menu-parent { cursor: pointer; position: relative; padding-right: 24px; }
.primary-nav .menu-parent::after { content: ''; position: absolute; right: 8px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.primary-nav li.is-open > .menu-parent::after { transform: translateY(-30%) rotate(-135deg); }

.site-actions { display: flex; align-items: center; gap: 16px; }
.site-actions .btn { padding: 13px 18px 11px; }
.lang-switch { display: inline-flex; line-height: 0; }
.lang-switch img { width: 20px; height: auto; }
.phone-link { display: inline-flex; color: var(--apex-icon, #39b6e0); }
.phone-link svg { width: 18px; height: 18px; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle__bars { display: grid; gap: 6px; width: 26px; }
.nav-toggle__bars span { display: block; height: 2px; background: #1b1b1b; transition: transform .25s, opacity .25s; }
.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Content frame ---------- */
.site-main { min-height: 50vh; }
.entry, .entry-content--home > :not(.alignfull):not(.apex-intro):not(.apex-services):not(.apex-partners) { }
.entry { max-width: 1140px; margin: 0 auto; padding: 60px 20px 80px; }
.entry-header { margin-bottom: 30px; }
.entry-title { font-family: Catamaran, sans-serif; color: #1b1b1b; font-weight: 500; font-size: 40px; line-height: 48px; letter-spacing: .5px; margin: 0; }
.entry-content > .alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.entry-content > .alignwide { max-width: 1320px; margin-left: auto; margin-right: auto; }
.entry-content--home { overflow-x: clip; }
.entry-content--home > * { max-width: 1140px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.entry-content--home > .alignfull { max-width: none; padding-left: 0; padding-right: 0; }
.apex-no-title .entry { padding-top: 40px; }
.entry-content > .wp-block-gallery.is-style-apex-mosaic:last-child { margin-bottom: -80px; }

/* News */
.news-list { display: grid; gap: 50px; }
.news-card { display: grid; grid-template-columns: 340px 1fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid #e5e5e5; }
.news-card__media img { width: 100%; height: auto; display: block; }
.news-card__date { font-family: Arimo, sans-serif; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--apex-accent); }
.news-card__title { font-family: Catamaran, sans-serif; font-weight: 500; font-size: 26px; line-height: 34px; margin: 6px 0 12px; }
.news-card__title a { color: #1b1b1b; text-decoration: none; }
.apex-more-link { display: inline-flex; align-items: center; gap: 6px; color: var(--apex-accent); text-decoration: none; }
.apex-more-link svg { width: 18px; height: 18px; color: var(--apex-icon, #39b6e0); }
.entry--single { max-width: 860px; }
.entry-thumb { margin: 0 0 30px; }
.entry-thumb img { width: 100%; height: auto; }
.entry-back { margin-top: 40px; }
.nav-links { display: flex; gap: 10px; margin-top: 40px; }
.nav-links a, .nav-links span { padding: 6px 12px; border: 1px solid #e5e5e5; text-decoration: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid #e5e5e5; }
.site-footer__top { max-width: 1140px; margin: 0 auto; padding: 40px 20px; display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 30px; align-items: start; }
.footer-title { font-family: Catamaran, sans-serif; font-size: 22px; line-height: 27px; letter-spacing: .5px; color: #1b1b1b; margin: 0 0 14px; }
.site-footer p { margin: 0 0 10px; font-size: 15px; line-height: 24px; }
.site-footer a { color: #797979; text-decoration: none; }
.site-footer a:hover { color: var(--apex-accent); }
.site-footer .menu { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 26px; }
.apex-social { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.apex-social a { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; border: 1px solid #1b1b1b; color: #1b1b1b; }
.apex-social a:hover { border-color: var(--apex-accent); color: var(--apex-accent); }
.apex-social svg { width: 16px; height: 16px; }
.footer-copy { font-family: Arimo, sans-serif; font-size: 12px !important; letter-spacing: 1.5px; text-transform: uppercase; color: #1b1b1b; }
.site-footer__band { height: 120px; background: #1b1b1b; }

/* ---------- Responsive ---------- */
@media (max-width: 1279px) {
	.site-header__inner { height: 80px; }
	.site-brand img { height: 50px; }
	.nav-toggle { display: block; }
	.site-nav { position: fixed; inset: 80px 0 0 0; background: #fff; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 20px clamp(16px, 7vw, 120px) 40px; overflow-y: auto; transform: translateX(100%); transition: transform .3s; }
	.admin-bar .site-nav { inset: 126px 0 0 0; }
	.nav-open .site-nav { transform: none; }
	.nav-open { overflow: hidden; }
	.primary-nav .menu { flex-direction: column; align-items: stretch; gap: 0; }
	.primary-nav .menu > li { border-bottom: 1px solid #e5e5e5; display: flex; flex-wrap: wrap; align-items: center; }
	.primary-nav .menu > li > a { flex: 1; padding: 16px 0; font-size: 14px; }
	.primary-nav .sub-menu { position: static; flex-basis: 100%; box-shadow: none; opacity: 1; visibility: visible; transform: none; display: none; padding: 0 0 12px 12px; }
	.primary-nav li.is-open > .sub-menu { display: block; }
	.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { display: none; }
	.primary-nav li.is-open > .sub-menu, .primary-nav li.is-open:hover > .sub-menu { display: block; }
	.primary-nav .menu-parent::after { right: 4px; }
	.site-actions { flex-wrap: wrap; margin-top: 24px; }
	.site-actions .btn { flex: 1 1 100%; text-align: center; }
}
@media (max-width: 781px) {
	.admin-bar .site-header { top: 0; }
	.entry { padding: 40px 16px 60px; }
	.entry-title { font-size: 30px; line-height: 38px; }
	.entry-content--home > * { padding-left: 16px; padding-right: 16px; }
	.news-card { grid-template-columns: 1fr; gap: 20px; }
	.site-footer__top { grid-template-columns: 1fr; padding: 30px 16px; }
	.site-footer__band { height: 60px; }
}

/* ---------- Cookie banner (Complianz): accept button in apex blue, whatever the palette ---------- */
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept { background-color: #39b6e0 !important; border-color: #39b6e0 !important; color: #fff !important; border-radius: 0; }
.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept:hover { background-color: #2a9fc8 !important; border-color: #2a9fc8 !important; }

/* ---------- Palette "Tenue apex": black top, grey band, as on the team polo ---------- */
.apex-polo { --apex-ink: #27272c; --apex-grey: #878787; }
.apex-polo .site-header { background: #27272c; }
.apex-polo .site-header.is-scrolled { box-shadow: 0 2px 16px rgba(0,0,0,.25); }
.apex-polo .primary-nav a { color: #fff; }
.apex-polo .primary-nav a:hover, .apex-polo .primary-nav .current-menu-item > a, .apex-polo .primary-nav .current-menu-ancestor > a, .apex-polo .primary-nav .current-page-ancestor > a { color: #b9b9b9; }
.apex-polo .primary-nav .sub-menu { background: #27272c; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.apex-polo .site-actions .btn { background: #fff; border-color: #fff; color: #27272c !important; }
.apex-polo .site-actions .btn:hover { background: #878787; border-color: #878787; color: #fff !important; }
.apex-polo .phone-link { color: #fff; }
.apex-polo .nav-toggle__bars span { background: #fff; }
.apex-polo .site-footer { background: #27272c; border-top: 0; }
.apex-polo .footer-title, .apex-polo .footer-copy { color: #fff; }
.apex-polo .site-footer p, .apex-polo .site-footer a { color: #c9c9cc; }
.apex-polo .site-footer a:hover { color: #fff; }
.apex-polo .apex-social a { border-color: #fff; color: #fff; }
.apex-polo .apex-social a:hover { background: #fff; color: #27272c; }
.apex-polo .site-footer__band { background: #878787; height: 70px; }
@media (max-width: 1279px) {
	.apex-polo .site-nav { background: #27272c; }
	.apex-polo .primary-nav .menu > li { border-bottom-color: rgba(255,255,255,.14); }
	.apex-polo .primary-nav .sub-menu { box-shadow: none; }
}
