/* - ОБЩИЕ НАСТРОЙКИ -  */
            :root {
            --bg-color: #ffffff;
            --card-size: 350px;
            --gap-size: 10px;
            --accent-color: #ff6b6b;
            --max-width: 800px;
            --border-radius: 16px;
            
            /* Динамические размеры текста */
            --text-min: 13px;
            --text-max: 15px;
            --heading-min: 15px;
            --heading-max: 18px;
            --company-font-min: 18px;
            --company-font-max: 22px;
            --company-font-size: clamp(var(--company-font-min), 2.5vw, var(--company-font-max));
            
            /* Текущие размеры (будут вычисляться) */
            --text-size: clamp(var(--text-min), 2vw, var(--text-max));
            --heading-size: clamp(var(--heading-min), 2.5vw, var(--heading-max));
        }

        body {
            margin: 0;
            padding: 0;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background-color: var(--bg-color);
            color: #333;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            font-size: var(--text-size); /* Базовый размер текста */
            line-height: 1.4;
        }

        /* Адаптивные текстовые элементы */
        .company-name, 
        .subscribe-title,
        .footer-icon,
        .views,
        .subscribe-button,
        .email-input::placeholder {
            font-size: var(--text-size);
        }

        .news-title,
        .subscribe-title {
            font-size: var(--heading-size);
        }

        .news-subtitle,
        .subscribe-text,
        .email-input {
            font-size: var(--text-size);
        }
      
        /* Иконки в SVG */
        .icon {
            width: 18px;
            height: 18px;
            fill: currentColor;
        }
     
        /* - ФУТЕР -  */
        .footer {
            width: 100%;
            max-width: var(--max-width);
            height: 50px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            box-sizing: border-box;
            border-top: 1px solid #e0e0e0;
            margin: 0 auto;
        }

        .company-name {
            background-color: #e0e0e0;
            border-radius: var(--border-radius);
            padding: 8px 12px;
            font-size: var(--company-font-size); /* Используем адаптивный размер */
            font-weight: 600; /* Делаем немного жирнее */
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: calc(var(--max-width) / 3);
            letter-spacing: 0.3px; /* Лёгкий кернинг для лучшей читаемости */
        }

        .footer-icons {
            display: flex;
            gap: 12px;
        }

        .footer-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 16px;
            border: none;
            outline: none;
        }

        .footer-icon:hover {
            background-color: #d0d0d0;
        }

        .footer-icon.active {
            background-color: var(--accent-color);
            color: white;
        }

        /* - БЛОК ПОИСКА - */
       .search {
            width: 100%;
            max-width: 760px;
            padding: 15px 20px;
            box-sizing: border-box;
            margin: 0 auto;
            position: relative; /* Добавляем для правильного позиционирования дочерних элементов */
        }

        .search-container {
            position: relative;
            width: 100%;
        }

        .search-input {
            width: 100%;
            padding: 10px 50px 10px 15px;
            border-radius: 20px;
            border: 1px solid #ddd;
            background-color: #f8f8f8;
            font-size: 16px;
            outline: none;
            transition: all 0.3s;
            box-sizing: border-box;
        }

        .search-input:focus {
            border-color: #aaa;
        }

        .search-icon-container {
            position: absolute;
            right: 5px; /* Отступ от правого края поля ввода */
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: #e0e0e0;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .search-icon {
            width: 18px;
            height: 18px;
            opacity: 0.7;
        }
      
        /* - БЛОК ПОДПИСКИ -  */
        .subscribe {
  width: 100%;
  max-width: 365px;
  margin: 20px auto;
  perspective: 1000px;
}

.subscribe-card {
  position: relative;
  width: 365px;
  height: 150px;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  cursor: pointer;
}

.subscribe:hover .subscribe-card {
  transform: rotateY(180deg);
}

.subscribe-front,
.subscribe-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 20px;
  box-sizing: border-box;
}

.subscribe-front {
  background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
  flex-direction: row;
  gap: 15px;
}

.subscribe-back {
  background: white;
  transform: rotateY(180deg);
  flex-direction: column;
  border: 1px solid #eee;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gift-icon-large {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.gift-icon-large svg {
  width: 100%;
  height: 100%;
  fill: white;
}

.subscribe-text {
  color: white;
  font-size: 18px;
  font-weight: 500;
  text-align: left;
  max-width: 200px;
}

.email-input {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 2px solid #ff6b6b;
  text-align: center;
  font-size: 16px;
  margin-bottom: 15px;
}

.email-input:focus {
  outline: none;
  border-bottom-color: #ff4757;
}

.subscribe-button {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.subscribe-button:hover {
  background: #ff4757;
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
  .subscribe {
    max-width: 320px;
  }
  
  .subscribe-card {
    width: 320px;
    height: 140px;
  }
  
  .subscribe-text {
    font-size: 16px;
  }
}

        /* - БЛОК ПУБЛИКАЦИЙ - */
        .content {
            width: 100%;
            max-width: 800px;
            display: grid;
            grid-template-columns: repeat(auto-fit, var(--card-size));
            justify-content: center;
            gap: var(--gap-size);
            padding: 0 20px 20px;
            box-sizing: border-box;
        }

        .news-card {
            width: var(--card-size);
            height: var(--card-size);
	    min-height: 200px;
            border-radius: 12px;
            overflow: visible;
            position: relative;
            background-color: #e0e0e0;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
	    background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .news-text {
            flex-grow: 1;
            position: relative;
            z-index: 2;
            color: white;
        }

        .news-title {
            font-weight: 600;
            margin-bottom: 8px;
            color: #ffffff;
            background-color: rgba(0, 0, 0, 0.2);
            padding: 4px 8px;
            border-radius: 14px;
        }

        .news-subtitle {
            color: #555;
            line-height: 1.4;
        }

        .news-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 15px;
        }

        .views {
            display: flex;
            align-items: center;
            gap: 4px;
            background-color: rgba(0, 0, 0, 0.2);
            padding: 4px 8px;
            border-radius: 14px;
            color: #444;
        }

        .favorite {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background-color: rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: #666;
            transition: all 0.2s;
        }

        .favorite.active {
            background-color: var(--accent-color);
            color: white;
        }

	/* Стили для модального окна */
.publication-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  overflow-y: auto;
}

.modal-overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
}

.modal-content {
  position: relative;
  max-width: 800px;
  width: 90%;
  margin: 20px auto;
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.modal-image-container {
  width: 100%;
  max-height: 300px;
  overflow: hidden;
}

.modal-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.modal-text-content {
  padding: 10px;
}

.modal-title {
  font-size: 24px;
  margin: 10px 0;
  color: #333;
}

.modal-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 20px;
}

.text-block {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #333;
}

.text-block p {
  margin-bottom: 15px;
}

.content-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
  display: block;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  color: white;
  cursor: pointer;
  z-index: 10;
}

        /* Контакты (будет показано при клике) */
        .contacts-popup {
            display: none;
            position: fixed;
            bottom: 70px;
            right: 20px;
            background-color: white;
            padding: 15px;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            width: 200px;
            border: 1px solid #e0e0e0;
        }

        .contacts-popup.show {
            display: block;
        }
