/* ============================================================
   СТРАНИЦА „БЮЛЕТИН" (чернова) + тестова страница
   Ползва общите брандови променливи от site.css:
   --green-dark, --cream, --cream-soft, --orange, --text-light
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   КАРТА ЗА СТАТУС (потвърждение / отписване)
   ------------------------------------------------------------ */
.nl-status-card {
  max-width: 560px;
  margin: 40px auto 0;
  padding: 40px 28px;
  text-align: center;
  background: var(--cream-soft, #faf6ec);
  border: 1px solid rgba(30, 77, 43, 0.18);
  border-top: 3px solid var(--orange);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(20, 54, 32, 0.10);
}
.nl-status-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 18px;
  border: 3px solid rgba(30, 77, 43, 0.2);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: nl-spin 0.8s linear infinite;
}
.nl-status-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  border-radius: 50%;
}
.nl-status-icon.is-ok  { background: var(--green-light, #2f6b3d); }
.nl-status-icon.is-err { background: var(--brown, #5a2d0c); }
.nl-status-title {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--green-dark);
}
.nl-status-text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-light);
}

/* ------------------------------------------------------------
   ОБЩ КОНТЕЙНЕР
   ------------------------------------------------------------ */
.newsletter-page,
.nl-test-page {
  padding-top: 8px;
  padding-bottom: 64px;
}
.newsletter-page .container {
  max-width: 1100px;
}
.nl-test-page .container {
  max-width: 820px;
}

/* ------------------------------------------------------------
   ДВУКОЛОНЕН LAYOUT: съдържание вляво, форма вдясно
   ------------------------------------------------------------ */
.nl-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  align-items: start;
  margin-top: 24px;
}
/* Фина вертикална линия между съдържанието и формата */
.nl-sidebar {
  position: sticky;
  top: 96px;
  padding-left: 40px;
  border-left: 1px solid rgba(30, 77, 43, 0.18);
}
.nl-sidebar-lead {
  margin: 0 0 18px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-light);
}
.nl-btn-block {
  width: 100%;
}

/* Спинър в бутона по време на изпращане */
.nl-btn .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: nl-spin 0.7s linear infinite;
}
@keyframes nl-spin {
  to { transform: rotate(360deg); }
}

/* Съобщение за резултат от абонирането */
.nl-message {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.nl-message.is-success {
  background: rgba(47, 107, 61, 0.12);
  color: var(--green-dark);
  border: 1px solid var(--green-light);
}
.nl-message.is-error {
  background: rgba(90, 45, 12, 0.10);
  color: var(--brown);
  border: 1px solid var(--brown);
}

/* ------------------------------------------------------------
   ВЪВЕЖДАЩ ТЕКСТ + СЛОГАН
   ------------------------------------------------------------ */
.nl-intro {
  max-width: 680px;
  margin: 28px auto 12px;
  text-align: center;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-light);
}
.nl-slogan {
  margin: 0 auto 36px;
  text-align: center;
  font-family: 'Bell MT', Georgia, 'Times New Roman', serif;
  font-size: 1.5rem;
  color: var(--green-dark);
}

/* ------------------------------------------------------------
   ФОРМА ЗА АБОНИРАНЕ
   ------------------------------------------------------------ */
.nl-subscribe {
  padding: 22px 22px 20px;
  background: var(--cream);
  border: 1px solid rgba(30, 77, 43, 0.18);
  border-top: 3px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(20, 54, 32, 0.10);
}
.nl-section-title {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--green-dark);
}
.nl-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* --- Компактен вариант: име + имейл + бутон на един ред --- */
.nl-subscribe-compact {
  max-width: 640px;
  margin: 0 auto 32px;
  padding: 20px 22px 18px;
}
.nl-subscribe-compact .nl-section-title {
  margin-bottom: 14px;
  font-size: 1.25rem;
}
.nl-form-compact {
  gap: 12px;
}
.nl-fields-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nl-fields-row input {
  flex: 1 1 160px;
  min-width: 0;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid rgba(30, 77, 43, 0.25);
  border-radius: 8px;
}
.nl-fields-row input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(217, 131, 36, 0.18);
}
.nl-fields-row .nl-btn {
  flex: 0 0 auto;
  padding: 10px 24px;
}
.nl-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.nl-field label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--green-dark);
}
.nl-field input {
  padding: 11px 13px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid rgba(30, 77, 43, 0.25);
  border-radius: 8px;
}
.nl-field input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(217, 131, 36, 0.18);
}
.nl-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.nl-consent input {
  margin-top: 3px;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--orange);
}
.nl-consent label {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-light);
}
.nl-form-note {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-light);
  text-align: center;
}

/* ------------------------------------------------------------
   БУТОНИ
   ------------------------------------------------------------ */
.nl-btn {
  display: inline-block;
  padding: 13px 28px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.05s ease;
}
.nl-btn-primary {
  background: var(--orange);
  color: var(--cream);
}
.nl-btn-primary:hover {
  background: var(--orange-dark);
}
.nl-btn-primary:active {
  transform: translateY(1px);
}

/* ------------------------------------------------------------
   ПРЕГЛЕД НА ПОСЛЕДЕН БРОЙ
   ------------------------------------------------------------ */
.nl-issue {
  margin: 0;
}
.nl-issue-eyebrow {
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}
.nl-issue-title {
  margin: 0 0 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--green-dark);
}
.nl-issue-text {
  margin: 0 0 20px;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-light);
}

/* Снимки */
.nl-photo {
  margin: 0 0 20px;
}
.nl-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}
.nl-photo figcaption {
  margin-top: 8px;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--text-light);
  text-align: center;
}
.nl-photo-lead img {
  aspect-ratio: 16 / 9;
}
.nl-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 8px;
}
.nl-photo-grid .nl-photo img {
  aspect-ratio: 4 / 3;
}

/* ------------------------------------------------------------
   ПУБЛИКУВАНИ БРОЕВЕ: КАРТИ + ПРАЗНО СЪСТОЯНИЕ
   ------------------------------------------------------------ */
.nl-empty {
  margin: 8px 0 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-light);
}
.nl-published-title {
  margin: 0 0 20px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--green-dark);
}

/* Мрежа с карти */
.nl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

/* Карта за брой (умалена, цялата снимка) */
.nl-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 0;
  font-family: inherit;
  background: var(--cream, #faf6ec);
  border: 1px solid rgba(30, 77, 43, 0.18);
  border-top: 3px solid var(--orange);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(20, 54, 32, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.nl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(20, 54, 32, 0.16);
}
.nl-card:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

/* Миниатюра: ЦЯЛАТА снимка, без изрязване (letterbox на тъмнозелено) */
.nl-card-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px;
  background: #0e2a18;
}
.nl-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.nl-card-thumb-empty {
  background: var(--green-dark);
}

.nl-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px 18px;
}
.nl-card-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}
.nl-card-title {
  margin: 0;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--green-dark);
}
.nl-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-light);
}
.nl-card-more {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
}

/* ------------------------------------------------------------
   СТРАНИЦИРАНЕ (номера на страници под броевете)
   ------------------------------------------------------------ */
.nl-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.nl-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  background: var(--cream, #faf6ec);
  border: 1px solid rgba(30, 77, 43, 0.25);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.nl-page-btn:hover:not(:disabled):not(.is-active) {
  background: var(--cream-soft, #f1ead8);
  transform: translateY(-1px);
}
.nl-page-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}
.nl-page-btn.is-active {
  color: #fff;
  background: var(--green-dark);
  border-color: var(--green-dark);
  cursor: default;
}
.nl-page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.nl-page-arrow {
  font-size: 1.3rem;
  line-height: 1;
}

/* ------------------------------------------------------------
   МОДАЛ (прозорец в прозорец) с целия брой
   ------------------------------------------------------------ */
.nl-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.nl-modal[hidden] { display: none; }
.nl-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 18, 0.6);
  backdrop-filter: blur(2px);
}
.nl-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  overflow: hidden;
  background: var(--cream, #faf6ec);
  border-radius: 14px;
  border-top: 4px solid var(--orange);
  box-shadow: 0 24px 60px rgba(10, 30, 18, 0.4);
  animation: nl-modal-in 0.18s ease;
}
@keyframes nl-modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nl-modal-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 12px 12px 0;
}
.nl-modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  background: var(--green-dark);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.nl-modal-close:hover { background: var(--orange); }
.nl-modal-content {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 32px 28px;
}
.nl-modal-eyebrow {
  flex: 0 0 auto;
  margin: 0 0 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}
.nl-modal-title {
  flex: 0 0 auto;
  margin: 0 0 16px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--green-dark);
}
/* Снимката заема оставащото място и се свива, за да няма скрол */
.nl-modal-figure {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 16px;
  background: #0e2a18;
  border-radius: 10px;
  overflow: hidden;
}
.nl-modal-figure[hidden] { display: none; }
.nl-modal-figure img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}
.nl-modal-text {
  flex: 0 0 auto;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-light);
}
.nl-modal-text a {
  color: var(--orange);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.nl-modal-text a:hover {
  color: var(--green-dark);
}

/* ------------------------------------------------------------
   ТЕСТОВА СТРАНИЦА
   ------------------------------------------------------------ */
.nl-test-note {
  max-width: 620px;
  margin: 28px auto 24px;
  padding: 14px 18px;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--green-dark);
  background: var(--cream);
  border: 1px dashed rgba(217, 131, 36, 0.6);
  border-radius: 8px;
}
.nl-test-cta {
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 28px;
  text-align: center;
  background: var(--cream);
  border: 1px solid rgba(30, 77, 43, 0.18);
  border-top: 3px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(20, 54, 32, 0.10);
}
.nl-test-title {
  margin: 0 0 10px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--green-dark);
}
.nl-test-lead {
  margin: 0 0 24px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-light);
}

/* ------------------------------------------------------------
   КОМПАКТНО ПОЛЕ ЗА АБОНИРАНЕ В СТРАНИЦАТА КОНТАКТИ
   ------------------------------------------------------------ */
.nl-inline {
  max-width: 640px;
  margin: 40px auto 8px;
  padding: 24px 24px 20px;
  text-align: center;
  background: var(--cream);
  border: 1px solid rgba(30, 77, 43, 0.18);
  border-top: 3px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(20, 54, 32, 0.10);
}
.nl-inline-title {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--green-dark);
}
.nl-inline-lead {
  margin: 0 0 18px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-light);
}
.nl-inline .nl-consent label {
  text-align: left;
}

/* --- Покана към бюлетина в страницата Контакти (само бутон) --- */
.nl-cta {
  max-width: 640px;
  margin: 40px auto 8px;
  padding: 28px 24px;
  text-align: center;
  background: var(--cream);
  border: 1px solid rgba(30, 77, 43, 0.18);
  border-top: 3px solid var(--orange);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(20, 54, 32, 0.10);
}
.nl-cta-title {
  margin: 0 0 8px;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--green-dark);
}
.nl-cta-lead {
  margin: 0 0 20px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-light);
}
.nl-cta-btn {
  display: inline-block;
  text-decoration: none;
}

/* ------------------------------------------------------------
   МОБИЛНИ / ТАБЛЕТ: една колона, формата отгоре
   ------------------------------------------------------------ */
@media (max-width: 820px) {
  .nl-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  /* Формата слиза най-долу, под съдържанието (за да не се губи интерес на телефон) */
  .nl-sidebar {
    position: static;
    top: auto;
    order: 2;
    padding-left: 0;
    border-left: none;
  }
}

@media (max-width: 560px) {
  .nl-photo-grid {
    grid-template-columns: 1fr;
  }
  .nl-fields-row {
    flex-direction: column;
  }
  .nl-fields-row .nl-btn {
    width: 100%;
  }
  .nl-cards {
    grid-template-columns: 1fr;
  }
  .nl-modal {
    padding: 12px;
  }
  .nl-modal-dialog {
    max-height: 94vh;
  }
  .nl-modal-content {
    padding: 4px 20px 24px;
  }
}
