/* Elora Works — custom layouts (Instagram / masonry / case studies) */

.elora-works-link,
.elora-ig-thumb,
.elora-masonry__item,
.elora-lb-btn,
.elora-ig-modal__close,
.elora-ig-modal__nav,
.elora-web-card,
.elora-case-nav a {
  cursor: pointer;
}

.no-touch .elora-works-link:hover .mxd-project-item__name .project-name-s,
.no-touch .elora-web-card:hover .elora-web-card__title {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --- Instagram grid --- */
.elora-ig {
  padding-bottom: 4rem;
}

.elora-ig__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
}

@media (max-width: 767px) {
  .elora-ig__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.2rem;
  }
}

.elora-ig-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #1a1a1a;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.elora-ig-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.no-touch .elora-ig-thumb:hover,
.elora-ig-thumb:focus-visible {
  opacity: 0.88;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.elora-ig-thumb__badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.1rem;
  height: 1.1rem;
  opacity: 0.95;
  pointer-events: none;
}

.elora-ig-thumb__badge svg {
  width: 100%;
  height: 100%;
  fill: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

/* --- Instagram modal --- */
.elora-ig-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.elora-ig-modal.is-open {
  display: flex;
}

.elora-ig-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.82);
  cursor: pointer;
}

.elora-ig-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: min(90vh, 900px);
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  background: #0f0f0f;
  color: #eeeae8;
  border-radius: 0.35rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

@media (max-width: 900px) {
  .elora-ig-modal__dialog {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow: auto;
  }
}

.elora-ig-modal__media {
  position: relative;
  background: #000;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.elora-ig-modal__track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  touch-action: pan-y;
}

.elora-ig-modal__slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.elora-ig-modal__slide img {
  max-width: 100%;
  max-height: min(80vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.elora-ig-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.2s ease;
}

.elora-ig-modal__nav.is-visible {
  display: inline-flex;
}

.elora-ig-modal__nav:hover,
.elora-ig-modal__nav:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

.elora-ig-modal__nav--prev {
  left: 0.6rem;
}

.elora-ig-modal__nav--next {
  right: 0.6rem;
}

.elora-ig-modal__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  pointer-events: none;
}

.elora-ig-modal__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.elora-ig-modal__dot.is-active {
  background: #fff;
}

.elora-ig-modal__side {
  padding: 1.25rem 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-left: 1px solid rgba(238, 234, 232, 0.12);
}

@media (max-width: 900px) {
  .elora-ig-modal__side {
    border-left: 0;
    border-top: 1px solid rgba(238, 234, 232, 0.12);
  }
}

.elora-ig-modal__client {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.72;
}

.elora-ig-modal__caption {
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0;
}

.elora-ig-modal__enquire {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-size: 0.92rem;
  transition: opacity 0.2s ease;
}

.elora-ig-modal__enquire:hover,
.elora-ig-modal__enquire:focus-visible {
  opacity: 0.75;
}

.elora-ig-modal__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.elora-ig-modal__close:hover,
.elora-ig-modal__close:focus-visible {
  background: rgba(255, 255, 255, 0.3);
}

body.elora-modal-open {
  overflow: hidden;
}

/* --- Masonry --- */
.elora-masonry {
  column-count: 3;
  column-gap: 0.85rem;
}

@media (max-width: 991px) {
  .elora-masonry {
    column-count: 2;
  }
}

@media (max-width: 575px) {
  .elora-masonry {
    column-count: 1;
  }
}

.elora-masonry__item {
  break-inside: avoid;
  margin: 0 0 0.85rem;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.elora-masonry__item img,
.elora-masonry__item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.2rem;
}

.no-touch .elora-masonry__item:hover,
.elora-masonry__item:focus-visible {
  transform: translateY(-2px);
  opacity: 0.92;
  outline: none;
}

.elora-masonry__meta {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.35;
  opacity: 0.8;
}

/* --- Lightbox --- */
.elora-lb {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.elora-lb.is-open {
  display: flex;
}

.elora-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.88);
  cursor: pointer;
}

.elora-lb__panel {
  position: relative;
  z-index: 1;
  width: min(1100px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.elora-lb__media {
  max-width: 100%;
  max-height: 78vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.elora-lb__media img,
.elora-lb__media video {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 0.2rem;
}

.elora-lb__caption {
  color: #eeeae8;
  text-align: center;
  max-width: 42rem;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.elora-lb__project {
  display: block;
  opacity: 0.7;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.elora-lb-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.elora-lb-btn:hover,
.elora-lb-btn:focus-visible {
  background: rgba(255, 255, 255, 0.32);
}

.elora-lb-btn--prev {
  left: 0.5rem;
}

.elora-lb-btn--next {
  right: 0.5rem;
}

.elora-lb__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
}

/* --- Web hub cards --- */
.elora-web-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

@media (max-width: 767px) {
  .elora-web-grid {
    grid-template-columns: 1fr;
  }
}

.elora-web-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 0.25rem;
  overflow: hidden;
  background: rgba(127, 127, 127, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.no-touch .elora-web-card:hover,
.elora-web-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.elora-web-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #222;
}

.elora-web-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.no-touch .elora-web-card:hover .elora-web-card__media img {
  transform: scale(1.04);
}

.elora-web-card__body {
  padding: 1rem 1.1rem 1.2rem;
}

.elora-web-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
}

.elora-web-card__domain {
  margin: 0;
  opacity: 0.7;
  font-size: 0.88rem;
}

/* --- Case study extras --- */
.elora-case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.elora-case-stack img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 0 1rem;
  border-radius: 0.2rem;
}

.elora-case-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 575px) {
  .elora-case-nav {
    grid-template-columns: 1fr;
  }
}

.elora-case-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(127, 127, 127, 0.35);
  border-radius: 0.25rem;
  color: inherit;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.no-touch .elora-case-nav a:hover,
.elora-case-nav a:focus-visible {
  background: rgba(127, 127, 127, 0.12);
  border-color: currentColor;
}

.elora-case-nav__label {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.7;
}

.elora-case-nav__name {
  font-size: 1.05rem;
}

.elora-case-nav__next {
  text-align: right;
}

@media (max-width: 575px) {
  .elora-case-nav__next {
    text-align: left;
  }
}

.elora-back-works {
  display: inline-flex;
  margin-bottom: 0.75rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  font-size: 0.9rem;
  color: inherit;
  transition: opacity 0.2s ease;
}

.elora-back-works:hover,
.elora-back-works:focus-visible {
  opacity: 0.7;
}
