/* Общие стили трёх страниц портфолио */
body.portfolio-page {
  margin: 0;
  background: #fff;
  color: #172228;
}

/* Горизонтальный кадр занимает место двух вертикальных фотографий. */
.individual-gallery-page .individual-gallery figure.photo-wide {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.individual-gallery-page .individual-gallery figure.photo-wide img {
  object-fit: cover;
  object-position: center;
}

@media (max-width: 650px) {
  .individual-gallery-page .individual-gallery figure.photo-wide {
    grid-column: 1 / -1;
  }
}

.portfolio-page * { box-sizing: border-box; }

.portfolio-page .portfolio-page-header {
  position: relative;
  z-index: 10;
  min-height: 116px;
  padding: 20px max(24px, calc((100% - 1500px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  background: #fff;
}

.portfolio-page-header img {
  display: block;
  width: clamp(215px, 18vw, 295px);
  height: auto;
}

.portfolio-page-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(17px, 1.7vw, 31px);
}

.portfolio-page-nav a {
  color: #172228;
  font-size: 15px;
  text-decoration: none;
  transition: color .25s ease;
}

.portfolio-page-nav a:hover { color: #4c94a3; }

.portfolio-page-hero {
  min-height: 72vh;
  padding: clamp(85px, 10vw, 150px) max(24px, calc((100% - 1500px) / 2));
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(50px, 8vw, 125px);
  background: linear-gradient(to bottom, #fff 0, #f5f5f3 25%, #efefec 100%);
}

.portfolio-page-kicker {
  margin: 0 0 24px;
  color: #4c7780;
  font: 600 14px/1.2 Manrope, Arial, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.portfolio-page-hero h1 {
  margin: 0 0 34px;
  font: 500 clamp(68px, 8vw, 132px)/.8 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.045em;
}

.portfolio-page-lead {
  max-width: 650px;
  margin: 0;
  color: #52656b;
  font-size: clamp(18px, 1.3vw, 21px);
  line-height: 1.65;
}

.portfolio-page-cover {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: 12px 12px 30px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(23, 34, 40, .15);
  transform: rotate(2deg);
}

.portfolio-page-cover::before,
.portfolio-shot::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 30px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(218, 201, 164, .72);
}

.portfolio-page-cover img {
  display: block;
  width: 100%;
  height: min(62vh, 700px);
  object-fit: cover;
}

.portfolio-page-text {
  padding: clamp(75px, 8vw, 120px) max(24px, calc((100% - 1240px) / 2));
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(45px, 8vw, 120px);
  background: #fff;
}

.portfolio-page-text h2 {
  margin: 0;
  font: 500 clamp(50px, 5vw, 82px)/.9 "Cormorant Garamond", Georgia, serif;
}

.portfolio-page-text-copy p {
  margin: 0 0 24px;
  color: #53666b;
  font-size: 19px;
  line-height: 1.72;
}

.portfolio-gallery {
  padding: clamp(70px, 8vw, 120px) max(24px, calc((100% - 1500px) / 2));
  background: linear-gradient(to bottom, #fff 0, #f5f5f3 13%, #efefec 100%);
}

.portfolio-gallery-heading {
  margin-bottom: clamp(55px, 7vw, 90px);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}

.portfolio-gallery-heading h2 {
  margin: 0;
  font: 500 clamp(56px, 6vw, 96px)/.85 "Cormorant Garamond", Georgia, serif;
}

.portfolio-gallery-heading p {
  max-width: 390px;
  margin: 0;
  color: #5a6c71;
  font-size: 18px;
  line-height: 1.55;
}

.portfolio-gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
  gap: clamp(22px, 3vw, 48px);
}

.portfolio-shot {
  position: relative;
  margin: 0;
  padding: 9px 9px 24px;
  background: #fff;
  box-shadow: 0 16px 35px rgba(23, 34, 40, .13);
}

.portfolio-shot img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.portfolio-shot:nth-child(1) { grid-column: 1 / span 5; transform: rotate(-1.5deg); }
.portfolio-shot:nth-child(2) { grid-column: 7 / span 6; margin-top: 70px; transform: rotate(1.2deg); }
.portfolio-shot:nth-child(3) { grid-column: 2 / span 4; margin-top: 25px; transform: rotate(1deg); }
.portfolio-shot:nth-child(4) { grid-column: 6 / span 7; margin-top: 90px; transform: rotate(-1.2deg); }
.portfolio-shot:nth-child(5) { grid-column: 1 / span 6; margin-top: 40px; transform: rotate(-.8deg); }
.portfolio-shot:nth-child(6) { grid-column: 8 / span 5; margin-top: 15px; transform: rotate(1.4deg); }

.portfolio-page-cta {
  padding: clamp(80px, 9vw, 135px) 24px;
  text-align: center;
  background: #fff;
}

.portfolio-page-cta h2 {
  max-width: 900px;
  margin: 0 auto 36px;
  font: 500 clamp(54px, 6vw, 92px)/.9 "Cormorant Garamond", Georgia, serif;
}

.portfolio-page-button {
  width: min(430px, 100%);
  min-height: 72px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #172228;
  color: #172228;
  font: 500 15px/1.2 Manrope, Arial, sans-serif;
  letter-spacing: .08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background .25s ease, border-color .25s ease;
}

.portfolio-page-button:hover {
  border-color: #79b8c5;
  background: #79b8c5;
}

.portfolio-page-footer {
  padding: 34px max(24px, calc((100% - 1500px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  background: #252b2e;
  color: rgba(255, 255, 255, .58);
}

.portfolio-page-footer img {
  width: clamp(190px, 17vw, 260px);
  filter: brightness(0) invert(1);
}

.portfolio-page-footer a { color: #fff; text-decoration: none; }

@media (max-width: 800px) {
  .portfolio-page .portfolio-page-header { min-height: 88px; padding: 15px 18px; }
  .portfolio-page-header img { width: 205px; }
  .portfolio-page-nav a:not(:last-child) { display: none; }
  .portfolio-page-nav a { font-size: 14px; }
  .portfolio-page-hero { min-height: auto; padding: 65px 18px 80px; display: block; }
  .portfolio-page-hero h1 { margin-bottom: 25px; font-size: clamp(62px, 20vw, 92px); }
  .portfolio-page-cover { width: 92%; margin-top: 55px; }
  .portfolio-page-cover img { height: 62vh; }
  .portfolio-page-text { padding: 65px 18px; display: block; }
  .portfolio-page-text h2 { margin-bottom: 32px; }
  .portfolio-page-text-copy p { font-size: 17px; }
  .portfolio-gallery { padding: 65px 18px 75px; }
  .portfolio-gallery-heading { display: block; margin-bottom: 52px; }
  .portfolio-gallery-heading h2 { margin-bottom: 25px; }
  .portfolio-gallery-grid { display: grid; grid-template-columns: 1fr; gap: 42px; }
  .portfolio-shot,
  .portfolio-shot:nth-child(n) { grid-column: 1; width: 100%; margin: 0; }
  .portfolio-shot:nth-child(odd) { transform: rotate(-.6deg); }
  .portfolio-shot:nth-child(even) { transform: rotate(.6deg); }
  .portfolio-shot img { min-height: 410px; max-height: 650px; }
  .portfolio-page-cta { padding: 70px 18px; }
  .portfolio-page-footer { padding: 26px 18px; display: block; text-align: center; }
  .portfolio-page-footer img { margin: 0 auto 20px; }
}

/* Главная страница портфолио */
.portfolio-categories-intro { padding-bottom: 58px; }

.category-grid {
  padding: 66px max(24px, calc((100% - 1450px) / 2)) 90px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(45px, 6vw, 85px) clamp(35px, 5vw, 75px);
  background: #fff;
}

.category-card { color: #172228; text-decoration: none; }

.category-card figure {
  position: relative;
  margin: 0 0 30px;
  padding: 10px 10px 26px;
  background: #fff;
  box-shadow: 0 17px 38px rgba(23, 34, 40, .14);
  transform: rotate(-.8deg);
  transition: transform .35s ease, box-shadow .35s ease;
}

.category-card:nth-child(even) figure { transform: rotate(.8deg); }
.category-card:hover figure { transform: rotate(0) translateY(-7px); box-shadow: 0 25px 48px rgba(23, 34, 40, .2); }
.category-card figure img { display: block; width: 100%; height: clamp(360px, 36vw, 540px); object-fit: cover; }
.category-card div > p { margin: 0 0 10px; color: #4c7780; font: 600 13px/1 Manrope, Arial, sans-serif; letter-spacing: .17em; }
.category-card h2 { margin: 0 0 15px; font: 500 clamp(47px, 4.5vw, 72px)/.88 "Cormorant Garamond", Georgia, serif; }
.category-card div > span { display: block; max-width: 560px; margin-bottom: 20px; color: #53666b; font-size: 17px; line-height: 1.55; }
.category-card b { font: 600 13px/1.2 Manrope, Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; }

.portfolio-empty {
  min-height: 430px;
  padding: 80px 24px 95px;
  text-align: center;
  background: #fff;
}

.portfolio-empty > p { margin: 0 0 18px; color: #4c7780; font: 600 13px/1 Manrope, Arial, sans-serif; letter-spacing: .18em; text-transform: uppercase; }
.portfolio-empty h2 { margin: 0 auto 36px; font: 500 clamp(50px, 5vw, 82px)/.9 "Cormorant Garamond", Georgia, serif; }

@media (max-width: 800px) {
  .category-grid { padding: 50px 18px 65px; grid-template-columns: 1fr; gap: 48px; }
  .category-card figure { margin-bottom: 25px; }
  .category-card figure img { height: 58vh; min-height: 390px; }
  .category-card h2 { font-size: 56px; }
  .portfolio-empty { min-height: 350px; padding: 65px 18px 75px; }
}

/* Каталог отдельных фотосессий */
.portfolio-main-header { position: relative; }

.inner-intro,
.session-detail-intro {
  padding: 38px max(24px, calc((100% - 1450px) / 2)) 68px;
  background: linear-gradient(to bottom, #fff, #f2f2ef);
}

.breadcrumbs {
  margin-bottom: 45px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 13px;
  color: #6c797d;
  font: 500 14px/1.4 Manrope, Arial, sans-serif;
}

.breadcrumbs a { color: #4c7780; text-decoration: none; }
.breadcrumbs a:hover { color: #172228; }

.inner-intro-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  align-items: end;
  gap: clamp(45px, 8vw, 120px);
}

.inner-intro h1,
.session-detail-heading h1 {
  margin: 0;
  font: 500 clamp(66px, 7vw, 112px)/.82 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.04em;
}

.inner-intro-copy p {
  margin: 0 0 15px;
  color: #53666b;
  font-size: 18px;
  line-height: 1.62;
}

.session-catalog {
  padding: 72px max(24px, calc((100% - 1350px) / 2)) 92px;
  background: #fff;
}

.session-card {
  padding: 45px 0;
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(340px, 1.2fr);
  align-items: center;
  gap: clamp(45px, 8vw, 120px);
  border-bottom: 1px solid rgba(23, 34, 40, .15);
  color: #172228;
  text-decoration: none;
}

.session-card:first-child { padding-top: 12px; }
.session-card:nth-child(even) { grid-template-columns: minmax(340px, 1.2fr) minmax(300px, .8fr); }
.session-card:nth-child(even) figure { grid-column: 2; }
.session-card:nth-child(even) .session-card-copy { grid-column: 1; grid-row: 1; }

.session-card figure {
  position: relative;
  margin: 0;
  padding: 10px 10px 27px;
  background: #fff;
  box-shadow: 0 17px 38px rgba(23, 34, 40, .14);
  transform: rotate(-1.2deg);
  transition: transform .35s ease, box-shadow .35s ease;
}

.session-card:nth-child(even) figure { transform: rotate(1.2deg); }
.session-card:hover figure { transform: rotate(0) translateY(-7px); box-shadow: 0 25px 48px rgba(23, 34, 40, .2); }

.session-card figure img {
  display: block;
  width: 100%;
  height: clamp(390px, 48vw, 610px);
  object-fit: cover;
}

.session-tape {
  position: absolute;
  z-index: 2;
  top: -13px;
  left: 50%;
  width: 92px;
  height: 30px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(218, 201, 164, .72);
}

.session-card-copy > p,
.session-detail-heading > div > p {
  margin: 0 0 14px;
  color: #4c7780;
  font: 600 13px/1.2 Manrope, Arial, sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.session-card-copy h2 {
  margin: 0 0 19px;
  font: 500 clamp(55px, 6vw, 90px)/.85 "Cormorant Garamond", Georgia, serif;
}

.session-card-copy > span {
  display: block;
  max-width: 560px;
  margin-bottom: 27px;
  color: #53666b;
  font-size: 18px;
  line-height: 1.62;
}

.session-card-copy b {
  font: 600 14px/1.2 Manrope, Arial, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.compact-cta { padding-top: 65px; padding-bottom: 80px; }

/* Страница одной фотосессии */
.session-detail-intro { padding-bottom: 62px; }

.session-detail-heading {
  display: grid;
  grid-template-columns: 1fr .85fr;
  align-items: end;
  gap: clamp(45px, 8vw, 120px);
}

.session-detail-heading > p {
  max-width: 600px;
  margin: 0;
  color: #53666b;
  font-size: 18px;
  line-height: 1.65;
}

.detail-gallery {
  padding: 70px max(24px, calc((100% - 1450px) / 2)) 90px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
  gap: clamp(28px, 4vw, 60px);
  background: #fff;
}

.detail-photo {
  position: relative;
  margin: 0;
  padding: 10px 10px 27px;
  background: #fff;
  box-shadow: 0 17px 38px rgba(23, 34, 40, .14);
}

.detail-photo img { display: block; width: 100%; height: 100%; min-height: 480px; object-fit: cover; }
.detail-photo:nth-child(1) { grid-column: 1 / span 7; transform: rotate(-1deg); }
.detail-photo:nth-child(2) { grid-column: 8 / span 5; margin-top: 80px; transform: rotate(1.2deg); }
.detail-photo:nth-child(3) { grid-column: 1 / span 5; margin-top: 25px; transform: rotate(.8deg); }
.detail-photo:nth-child(4) { grid-column: 6 / span 7; margin-top: 90px; transform: rotate(-1deg); }

.session-pagination {
  padding: 0 max(24px, calc((100% - 1450px) / 2)) 80px;
  display: flex;
  justify-content: space-between;
  gap: 25px;
}

.session-pagination a { color: #172228; font: 500 15px/1.3 Manrope, Arial, sans-serif; text-decoration: none; }
.session-pagination a:hover { color: #4c94a3; }

@media (max-width: 800px) {
  .inner-intro,
  .session-detail-intro { padding: 25px 18px 48px; }
  .breadcrumbs { margin-bottom: 31px; font-size: 12px; }
  .inner-intro-grid,
  .session-detail-heading { display: block; }
  .inner-intro h1,
  .session-detail-heading h1 { margin-bottom: 27px; font-size: clamp(58px, 18vw, 82px); }
  .inner-intro-copy p,
  .session-detail-heading > p { font-size: 17px; }
  .session-catalog { padding: 48px 18px 62px; }
  .session-card,
  .session-card:nth-child(even) { padding: 34px 0; display: block; }
  .session-card figure,
  .session-card:nth-child(even) figure { margin-bottom: 32px; transform: rotate(-.5deg); }
  .session-card:nth-child(even) figure { transform: rotate(.5deg); }
  .session-card figure img { height: 62vh; min-height: 420px; }
  .session-card-copy h2 { font-size: 62px; }
  .session-card-copy > span { font-size: 17px; }
  .detail-gallery { padding: 52px 18px 62px; display: grid; grid-template-columns: 1fr; gap: 42px; }
  .detail-photo,
  .detail-photo:nth-child(n) { grid-column: 1; width: 100%; margin: 0; transform: rotate(-.4deg); }
  .detail-photo:nth-child(even) { transform: rotate(.4deg); }
  .detail-photo img { min-height: 430px; max-height: 680px; }
  .session-pagination { padding: 0 18px 60px; display: grid; gap: 18px; }
}

/* Портфолио: 6 карточек, по 3 в ряд */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 46px 28px;
  padding-top: 45px;
  padding-bottom: 70px;
}

.category-card img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: center;
}

/* Планшет: по 2 */
@media (max-width: 1000px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Телефон: по 1 */
@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 38px 18px 55px;
  }

  .category-card img {
    height: 500px;
  }
}

/* ==================================================
   ЕДИНЫЙ СТИЛЬ СТРАНИЦЫ ПОРТФОЛИО
   Вставить в конец portfolio-pages.css
================================================== */

/* Основной шрифт — как на главной */
body {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: #172228;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

/* Ограничитель контента */
.inner-page .container,
.portfolio-page .container {
  width: min(1450px, calc(100% - 48px));
  margin-inline: auto;
}

/* =========================
   ШАПКА — КАК НА ГЛАВНОЙ
========================= */

.site-header {
  position: relative;
  z-index: 100;
  width: 100%;
  height: 120px;
  padding: 0;
  background: #fff;
}

.site-header .header-inner {
  width: min(1550px, calc(100% - 48px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.site-header .logo,
.site-header .brand {
  flex: 0 0 auto;
  display: block;
  color: #172228;
  text-decoration: none;
}

.site-header .logo img,
.site-header .brand img {
  display: block;
  width: 290px;
  height: auto;
}

.site-header nav {
  margin-left: auto;
}

.site-header nav ul,
.site-header .nav-list,
.site-header .header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(18px, 1.8vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header nav a,
.site-header .nav-list a,
.site-header .header-nav a {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: #172228;
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.site-header nav a::after,
.site-header .nav-list a::after,
.site-header .header-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 1px;
  background: #4c94a3;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.site-header nav a:hover::after,
.site-header .nav-list a:hover::after,
.site-header .header-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* =========================
   ВВОДНЫЙ БЛОК
========================= */

.inner-intro {
  padding: 42px max(24px, calc((100% - 1450px) / 2)) 58px;
  background: #fff;
}

/* Хлебные крошки — меньше */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 28px;
  padding: 0;
  color: #738085;
  font-family: Manrope, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: #53666b;
  text-decoration: none;
  transition: color 0.25s ease;
}

.breadcrumbs a:hover {
  color: #4c94a3;
}

.breadcrumbs span {
  color: #9aa4a7;
}

/* Заголовок и описание */
.inner-intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: end;
  gap: clamp(45px, 7vw, 110px);
}

.inner-intro h1 {
  max-width: 850px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(70px, 7.5vw, 130px);
  font-weight: 400;
  line-height: 0.82;
  letter-spacing: -0.045em;
}

.inner-intro-copy {
  max-width: 590px;
  padding-bottom: 7px;
}

.inner-intro-copy p {
  margin: 0 0 13px;
  color: #46595e;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.45;
}

.inner-intro-copy p:last-child {
  margin-bottom: 0;
}

/* =========================
   КАРТОЧКИ ПОРТФОЛИО
========================= */

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 52px 30px;
  padding: 58px max(24px, calc((100% - 1450px) / 2)) 85px;
  background: #f4f4f2;
}

.category-card {
  min-width: 0;
}

.category-card > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.category-card figure {
  position: relative;
  margin: 0 0 23px;
  padding: 9px 9px 25px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(23, 34, 40, 0.13);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.category-card figure::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 50%;
  z-index: 2;
  width: 70px;
  height: 23px;
  background: rgba(221, 213, 190, 0.8);
  box-shadow: 0 2px 5px rgba(23, 34, 40, 0.08);
  transform: translateX(-50%) rotate(-2deg);
}

.category-card img {
  display: block;
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: center;
}

.category-card:nth-child(3n + 1) figure {
  transform: rotate(-0.6deg);
}

.category-card:nth-child(3n + 2) figure {
  transform: rotate(0.5deg);
}

.category-card:nth-child(3n + 3) figure {
  transform: rotate(-0.25deg);
}

.category-card > a:hover figure {
  transform: translateY(-6px) rotate(0deg);
  box-shadow: 0 20px 40px rgba(23, 34, 40, 0.18);
}

.category-card h2 {
  margin: 0 0 8px;
  color: #172228;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(35px, 3vw, 49px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
}

.category-card p {
  max-width: 390px;
  margin: 0;
  color: #53666b;
  font-family: Manrope, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
}

/* =========================
   ФУТЕР — КАК НА ГЛАВНОЙ
========================= */

.site-footer {
  padding: 48px max(24px, calc((100% - 1550px) / 2)) 25px;
  color: rgba(255, 255, 255, 0.78);
  background: #20282c;
}

.site-footer .footer-main {
  display: grid;
  grid-template-columns: 300px 1fr auto;
  align-items: center;
  gap: 50px;
  padding-bottom: 30px;
}

.site-footer .footer-logo,
.site-footer .footer-brand {
  display: block;
  width: 285px;
  color: #fff;
  text-decoration: none;
}

.site-footer .footer-logo img,
.site-footer .footer-brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.site-footer nav ul,
.site-footer .footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 25px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer nav a,
.site-footer .footer-nav a {
  color: rgba(255, 255, 255, 0.76);
  font-size: 16px;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.25s ease;
}

.site-footer nav a:hover,
.site-footer .footer-nav a:hover {
  color: #72bdcc;
}

.site-footer .footer-socials,
.site-footer .social-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-footer .footer-socials a,
.site-footer .social-links a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  text-decoration: none;
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    background 0.25s ease;
}

.site-footer .footer-socials a:hover,
.site-footer .social-links a:hover {
  color: #172228;
  border-color: #72bdcc;
  background: #72bdcc;
}

.site-footer .footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-top: 21px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.site-footer .footer-bottom p {
  margin: 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  line-height: 1.45;
}

/* =========================
   АДАПТИВ
========================= */

@media (max-width: 1180px) {
  .site-header .logo img,
  .site-header .brand img {
    width: 245px;
  }

  .site-header nav ul,
  .site-header .nav-list,
  .site-header .header-nav {
    gap: 16px;
  }

  .site-header nav a,
  .site-header .nav-list a,
  .site-header .header-nav a {
    font-size: 15px;
  }

  .site-footer .footer-main {
    grid-template-columns: 260px 1fr;
  }

  .site-footer .footer-socials,
  .site-footer .social-links {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .site-header {
    height: 96px;
  }

  .site-header .header-inner {
    width: calc(100% - 32px);
  }

  .site-header .logo img,
  .site-header .brand img {
    width: 220px;
  }

  .inner-intro {
    padding: 30px 20px 46px;
  }

  .inner-intro-grid {
    display: block;
  }

  .inner-intro h1 {
    margin-bottom: 28px;
    font-size: clamp(64px, 13vw, 100px);
  }

  .inner-intro-copy {
    max-width: 700px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 50px 20px 70px;
    gap: 45px 22px;
  }

  .category-card img {
    height: 460px;
  }

  .site-footer .footer-main {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .site-footer nav ul,
  .site-footer .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .site-header {
    height: 82px;
  }

  .site-header .header-inner {
    width: calc(100% - 28px);
  }

  .site-header .logo img,
  .site-header .brand img {
    width: 190px;
  }

  .breadcrumbs {
    margin-bottom: 22px;
    font-size: 9px;
    letter-spacing: 0.1em;
  }

  .inner-intro h1 {
    margin-bottom: 22px;
    font-size: clamp(52px, 17vw, 76px);
  }

  .inner-intro-copy p {
    font-size: 18px;
    line-height: 1.42;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 42px;
    padding: 42px 16px 60px;
  }

  .category-card img {
    height: min(125vw, 560px);
  }

  .category-card h2 {
    font-size: 39px;
  }

  .category-card p {
    font-size: 15px;
  }

  .site-footer {
    padding: 38px 18px 22px;
  }

  .site-footer .footer-logo,
  .site-footer .footer-brand {
    width: 235px;
  }

  .site-footer .footer-main {
    padding-bottom: 23px;
  }

  .site-footer nav ul,
  .site-footer .footer-nav {
    gap: 11px 18px;
  }

  .site-footer nav a,
  .site-footer .footer-nav a {
    font-size: 15px;
  }

  .site-footer .footer-bottom {
    display: grid;
    gap: 9px;
    padding-top: 18px;
  }

  .site-footer .footer-bottom p {
    font-size: 12px;
  }
}

/* Верх страницы портфолио */

.inner-intro {
  box-sizing: border-box;
  width: min(1550px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 55px;
  background: #fff;
}

/* Левый край совпадает с логотипом */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 30px;
  padding: 0;
  color: #899397;
  font-family: Manrope, Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.breadcrumbs a {
  color: #53666b;
  text-decoration: none;
  transition: color 0.25s ease;
}

.breadcrumbs a:hover {
  color: #4c94a3;
}

.inner-intro h1 {
  max-width: 900px;
  margin: 0 0 26px;
  color: #172228;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(72px, 7vw, 120px);
  font-weight: 400;
  line-height: 0.86;
  letter-spacing: -0.04em;
}

.inner-intro-copy {
  max-width: 760px;
}

.inner-intro-copy p {
  margin: 0 0 11px;
  color: #46595e;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.45;
}

.inner-intro-copy p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .inner-intro {
    width: calc(100% - 32px);
    padding: 25px 0 42px;
  }

  .breadcrumbs {
    margin-bottom: 22px;
    font-size: 9px;
  }

  .inner-intro h1 {
    margin-bottom: 22px;
    font-size: clamp(58px, 18vw, 78px);
  }

  .inner-intro-copy p {
    font-size: 18px;
  }
}

/* Кейсы в одной непрерывной сетке с вертикальным переходом */
.individual-gallery-page .individual-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  columns: initial;
}

/* Плотно заполняем строки лавстори при чередовании вертикальных и широких кадров. */
.individual-gallery-page .lovestory-gallery {
  grid-auto-flow: row dense;
}

.individual-gallery-page .lovestory-gallery .gallery-transition--wide {
  grid-column: span 2;
  aspect-ratio: 4 / 3;
}

.individual-gallery-page .individual-gallery figure {
  position: relative;
  width: auto;
  margin: 0;
  aspect-ratio: 2 / 3;
  break-inside: auto;
}

.individual-gallery-page .individual-gallery figure a {
  width: 100%;
  height: 100%;
}

.individual-gallery-page .individual-gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-photo--start::after {
  content: attr(data-case);
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 2;
  padding: 7px 10px 6px;
  background: rgba(255, 255, 255, .9);
  color: #172228;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .1em;
  pointer-events: none;
}

.gallery-transition {
  position: relative;
  display: flex;
  min-width: 0;
  aspect-ratio: 2 / 3;
  padding: 22px 18px 22px 30px;
  flex-direction: column;
  justify-content: center;
  color: #172228;
}

.gallery-transition::before {
  content: "";
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 10px;
  width: 1px;
  background: #79b8c5;
}

.gallery-transition span {
  margin-bottom: 8px;
  color: #79b8c5;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .14em;
}

.gallery-transition h2 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 3vw, 48px);
  font-weight: 500;
  line-height: .9;
}

.gallery-transition p {
  max-width: 170px;
  margin: 0;
  color: #617075;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 17px;
  line-height: 1.25;
}

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

@media (max-width: 650px) {
  .individual-gallery-page .individual-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .gallery-transition {
    padding: 16px 10px 16px 23px;
  }

  .gallery-transition::before {
    left: 7px;
  }

  .gallery-transition h2 {
    font-size: 32px;
  }

  .gallery-transition p {
    font-size: 15px;
  }

  .case-photo--start::after {
    bottom: 8px;
    left: 8px;
    font-size: 9px;
  }
}

.category-card .button,
.category-card .btn,
.portfolio-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  min-width: 230px;
  min-height: 58px;
  padding: 15px 21px;
  color: #172228;
  background: #fff;
  border: 1px solid rgba(23, 34, 40, 0.55);
  font-family: Manrope, Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.category-card .button:hover,
.category-card .btn:hover,
.portfolio-button:hover {
  color: #fff;
  background: #4c94a3;
  border-color: #4c94a3;
}

/* Хлебные крошки */

.inner-intro {
  width: min(1550px, calc(100% - 48px));
  margin-inline: auto;
  padding-right: 0;
  padding-left: 0;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  margin: 0 0 25px;
  padding: 0;

  /* Тот же шрифт, что и на сайте */
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-transform: none;

  color: #7b8588;
}

.breadcrumbs a {
  color: #53666b;
  font: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

.breadcrumbs a:hover {
  color: #4c94a3;
}

.breadcrumbs span {
  color: #929b9e;
  font: inherit;
}

@media (max-width: 700px) {
  .inner-intro {
    width: calc(100% - 50px);
  }

  .breadcrumbs {
    margin-bottom: 20px;
    font-size: 12px;
  }
}

.site-header .header-inner {
  width: min(1550px, calc(100% - 48px));
  margin-inline: auto;
}

/* Начало крошек на одной линии с логотипом */

.inner-intro {
  width: auto;
  margin: 0;
  padding-left: max(24px, calc((100% - 1550px) / 2));
  padding-right: max(24px, calc((100% - 1550px) / 2));
}

.breadcrumbs {
  margin-left: 0;
  padding-left: 0;
}

/* Крошки начинаются строго на уровне логотипа */

.portfolio-page .portfolio-categories-intro {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: clamp(24px, 10vw, 160px) !important;
  padding-right: clamp(24px, 10vw, 160px) !important;
}

.portfolio-page .breadcrumbs {
  margin-left: 0 !important;
  padding-left: 0 !important;
}

/* Финальная правка страницы портфолио */
.portfolio-index-page .inner-intro {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 32px clamp(24px, 10vw, 160px) 55px !important;
}

.portfolio-index-page .breadcrumbs {
  margin: 0 0 24px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: .03em !important;
  text-transform: none !important;
}

.portfolio-index-page .category-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.portfolio-index-page .category-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.portfolio-index-page .category-card div > span {
  min-height: calc(3 * 1.55em);
  margin-bottom: 18px;
}

.portfolio-index-page .category-card b {
  display: block;
  width: max-content;
  margin-top: auto;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: .04em !important;
  text-transform: none !important;
}

@media (max-width: 800px) {
  .portfolio-index-page .inner-intro {
    padding: 25px 24px 45px !important;
  }

  .portfolio-index-page .breadcrumbs {
    margin-bottom: 20px !important;
    font-size: 12px !important;
  }

  .portfolio-index-page .category-card div > span {
    min-height: 0;
  }
}

/* Четыре активные категории в один ряд */

.portfolio-index-page .category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 45px 24px !important;
}

/* Выключенные категории остаются в HTML, но не показываются */
.portfolio-index-page .category-card--disabled {
  display: none !important;
}

/* Вертикальные фотографии */
.portfolio-index-page .category-card figure img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  object-position: center;
}

/* Названия немного уменьшаем для четырёх колонок */
.portfolio-index-page .category-card h2 {
  font-size: clamp(34px, 3vw, 49px) !important;
}

/* Три строки под каждой фотографией */
.portfolio-index-page .category-card div > span {
  min-height: calc(3 * 1.55em);
  font-size: 16px;
  line-height: 1.55;
}

/* Кнопки остаются на одном уровне */
.portfolio-index-page .category-card b {
  margin-top: auto;
}

/* Планшет — две карточки в ряд */
@media (max-width: 1100px) {
  .portfolio-index-page .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .portfolio-index-page .category-card figure img {
    height: 500px;
  }
}

/* Телефон — одна карточка */
@media (max-width: 600px) {
  .portfolio-index-page .category-grid {
    grid-template-columns: 1fr !important;
  }

  .portfolio-index-page .category-card figure img {
    height: min(125vw, 560px);
  }

  .portfolio-index-page .category-card div > span {
    min-height: 0;
  }
}

/* Заголовок и крошки начинаются на уровне логотипа */

.portfolio-index-page .inner-intro {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 32px clamp(24px, 10vw, 160px) 58px !important;
}

.portfolio-index-page .breadcrumbs {
  margin: 0 0 24px !important;
  padding: 0 !important;
}

.portfolio-index-page .inner-intro > h1 {
  width: 100%;
  max-width: none;
  margin: 0 0 30px;
  padding: 0;
}

/* Текст занимает всю доступную ширину блока */

.portfolio-index-page .inner-intro-copy {
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: 0;
}

.portfolio-index-page .inner-intro-copy p {
  width: 100%;
  max-width: none !important;
  margin: 0;
  color: #46595e;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.5;
}

/* Окончательная геометрия вводного блока портфолио */
.portfolio-index-page main > .inner-intro {
  display: block !important;
  inline-size: 100% !important;
  max-inline-size: none !important;
  margin: 0 !important;
  padding: 32px clamp(24px, 10vw, 160px) 58px !important;
}

.portfolio-index-page main > .inner-intro > .breadcrumbs,
.portfolio-index-page main > .inner-intro > h1 {
  inline-size: 100% !important;
  max-inline-size: none !important;
}

.portfolio-index-page main > .inner-intro > .inner-intro-copy {
  display: block !important;
  inline-size: 100% !important;
  max-inline-size: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.portfolio-index-page main > .inner-intro > .inner-intro-copy > p {
  display: block !important;
  inline-size: 100% !important;
  max-inline-size: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left;
}

/* Индивидуальная фотосессия: компактная галерея без рамок */
.individual-gallery-page .individual-intro {
  padding: 32px clamp(24px, 10vw, 160px) 58px;
  background: linear-gradient(to bottom, #fff 60%, #f3f3f1);
}

.individual-gallery-page .individual-intro .breadcrumbs {
  margin: 0 0 28px;
  padding: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .03em;
  text-transform: none;
}

.individual-gallery-page .individual-intro h1 {
  max-width: 1100px;
  margin: 0 0 30px;
  color: #172228;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(68px, 8vw, 128px);
  font-weight: 400;
  line-height: .78;
  letter-spacing: -.045em;
}

.individual-gallery-page .individual-intro > p {
  max-width: 900px;
  margin: 0;
  color: #46595e;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 21px;
  line-height: 1.5;
}

.individual-gallery {
  padding: 12px max(12px, calc((100% - 1500px) / 2)) 70px;
  columns: 4;
  column-gap: 10px;
  background: #f3f3f1;
}

.individual-gallery figure {
  width: 100%;
  margin: 0 0 10px;
  break-inside: avoid;
  overflow: hidden;
  background: transparent;
}

.individual-gallery a { display: block; }

.individual-gallery img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .45s ease, filter .45s ease;
}

.individual-gallery a:hover img {
  transform: scale(1.018);
  filter: brightness(.94);
}

.gallery-series {
  column-span: all;
  display: grid;
  grid-template-columns: 42px auto 1fr;
  gap: 16px;
  align-items: baseline;
  margin: 34px 0 14px;
  padding-top: 17px;
  border-top: 1px solid rgba(23, 34, 40, 0.16);
}

.gallery-series span {
  color: #79b8c5;
  font-family: "Manrope", Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .12em;
}

.gallery-series h2 {
  margin: 0;
  color: #172228;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  line-height: 1;
}

.gallery-series p {
  margin: 0;
  color: #617075;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  line-height: 1.35;
}

@media (max-width: 1100px) {
  .individual-gallery { columns: 3; }
}

@media (max-width: 800px) {
  .individual-gallery-page .individual-intro { padding: 25px 20px 45px; }
  .individual-gallery-page .individual-intro h1 { margin-bottom: 25px; font-size: clamp(58px, 15vw, 90px); }
  .individual-gallery-page .individual-intro > p { font-size: 18px; }
  .individual-gallery { padding: 10px 10px 50px; columns: 2; column-gap: 8px; }
  .individual-gallery figure { margin-bottom: 8px; }

  .gallery-series {
    grid-template-columns: 28px 1fr;
    gap: 7px 11px;
    margin: 25px 0 12px;
    padding-top: 14px;
  }

  .gallery-series p {
    grid-column: 2;
    font-size: 16px;
  }
}

@media (max-width: 430px) {
  .individual-gallery { padding-right: 5px; padding-left: 5px; column-gap: 5px; }
  .individual-gallery figure { margin-bottom: 5px; }
}

@media (max-width: 800px) {
  .portfolio-index-page main > .inner-intro {
    padding: 25px 24px 45px !important;
  }
}

/* Крошки и заголовок — строго под логотипом */

.portfolio-index-page main > .inner-intro {
  width: 100% !important;
  margin: 0 !important;
  padding: 32px 0 58px !important;
}

.portfolio-index-page main > .inner-intro > .breadcrumbs,
.portfolio-index-page main > .inner-intro > h1 {
  width: auto !important;
  margin-right: 0 !important;
  padding-right: clamp(24px, 10vw, 160px) !important;
  padding-left: clamp(24px, 10vw, 160px) !important;
}

/* Текст немного сдвинут вправо */

.portfolio-index-page main > .inner-intro > .inner-intro-copy {
  width: auto !important;
  margin: 0 !important;
  padding-right: clamp(24px, 10vw, 160px) !important;
  padding-left: clamp(40px, 10vw, 260px) !important;
}

.portfolio-index-page main > .inner-intro > .inner-intro-copy > p {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

@media (max-width: 800px) {
  .portfolio-index-page main > .inner-intro {
    padding: 25px 0 44px !important;
  }

  .portfolio-index-page main > .inner-intro > .breadcrumbs,
  .portfolio-index-page main > .inner-intro > h1 {
    padding-right: 24px !important;
    padding-left: 24px !important;
  }

  .portfolio-index-page main > .inner-intro > .inner-intro-copy {
    padding-right: 24px !important;
    padding-left: 40px !important;
  }
}

/* Кадрирование фотографии «Репортажи» */

.portfolio-index-page .category-card:nth-child(4) figure {
  overflow: hidden;
}

.portfolio-index-page .category-card:nth-child(4) figure img {
  width: 100%;
  max-width: 100%;
  transform: none;
  object-fit: cover;
  object-position: 28% center;
}

/* Открывающаяся галерея */

.individual-gallery a {
  cursor: zoom-in;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px 90px;
  background: rgba(15, 24, 28, 0.95);
  backdrop-filter: blur(5px);
}

.gallery-lightbox.is-open {
  display: flex;
}

.gallery-lightbox__stage {
  display: flex;
  max-width: 100%;
  max-height: calc(100vh - 56px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 78px);
  object-fit: contain;
  user-select: none;
}

.gallery-lightbox__counter {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.82);
  font-family: "Manrope", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
}

.gallery-lightbox__button {
  position: absolute;
  display: grid;
  width: 50px;
  height: 50px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.gallery-lightbox__button svg {
  display: block;
  width: 23px;
  height: 23px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-lightbox__button:hover {
  border-color: #79b8c5;
  background: #79b8c5;
  color: #172228;
}

.gallery-lightbox__button:focus-visible {
  outline: 2px solid #79b8c5;
  outline-offset: 4px;
}

.gallery-lightbox__previous {
  top: 50%;
  left: 22px;
  transform: translateY(-50%);
}

.gallery-lightbox__next {
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
}

.gallery-lightbox__close {
  top: 18px;
  right: 22px;
}

body.gallery-is-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .gallery-lightbox {
    padding: 62px 10px 75px;
  }

  .gallery-lightbox__stage {
    max-height: calc(100vh - 137px);
  }

  .gallery-lightbox__image {
    max-height: calc(100vh - 156px);
  }

  .gallery-lightbox__button {
    width: 42px;
    height: 42px;
  }

  .gallery-lightbox__button svg {
    width: 20px;
    height: 20px;
  }

  .gallery-lightbox__previous {
    top: auto;
    bottom: 13px;
    left: calc(50% - 54px);
    transform: none;
  }

  .gallery-lightbox__next {
    top: auto;
    right: calc(50% - 54px);
    bottom: 13px;
    transform: none;
  }

  .gallery-lightbox__close {
    top: 10px;
    right: 10px;
  }
}

/* Финальные правила сетки должны идти после старых правил галереи */
.individual-gallery-page .individual-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  columns: initial;
}

.individual-gallery-page .individual-gallery figure {
  width: auto;
  margin: 0;
  aspect-ratio: 2 / 3;
}

.individual-gallery-page .individual-gallery figure a,
.individual-gallery-page .individual-gallery figure img {
  display: block;
  width: 100%;
  height: 100%;
}

.individual-gallery-page .individual-gallery figure img {
  object-fit: cover;
}

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

@media (max-width: 650px) {
  .individual-gallery-page .individual-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
}

/* Для лавстори две колонки на планшетах не дают широким кадрам ломать ряды. */
@media (max-width: 900px) {
  .individual-gallery-page .lovestory-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
