  .accent {
    color: var(--brand);
  }

  .masonry {
    column-gap: 1rem;
  }

  @media (min-width:0) {
    .masonry {
      columns: 1;
    }
  }

  @media (min-width:576px) {
    .masonry {
      columns: 2;
    }
  }

  @media (min-width:992px) {
    .masonry {
      columns: 3;
    }
  }

  @media (min-width:1400px) {
    .masonry {
      columns: 4;
    }
  }

  .masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  .gallery-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .06);
    background: #fff;
  }

  .gallery-thumb {
    display: block;
    position: relative;
    cursor: zoom-in;
  }

  .gallery-thumb img {
    width: 100%;
    height: auto;
    display: block;
  }

  .gallery-thumb .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding: .75rem .9rem;
    background: linear-gradient(to top, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity .2s ease-in-out;
  }

  .gallery-thumb:hover .overlay,
  .gallery-thumb:focus-visible .overlay {
    opacity: 1;
  }

  .overlay .title {
    color: #fff;
    font-weight: 600;
    font-size: .95rem;
  }

  .overlay .badge {
    backdrop-filter: blur(3px);
    background: rgba(255, 255, 255, .85);
    color: #0f172a;
  }

  .modal-dark .modal-content {
    background: #0b0f19;
    border: 0;
  }

  .modal-dark .modal-header {
    border: 0;
  }

  .modal-dark .btn-close {
    filter: invert(1) grayscale(100%);
  }

  .carousel-item img {
    object-fit: contain;
    max-height: calc(100vh - 12rem);
  }

  img[loading="lazy"] {
    background: #f3f4f6;
  }

/* Wrapper pill */
.gallery-switch {
  text-align: center;
  background: linear-gradient(90deg, rgba(27, 95, 140, 0.03), rgba(27, 95, 140, 0.10));
  padding: 1.1rem 1.9rem;
  border-radius: 999px;
  box-shadow: 0 0.6rem 1.4rem rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(27, 95, 140, 0.20);
}

/* Dropdown button – bold & primary */
.dropdown-toggle.custom-dropdown {
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  border: 1px solid transparent;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 8px 18px rgba(27, 95, 140, 0.35);
  transition:
    background-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.08s ease,
    border-color 0.15s ease;
}

/* Remove default Bootstrap arrow so we can use our own */
.dropdown-toggle.custom-dropdown::after {
  display: none;
}

/* Inner text styles */
.dropdown-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.85;
}

.dropdown-value {
  font-size: 0.95rem;
}

/* Chevron icon */
.dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
}

/* Hover / focus / active states */
.dropdown-toggle.custom-dropdown:hover,
.dropdown-toggle.custom-dropdown:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow:
    0 10px 24px rgba(27, 95, 140, 0.45),
    0 0 0 3px rgba(27, 95, 140, 0.25);
  transform: translateY(-1px);
  color: #ffffff;
}

.dropdown-toggle.custom-dropdown:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(27, 95, 140, 0.35);
}

/* Dropdown menu */
.dropdown-menu.custom-menu {
  border-radius: 1rem;
  padding: 0.4rem;
  margin-top: 0.6rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
  border: 1px solid rgba(15, 23, 42, 0.08);
  min-width: 230px;
}

/* Top accent line in primary color */
.dropdown-menu.custom-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
  opacity: 0.7;
}

/* Menu items */
.dropdown-menu.custom-menu .dropdown-item {
  border-radius: 0.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.95rem;
  transition: background-color 0.12s ease, color 0.12s ease, padding-left 0.12s ease;
}

/* Hover state */
.dropdown-menu.custom-menu .dropdown-item:hover {
  background-color: rgba(27, 95, 140, 0.08);
  padding-left: 0.9rem;
}

/* Active state */
.dropdown-menu.custom-menu .dropdown-item.active,
.dropdown-menu.custom-menu .dropdown-item:active {
  background-color: var(--primary);
  color: #ffffff;
}

/* Container / label */
.page-size-control .small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Wrapper to host the custom arrow */
.page-size-select-wrapper {
  position: relative;
  display: inline-block;
}

/* The select styled as a pill button */
.page-size-select {
  min-width: 4.5rem;
  border-radius: 999px;
  padding: 0.3rem 2.1rem 0.3rem 0.9rem; /* extra right space for arrow */
  border: 1px solid var(--primary);
  background-color: #ffffff;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 6px 14px rgba(27, 95, 140, 0.18);
  cursor: pointer;
  /* remove native arrows */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Hover / focus */
.page-size-select:hover,
.page-size-select:focus {
  border-color: var(--primary-dark);
  box-shadow:
    0 10px 22px rgba(27, 95, 140, 0.32),
    0 0 0 2px rgba(27, 95, 140, 0.22);
  outline: none;
}

/* Custom chevron */
.page-size-select-wrapper::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 0.7rem;
  transform: translateY(-50%);
  font-size: 0.7rem;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  width: 1.2rem;
  height: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  box-shadow: 0 0 0 2px #ffffff;
}

#galleryLightbox .carousel-control-prev,
#galleryLightbox .carousel-control-next {
    width: 7rem;
}

#galleryLightbox .carousel-control-prev-icon,
#galleryLightbox .carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-size: 60% 60%;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.4);
}

#galleryLightbox .carousel-control-prev:hover .carousel-control-prev-icon,
#galleryLightbox .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.85);
}

#galleryLightbox .carousel-control-prev-icon,
#galleryLightbox .carousel-control-next-icon {
    filter: invert(1);
}