/* ==========================================================================
   VMES (vmesbd.com) — polish layer
   VMSS-style mega menu · section rhythm · centred alignment · sharper fonts
   No content, colour theme or page structure changes. Remove to undo.
   ========================================================================== */
/* Fonts (Inter + Poppins) are loaded by the mu-plugin with a <link> tag (faster than @import). */

:root {
  --vm-blue: #0F6FB6;
  --vm-ink: #0E2A47;
  --vm-text: #3F4A5A;
  --vm-muted: #5B6676;
  --vm-line: #E3E9F0;
  --vm-panel: #FAF9F7;
  --vm-sec-y: clamp(44px, 4.6vw, 64px);
  --vm-ease: cubic-bezier(.2, .7, .2, 1);
}

/* 1. Sharper, consistent fonts ------------------------------------------- */
html body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* NOTE: no CSS smooth scrolling here. Divi already runs its own smooth-scroll script;
   adding CSS scroll-behavior on top made every scroll (and the back-to-top button) fight itself. */
html { scroll-behavior: auto !important; }
html body, html body p, html body li, html body input, html body textarea, html body select {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
/* text colour is NOT changed: dark sections keep their white text */
html body #main-content p { font-weight: 400; line-height: 1.7; }
html body #main-content :is(h1, h2, h3, h4, h5, h6),
html body #main-content .et_pb_module_header {
  font-family: "Poppins", "Inter", system-ui, sans-serif;
  letter-spacing: -.012em;
  line-height: 1.2;
  text-wrap: balance;
}
html body #main-content :is(h1, h2) { font-weight: 700; }
html body #main-content :is(h3, h4, .et_pb_module_header) { font-weight: 600; }
html body #main-content h2 { margin-bottom: .45em; }
/* justified paragraphs leave uneven word gaps: align left for cleaner reading */
html body #main-content :is(.et_pb_text_align_justified, [style*="justify"]) p,
html body #main-content p[style*="justify"] { text-align: left !important; }
/* subtitles: clearer through size + weight only (no highlight colours) */
html body #main-content :is(h1, h2) + p,
html body #main-content .et_pb_text_inner > p:first-child:not(:only-child) { font-size: 1.06em; font-weight: 500; }

/* 2. Section rhythm + centred alignment ---------------------------------- */
/* section padding is normalised by vmes-polish.js: sections that were
   deliberately joined (0 padding) stay joined, and two neighbours with the
   same background share one gap instead of doubling it. */
/* tidy row spacing (the very first row of a page keeps its space below the fixed header) */
html body #main-content .et_pb_section:not(:first-child) .et_pb_row,
html body #main-content .et_pb_section:first-child .et_pb_row:not(:first-child) { padding-top: 14px !important; padding-bottom: 14px !important; }
html body #main-content .et_pb_row + .et_pb_row { margin-top: 8px; }
html body #main-content .et_pb_module { margin-bottom: clamp(16px, 2vw, 24px); }
html body #main-content .et_pb_module:last-child { margin-bottom: 0; }
/* one content width for every row on every page (rows sat at 142 / 152 / 172px before) */
html body #main-content .et_pb_row {
  width: min(1140px, calc(100% - 48px)) !important;
  max-width: 1140px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
/* hidden negative shifts on modules (e.g. Why Choose Us intro at -86px) */
html body #main-content .et_pb_section:not(:first-child) .et_pb_module:not([data-vm-head]):not([data-vm-article]) { margin-left: 0 !important; margin-right: 0 !important; }

/* section headings: centred title + short intro, readable width.
   vmes-menu.js marks them with data-vm-head (only short blocks, never long article text). */
html body #main-content [data-vm-head] {
  text-align: center !important;
  max-width: 820px;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body #main-content [data-vm-head] :is(h1, h2, h3, p, li) { text-align: center !important; }
html body #main-content [data-vm-head="intro"] { margin-bottom: clamp(28px, 3.2vw, 40px) !important; }
html body #main-content .et_pb_column_4_4 > .et_pb_button_module_wrapper { text-align: center !important; }
/* long article text in a full-width column: comfortable reading width, centred block, left-aligned text */
html body #main-content [data-vm-article] { max-width: 940px; margin-left: auto !important; margin-right: auto !important; }

/* two-column rows (50/50, 60/40, 40/60, 2/3+1/3): balanced, vertically centred, one gap size.
   vmes-menu.js marks them with data-vm-split; column proportions are kept. */
@media (min-width: 981px) {
  html body #main-content .et_pb_row[data-vm-split] {
    display: flex !important;
    align-items: center;
    gap: clamp(32px, 4.5vw, 64px);
  }
  html body #main-content .et_pb_row[data-vm-split]::after { display: none !important; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column {
    width: auto !important;
    margin-right: 0 !important;
    float: none !important;
    padding-top: 0 !important;
    min-width: 0;
  }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_1_2 { flex: 1 1 0; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_3_5 { flex: 3 1 0; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_2_5 { flex: 2 1 0; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_2_3 { flex: 2 1 0; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_1_3 { flex: 1 1 0; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_3_4 { flex: 3 1 0; }
  html body #main-content .et_pb_row[data-vm-split] > .et_pb_column_1_4 { flex: 1 1 0; }
  /* headings inside a half-width column: sized to the column so they don't wrap into 3-4 lines */
  html body #main-content .et_pb_section:not(:first-child) .et_pb_row[data-vm-split] :is(h1, h2) { font-size: clamp(30px, 3vw, 44px) !important; line-height: 1.15 !important; }

  /* card rows (3 or 4 columns): equal heights and one gap size */
  html body #main-content .et_pb_row[data-vm-cards] { display: flex !important; align-items: stretch; gap: clamp(18px, 2.2vw, 28px); }
  html body #main-content .et_pb_row[data-vm-cards]::after { display: none !important; }
  html body #main-content .et_pb_row[data-vm-cards] > .et_pb_column { flex: 1 1 0; width: auto !important; margin-right: 0 !important; float: none !important; min-width: 0; }
}

/* images: same soft shape everywhere; side-by-side photos share one proportion */
html body #main-content .et_pb_image .et_pb_image_wrap { border-radius: 16px; overflow: hidden; display: block; }
html body #main-content .et_pb_image img { border-radius: 16px; }
html body #main-content .et_pb_row[data-vm-split] .et_pb_image :is(.et_pb_image_wrap, img) { width: 100%; }
html body #main-content .et_pb_row[data-vm-split] .et_pb_image img { aspect-ratio: 4 / 3 !important; height: auto !important; object-fit: cover; }
/* video modules and galleries: rounded, even tiles */
html body #main-content .et_pb_video { border-radius: 16px; overflow: hidden; }
html body #main-content .et_pb_gallery_grid .et_pb_gallery_items { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(14px, 1.8vw, 22px); }
html body #main-content .et_pb_gallery_grid .et_pb_gallery_item { width: auto !important; margin: 0 !important; float: none !important; clear: none !important; display: block !important; }
html body #main-content .et_pb_gallery_grid .et_pb_gallery_image { border-radius: 14px; overflow: hidden; }
html body #main-content .et_pb_gallery_grid .et_pb_gallery_image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; transition: transform .5s var(--vm-ease); }
html body #main-content .et_pb_gallery_grid .et_pb_gallery_image:hover img { transform: scale(1.04); }

/* Blogs: three equal cards filling the row (works with or without Divi's grid script) */
html body #main-content .et_pb_blog_grid .et_pb_ajax_pagination_container {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}
html body #main-content .et_pb_blog_grid :is(.et_pb_salvattore_content, .et_pb_salvattore_content > .column) { display: contents !important; }
html body #main-content .et_pb_blog_grid .et_pb_ajax_pagination_container > :not(article):not(.et_pb_salvattore_content) { grid-column: 1 / -1; }
html body #main-content .et_pb_blog_grid article.et_pb_post {
  opacity: 1 !important;
  width: auto !important;
  margin: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--vm-line) !important;
  background: #FFFFFF;
  box-shadow: 0 14px 32px -26px rgba(14, 42, 71, .35);
}
html body #main-content .et_pb_blog_grid article.et_pb_post .et_pb_image_container img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
html body #main-content .et_pb_blog_grid_wrapper { margin-bottom: clamp(28px, 3vw, 40px) !important; }
@media (max-width: 980px) { html body #main-content .et_pb_blog_grid .et_pb_ajax_pagination_container { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { html body #main-content .et_pb_blog_grid .et_pb_ajax_pagination_container { grid-template-columns: 1fr; } }

/* 3. Smooth, crisp interactive elements ---------------------------------- */
html body .et_pb_button, html body .et_pb_more_button, html body .et_pb_contact_submit {
  border-radius: 10px !important;
  font-family: "Inter", system-ui, sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: .01em;
  transition: transform .3s var(--vm-ease), box-shadow .3s ease, background-color .3s ease, color .3s ease !important;
}
html body .et_pb_button:hover, html body .et_pb_more_button:hover, html body .et_pb_contact_submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -12px rgba(15, 111, 182, .55);
}
html body #main-content :is(.et_pb_blurb, .et_pb_team_member, .et_pb_post, .et_pb_pricing_table) {
  transition: transform .45s var(--vm-ease), box-shadow .45s var(--vm-ease);
}
html body #main-content :is(.et_pb_blurb, .et_pb_post):hover { transform: translateY(-4px); }
html body #main-content :is(input, textarea, select) { border-radius: 10px !important; transition: box-shadow .25s ease, border-color .25s ease; }
html body #main-content :is(input, textarea):focus { outline: none; box-shadow: 0 0 0 3px rgba(15, 111, 182, .16) !important; }

/* 4. Top menu links: cleaner type --------------------------------------- */
html body #top-menu > li > a { font-family: "Inter", system-ui, sans-serif !important; font-weight: 600 !important; letter-spacing: .02em; }
/* scrolled header: solid navy bar so the white menu never floats over page content */
html[data-vm-scrolled] body #main-header,
html body #main-header.et-fixed-header {
  background-color: #0A1E34 !important;
  background-image: none !important;
  box-shadow: 0 6px 18px -10px rgba(0, 0, 0, .45) !important;
  transition: background-color .25s ease;
}
html[data-vm-scrolled] body #main-header #top-menu > li > a,
html body #main-header.et-fixed-header #top-menu > li > a { color: #FFFFFF !important; }
html[data-vm-scrolled] body #main-header #top-menu > li.current-menu-item > a,
html body #main-header.et-fixed-header #top-menu > li.current-menu-item > a { color: #5FB8F5 !important; }
html body #main-header #top-menu > li > a:hover { opacity: 1 !important; }
/* dropdown arrows: pure CSS chevron (the icon-font arrow could show as a stray "3") */
html body #top-menu .menu-item-has-children > a:first-child::after,
html body #top-menu li.mega-menu > a::after {
  content: "" !important;
  font-family: inherit !important;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  top: calc(50% - 14px) !important;
  right: 2px !important;
  transition: transform .25s ease;
}
html body #top-menu li.mega-menu:hover > a::after { transform: rotate(225deg); top: calc(50% - 10px) !important; }

/* 5. VMSS-style mega menu (desktop) -------------------------------------- */
@media (min-width: 981px) {
  html body #top-menu li.mega-menu > ul.sub-menu {
    position: fixed !important;
    top: var(--vm-hh, 98px) !important;
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, 10px);
    width: min(1180px, calc(100vw - 40px)) !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px 28px;
    padding: 24px 28px !important;
    background: var(--vm-panel) !important;
    border: 1px solid var(--vm-line) !important;
    border-top: 3px solid var(--vm-blue) !important;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 28px 60px -28px rgba(14, 42, 71, .38) !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .35s var(--vm-ease), visibility 0s linear .35s !important;
  }
  html body #top-menu li.mega-menu:hover > ul.sub-menu,
  html body #top-menu li.mega-menu.et-show-dropdown > ul.sub-menu,
  html body #top-menu li.mega-menu:focus-within > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
    transition-delay: 0s !important;
  }
  html body #top-menu li.mega-menu > ul.sub-menu > li {
    width: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    border: 0 !important;
  }
  html body #top-menu li.mega-menu > ul.sub-menu > li > a {
    display: flex !important;
    align-items: flex-start;
    gap: 16px;
    width: auto !important;
    padding: 14px 14px !important;
    border-radius: 12px;
    text-transform: none !important;
    letter-spacing: 0 !important;
    background: transparent !important;
    border: 0 !important;
    opacity: 1 !important;
    transition: background-color .25s ease, box-shadow .25s ease, transform .3s var(--vm-ease) !important;
  }
  html body #top-menu li.mega-menu > ul.sub-menu > li > a:hover,
  html body #top-menu li.mega-menu > ul.sub-menu > li > a:focus-visible {
    background: #FFFFFF !important;
    box-shadow: 0 10px 24px -18px rgba(14, 42, 71, .45);
    transform: translateY(-1px);
  }
  html body #top-menu li.mega-menu > ul.sub-menu > li.current-menu-item > a { background: #FFFFFF !important; }
  html body #top-menu li.mega-menu > ul.sub-menu > li > a::before { display: none !important; }
  html body #top-menu .vm-ico { flex: none; width: 42px; height: 42px; display: grid; place-items: center; color: var(--vm-blue); }
  html body #top-menu .vm-ico svg { width: 36px; height: 36px; }
  html body #top-menu .vm-txt { display: grid; gap: 4px; min-width: 0; }
  html body #top-menu .vm-t {
    font-family: "Poppins", "Inter", system-ui, sans-serif;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--vm-blue);
  }
  html body #top-menu .vm-d {
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--vm-muted);
    white-space: normal;
  }
}
/* mobile menu: keep it simple (titles only) */
html body #mobile_menu :is(.vm-ico, .vm-d) { display: none !important; }

/* 5b. Footer contact lines: icon + phone / email always on one line ------- */
html body .et-l--footer .et_pb_blurb_description > div { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
html body .et-l--footer .et_pb_blurb_description > div > .et-pb-icon { flex: none; margin: 0 !important; }
/* phone icon drawn as an SVG mask, so it always shows (the icon font glyph sometimes fails to paint) */
html body .et-l--footer .et_pb_blurb_description .et-pb-fa-icon {
  font-size: 0 !important;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25c1.12.37 2.33.57 3.6.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25c1.12.37 2.33.57 3.6.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E") center / 15px 15px no-repeat;
}
@media (min-width: 981px) {
  html body .et-l--footer .et_pb_row_4col:has(> .et_pb_column > .et_pb_blurb) {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
  html body .et-l--footer .et_pb_row_4col:has(> .et_pb_column > .et_pb_blurb)::before,
  html body .et-l--footer .et_pb_row_4col:has(> .et_pb_column > .et_pb_blurb)::after { display: none !important; }
  html body .et-l--footer .et_pb_row_4col:has(> .et_pb_column > .et_pb_blurb) > .et_pb_column { width: auto !important; margin: 0 !important; float: none !important; }
}
/* no sideways page scroll from oversized background videos */
html body #page-container { overflow-x: clip; }

/* 6. Small screens ------------------------------------------------------- */
@media (max-width: 767px) {
  :root { --vm-sec-y: 44px; }
  html body .et_pb_button:hover, html body #main-content :is(.et_pb_blurb, .et_pb_post):hover { transform: none; }
}