/* Interactions layer: hover for content lists + glass/tilt/parallax for cards.
   Loaded after style.css via functions.php. */

/* ==========================
   Mobile/Small Viewports: allow shrinking below 555px
   Guard against accidental horizontal overflow caused by long strings,
   tables, or flex children with implicit min-width.
   ========================== */
/* Do NOT clamp overflow-x on html/body: it breaks nested horizontal scroll (tables). */

#main-content { min-width: 0; }
.container, .section, .page-layout, .posts-grid { min-width: 0; }
.page-layout__content, .page-layout__sidebar { min-width: 0; }

/* Ensure long tokens can wrap in content */
.entry-content { overflow-wrap: anywhere; word-break: normal; }

/* Tables: scroll rules in style.css */

/* ==========================================================================
   Desktop safety-net
   If an older cached style.css contains a syntax error, some mobile-only rules
   may apply globally. Re-assert core desktop layout at >= 901px.
   ========================================================================== */
@media (min-width: 901px){
  ul#nav-menu.nav-menu{
    position: static;
    display: flex;
    transform: none;
    visibility: visible;
    width: auto;
    max-width: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  ul#nav-menu.nav-menu > li{
    position: relative;
    margin-bottom: 0;
  }

  .nav-overlay,
  .nav-drawer-close{
    display: none;
  }

  body.menu-open{
    position: static;
    width: auto;
    overflow-y: auto;
  }

  .nav-toggle,
  .nav-menu .submenu-toggle{
    display: none;
  }

  .nav-menu .sub-menu{
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    display: none;
    padding: 10px;
    width: clamp(260px, 24vw, 340px);
    max-width: min(calc(100vw - 20px), 340px);
      background: #fff;
    border: 1px solid rgba(37,99,235,.12);
    border-radius: var(--radius-md, 16px);
    box-shadow: 0 18px 46px rgba(10,26,56,.12);
    z-index: 200;
  }
  .nav-menu .sub-menu a{
    white-space: normal;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: normal;
  }
  /* Keep hover alive across visual gap between top-level item and dropdown. */
  .nav-menu > .menu-item-has-children{
    position: relative;
  }
  .nav-menu > .menu-item-has-children::after{
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    height: 12px;
  }
  .nav-menu .sub-menu .menu-item-has-children{
    position: relative;
  }
  .nav-menu .sub-menu .menu-item-has-children::after{
    content: "";
    position: absolute;
    top: 0;
    right: -12px;
    width: 12px;
    height: 100%;
  }
  .nav-menu .sub-menu .menu-item-has-children.submenu-parent-flip-left::after{
    right: auto;
    left: -12px;
  }
  .nav-menu li:hover > .sub-menu{ display: block; }
  .nav-menu li:focus-within > .sub-menu{ display: block; }
  .nav-menu .sub-menu .sub-menu{
    left: calc(100% + 5px);
    top: -10px;
  }
  .nav-menu .sub-menu.is-right-edge{
    left: auto;
    right: 0;
  }
  .nav-menu .sub-menu.submenu-flip-left{
    left: auto;
    right: calc(100% + 5px);
    top: -10px;
  }
  @media (max-width: 1280px){
    .nav-menu .sub-menu{
      width: clamp(220px, 30vw, 320px);
      max-width: min(calc(100vw - 16px), 320px);
      min-width: 220px;
    }
  }

  /* Chevron arrows for menu items with sub-menus */
  .nav-menu > .menu-item-has-children > a::after {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    margin-left: 5px;
    opacity: 0.5;
    vertical-align: middle;
  }
  .nav-menu .sub-menu .menu-item-has-children > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .nav-menu .sub-menu .menu-item-has-children > a::after {
    content: "›";
    font-size: 18px;
    line-height: 1;
    opacity: 0.45;
    flex-shrink: 0;
    margin-left: 8px;
  }

  /* Grid columns: base rules in style.css, mobile 1fr override in style.css @media 900px */
}

:root{
  --ix-tilt-max: 9;      /* degrees */
  --ix-tilt-lift: 6;     /* px */
  --ix-tilt-persp: 980px;
  --ix-glass-bg: rgba(255,255,255,.66);
  --ix-glass-border: rgba(37,99,235,.14);
  --ix-glass-shadow: 0 18px 46px rgba(10, 26, 56, .10);
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce){
  .ix-tilt{transition:none;}
}

/* Contact bar glass effect (backdrop-filter) */
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .contact-bar{
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
  }
}

/* ==========================
   Services cards marker alignment
   Real list (<ul><li>): use native marker with browser default vertical alignment.
   ========================== */
.services__grid{
  margin: 0;
  padding: 0;
  list-style: none;
}

.services__grid .services__item,
.services__grid > li{
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  list-style: none;
}

.services__grid .services__item::before,
.services__grid > li::before{
  content: "•";
  color: var(--list-marker-color, #7b9fc4);
  line-height: 1;
  transform: translateY(2px);
}

.services__grid .services__item::marker,
.services__grid > li::marker{
  content: "";
}

.services__grid .services__item > a,
.services__grid > li > a{
  display: block;
  min-width: 0;
}

/* ==========================
   Text Link Underline (content)
   Stable animation under glyphs even if <a> is block/grid.
   JS adds .ix-u and wraps link contents into .ix-ut.
   ========================== */
#main-content a.ix-u{
  text-decoration: none;
  background: none;
}

#main-content .breadcrumbs{
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--c-muted);
}

#main-content .breadcrumbs__list{
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

#main-content .breadcrumbs__item{
  display: inline-flex;
  align-items: baseline;
}

#main-content .breadcrumbs__sep{
  padding: 0 8px;
  opacity: 0.6;
}

#main-content .breadcrumbs__link{
  color: inherit;
  text-decoration: none;
}

#main-content .breadcrumbs__current{
  color: var(--c-text);
  opacity: 0.9;
}

#main-content a.ix-u > .ix-ut{
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0 2px;
  background-position: 0 100%;
  transition: background-size .18s ease, color .18s ease;
}

#main-content a.ix-u:hover > .ix-ut,
#main-content a.ix-u:focus-visible > .ix-ut{
  background-size: 100% 2px;
}

/* List markers: unified behavior for all lists inside main content. */
#main-content :where(ul,ol) li::marker{
  color: var(--list-marker-color, #7b9fc4);
  transition: color .18s ease;
}

#main-content :where(ul ul,ol ol,ul ol,ol ul) > li::marker{
  color: var(--list-nested-color, var(--c-cyan));
}

#main-content :where(ul,ol) > li{
  transition: color .18s ease;
}

#main-content :where(ul,ol) > li:hover{
  color: var(--c-text);
}

#main-content :where(ul,ol) > li:hover::marker{
  color: var(--c-primary);
}

/* Content lists: keep native marker behavior (alignment on wraps + nested lists). */
:where(.entry-content,.page-content) :where(ul,ol){
  list-style: revert;
  list-style-position: outside;
  padding-left: 1.25em;
  margin-bottom: 18px;
}

:where(.entry-content,.page-content) li{
  display: list-item;
  margin-bottom: 8px;
}

:where(.entry-content,.page-content) :where(li,ol>li)::before{
  content: none;
  display: none;
}

:where(.entry-content,.page-content) ol{
  counter-reset: none;
}

:where(.entry-content,.page-content) ol > li{
  counter-increment: none;
}

:where(.entry-content,.page-content) :where(li>ul,li>ol){
  margin-top: 6px;
  padding-left: 1.25em;
}

:where(.entry-content,.page-content) ul ul{ list-style-type: circle; }
:where(.entry-content,.page-content) ul ul ul{ list-style-type: disc; }

/* List items with links: hover/underline only on text width. */
:where(.entry-content,.page-content) :where(ul,ol) > li > a{
  display: inline-block;
  width: fit-content;
  max-width: 100%;
}

/* ==========================
   Glass cards (theme-wide)
   ========================== */
.ix-enhanced .card,
.ix-enhanced .services__panel,
.ix-enhanced .reasons__item,
.ix-enhanced .video-card,
.ix-enhanced .hero__float-card{
  background: var(--ix-glass-bg);
  border-color: var(--ix-glass-border);
  box-shadow: var(--ix-glass-shadow);
}

@supports ((backdrop-filter: blur(14px)) or (-webkit-backdrop-filter: blur(14px))) {
  .ix-enhanced .card,
  .ix-enhanced .services__panel,
  .ix-enhanced .reasons__item,
  .ix-enhanced .video-card,
  .ix-enhanced .hero__float-card{
    backdrop-filter: blur(14px) saturate(1.08);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
  }
}

/* ==========================
   Tilt + 3D depth parallax
   ========================== */
.ix-tilt{
  position: relative;
  isolation: isolate;
  transform-style: preserve-3d;
  will-change: transform;
  transform: perspective(var(--ix-tilt-persp)) rotateX(calc(var(--ix-rx, 0) * 1deg)) rotateY(calc(var(--ix-ry, 0) * 1deg)) translate3d(0, calc(var(--ix-lift, 0) * 1px), 0);
  transition: transform 420ms cubic-bezier(.2,.9,.2,1), box-shadow 420ms ease, border-color 420ms ease;
}

/* While pointer is actively moving, remove inertia (so it feels mouse-following). */
.ix-tilt.ix-tilt--live{transition: none;}

.ix-tilt::after{
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: .0;
  transform: translateZ(14px);
  background:
    radial-gradient(
      1200px circle at calc(var(--ix-px, .5) * 100%) calc(var(--ix-py, .5) * 100%),
      rgba(255,255,255,.75),
      rgba(255,255,255,.06) 38%,
      transparent 62%
    ),
    linear-gradient(
      135deg,
      rgba(255,255,255,.46),
      rgba(255,255,255,0) 34%,
      rgba(37,99,235,.10) 100%
    );
  mix-blend-mode: overlay;
  mask-image: radial-gradient(70% 70% at 30% 20%, #000 40%, transparent 75%);
}

.ix-tilt:hover::after{opacity: .55;}

/* Subtle lift on hover that works even when JS is disabled */
.ix-tilt:hover{--ix-lift: -6; box-shadow: 0 26px 64px rgba(10, 26, 56, .14);}

/* Services list-cards: make hover more noticeable */
.ix-enhanced .services__item,
.ix-enhanced .services__grid > li{
  border-color: rgba(37,99,235,.12);
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}

.ix-enhanced .services__item::before,
.ix-enhanced .services__grid > li::before{transition: color .22s ease, text-shadow .22s ease, transform .22s ease;}

.ix-enhanced .services__item:hover,
.ix-enhanced .services__grid > li:hover{
  background: rgba(37,99,235,.06);
  border-color: rgba(37,99,235,.18);
  color: var(--c-text);
  box-shadow: 0 16px 34px rgba(37,99,235,.10);
}

.ix-enhanced .services__item:hover > a,
.ix-enhanced .services__item:focus-within > a,
.ix-enhanced .services__grid > li:hover > a,
.ix-enhanced .services__grid > li:focus-within > a{
  color: var(--c-primary);
}

.ix-enhanced .services__item:hover::before,
.ix-enhanced .services__grid > li:hover::before{
  color: var(--c-primary);
  text-shadow: 0 0 10px rgba(37,99,235,.30);
  transform: translateZ(8px) scale(1.06);
}

/* ==========================
   Selected Posts block
   Match blog page (.post-card + .posts-grid--grid), but allow scaling per block.
   ========================== */
.isoftcore-selected-posts{
  --sp-scale: 0.9;
}

.isoftcore-selected-posts.posts-grid--grid{
  gap: calc(24px * var(--sp-scale));
  grid-template-columns: repeat(var(--blog-columns, 3), minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 1240px){
  .isoftcore-selected-posts.posts-grid--grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .isoftcore-selected-posts.posts-grid--grid > .post-card:last-child:nth-child(odd){
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px){
  .isoftcore-selected-posts.posts-grid--grid{
    grid-template-columns: 1fr;
  }
}

.isoftcore-selected-posts .post-card__thumb{
  height: calc(140px * var(--sp-scale));
  line-height: 0;
  transform: translateY(-1px);
}

.isoftcore-selected-posts .post-card--grid{
  display: flex;
  flex-direction: column;
}

.isoftcore-selected-posts .post-card--grid > .post-card__link{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.isoftcore-selected-posts .post-card__body{
  padding: calc(20px * var(--sp-scale));
  padding-bottom: 48px;
  position: relative;
  flex: 1;
}

.isoftcore-selected-posts .post-card__meta{
  margin-bottom: calc(8px * var(--sp-scale));
  gap: calc(12px * var(--sp-scale));
}

.isoftcore-selected-posts .tag{
  font-size: calc(12px * var(--sp-scale));
  padding: calc(4px * var(--sp-scale)) calc(10px * var(--sp-scale));
}

.isoftcore-selected-posts .post-card__date{
  font-size: calc(12px * var(--sp-scale));
}

.isoftcore-selected-posts .post-card h3{
  font-size: calc(20px * var(--sp-scale));
  margin-bottom: 0;
}

.related-posts__grid .post-card__thumb{
  height: clamp(120px, 18vw, 130px);
  line-height: 0;
  transform: translateY(-1px);
}

.related-posts__grid .post-card--grid{
  display: flex;
  flex-direction: column;
}

.related-posts__grid .post-card--grid > .post-card__link{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.related-posts__grid .post-card__body{
  padding: 18px;
  padding-bottom: 48px;
  position: relative;
  flex: 1;
}

.related-posts__grid .post-card__meta{
  margin-bottom: 8px;
  gap: 12px;
}

.related-posts__grid .tag{
  font-size: 12px;
  padding: 4px 10px;
}

.related-posts__grid .post-card__date{
  font-size: 12px;
}

.related-posts__grid .post-card h3{
  font-size: 16px;
  margin-bottom: 0;
}

/* Keep performance sane on mobile/touch */
@media (hover: none), (pointer: coarse){
  .ix-tilt{transform: none;}
  .ix-tilt::before,.ix-tilt::after{display:none;}
}
