/* =========================================================
   Страница "Реестр инвестиционных предложений" — по макету Figma
   ========================================================= */

body.registry-page{ background:#F7F7F7; }

/* ---------- Layout (переиспользуем баннер/сайдбар со страницы Новости) ---------- */
.registry-layout{
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 40px var(--page-pad) 90px;
  display:flex;
  align-items:flex-start;
  gap:40px;
}
.registry-content{ flex:1; min-width:0; }
.registry-content h1{
  font-family:'Inter',Arial,sans-serif;
  font-weight:700;
  font-size:42px;
  line-height:1.4;
  color:#333;
  margin-bottom:24px;
}

/* ---------- Поиск + переключатель фильтра ---------- */
.reg-searchbar{
  display:flex; align-items:center; gap:20px; margin-bottom:16px;
}
.reg-search{
  flex:1;
  display:flex; align-items:center; gap:12px;
  background:#fff; border:1px solid #e5e5e5; border-radius:8px;
  padding:16px 20px;
}
.reg-search input{
  flex:1; border:none; outline:none; font-family:'Inter',Arial,sans-serif;
  font-size:15px; color:#333; background:none;
}
.reg-search input::placeholder{ color:#999; }
.reg-search svg{ width:18px; height:18px; color:#333; flex-shrink:0; }
.reg-filter-toggle{
  display:flex; align-items:center; gap:8px; flex-shrink:0;
  background:#EAF2FB; border:1px solid #1666B0; border-radius:8px;
  padding:16px 20px; font-size:14px; color:#1666B0; white-space:nowrap;
  transition: background .2s, color .2s;
}
.reg-filter-toggle:hover{ background:#1666B0; color:#fff; }
.reg-filter-toggle svg{ width:10px; height:6px; transition: transform .2s; }
.reg-filter-toggle.open svg{ transform: rotate(180deg); }

/* ---------- Панель фильтров ---------- */
.reg-filters{
  background:#fff; border:1px solid #e5e5e5; border-radius:10px;
  padding:24px; margin-bottom:16px;
  display:grid; grid-template-columns: repeat(3, 1fr); gap:16px;
  overflow:hidden;
  max-height:1000px;
  transition: max-height .3s ease, opacity .3s ease, padding .3s ease, margin .3s ease;
}
.reg-filters.collapsed{
  max-height:0; opacity:0; padding-top:0; padding-bottom:0; margin-bottom:0;
  border-width:0;
}
.rf-field{
  background:#fff; border:1px solid #e5e5e5; border-radius:8px;
  padding:12px 18px; cursor:pointer; position:relative;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.rf-field .rf-text{ display:flex; flex-direction:column; gap:6px; }
.rf-field .label{ font-size:13px; color:#999; }
.rf-field .value{ font-size:15px; font-weight:500; color:#333; }
.rf-field img.chev{ width:10px; height:6px; flex-shrink:0; }
.rf-dropdown{
  position:absolute; top:calc(100% + 6px); left:0; right:0;
  background:#fff; border:1px solid #e5e5e5; border-radius:10px;
  box-shadow:2px 16px 19px rgba(0,0,0,.09);
  padding:8px 0; z-index:30;
  opacity:0; visibility:hidden; transform:translateY(-6px);
  transition:opacity .2s, transform .2s, visibility .2s;
}
.rf-field.open .rf-dropdown{ opacity:1; visibility:visible; transform:translateY(0); }
.rf-dropdown button{
  display:block; width:100%; text-align:left; background:none; border:none;
  padding:10px 18px; font-size:14px; color:#333;
}
.rf-dropdown button:hover{ background:#fafafa; color:#cd1f26; }

.rf-range{ grid-column: span 2; display:flex; align-items:center; gap:16px; }
.rf-range .rf-num{
  flex:1; background:#fff; border:1px solid #e5e5e5; border-radius:8px; padding:12px 18px;
}
.rf-range .rf-num .label{ font-size:13px; color:#999; display:block; margin-bottom:6px; }
.rf-range .rf-num input{
  width:100%; border:none; outline:none; font-family:'Inter',Arial,sans-serif;
  font-size:15px; font-weight:500; color:#333;
}
.rf-range .sep{ font-size:15px; color:#333; }

.reg-slider-row{ grid-column: 1 / -1; padding:0 4px; }
.reg-slider-row .rf-track{
  position:relative; height:4px; background:#e5e5e5; border-radius:2px; margin:10px 0 4px;
}
.reg-slider-row .rf-track .fill{
  position:absolute; height:4px; background:#1666B0; border-radius:2px;
}
.reg-slider-row .rf-track .handle{
  position:absolute; top:50%; width:14px; height:14px; border-radius:50%;
  background:#fff; border:2px solid #1666B0; transform:translate(-50%,-50%);
  cursor:pointer;
}
.reg-slider-row .rf-labels{ display:flex; justify-content:space-between; font-size:12px; color:#999; }

.reg-reset-row{ grid-column: 1 / -1; display:flex; justify-content:center; }
.reg-reset{
  background:#fff; border:1px solid #1666B0; border-radius:8px;
  padding:14px 40px; font-size:15px; color:#1666B0;
  transition: background .2s, color .2s;
}
.reg-reset:hover{ background:#1666B0; color:#fff; }

/* ---------- Панель действий ---------- */
.reg-actionbar{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-bottom:24px;
}
.reg-actionbar__left{ display:flex; gap:12px; flex-wrap:wrap; }
.reg-actionbar__right{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.reg-dl-btn{
  display:flex; align-items:center; gap:8px;
  background:#fff; border:1px solid #e5e5e5; border-radius:8px;
  padding:12px 16px; font-size:13px; color:#333;
  transition: color .2s, border-color .2s;
}
.reg-dl-btn:hover{ color:#cd1f26; border-color:#cd1f26; }
.reg-dl-btn svg{ width:18px; height:18px; flex-shrink:0; }
.reg-view-toggle{ display:flex; gap:6px; }
.reg-view-toggle button{
  width:40px; height:40px; border-radius:8px; background:#fff; border:1px solid #e5e5e5;
  display:flex; align-items:center; justify-content:center; color:#999;
  transition: background .2s, color .2s, border-color .2s;
}
.reg-view-toggle button svg{ width:16px; height:16px; }
.reg-view-toggle button:hover{ color:#cd1f26; border-color:#cd1f26; }
.reg-view-toggle button.active{ background:#cd1f26; border-color:#cd1f26; color:#fff; }

/* ---------- Grid view (карточки) ---------- */
.reg-grid{
  display:grid; grid-template-columns:repeat(4, 1fr); gap:20px; margin-bottom:24px;
}
.reg-card{
  background:#fff; border:1px solid #e5e5e5; border-radius:16px; overflow:hidden;
  display:flex; flex-direction:column;
}
.reg-card__media{
  position:relative; height:160px; overflow:hidden; flex-shrink:0;
  transition: height .35s ease;
}
.reg-card__media img{
  position:absolute; inset:0; width:100%; height:100%; object-fit:cover;
}
.reg-card__tag{
  position:absolute; top:12px; left:12px; z-index:2;
  background:rgba(255,255,255,.92); color:#333; font-size:10px; text-transform:uppercase;
  letter-spacing:.02em; padding:6px 10px; border-radius:6px;
}
.reg-card__hover-title{
  position:absolute; left:0; right:0; bottom:0; z-index:2; padding:16px;
  background:linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
  color:#fff; font-size:16px; font-weight:600; line-height:1.3;
  opacity:0; transform:translateY(8px);
  transition:opacity .3s ease, transform .3s ease;
}
.reg-card__body{ padding:16px; display:flex; flex-direction:column; gap:8px; }
.reg-card__title{ font-size:15px; font-weight:600; color:#333; line-height:1.35; min-height:2.7em; }
.reg-card__row{ display:flex; align-items:center; gap:8px; font-size:13px; color:#666; }
.reg-card__row svg{ width:15px; height:15px; color:#1666B0; flex-shrink:0; }

/* Наведение: изображение растягивается во всю высоту карточки */
.reg-card:hover .reg-card__media{ height:100%; position:absolute; inset:0; }
.reg-card{ position:relative; }
.reg-card:hover{ min-height:280px; }
.reg-card:hover .reg-card__body{ opacity:0; pointer-events:none; }
.reg-card:hover .reg-card__hover-title{ opacity:1; transform:translateY(0); }

/* ---------- List view (таблица) ---------- */
.reg-table-wrap{
  background:#fff; border:1px solid #e5e5e5; border-radius:10px; overflow:auto; margin-bottom:24px;
}
.reg-table{ width:100%; border-collapse:collapse; min-width:1100px; }
.reg-table thead th{
  background:#E7F1FA; text-align:left; font-size:12px; font-weight:600; color:#333;
  padding:14px 16px; white-space:normal; border-bottom:1px solid #e5e5e5;
}
.reg-table tbody td{
  padding:16px; font-size:13px; color:#333; border-bottom:1px solid #f0f0f0; vertical-align:top;
}
.reg-table tbody tr:last-child td{ border-bottom:none; }
.reg-table tbody tr:hover{ background:#fafcff; }
.reg-table a.reg-row-title{ color:#1666B0; font-weight:500; transition:color .2s; }
.reg-table a.reg-row-title:hover{ color:#cd1f26; }

/* ---------- Пагинация + на странице ---------- */
.reg-pagination-row{
  display:flex; align-items:center; justify-content:center; gap:24px; flex-wrap:wrap; position:relative;
}
.reg-pagination{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.reg-pagination button{
  background:#fff; border:1px solid #cd1f26; border-radius:8px;
  padding:10px; min-width:40px; height:40px; font-size:14px; color:#cd1f26; text-align:center;
  transition: background .2s, color .2s;
}
.reg-pagination button:hover{ background:rgba(205,31,38,.08); }
.reg-pagination button.active{ background:#cd1f26; color:#fff; }
.reg-pagination button.wide{ padding:10px 16px; width:auto; }
.reg-pagination span.dots{ color:#cd1f26; padding:0 4px; }
.reg-perpage{
  position:absolute; right:0;
  display:flex; align-items:center; gap:8px;
  background:#fff; border:1px solid #e5e5e5; border-radius:8px;
  padding:10px 16px; font-size:14px; color:#333; cursor:pointer;
}
.reg-perpage img{ width:10px; height:6px; }

/* ---------- Детальная карточка (описание / характеристики / материалы + галерея) ---------- */
.reg-detail{
  margin-top:56px; background:#fff; border:1px solid #e5e5e5; border-radius:16px; padding:32px;
}
.reg-detail h2{ font-size:26px; font-weight:700; color:#333; margin-bottom:20px; }
.reg-tabs{ display:flex; gap:8px; margin-bottom:24px; }
.reg-tabs button{
  padding:12px 24px; border-radius:10px; border:none; background:#EEF2F7; color:#333; font-size:14px;
  transition: background .2s, color .2s;
}
.reg-tabs button.active{ background:#1666B0; color:#fff; }
.reg-tab-panel{ display:none; font-size:14px; line-height:1.7; color:#444; }
.reg-tab-panel.active{ display:block; }
.reg-tab-panel ul{ padding-left:20px; margin-top:8px; }
.reg-gallery{ display:flex; gap:12px; overflow-x:auto; padding-bottom:8px; margin-top:20px; }
.reg-gallery img{
  width:220px; height:150px; object-fit:cover; border-radius:10px; flex-shrink:0; cursor:pointer;
  transition: transform .3s;
}
.reg-gallery img:hover{ transform: scale(1.03); }

/* ---------- Lightbox ---------- */
.reg-lightbox{
  position:fixed; inset:0; background:rgba(0,0,0,.9); z-index:1000;
  display:flex; align-items:center; justify-content:center;
  opacity:0; visibility:hidden; transition:opacity .25s, visibility .25s;
}
.reg-lightbox.open{ opacity:1; visibility:visible; }
.reg-lightbox img{ max-width:90vw; max-height:85vh; border-radius:8px; }
.reg-lightbox-close{
  position:absolute; top:24px; right:24px; width:44px;height:44px; border-radius:50%;
  background:rgba(255,255,255,.15); color:#fff; border:none; font-size:22px;
}

@media (max-width: 1300px){
  .reg-grid{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width: 1100px){
  .registry-layout{ flex-direction:column; }
  .news-sidebar{ width:100%; }
  .reg-filters{ grid-template-columns:1fr 1fr; }
  .rf-range{ grid-column:1/-1; }
}
@media (max-width: 800px){
  .reg-grid{ grid-template-columns:repeat(2,1fr); }
  .reg-filters{ grid-template-columns:1fr; }
  .reg-searchbar{ flex-direction:column; align-items:stretch; }
  .reg-pagination-row{ flex-direction:column; }
  .reg-perpage{ position:static; }
}
@media (max-width: 560px){
  .reg-grid{ grid-template-columns:1fr; }
}
