/* Shared navigation and footer of the FerlyTech review site. */
:root {
  --ferly-surface-fog: #eaf1fa;
  --ferly-surface-silver: #f3f4f6;
  --ferly-editorial-ink: #1d232c;
  --ferly-editorial-muted: #4d5868;
  --ferly-editorial-rule: #d9dfe7;
  --ferly-phone-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3H4.7A1.7 1.7 0 0 0 3 4.9c.9 8.6 7.8 15.5 16.4 16.1a1.5 1.5 0 0 0 1.6-1.5v-2.6l-4.7-2-1.7 1.7a14 14 0 0 1-7.2-7.2l1.7-1.7L7 3Z'/%3E%3C/svg%3E");
}

html:has(.ferly-header) {
  --ferly-header-height: 69px;
  --ferly-anchor-gap: 12px;
  scroll-padding-top: var(--ferly-header-height);
}

body:has(.ferly-header) {
  padding-top: 0;
}

body:has(.ferly-header) .geo-service { --geo-anchor-offset: var(--ferly-anchor-gap); }
body:has(.ferly-header) .ed-case-grid figure { scroll-margin-top: var(--ferly-anchor-gap); }

.ferly-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #1a2b4a;
  background: #fff;
  border-bottom: 1px solid #e8edf4;
}

.ferly-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
}

.ferly-logo,
.ferly-footer-logo {
  display: inline-flex;
  align-items: center;
}

.ferly-logo img,
.ferly-footer-logo img {
  display: block;
  width: clamp(132px, 16vw, 198px);
  height: auto;
}

.ferly-navigation { order: 1; }
.ferly-phone { order: 2; }
.ferly-menu-toggle { order: 3; }

.ferly-header :focus-visible,
.ferly-footer :focus-visible {
  outline: 2px solid #0b5bd3;
  outline-offset: 3px;
}

.ferly-nav-list,
.ferly-products-groups ul,
.ferly-footer-directory ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ferly-nav-list {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1vw, 20px);
}

.ferly-nav-list > li > a,
.ferly-products > summary {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #1a2b4a;
  font-size: 15px;
  white-space: nowrap;
}

.ferly-nav-list > li > a::after,
.ferly-products > summary::before {
  position: absolute;
  inset: auto 0 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--ferly-cta-blue);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  content: "";
}

.ferly-nav-list > li > a:is(:hover, :focus-visible, [aria-current="page"], [aria-expanded="true"])::after,
.ferly-products > summary:is(:hover, :focus-visible)::before,
.ferly-products[open] > summary::before {
  transform: scaleX(1);
}

.ferly-nav-list > li > a[aria-current="page"] { color: var(--ferly-cta-blue); }
.ferly-products-panel a:hover { text-decoration: underline; text-underline-offset: .25em; }

@media (prefers-reduced-motion: no-preference) {
  .ferly-nav-list > li > a::after,
  .ferly-products > summary::before { transition: transform 200ms cubic-bezier(.2,.65,.3,1); }
}

.ferly-products > summary,
.ferly-footer-directory > summary {
  cursor: pointer;
  list-style: none;
}

.ferly-products > summary::-webkit-details-marker,
.ferly-footer-directory > summary::-webkit-details-marker { display: none; }

.ferly-products > summary::after,
.ferly-footer-directory > summary::after {
  content: "";
  width: 5px;
  height: 5px;
  margin-inline-start: 9px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: translateY(-2px) rotate(45deg);
}

.ferly-products[open] > summary::after,
.ferly-footer-directory[open] > summary::after {
  transform: translateY(1px) rotate(225deg);
}

.ferly-products-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: #fff;
  box-shadow: 0 16px 30px rgb(8 43 102 / .09);
  border-top: 1px solid #e8edf4;
  padding-block: 24px 36px;
}

@media (min-width: 1101px) {
  .ferly-products-panel {
    max-height: calc(100dvh - var(--ferly-header-height));
    overflow-y: auto;
  }
}

@media (min-width: 1101px) and (prefers-reduced-motion: no-preference) {
  .ferly-products[open] > .ferly-products-panel {
    animation: ferly-menu-appear 170ms ease-out both;
  }
}

@keyframes ferly-menu-appear {
  from { opacity: 0; transform: translateY(-5px); }
}

.ferly-products-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #0a3d91;
  font-weight: 700;
}

.ferly-products-groups {
  display: grid;
  grid-template-columns: 1fr 1fr 1.75fr;
  gap: 32px;
  border-top: 1px solid #e8edf4;
  padding-top: 19px;
}

.ferly-products-groups h2,
.ferly-footer h2,
.ferly-footer-directory > summary {
  color: #182b44;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.ferly-products-groups ul { margin-top: 9px; }
.ferly-products-groups a { display: inline-flex; align-items: center; min-height: 38px; font-size: 14px; }
.ferly-product-robots { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 22px; }

.ferly-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #aacdee;
  border-radius: 999px;
  background: #fff;
  color: var(--ferly-cta-blue);
  white-space: nowrap;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.ferly-phone::before,
.home-call-icon::before {
  display: block;
  flex: none;
  width: 15px;
  aspect-ratio: 1;
  mask: var(--ferly-phone-icon) center / contain no-repeat;
  background: currentColor;
  content: "";
}
.home-call-icon::before { width: 48%; }
.ferly-phone:is(:hover, :focus-visible) { color: var(--ferly-phone-on-tint); background: #edf6ff; }

.ferly-phone-short,
.ferly-menu-toggle,
.ferly-mobile-chat { display: none; }

.ferly-footer {
  padding-top: 40px;
  background: #f5f6f8;
  color: #42536c;
  font-size: 14px;
  line-height: 1.65;
}

.ferly-footer-logo img { width: 160px; }

.ferly-footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap: 28px 42px;
  padding-block: 23px 29px;
}

.ferly-footer-directory > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
}

.ferly-footer-directory a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
}

.ferly-footer-summary { margin-top: 8px; }
.ferly-footer-contact p { margin-block: 6px; }
.ferly-footer a:hover { color: #0a3d91; text-decoration: underline; text-underline-offset: 3px; }
.ferly-footer a[href^="tel:"] { color: var(--ferly-phone-on-tint); }

.ferly-footer-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  border-top: 1px solid #dce1e9;
  padding-block: 14px 22px;
}

.ferly-footer-end a { white-space: nowrap; }
.ferly-footer-blog { display: inline-flex; align-items: center; min-height: 24px; }

@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
  html:has(.ferly-header) { --ferly-header-height: 61px; }
  .ferly-header[data-global-navigation]:not([data-ready]) { position: relative; }
  .ferly-header-row { min-height: 60px; gap: 10px; }
  .ferly-logo { margin-right: auto; order: 0; }
  .ferly-phone { padding-inline: 10px; gap: 6px; font-size: 13px; }
  .ferly-phone::before { width: 14px; }
  .ferly-phone-long { display: none; }
  .ferly-phone-short { display: inline; }

  .ferly-header[data-ready] .ferly-menu-toggle {
    display: inline-grid;
    place-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0a3d91;
    cursor: pointer;
  }

  .ferly-menu-toggle:hover { background: #eef3fa; }
  .ferly-menu-toggle span { width: 21px; height: 2px; background: currentColor; border-radius: 1px; }

  .ferly-header:not([data-ready]) .ferly-header-row { flex-wrap: wrap; }
  .ferly-header:not([data-ready]) .ferly-navigation { flex: 0 0 100%; order: 4; }

  .ferly-header[data-ready] .ferly-navigation {
    display: none;
    position: absolute;
    inset: 100% 0 auto;
    max-height: calc(100dvh - 62px);
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid #e8edf4;
    box-shadow: 0 16px 30px rgb(8 43 102 / .09);
    padding: 6px max(24px, calc((100vw - 1152px) / 2)) 18px;
  }

  .ferly-header[data-menu-open] .ferly-navigation { display: block; }
  .ferly-nav-list { display: block; }
  .ferly-nav-list > li { border-bottom: 1px solid #e8edf4; }
  .ferly-nav-list > li > a,
  .ferly-products > summary { display: flex; min-height: 48px; }
  .ferly-nav-list > li > a::after,
  .ferly-products > summary::before { inline-size: 2em; }

  .ferly-products-panel {
    position: static;
    padding: 0 0 17px;
    border: 0;
    box-shadow: none;
  }

  .ferly-products-panel .wrap { padding: 0 0 0 14px; }
  .ferly-products-groups { gap: 18px; }
  .ferly-products-groups a { min-height: 44px; }
  .ferly-mobile-chat {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #0a3d91;
    font: inherit;
    cursor: pointer;
  }
  .ferly-header:not([data-ready]) .ferly-mobile-chat { display: none; }
}

@media (max-width: 640px) {
  .ferly-header-row { padding-inline: 16px; }
  .ferly-phone { padding-inline: 8px; gap: 5px; }
  .ferly-navigation { padding-inline: 16px; }
  .ferly-products-groups { grid-template-columns: 1fr; row-gap: 14px; }
  .ferly-product-robots { display: block; }
  .ferly-footer { padding-top: 29px; }
  .ferly-footer-columns { grid-template-columns: 1fr; gap: 12px; padding-block: 14px 18px; }
  .ferly-footer-directory { border-bottom: 1px solid #dce1e9; }
  .ferly-footer-directory > summary { min-height: 44px; }
  .ferly-footer-directory a { min-height: 44px; }
  .ferly-footer-end { flex-direction: column; }
  .ferly-footer-blog { order: -1; min-height: 44px; }
}
[data-cms-hidden] { display: none !important; }

.cms-content-section {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  padding-block: clamp(32px, 5vw, 72px);
}

.cms-content-section > * + * { margin-top: 16px; }
.cms-content-section :is(img, video) { max-width: 100%; height: auto; }

