/*
Theme Name: CBM Twenty Twenty-Five
Description: A compact multilingual block theme for the CBM website.
Template: twentytwentyfive
Version: 1.3.2
Text Domain: cbm-twentytwentyfive
*/
:root {
  --cbm-ink: #222a2e;
  --cbm-muted: #667078;
  --cbm-line: #e1e6e9;
  --cbm-paper: #fff;
  --cbm-canvas: #f5f7f8;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body { margin: 0; background: var(--cbm-canvas); }
a { text-underline-offset: .22em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #245d86;
  outline-offset: 5px;
}
.wp-site-blocks { padding: 0; min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > * { margin-block-start: 0; }
.cbm-shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.cbm-header { background: var(--cbm-paper); border-bottom: 1px solid var(--cbm-line); }
.cbm-header-inner { min-height: 96px; padding-block: 16px; gap: 28px; }
.cbm-header .wp-block-site-logo { line-height: 0; flex-shrink: 0; }
.cbm-header .wp-block-site-logo img { width: 168px; height: auto; }
.cbm-header .wp-block-navigation { font-size: 16px; font-weight: 600; }
.cbm-header .wp-block-navigation__container { gap: 28px; }
.cbm-header .wp-block-navigation-item__content { padding-block: 10px; text-decoration: none; }
.cbm-header .current-menu-item > .wp-block-navigation-item__content,
.cbm-header .wp-block-navigation-item__content:hover { text-decoration: underline; }
.wp-site-blocks > .cbm-main { margin-block: 36px 64px; flex: 1 0 auto; }
.cbm-page-heading { margin-block: 0 28px; padding-bottom: 20px; border-bottom: 1px solid var(--cbm-line); }
.cbm-page-heading h1 { margin: 0; font-size: 32px; line-height: 1.5; }
.cbm-page-heading .wp-block-term-description { margin-top: 12px; color: var(--cbm-muted); font-size: 17px; }
.cbm-list .wp-block-post-template { gap: 24px; }
.cbm-list .wp-block-post-template > li { margin: 0; min-width: 0; }
.cbm-card {
  height: 100%;
  padding: 28px;
  border: 1px solid var(--cbm-line);
  border-radius: 10px;
  background: var(--cbm-paper);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cbm-card > * { margin-block: 0; }
.cbm-card .wp-block-post-title { font-size: 23px; font-weight: 600; line-height: 1.55; }
.cbm-card .wp-block-post-title a { text-decoration: none; }
.cbm-card .wp-block-post-title a:hover { text-decoration: underline; }
.cbm-card .wp-block-post-date { font-size: 14px; color: var(--cbm-muted); }
.cbm-card .wp-block-post-excerpt { font-size: 17px; line-height: 1.8; color: #4e5a62; display: flex; flex-direction: column; flex: 1; }
.cbm-card .wp-block-post-excerpt__excerpt { margin-block: 0; }
.cbm-card .wp-block-post-excerpt__more-text { margin-top: auto; padding-top: 20px; }
.cbm-card .wp-block-post-excerpt__more-link { color: var(--cbm-ink); font-weight: 600; }
.cbm-catalog .cbm-card { padding: 18px; gap: 18px; }
.cbm-catalog .wp-block-post-featured-image { margin: 0; background: #fafbfc; border: 1px solid #edf0f2; border-radius: 7px; padding: 12px; }
.cbm-catalog .wp-block-post-featured-image img { object-fit: contain; }
.cbm-catalog .wp-block-post-title { font-size: 22px; }
.cbm-list .wp-block-query-pagination { margin-block-start: 28px; gap: 16px; font-size: 16px; }
.cbm-article {
  max-width: 860px;
  margin-inline: auto;
  background: var(--cbm-paper);
  border: 1px solid var(--cbm-line);
  border-radius: 10px;
  padding: 36px 40px 40px;
}
.cbm-article-header { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--cbm-line); }
.cbm-article-header .wp-block-post-title { margin: 12px 0 0; font-size: 34px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.cbm-meta { color: var(--cbm-muted); font-size: 14px; gap: 12px; }
.cbm-meta a { color: inherit; }
.cbm-meta time, .cbm-card time { display: inline-block; direction: ltr; unicode-bidi: isolate; }
.cbm-back-link { margin: 0; font-size: 14px; color: var(--cbm-muted); }
.cbm-prose { font-size: 18px; line-height: 1.85; overflow-wrap: anywhere; }
.cbm-prose > * + * { margin-block-start: 24px; }
.cbm-prose p { margin-block: 0 1.1em; }
.cbm-prose :where(h2, h3, h4) { margin-block: 1.5em .65em; line-height: 1.6; }
.cbm-prose h2 { font-size: 27px; }
.cbm-prose h3 { font-size: 23px; }
.cbm-prose h4 { font-size: 20px; }
.cbm-prose :where(samp, kbd, tt, cite) { font: inherit; color: inherit; }
.cbm-prose :where(ul, ol) { padding-inline-start: 1.5em; }
.cbm-prose li + li { margin-top: .45em; }
.cbm-prose :where(img, video, iframe) { max-width: 100%; }
.cbm-prose :where(table) { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.cbm-prose :where(td, th) { padding: 10px 14px; border: 1px solid var(--cbm-line); }
.cbm-prose > .wp-block-image { margin-inline: 0; }
.cbm-prose > .wp-block-image img { width: 100%; height: auto; max-height: 380px; object-fit: contain; }
.cbm-prose .wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: 16px; gap: 16px; margin-block: 0 28px; }
.cbm-prose .wp-block-gallery.has-nested-images figure.wp-block-image { flex-grow: 0; }
.cbm-prose .wp-block-gallery.has-nested-images figure.wp-block-image > a {
  display: block;
  position: relative;
  min-height: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 12px;
  border: 1px solid var(--cbm-line);
  border-radius: 7px;
  background: #fafbfc;
}
.cbm-prose .wp-block-gallery.has-nested-images figure.wp-block-image img {
  position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; display: block;
}
.cbm-prose .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
  position: static; background: transparent; color: var(--cbm-muted);
  text-shadow: none; padding: 9px 4px 0; font-size: 13px;
  max-height: none; overflow: visible;
}
.cbm-footer { border-top: 1px solid var(--cbm-line); background: var(--cbm-paper); padding-block: 24px; }
.cbm-footer-inner { gap: 20px; }
.cbm-footer p { margin: 0; font-size: 14px; color: var(--cbm-muted); direction: ltr; unicode-bidi: isolate; }
.cbm-footer .wp-block-navigation { font-size: 14px; }
.cbm-footer .wp-block-navigation__container { gap: 20px; }
.cbm-footer .wp-block-navigation-item__content { text-decoration: none; }
.cbm-footer .wp-block-navigation-item__content:hover { text-decoration: underline; }
.cbm-empty { padding: 28px; border: 1px solid var(--cbm-line); border-radius: 8px; background: var(--cbm-paper); }

@media (max-width: 700px) {
  .cbm-shell { width: calc(100% - 32px); }
  .cbm-header-inner { flex-direction: column; justify-content: center; min-height: 0; gap: 8px; padding-block: 12px; }
  .cbm-header .wp-block-site-logo img { width: 148px; }
  .cbm-header .wp-block-navigation__container { justify-content: center; gap: 20px; }
  .cbm-header .wp-block-navigation { font-size: 15px; }
  .wp-site-blocks > .cbm-main { margin-block: 24px 40px; }
  .cbm-page-heading { margin-bottom: 20px; padding-bottom: 16px; }
  .cbm-page-heading h1 { font-size: 27px; }
  .cbm-list .wp-block-post-template { grid-template-columns: 1fr; gap: 16px; }
  .cbm-card { padding: 22px; gap: 12px; }
  .cbm-card .wp-block-post-title { font-size: 22px; }
  .cbm-article { padding: 24px 20px 28px; }
  .cbm-article-header { padding-bottom: 20px; margin-bottom: 22px; }
  .cbm-article-header .wp-block-post-title { font-size: 27px; }
  .cbm-prose { font-size: 17px; line-height: 1.9; }
  .cbm-prose h2 { font-size: 24px; }
  .cbm-prose h3 { font-size: 21px; }
  .cbm-prose .wp-block-gallery.has-nested-images { --wp--style--unstable-gallery-gap: 10px; gap: 10px; }
  .cbm-prose .wp-block-gallery.has-nested-images figure.wp-block-image > a { padding: 6px; }
  .cbm-prose .wp-block-gallery.has-nested-images figure.wp-block-image img { inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); }
  .cbm-footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .cbm-footer .wp-block-navigation__container { justify-content: center; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Language direction follows the current Polylang locale. */
html[lang^="en"] .cbm-header, html[lang^="en"] .cbm-footer { direction: ltr; }
html[lang^="ar"] .cbm-header, html[lang^="ar"] .cbm-footer { direction: rtl; }
.cbm-language-switcher { font-size: 14px; flex-shrink: 0; }
.cbm-language-switcher ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; align-items: center; list-style: none; padding: 0; margin: 0; }
.cbm-language-switcher a { display: inline-block; padding-block: 10px; text-decoration: none; }
.cbm-language-switcher a[aria-current="true"] { font-weight: 700; text-decoration: underline; }
.cbm-language-switcher a:hover { text-decoration: underline; }

/* Product enquiry links and native multi-page content. */
.vbm-quote-link { margin-top: 18px; font-size: 16px; }
.vbm-quote-link .wp-element-button { display: inline-block; padding: 10px 18px; border: 0; border-radius: 5px; background: var(--cbm-ink); color: #fff; font: inherit; text-decoration: none; cursor: pointer; }
.cbm-prose .post-nav-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cbm-prose .post-nav-links a, .cbm-prose .post-nav-links .current { padding: 5px 10px; border: 1px solid var(--cbm-line); border-radius: 4px; }
@media (max-width: 700px) {
  .cbm-header .wp-block-navigation__container { gap: 14px; }
  .cbm-header .wp-block-navigation { font-size: 14px; }
  .cbm-language-switcher a { padding-block: 5px; }
}

/* Elementor Pro forms inherit the site's existing field and button appearance. */
.vbm-enquiry-form { margin-block: 28px; }
.vbm-enquiry-form .elementor-field-label { font-size: 16px; color: var(--cbm-ink); }
.vbm-enquiry-form .elementor-field-group .elementor-field { padding: 11px 12px; border: 1px solid var(--cbm-line); border-radius: 5px; background: var(--cbm-paper); color: var(--cbm-ink); font: inherit; }
.vbm-enquiry-form .elementor-field-group input[type="email"],
.vbm-enquiry-form .elementor-field-group input[type="tel"] { direction: ltr; }
.vbm-enquiry-form .elementor-button { padding: 12px 18px; border: 0; border-radius: 5px; background: var(--cbm-ink); color: #fff; font: inherit; cursor: pointer; }
.vbm-enquiry-form .elementor-message { line-height: 1.6; }

/* Keep native Elementor form labels readable within the site typography. */
.cbm-prose .elementor-form .elementor-field-label { color: #242e30; }
.cbm-prose .elementor-form .elementor-field-textual { border-color: #8b9399; }
