@font-face {
    font-family: 'Google Sans';
    font-style: italic;
    font-weight: 400;
    src: url(https://kompas.gpmanager.ru/css/4UaXrENHsxJlGDuGo1OIlL3L2JB874GPhFI9_IqmuTCajshE7g.woff2) format('woff2');
    unicode-range: U +0308, U +0530 -058F, U +2010, U +2024, U +25CC, U + FB13-FB17;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: Google Sans, Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    background: #f8fafd;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

header {
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

nav a {
    margin-right: 15px;
    text-decoration: none;
    color: #333;
}

nav a:hover { color: #0066cc; }

#content { min-height: 300px; }

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

form input, form textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    padding: 10px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

form button:hover { background: #0055aa; }

#form-result { margin-top: 10px; color: #333; }



.files-box {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 0;
}

.dwfiles {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  width: 100%;
  max-width: 240px; /* ширина карточки */
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Обертка для картинки — чтобы не ломала верстку при разной высоте */
.dwfiles-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
  background-color: #f5f5f5; /* цвет фона, если картинки нет */
}

.dwfiles-img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* картинка заполняет блок, не искажаясь */
  display: block;
}

.dwfiles h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  text-align: center;
  line-height: 1.2;
}

.btn-download {
  display: block;
  text-align: center;
  padding: 10px;
  margin-bottom: 8px;
  background: #0066cc;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: background 0.2s ease;
}

.btn-download:hover {
  background: #0055aa;
}

/* Адаптив: на планшетах по 2 в ряд, на телефонах по 1 */
@media (max-width: 768px) {
  .dwfiles {
    max-width: 48%;
  }
}

@media (max-width: 480px) {
  .dwfiles {
    max-width: 100%;
  }
}




/* Затемнение фона — теперь это flex-контейнер, который центрирует контент */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9998;
  display: none; /* скрыто по умолчанию */

  /* ГЛАВНОЕ: центрирование содержимого оверлея */
  justify-content: center;
  align-items: center;
}

/* Блок с картинкой — больше не нужно позиционировать вручную */
.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  z-index: 9999;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  /* object-fit: contain гарантирует, что картинка не обрежется и впишется в блок */
}

/* Кнопка закрытия (крестик) */
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  user-select: none;
}
