/* 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;
  }
}

}
@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;
  }