.jlg-areas-grid {
  --jlg-overlay-opacity: 0.35;
  position: relative;
  width: 100%;
  height: 570px;
  overflow: hidden;
  background: #111;
}

.jlg-areas-grid__bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

.jlg-areas-grid__bg {
  position: absolute;
  inset: 0;
  background-image: var(--jlg-active-bg);
  background-size: cover;
  background-position: center center;
  transform: scale(1.08);
  transition: background-image 0.3s ease, transform 0.8s ease;
}

.jlg-areas-grid__bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.18);
}

.jlg-areas-grid__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  height: 100%;
}

.jlg-area-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
}

.jlg-area-card__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.jlg-area-card__image-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
  transition: box-shadow 0.35s ease, background-color 0.35s ease;
}

.jlg-area-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.65s ease, filter 0.4s ease, opacity 0.4s ease;
}

.jlg-area-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,var(--jlg-overlay-opacity));
  transition: opacity 0.35s ease, background-color 0.35s ease;
}

.jlg-area-card__content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.jlg-area-card__title {
  margin: 0;
  color: #fff;
  font-family: "Cormorant Garamond", serif;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

/* Background takeover mode */
.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-areas-grid__bg-wrap {
  opacity: 1;
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-areas-grid__bg {
  transform: scale(1);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card {
  opacity: 1;
  transform: none;
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card .jlg-area-card__image-wrap {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card .jlg-area-card__image {
  opacity: 0.10;
  transform: scale(1.04);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card .jlg-area-card__overlay {
  background: rgba(0,0,0,0.16);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card .jlg-area-card__title {
  opacity: 0.92;
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card.is-active {
  z-index: 3;
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card.is-active .jlg-area-card__image-wrap {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.26), inset 0 0 0 999px rgba(255,255,255,0.02);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card.is-active .jlg-area-card__image {
  opacity: 0;
  transform: scale(1.07);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card.is-active .jlg-area-card__overlay {
  background: rgba(0,0,0,0.04);
}

.jlg-areas-grid.hover-style-background_takeover.is-hovering .jlg-area-card.is-active .jlg-area-card__title {
  opacity: 1;
  transform: scale(1.03);
}

/* Card focus mode */
.jlg-areas-grid.hover-style-card_focus .jlg-areas-grid__bg-wrap {
  display: none;
}

.jlg-areas-grid.hover-style-card_focus.is-hovering .jlg-area-card {
  opacity: 0.68;
  filter: saturate(0.75);
}

.jlg-areas-grid.hover-style-card_focus.is-hovering .jlg-area-card.is-active {
  opacity: 1;
  filter: saturate(1.05);
  transform: scale(1.03);
  z-index: 4;
}

.jlg-areas-grid.hover-style-card_focus.is-hovering .jlg-area-card.is-active .jlg-area-card__image {
  transform: scale(1.08);
}

.jlg-areas-grid.hover-style-card_focus.is-hovering .jlg-area-card.is-active .jlg-area-card__overlay {
  opacity: 0.18;
}

.jlg-areas-grid.hover-style-card_focus.is-hovering .jlg-area-card.is-active .jlg-area-card__image-wrap {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
}

.jlg-area-card:hover .jlg-area-card__image {
  transform: scale(1.05);
}

/* Tablet */
@media (max-width: 1024px) {
  .jlg-areas-grid {
    height: auto !important;
  }

  .jlg-areas-grid__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    auto-rows: minmax(220px, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .jlg-areas-grid__inner {
    grid-template-columns: 1fr;
    auto-rows: 260px;
  }

  .jlg-area-card__title {
    font-size: 24px;
  }

  .jlg-areas-grid__bg-wrap {
    display: none;
  }
}
