/* Promo tiles */
.promo-wrap {
  margin: 0 auto;
  max-width: 1200px; /* or whatever fits your grid */
  padding: 0; /* removes the unwanted space */
}

.promo-tiles {
  position: relative;
  margin-top: 0;
  padding-top: 100px;
  margin-bottom: 0;
  padding-bottom: 100px;
  overflow: hidden;
  background-color: white;
}

.promo-title {
  position: relative;
  z-index: 2;
}

.promo-tile {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  text-decoration: none;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.2),
    inset -4px -4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background-blend-mode: overlay;

  /* NEW: Make tile width flexible but never too small */
  flex: 1 1 0;
  min-width: 180px;
  max-width: 280px; /* Optional: limits max tile width */
}

.promo-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.promo-tile-grid {
  display: flex;
  justify-content: flex-end;     /* Align all tiles to the right */
  flex-wrap: nowrap;             /* Prevent wrapping */
  gap: 24px;
  padding-left: 8.8%;           /* Left-side negative space */
  padding-right: 0%;
  overflow-x: hidden;            /* Optional: hide overflow */
}

.promo-tiles::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/wp-content/uploads/blue-block-2.png");
  background-repeat: no-repeat;
  background-position: right -350px top -350px;
  background-size: 1450px 1200px;
  opacity: 0.7; /* 0 = fully transparent, 1 = fully opaque */
  z-index: 0;
  pointer-events: none;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateX(-80px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.animated-tile {
  opacity: 0;
  animation: slideFadeIn 1.2s ease-out forwards;
}

.promo-tile:nth-child(1) { animation-delay: 0.5s; }
.promo-tile:nth-child(2) { animation-delay: 0.9s; }
.promo-tile:nth-child(3) { animation-delay: 1.3s; }
.promo-tile:nth-child(4) { animation-delay: 1.7s; }
.promo-tile:nth-child(5) { animation-delay: 2.1s; }
}

 /* Promo-inverse */
.promo-wrap-inverse {
  margin: 0 auto;
  max-width: 1200px; /* or whatever fits your grid */
  padding: 0; /* removes the unwanted space */
}

.promo-tiles-inverse {
  position: relative;
  margin-top: 0;
  padding-top: 100px;
  margin-bottom: 0;
  padding-bottom: 100px;
  overflow: hidden;
  background-color: white;
}

.promo-title-inverse {
  position: relative;
  padding-left: 5.8%;
  padding-right: 0px;
  z-index: 2;
}

.promo-tile-inverse {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 20px;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  text-decoration: none;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  box-shadow:
    inset 2px 2px 4px rgba(255, 255, 255, 0.2),
    inset -4px -4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  background-blend-mode: overlay;

  /* NEW: Make tile width flexible but never too small */
  flex: 1 1 0;
  min-width: 180px;
  max-width: 280px; /* Optional: limits max tile width */
}

.promo-tile-inverse:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.promo-tile-grid-inverse {
  display: flex;
  justify-content: flex-start;     /* Align all tiles to the left */
  flex-wrap: nowrap;             /* Prevent wrapping */
  gap: 24px;
  padding-left: 5.8%;           /* Left-side negative space */
  padding-right: 5.8%;
  overflow-x: hidden;            /* Optional: hide overflow */
}

.promo-tiles-inverse::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("/wp-content/uploads/blue-block-2.png");
  background-repeat: no-repeat;
  background-position: -350px -350px;
   background-size: 1450px 1200px;
  opacity: 0.7; /* 0 = fully transparent, 1 = fully opaque */
  z-index: 0;
  pointer-events: none;
}

.promo-tile-back {
  display: none !important;
}

@keyframes slideFadeInInverse {
  from {
    opacity: 0;
    transform: translateX(80px); /* slide in from right */
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animated-tile-inverse {
  opacity: 0;
  animation: slideFadeInInverse 1.2s ease-out forwards;
}

.promo-tile-inverse:nth-child(1) { animation-delay: 0.5s; }
.promo-tile-inverse:nth-child(2) { animation-delay: 0.9s; }
.promo-tile-inverse:nth-child(3) { animation-delay: 1.3s; }
.promo-tile-inverse:nth-child(4) { animation-delay: 1.7s; }
.promo-tile-inverse:nth-child(5) { animation-delay: 2.1s; }

/* Modal Overlay */
.promo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: modalFadeIn 0.4s ease-out;
}

/* Modal Inner Box */
.promo-modal-content {
  background: rgba(0, 119, 182, 0.2); /* blue tint */
  backdrop-filter: saturate(180%) blur(12px); /* frosted glass */
  -webkit-backdrop-filter: saturate(180%) blur(12px); /* Safari support */
  border: 1px solid rgba(255, 255, 255, 0.3); /* subtle outline */
  border-radius: var(--radius);
  padding: 40px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  position: relative;
}

/* Close Button */
.promo-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.8rem;
  color: #666;
  cursor: pointer;
}

/* Hide Modal by Default */
.hidden {
  display: none;

  @keyframes modalFadeIn {
    from {
      transform: translateY(20px);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }