/* ================================
   📧 Newsletter Styles
   ================================ */

.newsletter-container {
  max-width: 900px;
  margin: 0 auto;
  font-family: system-ui, sans-serif;
  line-height: 1.5;
  color: #333;
}

/* Шапка */
.newsletter-header {
  background: linear-gradient(135deg, #2e1065 0%, #4c1d95 100%);
  color: #fff;
  text-align: center;
  padding: 20px 10px;   /* было 40px 20px */
  border-radius: 12px;
  margin-bottom: 30px;
}
.newsletter-header h1 {
  margin: 0;
  font-size: 1rem;      /* было 2rem */
}
.newsletter-header p {
  margin: 5px 0 0;
  font-size: 0.75rem;   /* уменьшен в 2 раза */
  opacity: 0.9;
}

/* Мобилки (до 768px) — ещё компактнее */
@media (max-width: 767px) {
  .newsletter-header {
    padding: 15px 8px;   /* ещё меньше отступ */
  }
  .newsletter-header h1 {
    font-size: 0.9rem;
  }
  .newsletter-header p {
    font-size: 0.7rem;
  }
}


/* Главное (мейн стори как карточка) */
.newsletter-main {
  max-width: 1200px;
  margin: 0 auto 40px;
  text-align: center;
}
.newsletter-main .main-card {
  max-width: 100%;
}
.newsletter-main img {
  width: 100%;
  height: 250px;       /* фиксированная высота */
  object-fit: cover;   /* обрезает лишнее */
  display: block;
  margin: 0 auto;
}

/* Секции */
.newsletter-section {
  margin: 30px auto 15px;
  font-size: 0.5rem;
  color: #4f46e5;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 5px;
  max-width: 400px;
  text-align: center;
}

/* Карточки */
.newsletter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
  place-content: center;
  justify-items: center;
}
.newsletter-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  max-width: 350px;
}
.newsletter-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}
.newsletter-card .card-body {
  padding: 15px;
}
.newsletter-card h3 {
  margin-top: 0;
  color: #111;
  font-size: 1.1rem;
}
.newsletter-card p {
  font-size: 0.9rem;
  color: #555;
}
.newsletter-card a {
  display: inline-block;
  margin-top: 10px;
  color: #4f46e5;
  font-weight: 600;
  text-decoration: none;
}
.newsletter-card a:hover {
  text-decoration: underline;
}

/* Футер */
.newsletter-footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #777;
  border-top: 1px solid #e5e7eb;
}
.newsletter-footer a {
  color: #4f46e5;
  margin: 0 5px;
  text-decoration: none;
}
.newsletter-footer a:hover {
  text-decoration: underline;
}

/* --- Планшеты (до 1024px) --- */
@media (max-width: 1023px) {
  .newsletter-main {
    max-width: 95%;
  }
  .newsletter-main img {
    height: 220px; /* чуть меньше на планшете */
  }
  .newsletter-section {
    font-size: 1rem;
  }
  .newsletter-grid {
    max-width: 95%;
  }
}

/* --- Мобилки (до 768px) --- */
@media (max-width: 767px) {
  .newsletter-header {
    padding: 15px 8px;   /* внутренние отступы */
    margin-top: 15px;    /* внешний отступ сверху – добавили воздух */
  }
  .newsletter-header h1 {
    font-size: 1.5rem;
  }
  .newsletter-main img {
    height: 180px; /* ниже высота */
  }
  .newsletter-section {
    font-size: 0.9rem;
    max-width: 80%;
  }
  .newsletter-grid {
    grid-template-columns: 1fr; /* по одной карточке в ряд */
    max-width: 100%;
  }
  .newsletter-card {
    max-width: 90%;
  }
}
/* ================================
   💀 Skeleton Loader
   ================================ */

.skeleton-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  max-width: 350px;
  width: 100%;
  animation: pulse 1.5s infinite ease-in-out;
}

.skeleton-media {
  width: 100%;
  height: 150px;
  background: #e5e7eb;
}

.skeleton-body {
  padding: 15px;
}

.skeleton-line {
  height: 12px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-bottom: 10px;
}

.skeleton-line.long {
  width: 100%;
}

.skeleton-line.medium {
  width: 70%;
}

.skeleton-line.short {
  width: 40%;
}

@keyframes pulse {
  0% {
    background-color: #e5e7eb;
  }
  50% {
    background-color: #f3f4f6;
  }
  100% {
    background-color: #e5e7eb;
  }
}
/* Анимация исчезновения */
.skeleton-container.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

/* ================================
   ✉️ Newsletter Forms (Novicoins)
   ================================ */

/* Форма подписки */
.newsletter-subscribe {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.newsletter-subscribe input[type="email"] {
  flex: 1;
  max-width: 280px;
  padding: 8px 12px;
  border: 2px solid #4a3c8c;
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.newsletter-subscribe input[type="email"]:focus {
  border-color: #4338ca;
}

.newsletter-subscribe button {
  @apply nk-btn; /* если у тебя tailwind-like, иначе просто дублируем стиль */
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid #4a3c8c;
  background: transparent;
  color: #4a3c8c;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.newsletter-subscribe button:hover {
  background: #4a3c8c;
  color: #fff;
}

/* Кнопка отправки выпуска */
.newsletter-send {
  text-align: center;
  margin: 20px 0;
}

.newsletter-send button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid #4a3c8c;
  background: transparent;
  color: #4a3c8c;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.newsletter-send button:hover {
  background: #4a3c8c;
  color: #fff;
}
