/* Studio two-column layout */
.studio-layout {
  display: flex;
  gap: 2rem;
}
.studio-left {
  flex: 3;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  grid-template-rows: auto auto auto;
  gap: 0 1.5rem;
  align-items: start;
}
.studio-left .title-subpage { grid-column: 1; grid-row: 1; }
.studio-left .studio-text { grid-column: 2; grid-row: 1; }
.studio-left .cta-btn { grid-column: 1 / -1; grid-row: 2; }
.studio-left .contact-cta-portrait { grid-column: 1 / -1; grid-row: 3; }
.studio-gallery {
  flex: 7;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-viewer {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 4px;
}
.gallery-main {
  width: 100%;
  display: block;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.6s ease-in-out;
}
.gallery-main.is-fading {
  opacity: 0;
}

/* Landscape: clamp gallery viewer width, height auto from aspect ratio */
@media (min-aspect-ratio: 950/1180) {
  .studio-gallery {
    padding-right: 2rem;
  }
  .gallery-viewer {
    width: clamp(880px, 60vw, 1100px);
    aspect-ratio: 16 / 10;
    height: auto;
    margin-left: auto;
    margin-right: auto;
  }
  .gallery-main {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.gallery-prev,
.gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  color: var(--white);
  border: none;
  font-size: 2.5rem;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}
.gallery-prev:hover,
.gallery-next:hover { opacity: 0.6; }
.gallery-prev { left: 1rem; }
.gallery-next { right: 1rem; }

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #aaa;
  border: 1px solid #999;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.gallery-dot:hover { background: #777; }
.gallery-dot.active {
  background: var(--dark-teal);
  border-color: var(--dark-teal);
  transform: scale(1.3);
}


.studio-text {
  font-family: fiona, sans-serif;
  font-weight: 200;
  color: var(--white);
  line-height: 1.5;
  font-size: clamp(1.5rem, 1rem + 0.5vw, 1.25rem);
}

/* Portrait: stack top to bottom, allow scroll (override global fixed main) */
@media (max-aspect-ratio: 950/1180) {
  main.studio-layout {
    position: static;
    height: auto;
    min-height: 0;
    bottom: auto;
    top: auto;
    left: auto;
    justify-content: flex-start;
    padding: 1.5rem 1.5rem 3rem;
  }
  .studio-layout {
    flex-direction: column;
    display: flex;
  }
  .studio-left {
    display: contents;
  }
  /* Stack order: title → gallery → studio-text (CTA and Contact stay fixed per styles.css) */
  .studio-layout .title-subpage { order: 1; }
  .studio-layout .studio-gallery { order: 2; }
  .studio-layout .studio-text { order: 3; }
}
