/* FORCE Astra header to stay pinned + visible */
header#masthead{
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 999999 !important;

  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
}

/* Keep it transparent */
header#masthead,
header#masthead .main-header-bar{
  background: transparent !important;
  box-shadow: none !important;
}

/* Admin bar offset when logged in */
body.admin-bar header#masthead{ top: 32px !important; }
@media (max-width: 782px){
  body.admin-bar header#masthead{ top: 46px !important; }
}
/* One dark shade on scroll (adjust the last number: 0.35 lighter → 0.85 darker) */
body.tt-scrolled header#masthead{
  background: rgba(0,0,0,.65) !important;
}

/* Make sure Astra inner header layers stay transparent (prevents 2-tone effect) */
body.tt-scrolled header#masthead .main-header-bar,
body.tt-scrolled header#masthead .main-header-bar-wrap,
body.tt-scrolled header#masthead .ast-primary-header-bar,
body.tt-scrolled header#masthead .ast-builder-grid-row-container,
body.tt-scrolled header#masthead .ast-builder-grid-row-container-inner{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
}

/* Header Logo sizing */
.tt-brand { display: inline-flex; align-items: center; }
.tt-logo { height: 40px; width: auto; display: block; }

/* Default: show full logo */
.tt-logo--full { display: block !important; }
.tt-logo--mark { display: none !important; }

/* After scroll: show mark only */
body.tt-scrolled .tt-logo--full { display: none !important; }
body.tt-scrolled .tt-logo--mark { display: block !important; }
/* Mobile: shrink the full logo so it leaves room for the CTA */
@media (max-width: 767px){
  .tt-logo{ height: 28px !important; }          /* was 40px */
  .tt-brand{ max-width: 55vw; }                /* prevents it from eating the row */
  .tt-brand .tt-logo{ width: auto !important; }
}

/* Optional: add a bit of breathing room between logo and header items */
@media (max-width: 767px){
  .tt-brand{ margin-right: 10px !important; }
}

/* 1. Clean base styles for header menu links */
.ast-builder-menu .main-header-menu .menu-link {
  text-decoration: none;
  line-height: 1.4;
}

/* 2. Nice vertical spacing for submenu items */
.ast-builder-menu .main-header-menu .sub-menu {
  padding: 6px 0;
}

.ast-builder-menu .main-header-menu .sub-menu > li {
  margin: 0;
}

.ast-builder-menu .main-header-menu .sub-menu > li > .menu-link {
  display: block;
  padding: 6px 20px;     /* tweak for more/less spacing */
  line-height: 1.2;
}

/* 3. Underline effect on TOP-LEVEL items (SERVICES, PORTFOLIO, etc.) */
.ast-builder-menu .main-header-menu > .menu-item > .menu-link {
  position: relative;
  padding-bottom: 4px;   /* space between text and underline */
}

/* Draw underline with ::after so it sits below the text */
.ast-builder-menu .main-header-menu > .menu-item > .menu-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background-color: #24bdda; /* match your teal */
  transition: width 0.2s ease;
}

/* Show underline on hover + active item */
.ast-builder-menu .main-header-menu > .menu-item:hover > .menu-link::after,
.ast-builder-menu .main-header-menu > .menu-item.current-menu-item > .menu-link::after {
  width: 100%;
}

@media (max-width: 767px) {
  /* Kill any bottom padding / margin on footer structure */
  .site-footer,
  .site-footer .ast-builder-grid-row,
  .site-footer .ast-builder-grid-row-container-inner {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Remove bottom margin from last widget / paragraph in footer */
  .site-footer .widget:last-child,
  .site-footer p:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Make sure the main page wrapper isn't adding extra space */
  body,
  #page {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* Only move the arrow when hovering anywhere over the CTA row */
.cta-link .cta-arrow {
  transition: transform 200ms ease;
}

.cta-link:hover .cta-arrow,
.cta-link:focus-within .cta-arrow {
  transform: translateX(8px);
}

@media (max-width: 767.98px){

  .brand-wall-gallery{
    --tile-radius: 14px;
    --tile-gap: 12px;
    --cycle: 7s;
  }

  /* Force a 2x2 grid no matter what Elementor outputs */
  .brand-wall-gallery .elementor-image-gallery .gallery,
  .brand-wall-gallery .elementor-gallery__container,
  .brand-wall-gallery .gallery{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: var(--tile-gap) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Tile base (kill WP gallery inline widths/floats) */
  .brand-wall-gallery .elementor-gallery-item,
  .brand-wall-gallery .gallery-item{
    float: none !important;
    width: auto !important;
    margin: 0 !important;

    border-radius: var(--tile-radius) !important;
    overflow: hidden !important;
    background: rgba(255,255,255,0.04) !important;

    aspect-ratio: 3 / 2;
    display: grid !important;
    place-items: center !important;
    position: relative !important;
  }

  .brand-wall-gallery img{
    max-width: 88% !important;
    max-height: 80% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  /* Overlap pairs into 4 grid cells */
  .brand-wall-gallery .elementor-gallery-item:nth-child(1),
  .brand-wall-gallery .elementor-gallery-item:nth-child(5),
  .brand-wall-gallery .gallery-item:nth-child(1),
  .brand-wall-gallery .gallery-item:nth-child(5){ grid-row: 1; grid-column: 1; }

  .brand-wall-gallery .elementor-gallery-item:nth-child(2),
  .brand-wall-gallery .elementor-gallery-item:nth-child(6),
  .brand-wall-gallery .gallery-item:nth-child(2),
  .brand-wall-gallery .gallery-item:nth-child(6){ grid-row: 1; grid-column: 2; }

  .brand-wall-gallery .elementor-gallery-item:nth-child(3),
  .brand-wall-gallery .elementor-gallery-item:nth-child(7),
  .brand-wall-gallery .gallery-item:nth-child(3),
  .brand-wall-gallery .gallery-item:nth-child(7){ grid-row: 2; grid-column: 1; }

  .brand-wall-gallery .elementor-gallery-item:nth-child(4),
  .brand-wall-gallery .elementor-gallery-item:nth-child(8),
  .brand-wall-gallery .gallery-item:nth-child(4),
  .brand-wall-gallery .gallery-item:nth-child(8){ grid-row: 2; grid-column: 2; }

  /* Crossfade first 4 then last 4 */
  .brand-wall-gallery .elementor-gallery-item,
  .brand-wall-gallery .gallery-item{
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    animation: bwSwap var(--cycle) infinite;
  }

  .brand-wall-gallery .elementor-gallery-item:nth-child(-n+4),
  .brand-wall-gallery .gallery-item:nth-child(-n+4){ animation-delay: 0s; }

  .brand-wall-gallery .elementor-gallery-item:nth-child(n+5),
  .brand-wall-gallery .gallery-item:nth-child(n+5){ animation-delay: calc(var(--cycle) / 2); }

  @keyframes bwSwap{
    0%   { opacity: 0; visibility: hidden; }
    10%  { opacity: 1; visibility: visible; }
    45%  { opacity: 1; visibility: visible; }
    50%  { opacity: 0; visibility: hidden; }
    100% { opacity: 0; visibility: hidden; }
  }

  /* Elementor editor: show all so it’s editable */
  body.elementor-editor-active .brand-wall-gallery .elementor-gallery-item,
  body.elementor-editor-active .brand-wall-gallery .gallery-item{
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
}

/* Astra Header Button: force-remove theme fill/overlay, then apply neon style */

.ast-header-button-1 .ast-builder-button-wrap > a.menu-link{
  display: none !important; /* Astra duplicate link */
}

/* Kill any default Astra/Elementor button fill, gradients, overlays */
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link,
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link *,
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link:before,
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link:after{
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  filter: none !important;
  opacity: 1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* If Astra uses pseudo-elements, stop them from drawing an overlay */
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link:before,
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link:after{
  content: none !important;
}

/* Neon outline + neon text (default state) */
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 8px 18px !important;
  border-radius: 999px !important;

  /* change to #000 for solid black fill */
  background-color: transparent !important;

  border: 1.5px solid #2dd4ff !important;
  color: #2dd4ff !important;

  text-transform: uppercase !important;
  letter-spacing: 0.18em !important;
  font-weight: 700 !important;

  text-shadow:
    0 0 10px rgba(45,212,255,.70),
    0 0 26px rgba(45,212,255,.45) !important;

  box-shadow:
    0 0 0 1px rgba(45,212,255,.35) inset,
    0 0 16px rgba(45,212,255,.35),
    0 0 44px rgba(45,212,255,.22) !important;

  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease !important;
}

/* Make sure the text inside inherits the color */
.ast-header-button-1 .ast-custom-button{
  color: inherit !important;
  -webkit-text-fill-color: currentColor !important;
}

/* Hover: fill neon, text black */
.ast-header-button-1 .ast-builder-button-wrap > a.ast-custom-button-link:hover{
  background-color: #2dd4ff !important;
  color: #000000 !important;

  text-shadow: none !important;

  box-shadow:
    0 0 0 1px rgba(45,212,255,.55) inset,
    0 0 26px rgba(45,212,255,.55),
    0 0 70px rgba(45,212,255,.38) !important;

  transform: translateY(-1px) !important;
}
/* Mobile repaint help for fixed headers */
header#masthead{
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}
@media (max-width: 767px){
  /* Remove any accidental gap under the hero */
  .tt-hero{
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Sometimes the inner wrapper creates a sliver */
  .tt-hero > .e-con-inner,
  .tt-hero .e-con-inner{
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }