/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ─── */
body {
  font-family: 'Inter', sans-serif;
  background: #FFF9F5;
  color: #111;
  line-height: 1.5;
  padding: 0.75rem;
}

/* ─── Language switcher ─── */
.language-switcher {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 20;
}

.language-button,
.language-menu button {
  appearance: none;
  border: 0;
  background: #fff;
  color: #333;
  font: inherit;
  cursor: pointer;
}

.language-button {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 72px;
  min-height: 40px;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.08);
}

.language-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  display: none;
  min-width: 112px;
  padding: 0.35rem;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
}

.language-switcher.is-open .language-menu { display: grid; gap: 0.15rem; }

.language-menu button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  text-align: left;
}

.language-menu button:hover,
.language-menu button.is-active {
  background: #FFF9F5;
}

/* ─── Grid ─── */
.page {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-flow: dense;
  gap: 0.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ─── Cell base ─── */
.cell {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
}

/* ─── Images ─── */
.cell-img a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.cell-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ─── Text tiles ─── */
.cell-text {
  display: flex;
  align-items: center;
  padding: 1.75rem 2rem;
  font-size: 1rem;
  font-weight: 400;
  color: #333;
  line-height: 1.6;
}

/* ─── HERO ─── */
.cell-hero {
  position: relative;
  grid-column: 1 / 13;
  padding: 2.5rem 8rem 2.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: visible;
}

.cell-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cell-hero .sub {
  font-size: 1rem;
  color: #888;
  font-weight: 400;
}

.cell-hero .hero-contact {
  font-size: 0.875rem;
  color: #bbb;
  margin-top: 0.5rem;
}

.cell-hero .hero-contact a {
  color: #555;
  text-decoration: none;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1px;
}

/* ─── PHOTO GRID ─── */

/* 1 — полная ширина */
.i1  { grid-column: 1 / 13; min-height: 340px; }

/* 2 и 3 — рядом */
.i2  { grid-column: 1 / 7;  min-height: 260px; }
.i3  { grid-column: 7 / 13; min-height: 260px; }

/* текст + фото + фото */
.t1  { grid-column: 1 / 4;  min-height: 170px; }
.i4  { grid-column: 4 / 13; min-height: 320px; }
.i5  { grid-column: 7 / 10; min-height: 300px; }

/* фото + текст + фото */
.i6  { grid-column: 1 / 7;  min-height: 300px; }
.t2  { grid-column: 10 / 13; min-height: 300px; }
.i7  { grid-column: 5 / 13; min-height: 260px; }

/* фото + фото + текст */
.i8   { grid-column: 1 / 5;  min-height: 260px; }
.i8_5 { grid-column: 5 / 13; min-height: 280px; }
.t3   { grid-column: 1 / 5; min-height: 180px; }

/* текст + фото + текст */
.t4  { grid-column: 1 / 4;  min-height: 160px; }
.i9  { grid-column: 4 / 10; min-height: 260px; }
.t5  { grid-column: 10 / 13; min-height: 160px; }


/* 11 — полная ширина */
.i11 { grid-column: 1 / 13; min-height: 320px; }

/* ─── MOBILE ─── */
@media (max-width: 680px) {
  body { padding: 0.5rem; }

  .page { grid-template-columns: 1fr 1fr; grid-auto-flow: dense; gap: 0.5rem; }

  .cell-hero  { grid-column: 1 / -1; padding: 1.25rem 5.75rem 1.25rem 1.25rem; }
  .cell-hero h1 { font-size: 1.6rem; }

  /* все фото — по 1 колонке → 2 в ряд → 2×2 */
  .i1, .i2, .i3, .i4, .i5,
  .i6, .i7, .i8, .i8_5, .i9, .i11 {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
    min-height: unset;
  }

  /* первое и последнее — полная ширина */
  .i1, .i11 { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

  /* акцентные фото — крупнее, но в той же чистой бенто-сетке */
  .i4, .i5, .i8_5 { grid-column: 1 / -1; aspect-ratio: 16 / 10; }

  /* текст — полная ширина */
  .t1, .t2, .t3, .t4, .t5 {
    grid-column: 1 / -1;
    min-height: auto;
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* ─── PhotoSwipe UI overrides ─── */

/* Общий фон — почти чёрный */
.pswp__bg { background: rgba(0, 0, 0, 0.92); }

/* Скрываем дефолтные SVG-иконки */
.pswp__button { background: none !important; }
.pswp__icn { display: none; }

/* Базовые кнопки */
.pswp__button--close,
.pswp__button--arrow--prev,
.pswp__button--arrow--next {
  width: 44px;
  height: 44px;
  opacity: 0.35;
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

.pswp__button--close:hover,
.pswp__button--arrow--prev:hover,
.pswp__button--arrow--next:hover {
  opacity: 0.9;
}

/* Крестик — через псевдоэлемент */
.pswp__button--close::before {
  content: '×';
  font-size: 28px;
  line-height: 1;
  font-weight: 300;
  color: #fff;
}

/* Стрелки — через псевдоэлемент */
.pswp__button--arrow--prev::before {
  content: '‹';
  font-size: 38px;
  line-height: 1;
  font-weight: 300;
  color: #fff;
}

.pswp__button--arrow--next::before {
  content: '›';
  font-size: 38px;
  line-height: 1;
  font-weight: 300;
  color: #fff;
}

/* Позиционирование стрелок */
.pswp__button--arrow--prev { left: 16px; }
.pswp__button--arrow--next { right: 16px; }

/* Скрываем счётчик и zoom-кнопку */
.pswp__counter { display: none; }
.pswp__button--zoom { display: none; }
