/* ===== VARIABLES ===== */
:root {
  --pf-bg: #ffffff;
  --pf-bg-soft: #f8f8f8;
  --pf-surface: #ffffff;
  --pf-line: rgba(0, 0, 0, 0.06);
  --pf-line-strong: rgba(0, 0, 0, 0.12);
  --pf-text: #1e1e1e;
  --pf-text-muted: #5e5e5e;
  --pf-text-light: #8e8e8e;
  --pf-accent: #b58b5b;
  --pf-accent-hover: #9e7446;
  --pf-accent-glow: rgba(181, 139, 91, 0.15);
  --pf-video: #ff5f00;
  --pf-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.02);
  --pf-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.04);
  --pf-shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.06);
  --pf-radius: 20px;
  --pf-radius-sm: 12px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--pf-text);
  background: #fff;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

img {
  max-width: 100%;
  display: block;
}

button, input, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== BACKGROUND TEXTURE ===== */
.pf-page {
  position: relative;
  background: #fff;
}

.pf-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(circle at 30% 40%, rgba(181, 139, 91, 0.02) 0%, transparent 30%),
    radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.01) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* ===== HERO — С ЧЕРТЁЖНОЙ ГРАФИКОЙ (УСИЛЕНО) ===== */
.pf-hero {
  position: relative;
  padding: 120px 0 50px;
  background: linear-gradient(145deg, #ffffff 0%, #fcfcfc 100%);
  border-bottom: 1px solid var(--pf-line);
  overflow: hidden;
}

/* Основной фоновый паттерн (точки + диагональные линии) */
.pf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(181, 139, 91, 0.08) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(181, 139, 91, 0.08) 0%, transparent 30%),
    repeating-linear-gradient(45deg, rgba(181, 139, 91, 0.05) 0px, rgba(181, 139, 91, 0.05) 1px, transparent 1px, transparent 20px),
    repeating-linear-gradient(135deg, rgba(181, 139, 91, 0.03) 0px, rgba(181, 139, 91, 0.03) 2px, transparent 2px, transparent 30px);
  pointer-events: none;
  z-index: 0;
}

/* Чертёжная сетка (горизонтальные и вертикальные линии) */
.pf-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

/* Графический элемент справа (абстрактные линии) */
.pf-hero__graphic {
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: 
    linear-gradient(135deg, transparent 0%, rgba(181, 139, 91, 0.05) 100%),
    url('data:image/svg+xml;utf8,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="2" fill="%23b58b5b" opacity="0.2"/><circle cx="10" cy="10" r="1.5" fill="%23b58b5b" opacity="0.2"/><circle cx="50" cy="20" r="1.5" fill="%23b58b5b" opacity="0.2"/><circle cx="40" cy="50" r="2" fill="%23b58b5b" opacity="0.2"/></svg>');
  background-size: 200px 200px, 60px 60px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

/* Графический элемент слева (диагональные линии) */
.pf-hero__graphic-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 250px;
  height: 100%;
  background: repeating-linear-gradient(45deg, transparent, transparent 20px, rgba(181, 139, 91, 0.06) 20px, rgba(181, 139, 91, 0.06) 40px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.7;
}

.pf-hero__inner {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.pf-hero__content {
  max-width: 600px;
}

.pf-hero__title {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--pf-text);
  line-height: 1.1;
  margin-bottom: 16px;
}

.pf-hero__title-accent {
  display: block;
  font-size: 0.8em;
  font-weight: 300;
  color: var(--pf-text-muted);
  margin-top: 8px;
}

.pf-hero__description {
  font-size: 16px;
  line-height: 1.6;
  color: var(--pf-text-muted);
  margin-bottom: 30px;
  max-width: 500px;
  position: relative;
  padding-left: 20px;
}

.pf-hero__description::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--pf-accent);
  opacity: 0.4;
  border-radius: 2px;
}

.pf-hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.pf-hero__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-end;
  min-width: 160px;
}

.pf-hero__stat {
  text-align: right;
  position: relative;
}

.pf-hero__stat::before {
  content: "•";
  color: var(--pf-accent);
  font-size: 24px;
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

.pf-hero__stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--pf-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.pf-hero__stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--pf-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pf-hero__decor-line {
  width: 60px;
  height: 1px;
  background: var(--pf-accent);
  opacity: 0.3;
  margin: 8px 0 0 auto;
}

.pf-hero__bottom-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pf-accent), transparent);
  opacity: 0.2;
  z-index: 2;
}

/* ===== BUTTONS ===== */
.pf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: 0.3px;
}

.pf-btn--primary {
  background: var(--pf-accent);
  color: #fff;
  box-shadow: 0 8px 20px var(--pf-accent-glow);
}

.pf-btn--primary:hover {
  background: var(--pf-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(181, 139, 91, 0.25);
}

.pf-btn--outline {
  background: transparent;
  border: 1px solid var(--pf-line-strong);
  color: var(--pf-text);
}

.pf-btn--outline:hover {
  border-color: var(--pf-accent);
  background: rgba(181, 139, 91, 0.02);
  transform: translateY(-2px);
}

/* ===== STICKY TOOLBAR — ТОЛЬКО ПОИСК ===== */
.pf-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pf-line);
  padding: 12px 0;
}

.pf-toolbar__inner {
  display: flex;
  flex-direction: column;
}

.pf-search {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

/* Чертёжная линия под поиском */
.pf-search::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 20%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pf-accent), transparent);
  opacity: 0.3;
}

.pf-search input {
  width: 100%;
  height: 54px;
  padding: 0 24px 0 56px;
  border-radius: 54px;
  background: #fff;
  border: 1px solid var(--pf-line);
  font-size: 15px;
  transition: var(--transition);
  box-shadow: var(--pf-shadow-sm);
}

.pf-search input:focus {
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 4px rgba(181, 139, 91, 0.1);
}

.pf-search i {
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pf-text-light);
  font-size: 18px;
}

/* Скрываем блок фильтров */
.pf-filters {
  display: none;
}

/* ===== CATALOG — УМЕНЬШЕННЫЙ ВЕРХНИЙ ОТСТУП ===== */
.pf-catalog {
  padding: 20px 0 100px;
  position: relative;
  z-index: 2;
}

/* ===== GRID ===== */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 60px;
}

@media (max-width: 1200px) {
  .pf-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .pf-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== CARD — ЯРКИЕ АКЦЕНТЫ, ЧЁТКИЕ ПОЛЯ ===== */
.pf-card {
  background: var(--pf-surface);
  border-radius: var(--pf-radius);
  overflow: hidden;
  border: 1px solid var(--pf-line);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--pf-shadow-md);
}

.pf-card:hover {
  transform: translateY(-6px);
  border-color: var(--pf-accent);
  box-shadow: var(--pf-shadow-lg);
}

.pf-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
}

.pf-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pf-card:hover .pf-card__media img {
  transform: scale(1.03);
}

.pf-card__badges {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}

.pf-badge {
  padding: 6px 14px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px;
  font-weight: 600;
  color: var(--pf-text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--pf-shadow-sm);
}

.pf-badge i {
  font-size: 12px;
  color: var(--pf-accent);
}

.pf-badge.video {
  background: var(--pf-video);
  color: white;
  border: none;
  box-shadow: 0 4px 10px rgba(255, 95, 0, 0.3);
}

.pf-badge.video i {
  color: white;
}

.pf-card__body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #fff;
  position: relative;
}

/* Лёгкий разделитель */
.pf-card__body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pf-accent), transparent);
  opacity: 0.2;
}

.pf-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pf-card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--pf-text);
}

.pf-card__year {
  font-size: 14px;
  font-weight: 500;
  color: var(--pf-text-light);
  background: var(--pf-bg-soft);
  padding: 6px 12px;
  border-radius: 30px;
  border: 1px solid var(--pf-line);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pf-card__year i {
  color: var(--pf-accent);
  font-size: 12px;
}

.pf-card__desc {
  font-size: 14px;
  color: var(--pf-text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}

.pf-meta-item {
  background: var(--pf-bg-soft);
  border-radius: var(--pf-radius-sm);
  padding: 12px;
  border: 1px solid var(--pf-line);
  transition: background 0.2s;
}

.pf-card:hover .pf-meta-item {
  background: #fff;
  border-color: rgba(181, 139, 91, 0.2);
}

.pf-meta-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--pf-text-light);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.pf-meta-label i {
  color: var(--pf-accent);
  font-size: 12px;
}

.pf-meta-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--pf-text);
  line-height: 1.3;
}

/* ===== EMPTY & MORE ===== */
.pf-empty {
  text-align: center;
  padding: 70px 20px;
  background: var(--pf-bg-soft);
  border-radius: var(--pf-radius);
  color: var(--pf-text-muted);
  border: 1px dashed var(--pf-line);
  font-size: 16px;
}

.pf-more {
  display: flex;
  justify-content: center;
  margin-bottom: 40px; /* добавим отступ снизу перед заметкой */
}

.pf-more .pf-btn {
  min-width: 220px;
  padding: 14px 28px;
}

/* ===== НОВЫЙ БЛОК — ПОЯСНЕНИЕ О МАЛОЙ ЧАСТИ РАБОТ ===== */
.pf-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 30px;
  background: var(--pf-bg-soft);
  border-radius: 60px;
  border: 1px solid var(--pf-line);
  max-width: 700px;
  margin: 0 auto 20px;
  color: var(--pf-text-muted);
  font-size: 15px;
  text-align: center;
  box-shadow: var(--pf-shadow-sm);
}

.pf-note i {
  color: var(--pf-accent);
  font-size: 20px;
  opacity: 0.8;
}

.pf-note span {
  line-height: 1.5;
}

/* ===== MODAL — СВЕТЛЫЙ ФОН ===== */
.pf-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pf-modal.active {
  display: block;
  opacity: 1;
}

.pf-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
}

.pf-modal__dialog {
  position: relative;
  z-index: 2;
  width: calc(100vw - 80px);
  height: calc(100vh - 80px);
  margin: 40px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 1000px) {
  .pf-modal__dialog {
    grid-template-columns: 1fr;
    width: calc(100vw - 32px);
    height: auto;
    max-height: calc(100vh - 32px);
    margin: 16px;
    border-radius: 24px;
  }
}

.pf-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--pf-line);
  color: var(--pf-text);
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 18px;
  box-shadow: var(--pf-shadow-md);
}

.pf-modal__close:hover {
  background: var(--pf-accent);
  color: #fff;
  border-color: var(--pf-accent);
  transform: rotate(90deg);
}

.pf-modal__media {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.pf-modal__media img,
.pf-modal__media iframe {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.pf-modal__info {
  padding: 40px;
  overflow-y: auto;
  background: #fff;
  border-left: 1px solid var(--pf-line);
}

.pf-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.pf-chip {
  padding: 6px 18px;
  border-radius: 30px;
  background: var(--pf-bg-soft);
  border: 1px solid var(--pf-line);
  font-size: 13px;
  font-weight: 600;
  color: var(--pf-text);
}

.pf-modal__title {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  line-height: 1.1;
}

.pf-modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.pf-modal__meta span {
  padding: 6px 18px;
  background: var(--pf-bg-soft);
  border-radius: 30px;
  font-size: 14px;
  color: var(--pf-text-muted);
  border: 1px solid var(--pf-line);
}

.pf-modal__desc {
  font-size: 16px;
  line-height: 1.7;
  color: var(--pf-text-muted);
  margin-bottom: 28px;
}

.pf-modal__gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pf-modal__gallery button {
  border: none;
  background: none;
  padding: 0;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1/1;
  transition: var(--transition);
  border: 2px solid transparent;
}

.pf-modal__gallery button:hover {
  border-color: var(--pf-accent);
  transform: scale(1.02);
}

.pf-modal__gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
  .pf-hero {
    padding: 90px 0 40px;
  }
  
  .pf-hero__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 30px;
  }
  
  .pf-hero__info {
    flex-direction: row;
    align-items: center;
    gap: 30px;
    align-self: flex-start;
  }
  
  .pf-hero__decor-line {
    display: none;
  }
  
  .pf-hero__graphic,
  .pf-hero__graphic-left {
    opacity: 0.6;
    width: 150px;
  }
  
  .pf-catalog {
    padding: 15px 0 70px;
  }

  .pf-note {
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    border-radius: 30px;
  }
}

@media (max-width: 600px) {
  .pf-hero {
    padding: 70px 0 30px;
  }
  
  .pf-hero__info {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .pf-hero__stat-number {
    font-size: 28px;
  }
  
  .pf-hero__stat::before {
    left: -15px;
  }
  
  .pf-toolbar {
    padding: 8px 0;
  }
  
  .pf-catalog {
    padding: 10px 0 70px;
  }
  
  .pf-card__meta {
    grid-template-columns: 1fr;
  }

  .pf-note {
    font-size: 14px;
    padding: 15px;
  }
}