/* === ОБЩИЕ СТИЛИ === */
html, body {
  width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  padding: 20px 0 !important;
  padding-bottom: 20px !important;
  background: #fff !important;
  font-family: "FuturaPT", sans-serif;
}

body.modal-open {
  overflow: hidden !important;
}

.hidden { display: none !important; }

/* === УНИФИЦИРОВАННЫЙ ОТСТУП 16px === */
.project-title,
.search-container,
.search-placeholder,
.tags-container,
.sections-container,
.articles-section-title,
.favorites__list {
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box;
}

/* Заголовок */
.project-title {
  font-weight: bold;
  font-size: 36px;
  text-align: left;
  margin: 20px 0 10px 0;
  color: #000;
  padding-top: 50px;
}

/* Логотип */
.logo {
  width: 90px !important;
  height: 30px !important;
  margin: 0 0 20px 16px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  padding: 0 !important;
}

/* === СПИСОК СТАТЕЙ === */
.favorites {
  position: static !important;
  margin-top: 24px !important;
  width: 100% !important;
}

.favorites-item {
  padding: 10px 0 !important;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.favorites-item:hover {
  background-color: #f9f9f9;
}

.favorites-item::after {
  content: "" !important;
}

/* === ПОИСК === */
.search-container {
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  gap: 12px;
  position: relative;
}

.search-input {
  flex: 1;
  font-size: 100px !important;
  line-height: 1.2 !important;
  min-height: 48px;
  color: #0084ff !important;
  caret-color: #0084ff;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  font-weight: 200 !important;
}

.articles-section-title {
  font-size: 20px;
  font-weight: 600;
  margin: 24px 0 16px 0;
  color: #000;
  padding-top: 8px;
}

@media (max-width: 768px) {
  .search-input {
    font-size: 32px !important;
  }
  .search__size-tester {
    font-size: 32px !important;
  }
}

@media (max-width: 480px) {
  .search-input {
    font-size: 28px !important;
  }
  .search__size-tester {
    font-size: 28px !important;
  }
}

.search-input::placeholder {
  color: #ccc !important;
  opacity: 1 !important;
}

.search-clear {
  font-size: 32px !important;
  color: #999 !important;
  background: none;
  border: none;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.search-placeholder {
  font-size: 16px !important;
  font-weight: 200;
  line-height: 1.2 !important;
  color: #000000 !important;
  margin-top: 12px !important;
  text-align: left !important;
}

.search__size-tester {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  white-space: nowrap;
  padding: 0 16px;
  font-weight: 200;
  pointer-events: none;
  font-family: "FuturaPT", sans-serif;
  line-height: 1.2;
  color: #0084ff;
  font-size: 100px; /* ← ДОБАВЬТЕ ЭТО */
}

/* === РАЗДЕЛЫ === */
.sections-container {
  margin-top: 24px;
  width: 100%;
}

.sections-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.section {
  padding: 10px 16px;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 200;
  cursor: pointer;
  background-color: #e0e0e0;
  color: #000;
  transition: all 0.2s;
  user-select: none;
  max-width: calc(100% - 16px);
  word-wrap: break-word;
  text-align: center;
}

.section.is-active {
  background-color: #000;
  color: #fff;
}

/* === ТЕГИ === */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 8px;
  width: 100%;
  box-sizing: border-box;
}

.tag {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background-color: #e0e0e0;
  color: #000;
  max-width: calc(100% - 16px);
  word-wrap: break-word;
  text-align: center;
}

/* === МОДАЛЬНОЕ ОКНО === */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.modal__content {
  position: relative;
  max-width: 900px;
  max-height: 90vh;
  width: 100%;
  background: #fff;
  overflow: auto;
  padding: 0;
  box-sizing: border-box;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  font-size: 18px;
  line-height: 1.6;
  color: #000;
  overscroll-behavior: contain;
}

/* ХЕДЕР МОДАЛКИ */
.modal-header {
  position: sticky;
  top: 0;
  background: transparent; /* ← прозрачный */
  padding: 16px;
  border: none; /* ← убрана серая полоса */
  z-index: 10;
}

/* Кнопка закрытия — справа вверху */
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 28px;
  background: none;
  border: none;
  cursor: pointer;
  color: #333;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
}

.modal-close-btn:hover {
  background: #f0f0f0;
}