@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&family=Nunito:wght@300;400;500;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background: #DDE5D8;
  min-height: 100vh;
  padding: 3rem 1.5rem;
}

.page {
  max-width: 980px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.back {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5A8060;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}

.back:hover {
  color: #3A5E40;
}

.header__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7A9E7E;
  margin-bottom: 0.3rem;
  text-align: right;
}

.header__name {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.45rem, 5vw, 3.2rem);
  font-weight: 600;
  color: #2C3029;
  line-height: 1;
  text-align: right;
}

.divider {
  width: 100%;
  height: 1px;
  background: #C0CCBA;
  margin-bottom: 2.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery__item {
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  display: block;
  object-fit: cover;
  background: transparent;
}

.gallery__media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #1C2E1C;
}

.gallery__media video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #1C2E1C;
  cursor: pointer;
}

.gallery__caption {
  padding: 0.55rem 0;
  font-size: 0.76rem;
  font-weight: 400;
  color: #5C5C52;
  background: transparent;
}


/* ── ЗАГЛУШКА ДЛЯ НЕЗАВАНТАЖЕНИХ ЗОБРАЖЕНЬ ── */

.image-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(238, 240, 234, 0.75);
  color: #5A8060;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  border: 1px dashed #AFC0AA;
  border-radius: 8px;
  padding: 1rem;
}

.gallery__item--placeholder {
  cursor: default;
}

.gallery__item--placeholder:hover {
  transform: none;
  box-shadow: none;
}

/* ── ЛАЙТБОКС ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 20, 0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  color: rgba(255,255,255,0.7);
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: color 0.2s;
}

.lightbox__close:hover {
  color: #fff;
}

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.7);
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
  transition: color 0.2s;
}

.lightbox__nav:hover {
  color: #fff;
}

.lightbox__prev {
  left: 1.5rem;
}

.lightbox__next {
  right: 1.5rem;
}

@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  body {
    padding: 2rem 1rem;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .header__name {
  font-family: 'Caveat', cursive;
  font-size: clamp(2.45rem, 5vw, 3.2rem);
  font-weight: 600;
  color: #2C3029;
  line-height: 1;
  text-align: right;
}
}

/* ── ВЕЛИКЕ ВІКНО ДЛЯ ВІДЕО ── */

.video-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 20, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-lightbox.active {
  display: flex;
}

.video-lightbox__video {
  width: min(90vw, 900px);
  max-height: 85vh;
  display: block;
  border-radius: 8px;
  background: #000;
}

.video-lightbox__close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  color: rgba(255,255,255,0.8);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  background: none;
  border: none;
  z-index: 10000;
  transition: color 0.2s;
}

.video-lightbox__close:hover {
  color: #ffffff;
}
