/* Life at Dicoding and Our offices, from the Figma Continuum frames (Life / activities, Life / offices): the old tabs
   become two sections of photo cards. Each card is a carousel with dots and prev/next, a title and a short line.
   Every category keeps all of its photos; the old left/right columns are merged into one carousel per card. */

.lp-life__inner {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 4rem 1rem;
}

.lp-life__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
}

.lp-life__title {
  font-size: 1.875rem;
  line-height: 2.375rem;
  font-weight: 400;
  color: var(--lp-ui-text-primary);
}

.lp-life__lead {
  font-size: 1.125rem;
  line-height: 1.75rem;
  color: var(--lp-ui-text-tertiary);
}

.lp-life__grid {
  display: grid;
  gap: 2.5rem 1rem;
}

.lp-gallery {
  display: flex;
  flex-direction: column;
}

.lp-gallery__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 33 / 32;
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-ui-2xl);
  background: var(--lp-ui-bg-secondary);
}

.lp-life--offices .lp-gallery__media {
  aspect-ratio: 63 / 40;
}

button.lp-gallery__media {
  cursor: zoom-in;
}

.lp-gallery__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transition: opacity 800ms ease-in-out;
}

.lp-gallery__media img.is-active {
  opacity: 1;
}

.lp-gallery__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.75rem;
}

.lp-gallery__dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.lp-gallery__dot {
  width: 0.5rem;
  height: 0.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--lp-ui-bg-quaternary);
  cursor: pointer;
}

.lp-gallery__dot.is-active {
  background: var(--primary);
}

.lp-gallery__arrows {
  display: flex;
  flex-shrink: 0;
  gap: 0.25rem;
}

.lp-gallery__arrow {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--lp-ui-text-primary);
  cursor: pointer;
}

.lp-gallery__arrow:hover {
  background: var(--muted);
}

.lp-gallery__arrow svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lp-gallery__media:focus-visible,
.lp-gallery__dot:focus-visible,
.lp-gallery__arrow:focus-visible,
.lp-photo-modal__close:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--ring) 50%, transparent);
  outline-offset: 2px;
}

.lp-gallery__title {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
  font-weight: 500;
  color: var(--lp-ui-text-primary);
}

.lp-gallery__desc {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--lp-ui-text-tertiary);
}

/* Life at Dicoding rows: one full-bleed peek carousel per category (.lp-carousel), with the title, description,
   counter and arrows lined up over the active slide. */

.lp-life--activities .lp-life__inner {
  padding-bottom: 3rem;
}

.lp-life__rows {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  padding-bottom: 4rem;
}

.lp-life-row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lp-life-row__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: var(--slide-w);
  margin: 0 auto;
}

.lp-life-row__copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 40rem;
}

.lp-life-row__title {
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 400;
  color: var(--lp-ui-text-primary);
}

.lp-life-row__desc {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--lp-ui-text-tertiary);
}

/* Office photo, opened from an office card */

.lp-photo-modal {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(12, 17, 29, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lp-photo-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 45rem;
  overflow: hidden;
  border-radius: var(--radius-ui-2xl);
  background: var(--lp-ui-bg-primary);
  box-shadow: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
  animation: lp-photo-modal-in 280ms ease-out both;
}

@keyframes lp-photo-modal-in {
  from { opacity: 0; transform: scale(0.96); }
}

.lp-photo-modal__dialog img {
  display: block;
  width: 100%;
  max-height: 26.25rem;
  object-fit: cover;
}

.lp-photo-modal__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--lp-ui-text-tertiary);
  cursor: pointer;
}

.lp-photo-modal__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

.lp-photo-modal__info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.75rem;
}

.lp-photo-modal__title {
  font-size: 1.25rem;
  line-height: 1.875rem;
  font-weight: 500;
  color: var(--lp-ui-text-primary);
}

.lp-photo-modal__desc {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--lp-ui-text-tertiary);
}

@media (min-width: 48rem) {
  .lp-life__inner { padding: 6rem 1.5rem; }
  .lp-life__title { font-size: 2.25rem; line-height: 2.75rem; letter-spacing: -0.02em; }
  .lp-life__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 48rem) {
  .lp-life--activities .lp-life__inner { padding-bottom: 3.5rem; }
  .lp-life__rows { gap: 5rem; padding-bottom: 6rem; }
  .lp-life-row__header { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lp-gallery__media img { transition: none; }
}
