/* ==========================================================================
   RAMOJI STUDIO — LOCATIONS PAGE COMPONENTS (BENTO CATALOGUE GRID)
   New components only — existing components keep their existing CSS.
   ========================================================================== */

/* Locations Hero Header Override */
#sd-fiveb {
  position: relative;
  z-index: 10;
  background: var(--primary-clr);
  color: #ffffff;
  box-sizing: border-box;
  width: 100%;
  height: 85vh;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 13vh 2.3vw 0;
}

.sd-locations-hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4.5vh;
  z-index: 1;
  width: 100%;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  filter: grayscale(1) brightness(1.5);
}

.sd-locations-hero-bg img {
  width: 100%;
  min-width: 100%;
  max-width: none;
  height: auto;
  object-fit: cover;
  object-position: bottom center;
  display: block;
  transform: translateY(2vh);
}

#sd-fiveb .sd-fmt-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1300px;
  width: 100%;
}

#sd-fiveb .sd-fmt-header h1 {
  color: #ffffff;
  margin: 1.2vh 0 2vh;
  text-wrap: balance;
}

#sd-fiveb .sd-fmt-header p {
  font-family: "Geist", Helvetica, Arial, sans-serif;
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 400;
  line-height: 1.28;
  color: #f1efea;
  margin: 0 auto;
  max-width: 860px;
}

.sd-breadcrumbs {
  font-family:
    "Geist",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.8vh;
}

.sd-breadcrumbs a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.sd-breadcrumbs a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.sd-breadcrumbs .sd-bc-sep {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.35);
}

.sd-breadcrumbs .sd-bc-current,
.sd-breadcrumbs span:last-child {
  color: #ffffff;
  font-weight: 400;
}

/* Section: Locations Catalogue (#sd-loc) */
#sd-loc {
  position: relative;
  z-index: 7;
  background: #ffffff;
  color: var(--primary-clr);
  box-sizing: border-box;
  width: 100%;
  padding: 6vh 2.3vw 14vh;
}

#sd-loc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.6vw;
  row-gap: 7vh;

  margin-left: auto;
  margin-right: auto;
}

/* Bento Card — width varies, height never does */
.sd-loc-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1.6vh;
}

.sd-loc-w3 {
  grid-column: span 3;
}

.sd-loc-w4 {
  grid-column: span 4;
}

.sd-loc-w5 {
  grid-column: span 5;
}

.sd-loc-media {
  position: relative;
  height: min(46vh, 440px);
  overflow: hidden;
  background: #f1efea;
}

.sd-loc-media>img,
.sd-loc-media>image-slot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-custom);
}

.sd-loc-card:hover .sd-loc-media>img {
  transform: scale(1.05);
}

/* Label below the card */
.sd-loc-card>h3 {
  margin: 0;
  font-family: "Geist", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 1.4vw, 26px);
  line-height: 1.1;
  letter-spacing: 0px;
  text-align: left;
  color: var(--primary-clr);
}

/* Slide-Up Detail Panel */
.sd-loc-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 100%;
  background: var(--primary-clr);
  color: #ffffff;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: clamp(16px, 1.2vw, 22px);
  padding: clamp(16px, 1.6vw, 30px);
  transform: translateY(102%);
  transition: transform 0.55s var(--ease-custom);
  pointer-events: none;
}

.sd-loc-card:hover .sd-loc-panel,
.sd-loc-card:focus-within .sd-loc-panel {
  transform: translateY(0);
  pointer-events: auto;
}

.sd-loc-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 0.7vh, 10px);
}

.sd-loc-panel li {
  position: relative;
  padding-left: 1.1em;
  font-family: "Geist", Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 1.35vw, 24px);
  font-weight: 400;
  line-height: 1.35;
  color: #ffffff;
}

.sd-loc-panel li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.42em;
  height: 0.42em;
  border-radius: 50%;
  background: #ffffff;
}

/* Responsive — mirrors the master stylesheet's breakpoints */
@media (max-width: 1024px) {
  #sd-loc {
    padding: 4vh 5vw 10vh;
  }

  #sd-loc-grid {
    column-gap: 3vw;
    row-gap: 4vh;

    margin-left: auto;
    margin-right: auto;
  }

  .sd-loc-w3,
  .sd-loc-w4,
  .sd-loc-w5 {
    grid-column: span 6;
  }

  .sd-loc-media {
    height: min(32vh, 300px);
  }
}

@media (max-width: 640px) {

  .sd-loc-w3,
  .sd-loc-w4,
  .sd-loc-w5 {
    grid-column: span 12;
  }

  #sd-loc {
    padding: 50px 5vw;
  }
}