/* ========================================
   memo-styles.css
   Стили раздела "Памятки"
   Путь: /wp-content/themes/understrap/css/memo-styles.css
   ======================================== */


/* === СПИСОК ПАМЯТОК (archive-memo.php) === */
.memoPage {
  margin-bottom: 80px;
}

.memoPage .title {
  font-weight: 700;
  font-size: 40px;
  margin-bottom: 50px;
  color: var(--primeColor);
  text-align: center;
}

/* Сетка карточек */
.memoGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Карточка памятки */
.memoCard {
  background: #F5F5F5;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow: hidden;
}

.memoCard:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Изображение в карточке */
.memoCardImage {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #e0e0e0;
}

.memoCardImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.memoCard:hover .memoCardImg {
  transform: scale(1.05);
}

/* Контент карточки */
.memoCardContent {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex-grow: 1;
}

.memoCardTitle {
  font-weight: 700;
  font-size: 24px;
  color: var(--primeColor);
  margin: 0;
  line-height: 1.3;
}

/* Кнопка "Подробнее" в карточке */
.memoCard .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 30px;
  font-size: 16px;
  font-weight: 600;
  background: transparent;
  color: var(--primeColor);
  border: 2px solid var(--primeColor);
  text-decoration: none;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.memoCard .btn-secondary:hover {
  background: var(--primeColor);
  color: #fff;
  transform: translateY(-2px);
}

.memoCard .btn-secondary svg {
  width: 10px;
  height: 15px;
}

/* Пустое состояние */
.memoPageEmpty {
  text-align: center;
  font-size: 18px;
  color: #666;
  padding: 50px 0;
}


/* === ОДНА ПАМЯТКА (single-memo.php) === */
.memoSingle {
  margin-bottom: 80px;
}

.memoSingleArticle {
  background: #fff;
  padding: 50px;
  margin-bottom: 50px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Шапка */
.memoSingleHeader {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 3px solid #DBAC6C;
}

.memoSingleIcon {
  margin-bottom: 20px;
}

.memoSingleTitle {
  font-weight: 700;
  font-size: 36px;
  color: var(--primeColor);
  line-height: 1.3;
  margin: 0;
}

/* Изображение */
.memoSingleImage {
  margin-bottom: 40px;
  text-align: center;
}

.memoSingleImg {
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

/* Контент памятки (базовые значения — детали ниже в Override) */
.memoSingleContent {
  font-size: 16px;
  color: #333;
  margin-bottom: 50px;
}

.memoSingleContent h2,
.memoSingleContent h3 {
  color: var(--primeColor);
  font-weight: 700;
  margin-top: 30px;
  margin-bottom: 15px;
}

.memoSingleContent h2 { font-size: 28px; }
.memoSingleContent h3 { font-size: 22px; }

.memoSingleContent ul,
.memoSingleContent ol {
  margin: 20px 0;
  padding-left: 30px;
}

.memoSingleContent strong {
  color: var(--primeColor);
  font-weight: 600;
}

/* Кнопки действий */
.memoSingleActions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding: 30px;
  background: #F5F5F5;
  justify-content: center;
}

/* Золотая кнопка */
.memoSingleActions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 40px;
  font-size: 18px;
  font-weight: 600;
  background: #D9AA6E;
  color: #03392D;
  border: none;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.memoSingleActions .btn-primary:hover {
  background: #c99a5a;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(217, 170, 110, 0.4);
  color: #03392D;
}

/* Зеленая кнопка */
.memoSingleActions .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px 40px;
  font-size: 18px;
  font-weight: 600;
  background: transparent;
  color: var(--primeColor);
  border: 2px solid var(--primeColor);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.memoSingleActions .btn-secondary:hover {
  background: var(--primeColor);
  color: #fff;
  transform: translateY(-2px);
}

/* Футер с контактами */
.memoSingleFooter {
  padding: 30px;
  background: #E8F1FF;
  border-left: 4px solid var(--primeColor);
}

.memoSingleNote {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 16px;
  color: #333;
  margin: 0;
  line-height: 1.6;
}

.memoSingleNote a {
  color: var(--primeColor);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid #DBAC6C;
  transition: all 0.3s ease;
}

.memoSingleNote a:hover {
  border-bottom-color: var(--primeColor);
  color: #025a3d;
}

/* Блок "Другие памятки" */
.memoSingleRelated { margin-top: 50px; }

.memoRelatedTitle {
  font-weight: 700;
  font-size: 28px;
  color: var(--primeColor);
  margin-bottom: 30px;
}

.memoRelatedGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.memoRelatedCard {
  background: #F5F5F5;
  padding: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.memoRelatedCard:hover {
  background: #E8F1FF;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.memoRelatedImage img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.memoRelatedCardTitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--primeColor);
  margin: 0;
  line-height: 1.4;
}


/* === АДАПТИВ === */
@media (max-width: 991px) {
  .memoGrid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }

  .memoPage .title { font-size: 32px; }
  .memoSingleArticle { padding: 30px; }
  .memoSingleTitle { font-size: 28px; }
  .memoSingleContent { font-size: 15px; }
}

@media (max-width: 767px) {
  .memoGrid { grid-template-columns: 1fr; }

  .memoCardImage { height: 200px; }
  .memoCardContent { padding: 20px; }
  .memoCardTitle { font-size: 20px; }
  .memoPage .title { font-size: 28px; }

  .memoSingleArticle { padding: 20px; }
  .memoSingleTitle { font-size: 24px; }

  .memoSingleActions {
    flex-direction: column;
    padding: 20px;
  }

  .memoSingleActions .btn-primary,
  .memoSingleActions .btn-secondary {
    width: 100%;
    padding: 16px 30px;
    font-size: 16px;
  }

  .memoSingleNote {
    flex-direction: column;
    text-align: center;
    font-size: 14px;
  }

  .memoRelatedGrid { grid-template-columns: 1fr; }
}


/* === ПЕЧАТЬ === */
@media print {
  .breadcrumbs,
  .memoSingleActions,
  .memoSingleRelated,
  header,
  footer {
    display: none !important;
  }

  .memoSingleArticle {
    box-shadow: none;
    padding: 20px;
  }

  .memoSingleContent {
    font-size: 14px;
  }
}


/* ========================================
   OVERRIDE: БОЛЬШЕ РАССТОЯНИЕ МЕЖДУ СТРОКАМИ
   (Повышенная специфичность + !important)
   ======================================== */
.memoSingle .memoSingleContent p,
.memoSingle .memoSingleContent li {
  line-height: 1.9 !important;
  margin: 0 0 14px !important;
}

.memoSingle .memoSingleContent ul,
.memoSingle .memoSingleContent ol {
  margin: 0 0 16px !important;
  padding-left: 28px !important;
}

/* На всякий случай общий line-height только для текстовых узлов */
.memoSingle .memoSingleContent {
  line-height: 1.9 !important;
}