/* Раздел «Проекты» и страница проекта — в палитре и типографике основного сайта */

.projects { background: var(--wine); }
.projects-head h2 { margin-bottom: 55px; }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 70px 45px; }
.project-card { display: block; }
.project-card-image { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--wine-dark); }
.project-card:nth-child(even) .project-card-image { aspect-ratio: 4 / 5; }
.project-card:nth-child(even) { margin-top: 90px; }
.project-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s; }
.project-card:hover .project-card-image img { transform: scale(1.03); }
.project-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, var(--wine-dark), color-mix(in srgb, var(--wine) 88%, #fff)); }
.project-card-num { display: block; font-size: 12px; color: var(--gold); margin-top: 22px; }
.project-card-title { display: block; font-family: Georgia, serif; font-size: 30px; line-height: 1.2; margin-top: 8px; transition: color .25s; }
.project-card:hover .project-card-title { color: var(--gold); }
.project-card-meta { display: block; font-size: 14px; color: var(--muted); margin-top: 8px; }

/* --- страница проекта --- */
.project-page .section-label a { color: inherit; transition: color .25s; }
.project-page .section-label a:hover { color: var(--gold); }
.project-hero { padding-bottom: 40px; }
.project-title { font-size: clamp(52px, 6.5vw, 100px); margin-bottom: 25px; }
.project-summary { font-family: Georgia, serif; font-size: 24px; line-height: 1.45; color: var(--hero-text); max-width: 760px; margin-bottom: 55px; }
.project-cover { display: block; overflow: hidden; }
.project-cover img { width: 100%; height: auto; max-height: 85vh; object-fit: cover; display: block; }

.project-text { padding-top: 30px; padding-bottom: 60px; }
.project-text-inner { max-width: 720px; margin-left: auto; margin-right: 8%; }
.project-text-inner p { color: var(--muted); font-size: 17px; line-height: 1.75; }
.project-text-inner p:first-child { font-family: Georgia, serif; font-size: 23px; line-height: 1.5; color: var(--cream); }

.project-gallery { padding-top: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.gallery-item { display: block; overflow: hidden; background: var(--wine-dark); }
.gallery-item.wide { grid-column: 1 / -1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1s; }
.gallery-item:not(.wide) img { aspect-ratio: 4 / 5; }
.gallery-item:hover img { transform: scale(1.025); }

.project-contact { padding-top: 60px; }
.project-next { display: block; font-family: Georgia, serif; font-size: clamp(30px, 3.5vw, 48px); border-bottom: 1px solid var(--line); padding-bottom: 50px; margin-bottom: 80px; transition: color .25s; }
.project-next span { display: block; font-family: Arial, sans-serif; font-size: 12px; letter-spacing: .13em; color: var(--gold); text-transform: uppercase; margin-bottom: 14px; }
.project-next:hover { color: var(--gold); }

/* --- лайтбокс --- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: color-mix(in srgb, var(--wine-dark) 96%, transparent); display: flex; align-items: center; justify-content: center; padding: 60px 70px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button { position: absolute; background: none; border: 0; color: var(--cream); font-size: 28px; cursor: pointer; width: 54px; height: 54px; transition: color .2s; }
.lightbox button:hover { color: var(--gold); }
.lb-close { top: 10px; right: 14px; font-size: 38px !important; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
body.lb-open { overflow: hidden; }

.notfound { min-height: 70vh; }

@media (max-width: 700px) {
  .projects-grid { grid-template-columns: 1fr; gap: 45px; }
  .project-card:nth-child(even) { margin-top: 0; }
  .project-card:nth-child(even) .project-card-image { aspect-ratio: 4 / 3; }
  .project-card-title { font-size: 26px; }
  .project-summary { font-size: 20px; margin-bottom: 35px; }
  .project-text-inner { margin: 0; }
  .project-text-inner p:first-child { font-size: 20px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 16px; }
  .gallery-item:not(.wide) img { aspect-ratio: auto; }
  .lightbox { padding: 60px 10px; }
  .lb-prev, .lb-next { top: auto !important; bottom: 6px; transform: none !important; }
  .project-next { margin-bottom: 50px; padding-bottom: 35px; }
}

/* параметры проекта */
.project-text.has-params { display: grid; grid-template-columns: minmax(240px, 0.8fr) 1.2fr; gap: 8%; align-items: start; }
.project-text.has-params .project-text-inner { margin: 0; }
.project-params-title { font-size: 12px !important; font-family: Arial, sans-serif !important; letter-spacing: .13em !important; text-transform: uppercase; color: var(--gold); margin: 0 0 18px !important; line-height: 1.4 !important; }
.project-params dl { margin: 0; }
.project-params dl > div { display: grid; grid-template-columns: 42% 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.project-params dl > div:last-child { border-bottom: 1px solid var(--line); }
.project-params dt { font-size: 13px; color: var(--muted); }
.project-params dd { margin: 0; font-size: 15px; }
@media (max-width: 800px) {
  .project-text.has-params { grid-template-columns: 1fr; gap: 40px; }
}
