/* ---------------------------------------------------
   🌱 Переназначение цветов шаблона (header/footer)
----------------------------------------------------- */
:root {
    --cassiopeia-color-primary: #4B7F3C;       /* основной зелёный */
    --cassiopeia-color-hover: #AACB84;         /* при наведении */
    --cassiopeia-color-link: #6A994E;          /* цвет ссылок */
    --cassiopeia-color-bg-light: #F5FBE9;      /* светлый фон */
    --cassiopeia-color-bg-dark: #E1EDDC;       /* тёмный фон - исправлен пробел */
}

/* -------------------------------
   🌷 Общие шрифты и фон
--------------------------------- */
body {
    font-family: 'Georgia', serif;
    background-color: #FCFAF4;
    color: #2F2F2F;
    line-height: 1.7;
}

/* -------------------------------
   🌸 Заголовки
--------------------------------- */
h1, h2, h3, h4 {
    color: #4B7F3C;
    font-weight: bold;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    line-height: 1.25;
}

/* 🌼 Слоган */
header .site-description {
    font-style: italic;
    color: #2F4F2F !important;          /* тёмно-зелёный для лучшей читаемости */
    background-color: #E6F0D9;           /* светло-зелёный фон, мягкий для глаз */
    padding: 0.7rem 1.2rem;
    border-left: 5px solid #4B7F3C;
    border-radius: 6px;
    margin-top: 0.5rem;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

/* -------------------------------
   🍀 Меню
--------------------------------- */
.container-nav {
    background-color: var(--cassiopeia-color-bg-light);
    border-top: 4px solid #8FAE6A;
    border-bottom: 1px solid #CFE6C0;
}

.navbar .mod-menu > li > a,
.navbar .mod-menu > li > button {
    color: #4B7F3C !important;
    font-weight: bold;
    padding: 0.75rem 1rem !important;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    outline-offset: 2px;
}

.navbar .mod-menu > li > a:hover,
.navbar .mod-menu > li > button:hover,
.navbar .mod-menu > li > a:focus,
.navbar .mod-menu > li > button:focus {
    background-color: #D9EBC7;
    color: #2D5023;
    transform: scale(1.05);
    outline: 2px solid #4B7F3C;
}

/* -------------------------------
   🍂 Ссылки
--------------------------------- */
a {
    color: var(--cassiopeia-color-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #527D3A;
    text-decoration: underline;
    outline: none;
}

a:focus-visible {
    outline: 2px solid #4B7F3C;
    outline-offset: 2px;
}

/* -------------------------------
   🍁 Цитаты
--------------------------------- */
blockquote {
    background-color: #F1F7E9;
    border-left: 6px solid #94BD7B;
    padding: 1rem 1.5rem;
    font-style: italic;
    font-size: 1.1rem;
    color: #3C4D30;
    margin: 2rem 0;
    border-radius: 4px;
}

/* -------------------------------
   🌻 Изображения
--------------------------------- */
img.float-start,
img.float-end,
img.mx-auto,
img.mx-auto.d-block {
    display: block !important;
    margin: 1.5rem 1.5rem;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(164, 194, 140, 0.3);
}

/* -------------------------------
   🐝 БЫСТРЫЙ ПЕРЕХОД - Top
--------------------------------- */
#back-top {
    position: fixed;
    bottom: 20px;
    right: 12px;
    z-index: 9999;

    background-color: #8FAE6A;
    color: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

#back-top:hover {
    background-color: #6C8E4E;
}

/* ---------------------------------------------------
   🍂 Стиль футера (и дочерних блоков)
----------------------------------------------------- */
.container-footer {
    background-color: var(--cassiopeia-color-bg-dark);
    color: #365028;
    text-align: center;
    padding: 2rem 0;
    max-width: 100%;
    box-sizing: border-box;
}

.container-footer .footer1 {
    font-style: italic;
}

/* контейнер помогает выравнивать дочерние модули */
.footer .grid-child {
    display: flex;
    flex-wrap: wrap;
    row-gap: 1rem;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer h3 {
    font-size: 1.2rem;
    color: #4B7F3C;
}

/* горизонтальные меню (например, соцсети) внутри футера */
.footer .menu-horizontal {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.footer a {
    color: #4D703A;
    transition: color 0.3s ease;
}

.footer a:hover,
.footer a:focus {
    text-decoration: underline;
    color: #365028;
    outline: none;
}

.footer a:focus-visible {
    outline: 2px solid #4B7F3C;
    outline-offset: 2px;
}
/* Ограничим кастомные стили меню для широких экранов */
@media (min-width: 992px) {
  .container-nav {
      background-color: var(--cassiopeia-color-bg-light);
      border-top: 4px solid #8FAE6A;
      border-bottom: 1px solid #CFE6C0;
  }

  .navbar .mod-menu > li > a,
  .navbar .mod-menu > li > button {
      color: #4B7F3C !important;
      font-weight: bold;
      padding: 0.75rem 1rem !important;
      transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
      outline-offset: 2px;
  }

  .navbar .mod-menu > li > a:hover,
  .navbar .mod-menu > li > button:hover,
  .navbar .mod-menu > li > a:focus,
  .navbar .mod-menu > li > button:focus {
      background-color: #D9EBC7;
      color: #2D5023;
      transform: scale(1.05);
      outline: 2px solid #4B7F3C;
  }
}
.container-header .navbar-toggler {
    color: #4B7F3C;
    cursor: pointer;
    border: 1px solid #4B7F3C;
}
/* 🌐 Адаптивная пагинация */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.5rem;
    box-sizing: border-box;
}

.pagination li {
    list-style: none;
}

.pagination a,
.pagination strong {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    background-color: #E6F0D9;
    color: #4B7F3C;
    border: 1px solid #C0D8B0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    min-width: 2.5rem;
    text-align: center;
    transition: background-color 0.2s ease;
}

.pagination a:hover {
    background-color: #CFE6C0;
    color: #2D5023;
}

.pagination strong {
    background-color: #8FAE6A;
    color: white;
    border-color: #4B7F3C;
}
/* 🌿 Центрирование figure и figcaption */
figure {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 0 12px rgba(164, 194, 140, 0.3);
    overflow: hidden;
    background-color: #f9fdf3; /* мягкий фон */
    padding: 0.5rem;
}

figure img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    border-radius: 6px;
}

figcaption {
    font-size: 0.9rem;
    color: #4B7F3C;
    margin-top: 0.5rem;
    font-style: italic;
}