/* ==================================================
   🔔 БЛОК ПОДПИСКИ НА УВЕДОМЛЕНИЯ
================================================== */

.subscribe-box{
  display:flex;
  align-items:center;
  background:var(--bg-subscribe);
  border:1px solid var(--border-subscribe);
  border-radius:16px;
  padding:16px 20px;
  gap:14px;
  flex-wrap:wrap;
}

.subscribe-main{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  gap:12px;
  flex-wrap:wrap;
}

.subscribe-box-text{
  font-size:15px;
  font-weight:500;
  color:var(--text-primary);
  flex:1;
  min-width:160px;
}

/* Кнопка подписки */
.subscribe-box-button .elementor-button{
  display:inline-block;
  background:var(--main-color);
  color:#fff;
  border:none;
  border-radius:50px;
  padding:10px 22px;
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
  text-decoration:none;
  cursor:pointer;
  transition:background 0.2s;
}

.subscribe-box-button .elementor-button:hover{
  background:var(--main-color-hover);
}

.subscribe-instruction{
  width:100%;
  font-size:14px;
  color:var(--text-secondary);
  line-height:1.6;
}

.subscribe-box .subscribe-instruction{
  display:none;
}

@media(max-width:768px){
  .subscribe-box{
    padding:14px 16px;
    border-radius:14px;
  }

  .subscribe-box-text{
    font-size:14px;
  }
}

/* ==================================================
   🎯 БАЗОВЫЕ ПЕРЕМЕННЫЕ
================================================== */
:root{
  --main-color:#0088CC;
  --main-color-hover:#006fa3;
  --bg-light:#F4FCFF;
  --bg-page:#ffffff;
  --bg-card:#ffffff;
  --bg-card-hover:#ffffff;
  --bg-secondary:#f1f3f5;
  --bg-header:#ffffff;
  --text-primary:#1a1a1a;
  --text-secondary:#444444;
  --text-muted:#6c757d;
  --border-color:#e0e0e0;
  --shadow-card:0 5px 15px rgba(0,0,0,0.05);
  --shadow-card-hover:0 10px 25px rgba(0,0,0,0.1);
  --gradient-fade:linear-gradient(180deg, rgba(245,245,245,0) 0%, rgba(245,245,245,0.82) 55%, #ffffff 100%);
  --bg-subscribe:linear-gradient(135deg,#e8f7ff 0%,#f0faff 100%);
  --border-subscribe:#c2e8ff;
  --bg-sidebar:#fff;
  --bg-tag:#ffffff;
  --border-tag:#d0d7de;
  --bg-tag-hover:#f8fbff;
  --bg-expand:rgba(255,255,255,0.94);
}

[data-theme="dark"]{
  --main-color:#3daadb;
  --main-color-hover:#5bc0eb;
  --bg-light:#1a1a2e;
  --bg-page:#121212;
  --bg-card:#1e1e2e;
  --bg-card-hover:#252538;
  --bg-secondary:#2a2a3c;
  --bg-header:#1a1a2e;
  --text-primary:#e0e0e0;
  --text-secondary:#b0b0b0;
  --text-muted:#888;
  --border-color:#333;
  --shadow-card:0 5px 15px rgba(0,0,0,0.3);
  --shadow-card-hover:0 10px 25px rgba(0,0,0,0.5);
  --gradient-fade:linear-gradient(180deg, rgba(30,30,46,0) 0%, rgba(30,30,46,0.82) 55%, #1e1e2e 100%);
  --bg-subscribe:linear-gradient(135deg,#1a2a3a 0%,#1e2e3e 100%);
  --border-subscribe:#2a4a5a;
  --bg-sidebar:#1e1e2e;
  --bg-tag:#1e1e2e;
  --border-tag:#444;
  --bg-tag-hover:#2a2a3c;
  --bg-expand:rgba(30,30,46,0.94);
}

/* ==================================================
   📰 ЛЕНТА ПОСТОВ
================================================== */
.posts-feed{
  display:flex;
  flex-direction:column;
  gap:40px;
  padding:0;
}

/* ==================================================
   🧱 КАРТОЧКА ПОСТА
================================================== */
.post-card{
  background:var(--bg-card);
  border-radius:25px;
  overflow:hidden;
  width:calc(100% - 32px);
  margin:0 auto;
  box-shadow:var(--shadow-card);
  transition:transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-card-hover);
}

.post-card-image{
  display:block;
  max-height:none;
}

.post-card-image img{
  width:100%;
  max-width:none;
  height:auto;
  max-height:none;
  display:block;
}

.post-card-body{
  padding:25px;
}

.post-card-title{
  font-size:22px;
  font-weight:700;
  margin-bottom:15px;
}
.post-card-title a{
  color:inherit;
  text-decoration:none;
}
.post-card-title a:hover{
  color:#0088cc;
}

.post-card-content{
  font-size:16px;
  line-height:1.6;
}

.post-card-content.is-collapsible{
  position:relative;
  overflow:hidden;
  transition:max-height 0.25s ease;
}

.post-card-content.is-collapsed{
  max-height:300px;
}

.post-card-expand-toggle{
  display:flex;
  align-items:flex-end;
  justify-content:center;
  position:sticky;
  bottom:0;
  height:96px;
  width:100%;
  margin-top:-96px;
  padding:0 0 14px;
  border:none;
  background:var(--gradient-fade);
  cursor:pointer;
  z-index:2;
}

.post-card-expand-toggle-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:50%;
  background:var(--bg-expand);
  box-shadow:0 6px 18px rgba(0,0,0,0.12);
  color:#7a7a7a;
  font-size:22px;
  line-height:1;
}

.post-card-extra-content{
  margin-top:28px;
}

.post-card-extra-content .post-footer-cta{
  margin-top:20px;
}

.post-card-extra-content .post-footer-cta-text{
  display:none;
}


.post-card-extra-content .single-related-block{
  margin-top:24px;
}

/* Скрываем пустой Elementor-контейнер (нужен для layout) */
.elementor-element-9598d04{
  display:none !important;
}

/* ==================================================
   🔘 ТАБЫ ФИЛЬТРОВ (единый стиль, PHP-рендер)
================================================== */
#filter-tabs-bar{
  display:flex;
  background:var(--bg-card);
  padding:0 10px;
}

.filter-tab{
  border-bottom:2px solid transparent;
  transition:border-color 0.3s;
}

.filter-tab-link{
  display:flex;
  align-items:center;
  gap:5px;
  padding:12px 15px;
  font-family:"Inter", sans-serif;
  font-size:16px;
  font-weight:400;
  color:#0088CC;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
}

.filter-tab-link:hover{
  color:#006699;
}

.filter-tab-link svg{
  vertical-align:middle;
}

.filter-tab-active{
  border-bottom-color:#0088CC;
}

.posts-filter-active{
  border-bottom-color:#0088CC;
}

/* ==================================================
   📄 СТРАНИЦА ПОСТА
================================================== */
.single-post-container{
  max-width:900px;
  margin:auto;
  padding:40px 20px;
}

.single-post-image img{
  width:100%;
  border-radius:12px;
  margin-bottom:30px;
}

.single-post-title{
  font-size:34px;
  margin-bottom:20px;
}

.single-post-content{
  font-size:18px;
  line-height:1.7;
}

/* === Single post as feed card === */
.single-as-feed{
  max-width:700px;
  margin:0 auto;
  padding:24px 0 40px;
}

.single-as-feed .post-card{
  width:calc(100% - 32px);
  margin:0 auto;
}

.single-as-feed .post-card-title{
  font-size:22px;
}

.single-as-feed .expired-post-banner{
  margin:0;
  border-radius:0;
}

.expired-post-banner{
  margin:0 0 24px;
  padding:14px 18px;
  border-radius:12px;
  background:var(--bg-secondary);
  color:var(--text-muted);
  font-size:16px;
  font-weight:700;
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.expired-post-banner-text{
  display:block;
}

.expired-post-banner-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  background:var(--bg-card)fff;
  border:1px solid var(--border-tag);
  color:#0088CC;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
}

.expired-post-banner-link:hover{
  background:var(--bg-tag-hover);
  border-color:#0088CC;
}

.single-related-block{
  margin-top:36px;
}

.single-related-title{
  font-size:26px;
  line-height:1.3;
  margin:0 0 18px;
}

.single-related-list{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.single-related-card{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px;
  border-radius:16px;
  background:var(--bg-card);
  box-shadow:0 4px 16px rgba(0,0,0,0.06);
  text-decoration:none;
  color:var(--text-primary);
  transition:transform 0.2s ease, box-shadow 0.2s ease;
}

.single-related-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,0.1);
}

.single-related-thumb img{
  display:block;
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:12px;
}

.single-related-content{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.single-related-card-title{
  margin:0;
  font-size:18px;
  line-height:1.4;
}

.single-related-expiry{
  font-size:13px;
  color:var(--text-muted);
  font-weight:600;
}

/* ==================================================
   🦶 ФУТЕР
   Был выключен через display:none — в подвале не было ничего, кроме
   логотипа и копирайта, и он только занимал место. Включён обратно
   04.08.2026: туда добавлены рубрики, «О сайте», «Политика
   конфиденциальности» и раскрытие о партнёрских ссылках.
   Отступ снизу — под плавающую кнопку «Фильтры», она fixed и легла бы
   поверх последних строк.
================================================== */
#site-footer{
  display:block;
  padding-bottom:24px;
}

@media (max-width:768px){
  #site-footer{
    padding-bottom:90px;
  }
}

/* ==================================================
   🧢 ХЭДЕР — старые правила удалены 31.08.2026 вместе с elementor-классами,
================================================== */
/* Логотип */
.elementor-element-9dd8aab{
  flex-shrink:0;
}

.elementor-element-9dd8aab img{
  width:50px;
  height:50px;
  border-radius:50%;
  display:block;
  background:transparent;
}

/* Название + подзаголовок */
.elementor-element-3682cd9{
  display:flex;
  flex-direction:column;
  flex:1;
  min-width:0;
}

.elementor-element-dae253b{
  text-align:left;
}

.elementor-element-dae253b .elementor-heading-title{
  font-family:"Roboto Mono", Sans-serif;
  font-size:40px;
  font-weight:400;
  color:#0088CC;
}

.elementor-element-dae253b .elementor-heading-title a{
  color:#0088CC;
  text-decoration:none;
}

/* Подзаголовок мобайл (под названием) — скрыт на десктопе */
.elementor-element-9046708{
  display:none;
}

.elementor-element-9046708 .elementor-heading-title{
  font-family:"Inter", Sans-serif;
  font-size:10px;
  font-weight:400;
  color:#000;
}

/* Описание (только десктоп) */
.elementor-element-85b95ad{
  display:flex;
  flex-direction:column;
}

.elementor-element-35aad81{
  text-align:center;
  font-family:"Inter", Sans-serif;
  font-size:21px;
  font-weight:600;
  text-transform:uppercase;
  color:var(--main-color);
}

.elementor-element-3e7a090{
  text-align:center;
}

.elementor-element-3e7a090 .elementor-heading-title{
  font-family:"Inter", Sans-serif;
  font-size:20px;
  font-weight:400;
  color:#000;
}

/* Кнопка поиска — скрыта на десктопе */
.elementor-element-8027757{
  display:none;
}

.elementor-element-8027757 .elementor-button{
  background-color:transparent !important;
  fill:#2c3e50 !important;
  color:#2c3e50 !important;
  border:1.5px solid #2c3e50 !important;
  border-radius:8px !important;
  padding:6px !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  flex-shrink:0;
}

.elementor-element-8027757 .e-font-icon-svg{
  width:20px !important;
  height:20px !important;
  fill:#2c3e50 !important;
}

/* Десктоп */
@media (min-width:768px){
.elementor-element-9dd8aab img{
    width:70px;
    height:70px;
  }

  .elementor-element-3682cd9{
    flex:0 0 auto;
  }

  /* Центрируем текст хедера по всей ширине */
  .elementor-element-85b95ad{
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    max-width:55%;
    text-align:center;
    gap:2px;
  }

  .elementor-element-9046708{
    display:none;
  }
}

/* Мобайл */
@media (max-width:767px){
.elementor-element-9dd8aab img{
    width:40px;
    height:40px;
  }

  .elementor-element-dae253b .elementor-heading-title{
    font-size:18px;
  }

  /* Показать подзаголовок на мобиле */
  .elementor-element-9046708{
    display:block;
  }

  /* Скрыть десктопное описание на мобиле */
  .elementor-element-85b95ad{
    display:none !important;
  }

  /* Показать кнопку поиска на мобиле */
  .elementor-element-8027757{
    display:block;
    flex-shrink:0;
  }
}

/* Модалка поиска */
.search-modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.45);
  z-index:10001;
}

.search-modal-overlay.open{
  display:block;
}

.search-modal{
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  z-index:10002;
  background:var(--bg-card);
  border-radius:20px 20px 0 0;
  padding:20px 20px 36px;
  transform:translateY(100%);
  transition:transform 0.3s ease;
  box-sizing:border-box;
}

.search-modal.open{
  transform:translateY(0);
}

.search-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px;
}

.search-modal-title{
  font-size:18px;
  font-weight:700;
}

.search-modal-close{
  background:none;
  border:none;
  font-size:24px;
  cursor:pointer;
  color:#888;
  line-height:1;
  padding:0;
}

.search-modal form{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.search-modal .search-modal-input{
  width:100%;
  box-sizing:border-box;
  padding:14px 16px;
  border:1px solid var(--main-color);
  border-radius:10px;
  font-size:16px;
  outline:none;
}

.search-modal .search-modal-submit{
  width:100%;
  background:var(--main-color);
  color:#fff;
  border:none;
  padding:14px;
  border-radius:10px;
  font-size:16px;
  font-weight:600;
  cursor:pointer;
  transition:background 0.2s;
}

.search-modal .search-modal-submit:hover{
  background:var(--main-color-hover);
}

/* ==================================================
   🎟 ПРОМОКОДЫ
================================================== */
.promo-box{
  display:inline-flex;
  align-items:center;
  gap:12px;
  background:#f5f7fb;
  padding:10px 16px;
  border-radius:8px;
  border:1px dashed #2b7cff;
}

.promo-code{
  font-weight:bold;
  font-size:14px;
  letter-spacing:1px;
}

.promo-copy-btn{
  background:var(--main-color);
  color:#fff;
  border:none;
  padding:6px 12px;
  border-radius:6px;
  cursor:pointer;
  transition:0.2s;
  display:flex;
  align-items:center;
  justify-content:center;
}

.promo-copy-btn:hover{
  background:var(--main-color-hover);
}

.promo-copy-btn svg{
  display:block;
}


/* ==================================================
   🔍 ФОРМА ФИЛЬТРОВ (DESKTOP)
================================================== */

.elementor-element-dca5ca8{
  position: sticky;
  top: auto;
  bottom: 20px;
  align-self: flex-start;
}

#custom-filter-form{
  display:flex;
  flex-direction:column;
  gap:20px;
  font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif;
  background:#F4FCFF;
  padding:20px;
  border-radius:15px;
}

/* строка поиска */
.filter-row{
  display:flex;
  gap:20px;
  align-items:center;
}

/* поле поиска */
#custom-filter-form .filter-search{
  flex:1;
  padding:12px 16px;
  border:1px solid #0088CC;
  border-radius:10px;
  font-size:16px;
  outline:none;
}

/* кнопка */
.filter-submit{
  background:#0088CC;
  color:#fff;
  border:none;
  padding:12px 20px;
  border-radius:10px;
  font-size:16px;
  cursor:pointer;
  transition:0.2s;
}

.filter-submit:hover{
  background:#006fa3;
}

/* строка с фильтрами */
.filter-row:nth-of-type(2){
  display:flex;
  flex-wrap:wrap;
  gap:20px;
}

#custom-filter-form .filter-select{
  padding:12px 16px;
  border:1px solid #0088CC;
  border-radius:10px;
  font-size:15px;
  background:var(--bg-card);
  cursor:pointer;
  outline:none;
}

/* при клике (focus) */
#custom-filter-form .filter-select:focus{
  border:1px solid #0088CC;
  box-shadow:0 0 0 2px rgba(0,136,204,0.15);
}





/* ==================================================
   🔎 SEARCHABLE SELECT (Бренды / Банки)
================================================== */

.searchable-select{
  position:relative;
  width:100%;
  box-sizing:border-box;
  max-width:100%;
}

.searchable-select-display{
  padding:12px 16px;
  border:1px solid #0088CC;
  border-radius:10px;
  font-size:16px;
  background:var(--bg-card);
  cursor:pointer;
  color:#757575;
  user-select:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.searchable-select-display::after{
  content:"";
  border:5px solid transparent;
  border-top-color:#0088CC;
  margin-left:8px;
  flex-shrink:0;
}

.searchable-select-display.has-value{
  color:var(--text-primary);
}

.searchable-select-dropdown{
  display:none;
  position:absolute;
  top:calc(100% + 4px);
  left:0;
  right:0;
  background:var(--bg-card);
  border:1px solid #0088CC;
  border-radius:10px;
  box-shadow:0 8px 24px rgba(0,0,0,0.12);
  z-index:100;
  overflow:hidden;
  box-sizing:border-box;
  max-width:100%;
}

.searchable-select-dropdown.open{
  display:block;
}

.searchable-select-search{
  width:100%;
  box-sizing:border-box;
  padding:10px 14px;
  border:none;
  border-bottom:1px solid #e0e0e0;
  font-size:16px;
  outline:none;
}

.searchable-select-list{
  max-height:200px;
  overflow-y:auto;
}

.searchable-select-item{
  padding:10px 14px;
  font-size:16px;
  cursor:pointer;
  transition:background 0.15s;
}

.searchable-select-item:hover{
  background:#e8f7ff;
}

.searchable-select-item.selected{
  background:#d0efff;
  font-weight:600;
}

/* ==================================================
   📌 STICKY CATEGORY PANEL
================================================== */

.sticky-category-panel{
  position:fixed;
  top:16px;
  left:50%;
  transform:translate(-50%, calc(-100% - 24px));
  width:min(1120px, calc(100vw - 24px));
  padding:10px 12px;
  border-radius:18px;
  background:var(--bg-expand);
  border:1px solid rgba(0,136,204,0.12);
  box-shadow:0 18px 40px rgba(22,67,89,0.14);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  z-index:999;
  opacity:0;
  pointer-events:none;
  transition:transform 0.22s ease, opacity 0.22s ease;
}

.sticky-category-panel.is-visible{
  transform:translate(-50%, 0);
  opacity:1;
  pointer-events:auto;
}

.sticky-category-panel-main{
  display:flex;
  align-items:center;
  gap:12px;
}

.sticky-category-panel-scroll{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  }

.sticky-category-panel-scroll::-webkit-scrollbar{
  display:none;
}

.sticky-category-chip{
  flex:0 0 auto;
  border:none;
  border-radius:999px;
  background:#eef8fc;
  color:#24526b;
  padding:10px 16px;
  font-size:14px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  cursor:pointer;
  transition:background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sticky-category-chip:hover{
  background:#dff2fb;
  transform:translateY(-1px);
}

.sticky-category-chip.is-active{
  background:#0088CC;
  color:#fff;
}

.sticky-category-more{
  position:relative;
  flex:0 0 auto;
}

.sticky-category-chip-more::after{
  content:"";
}

.sticky-category-more-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:320px;
  max-height:420px;
  overflow:auto;
  display:none;
  flex-wrap:wrap;
  gap:10px;
  padding:14px;
  border-radius:18px;
  background:var(--bg-card);
  border:1px solid rgba(0,136,204,0.12);
  box-shadow:0 20px 40px rgba(22,67,89,0.16);
}

.sticky-category-more.is-open .sticky-category-more-dropdown{
  display:flex;
}

/* ==================================================
   📱 МОБИЛЬНАЯ АДАПТАЦИЯ
================================================== */
@media (max-width:768px){

  .sticky-category-panel{
    top:calc(var(--header-height, 0px) + 8px);
    width:calc(100vw - 12px);
    padding:8px 8px;
    border-radius:16px;
  }

  .sticky-category-panel-main{
    gap:8px;
  }

  .sticky-category-panel-scroll{
    gap:8px;
    overflow-x:auto;
    flex:1 1 auto;
    scrollbar-width:none;
  }

  .sticky-category-panel-scroll::-webkit-scrollbar{
    display:none;
  }

  .sticky-category-chip{
    padding:9px 14px;
    font-size:13px;
  }

  .sticky-category-more-dropdown{
    right:0;
    left:auto;
    width:min(320px, calc(100vw - 24px));
    max-height:55vh;
  }

  .posts-feed{
    gap:25px;
    padding:0 16px;
  }

  .post-card{
    box-shadow:0 5px 15px rgba(0,0,0,0.1);
    border-radius:18px;
    margin:0;
  }

  .post-card-body{
    padding:18px;
  }

  .post-card-image{
    display:block;
    max-height:none;
  }

  .post-card-image img{
    display:block;
    width:100%;
    max-width:none;
    max-height:none;
    height:auto;
  }

  .post-card-title{
    font-size:18px;
    margin-bottom:10px;
    line-height:1.3;
  }

  .post-card-content{
    font-size:15px;
    line-height:1.6;
  }

  .post-card-extra-content{
    margin-top:16px;
  }

  .post-card-extra-content .post-footer-cta{
    margin:0;
    padding:0;
    background:none;
    border:none;
    border-radius:0;
  }

  .post-card-extra-content .post-footer-cta-buttons{
    display:flex;
    gap:8px;
    align-items:stretch;
  }

  .post-card-extra-content .post-footer-btn{
    flex:1;
    justify-content:center;
    padding:10px 8px;
    border-radius:12px;
    font-size:13px;
    font-weight:600;
    border:none;
    box-shadow:none;
  }
  .post-card-extra-content .post-footer-btn:hover{
    transform:none;
    box-shadow:none;
    opacity:0.85;
  }
  .post-card-extra-content .post-footer-btn svg{
    width:14px;
    height:14px;
  }

  .post-card-extra-content .post-footer-btn-tg{
    background:#e8f4fd;
    color:#229ED9 !important;
  }
  .post-card-extra-content .post-footer-btn-max{
    background:#f0ecfd;
    color:#7B68EE !important;
  }
  .post-card-extra-content .post-footer-btn-home{
    background:#0088CC;
    color:#fff !important;
  }

  .post-card-extra-content .single-related-block{
    margin-top:18px;
  }

  .post-card-extra-content .single-related-title{
    margin:0 0 10px;
    font-size:16px;
    line-height:1.35;
  }

  .post-card-extra-content .single-related-list{
    display:flex;
    flex-direction:column;
    gap:8px;
  }

  .post-card-extra-content .single-related-card{
    flex-direction:row;
    align-items:flex-start;
    gap:10px;
    padding:8px 0;
    border-radius:0;
    background:none;
    box-shadow:none;
    border-bottom:1px solid #edf1f5;
  }

  .post-card-extra-content .single-related-card:last-child{
    border-bottom:none;
  }

  .post-card-extra-content .single-related-card:hover{
    transform:none;
    box-shadow:none;
  }

  .post-card-extra-content .single-related-thumb{
    width:56px;
    flex-shrink:0;
  }

  .post-card-extra-content .single-related-thumb img{
    width:56px;
    height:56px;
    border-radius:10px;
    object-fit:cover;
  }

  .post-card-extra-content .single-related-content{
    gap:4px;
    min-width:0;
  }

  .post-card-extra-content .single-related-card-title{
    font-size:14px;
    line-height:1.35;
    margin:0;
  }

  .post-card-extra-content .single-related-expiry{
    font-size:12px;
    line-height:1.3;
  }

  /* Страница поста */
  .single-post-container{
    padding:25px 15px;
  }

  .single-post-title{
    font-size:26px;
    line-height:1.3;
    margin-bottom:15px;
  }

  .single-as-feed{
    padding:16px 0 30px;
  }

  .single-post-content{
    font-size:16px;
    line-height:1.7;
  }

  .single-post-image img{
    border-radius:10px;
    margin-bottom:20px;
  }

  /* Липкий верх — subscribe под хедером */
  .elementor-element-575d04e.site-top{
    position:sticky;
    top:var(--header-height, 56px);
    z-index:9998;
    background:var(--bg-card)fff;
    width:100%;
  }

  body{
    overflow-x:hidden;
  }

}

/* ==================================================
   📱 МОБИЛЬНЫЕ ФИЛЬТРЫ
================================================== */

/* Кнопка-триггер */
.mobile-filter-btn{
  display:none;
}

@media (max-width:768px){

  .mobile-filter-btn{
    display:flex;
    align-items:center;
    gap:8px;
    position:fixed;
    bottom:24px;
    left:50%;
    transform:translateX(-50%);
    z-index:10000;
    background:var(--main-color);
    color:#fff;
    border:none;
    padding:14px 28px;
    border-radius:50px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    box-shadow:0 4px 20px rgba(0,136,204,0.45);
    white-space:nowrap;
    transition:background 0.2s, box-shadow 0.2s;
  }

  .mobile-filter-btn:hover{
    background:var(--main-color-hover);
  }

  /* Затемнение */
  .mobile-filter-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.45);
    z-index:10001;
  }

  .mobile-filter-overlay.open{
    display:block;
  }

  /* Панель */
  .mobile-filter-panel{
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    z-index:10002;
    background:var(--bg-card);
    border-radius:20px 20px 0 0;
    padding:20px 20px 36px;
    transform:translateY(100%);
    transition:transform 0.3s ease;
    max-height:85vh;
    overflow-y:auto;
    overflow-x:hidden;
    box-sizing:border-box;
  }

  .mobile-filter-panel *{
    max-width:100%;
    box-sizing:border-box;
  }

  .mobile-filter-panel.open{
    transform:translateY(0);
  }

  /* Шапка панели */
  .mobile-filter-panel-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:20px;
  }

  .mobile-filter-panel-title{
    font-size:18px;
    font-weight:700;
  }

  .mobile-filter-close{
    background:none;
    border:none;
    font-size:24px;
    cursor:pointer;
    color:#888;
    line-height:1;
    padding:0;
  }

  /* Форма внутри панели */
  .mobile-filter-panel #mobile-filter-form{
    display:flex;
    flex-direction:column;
    gap:14px;
    width:100%;
    max-width:calc(100vw - 40px);
    overflow:hidden;
    box-sizing:border-box;
  }

  .mobile-filter-panel .searchable-select{
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }

  .mobile-filter-panel .searchable-select-display{
    width:100%;
    box-sizing:border-box;
  }

  .mobile-filter-panel .searchable-select-dropdown{
    position:relative;
    top:0;
    width:100%;
    max-width:100%;
    box-sizing:border-box;
  }

  .mobile-filter-panel .filter-search,
  .mobile-filter-panel .filter-select{
    width:100%;
    box-sizing:border-box;
    padding:12px 16px;
    border:1px solid var(--main-color);
    border-radius:10px;
    font-size:15px;
    background:var(--bg-card);
    outline:none;
  }

  .mobile-filter-panel .filter-submit{
    width:100%;
    background:var(--main-color);
    color:#fff;
    border:none;
    padding:14px;
    border-radius:10px;
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    margin-top:4px;
    transition:background 0.2s;
  }

  .mobile-filter-panel .filter-submit:hover{
    background:var(--main-color-hover);
  }

}

/* ==================================================
   📅 ДАТА ИСТЕЧЕНИЯ В КАРТОЧКЕ
================================================== */
.post-card-expiry{
  display:inline-block;
  font-size:13px;
  color:#e67e22;
  font-weight:600;
  margin-bottom:10px;
}

/* ==================================================
   📊 ВИДЖЕТЫ САЙДБАРА
================================================== */
.sidebar-widget{
  background:var(--bg-card);
  border-radius:15px;
  padding:20px;
  margin-top:20px;
  box-shadow:0 2px 10px rgba(0,0,0,0.06);
}

.sidebar-widget-title{
  font-size:16px;
  font-weight:700;
  margin:0 0 14px;
  color:var(--text-primary);
}

.sidebar-widget-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sidebar-widget-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text-primary);
  transition:background 0.15s;
}

.sidebar-widget-item:hover{
  background:#f0f8ff;
}

.sidebar-widget-thumb{
  width:44px;
  height:44px;
  border-radius:8px;
  object-fit:cover;
  flex-shrink:0;
}

.sidebar-widget-text{
  font-size:14px;
  font-weight:500;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.sidebar-widget-item-content{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.sidebar-widget-expiry{
  font-size:12px;
  color:#e67e22;
  font-weight:600;
}

.sidebar-widget-empty{
  font-size:13px;
  color:#999;
  text-align:center;
  padding:10px 0;
  margin:0;
}

/* ==================================================
   🏷 ТАБЫ ФИЛЬТРОВ — МОБИЛЕ
================================================== */
@media (max-width:767px){
  #filter-tabs-bar{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    flex-wrap:nowrap;
    padding:0 5px;
  }

  #filter-tabs-bar::-webkit-scrollbar{
    display:none;
  }

  .filter-tab{
    flex-shrink:0;
  }

  /* Пять вкладок должны помещаться целиком: не хватало 39px на экране 390
     и 69px на 360, из-за чего «Истекают» выглядело случайно обрезанным.
     Прокрутка вбок оставлена как запас — на совсем узких экранах. */
  .filter-tab-link{
    padding:8px 6px;
    font-size:13px;
    gap:3px;
  }

  .filter-tab-link svg{
    width:13px;
    height:13px;
  }
}

@media (max-width:380px){
  .filter-tab-link{padding:8px 4px;font-size:12px;}
  .filter-tab-link svg{width:12px;height:12px;}
}

/* ==================================================
   🖥 УЗКОЕ ОКНО НА ДЕСКТОПЕ (768–1199px)
   Главная делит ширину пополам между лентой и фильтрами, поэтому в окне
   около 1000px колонке ленты достаётся ~380px при 512px, нужных вкладкам —
   «Истекают» уезжало за край. Проверено: к меню в шапке это отношения не
   имеет, страница вела себя так же и без него.
================================================== */
@media (min-width:768px) and (max-width:1199px){
  #filter-tabs-bar{
    flex-wrap:wrap;
    row-gap:2px;
  }

  .filter-tab-link{
    padding:9px 9px;
    font-size:14px;
    gap:4px;
  }

  .filter-tab-link svg{
    width:14px;
    height:14px;
  }

  /* Слоган в шапке центрируется абсолютным позиционированием и при узком
     окне наезжает на название сайта. Здесь показываем подзаголовок под
     названием — так же, как на телефоне. */
  .elementor-element-85b95ad{
    display:none !important;
  }

  .elementor-element-9046708{
    display:block;
  }

  .elementor-element-9046708 .elementor-heading-title{
    font-size:13px;
    line-height:1.3;
    opacity:.85;
  }
}

/* Кликабельные заголовки виджетов */
.sidebar-filter-trigger {
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.sidebar-filter-trigger:hover {
    color: #0088CC !important;
}
.sidebar-widget-title-all {
    font-size: 13px;
    font-weight: 400;
    color: #0088CC;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.sidebar-filter-trigger:hover .sidebar-widget-title-all {
    opacity: 1;
}

/* ===== CTA-блок внизу страницы поста ===== */
.post-footer-cta {
    margin-top: 30px;
    padding: 0;
    background: none;
    border-radius: 0;
    border: none;
    text-align: center;
}
.post-footer-cta-text {
    display: none;
}
.post-footer-cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.post-footer-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
}
.post-footer-btn svg {
    flex-shrink: 0;
}
.post-footer-btn-home {
    background: #0088CC;
    color: #fff !important;
}
.post-footer-btn-home:hover {
    background: #006da3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.4);
}
.post-footer-btn-tg {
    background: #0088cc;
    background: linear-gradient(135deg, #2AABEE, #229ED9);
    color: #fff !important;
}
.post-footer-btn-tg:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 171, 238, 0.4);
}
.post-footer-btn-max {
    background: #7B68EE;
    background: linear-gradient(135deg, #9B59B6, #7B68EE);
    color: #fff !important;
}
.post-footer-btn-max:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 104, 238, 0.4);
}

/* ==================================================
   🌙 ТЁМНАЯ / СВЕТЛАЯ ТЕМА
================================================== */
body{
  background:var(--bg-page) !important;
  color:var(--text-primary);
  transition:background 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] .elementor-section,
[data-theme="dark"] .elementor-element,
[data-theme="dark"] .e-con{
  --e-global-color-primary:var(--text-primary);
  --e-global-color-text:var(--text-primary);
}

[data-theme="dark"] .elementor-widget-text-editor,
[data-theme="dark"] .elementor-heading-title,
[data-theme="dark"] .elementor-heading-title a,
[data-theme="dark"] .elementor-widget-heading .elementor-heading-title{
  color:var(--text-primary) !important;
}

[data-theme="dark"] .e-con,
[data-theme="dark"] .elementor-section{
  background-color:transparent !important;
}

/* Кнопка переключения темы */
.theme-toggle{
  display:flex;
  align-items:center;
  justify-content:center;
  width:36px;
  height:36px;
  border:none;
  border-radius:50%;
  background:var(--bg-secondary);
  cursor:pointer;
  transition:background 0.3s, transform 0.2s;
  padding:0;
  margin-left:8px;
  flex-shrink:0;
}

.theme-toggle:hover{
  transform:scale(1.1);
}

.theme-toggle svg{
  width:20px;
  height:20px;
  fill:var(--text-primary);
  transition:fill 0.3s;
}

.theme-toggle .icon-moon{ display:block; }
.theme-toggle .icon-sun{ display:none; }
[data-theme="dark"] .theme-toggle .icon-moon{ display:none; }
[data-theme="dark"] .theme-toggle .icon-sun{ display:block; }

/* Скрыть Elementor bg в тёмной теме */
[data-theme="dark"] .elementor-background-overlay{
  opacity:0.1 !important;
}

/* Табы фильтров */
[data-theme="dark"] #filter-tabs-bar{
  background:var(--bg-header) !important;
}

/* Сайдбар */
[data-theme="dark"] .sidebar-widget{
  background:var(--bg-sidebar) !important;
}

/* Поиск */
[data-theme="dark"] #mobile-search-box input,
[data-theme="dark"] .search-form input{
  background:var(--bg-secondary);
  color:var(--text-primary);
  border-color:var(--border-color);
}

/* Ссылки */
[data-theme="dark"] a{
  color:var(--main-color);
}

[data-theme="dark"] .post-card-title a{
  color:var(--main-color);
}


/* ==================================================
   ⏬ ПОДГРУЗКА ЛЕНТЫ ПРИ ПРОКРУТКЕ
================================================== */

.feed-load-more{
  text-align:center;
  padding:18px 0 28px;
  min-height:24px;
}

.feed-load-more-btn{
  border:1px solid var(--border-subscribe);
  background:var(--bg-card);
  color:var(--text-primary);
  border-radius:50px;
  padding:12px 28px;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:background .2s, color .2s;
}

.feed-load-more-btn:hover{
  background:var(--main-color);
  color:#fff;
}

.feed-load-more-text{
  display:none;
  font-size:14px;
  color:var(--text-secondary);
}

.feed-load-more.is-loading .feed-load-more-btn{
  display:none;
}

.feed-load-more.is-loading .feed-load-more-text{
  display:inline-block;
}

/* ==================================================
   ✕ СБРОС ФИЛЬТРА ПРЯМО В ПОЛЕ
================================================== */

.searchable-select-clear{
  position:absolute;
  top:50%;
  right:38px;
  transform:translateY(-50%);
  display:none;
  border:none;
  background:transparent;
  color:#757575;
  font-size:22px;
  line-height:1;
  padding:0 4px;
  cursor:pointer;
  z-index:2;
  transition:color .2s;
}

.searchable-select.has-value .searchable-select-clear{
  display:block;
}

.searchable-select-clear:hover{
  color:var(--main-color);
}

.searchable-select.has-value .searchable-select-display{
  padding-right:62px;
}

/* ==================================================
   🗂 АРХИВЫ: лента + боковая форма фильтров
   Рубрики (/vseakcii/...), таксономии и поиск. Разметку даёт
   template-parts/feed-layout.php. На главной такая же двухколоночная
   сетка приходит из home.css, но она привязана к разметке страницы #40,
   поэтому здесь своя — с теми же пропорциями.
================================================== */
.fh-archive-layout{
  display:grid;
  /* Лента шире колонки фильтров: пополам ей оставалось меньше 400px
     на обычном ноутбучном окне, карточки сжимались. */
  grid-template-columns:1.65fr 1fr;
  align-items:start;
  gap:0;
}

.fh-archive-sidebar{
  position:sticky;
  top:auto;
  bottom:20px;
  align-self:start;
}

/* На планшете и телефоне колонки фильтров нет — ровно как на главной.
   Там работает плавающая кнопка «Фильтры»: она клонирует поля из
   #custom-filter-form, а он в DOM остаётся, просто не показан. */
@media (max-width:1024px){
  .fh-archive-layout{
    grid-template-columns:1fr;
  }

  .fh-archive-sidebar{
    display:none;
  }
}

/* Заголовок архива.
   elementor-base.css задаёт h1.entry-title{display:var(--page-title-display)},
   а саму переменную объявляет только home.css — то есть на главной, где
   заголовок и должен быть скрыт. На всех прочих страницах переменной нет,
   объявление становится невалидным и h1 схлопывается в display:inline.
   Фолбэк возвращает блочный заголовок рубрикам, брендам и поиску. */
h1.entry-title{
  display:var(--page-title-display, block);
}

/* Ссылки виджетов сайдбара на архивах.
   `theme.css` темы задаёт `.page-content a{text-decoration:underline}` —
   специфичность (0,1,1) перебивает `.sidebar-widget-item`. На главной
   подчёркивания нет, потому что там сайдбар лежит внутри `.elementor`
   и его перекрывает elementor-base.css. Уравниваем архивы с главной. */
.page-content .sidebar-widget-item,
.page-content .sidebar-widget-title-all,
.page-content .fh-404-link{
  text-decoration:none;
}

/* ==================================================
   🚧 СТРАНИЦА 404
================================================== */
.fh-404{
  max-width:640px;
  margin:0 auto;
  padding:20px 16px 60px;
}

.fh-404-text{
  font-size:17px;
  line-height:1.6;
  color:var(--text-secondary, #555);
  margin:0 0 24px;
}

.fh-404-search{
  display:flex;
  gap:12px;
  margin-bottom:28px;
}

.fh-404-search-input{
  flex:1;
  min-width:0;
  padding:12px 16px;
  border:1px solid var(--main-color);
  border-radius:10px;
  font-size:16px;
  outline:none;
}

.fh-404-search-submit{
  background:var(--main-color);
  color:#fff;
  border:none;
  border-radius:10px;
  padding:12px 22px;
  font-size:16px;
  cursor:pointer;
}

.fh-404-links{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  margin-bottom:24px;
}

.fh-404-links-title{
  font-weight:600;
}

.fh-404-link{
  display:inline-block;
  padding:7px 14px;
  border-radius:50px;
  background:var(--bg-card, #F4FCFF);
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
  color:var(--main-color);
  font-size:15px;
}

.fh-404-home a{
  color:var(--main-color);
  font-weight:600;
}

/* Плавающая кнопка «Фильтры» стояла по центру и накрывала стрелку
   раскрытия карточки — та тоже по центру. Сдвигаем вправо. */
@media (max-width:768px){
  .mobile-filter-btn{
    left:auto;
    right:16px;
    transform:none;
  }
}

/* ==================================================
   🏷 ПЛАШКИ АКТИВНЫХ ФИЛЬТРОВ
   Показывают, чем сузили выдачу, и дают снять это одним кликом.
   Разметку рисует financehacks_render_active_filters() в functions.php,
   обработчики — в custom.js. Нужны прежде всего на телефоне: там поля
   фильтров спрятаны в панель и понять, что фильтр включён, было нельзя.
================================================== */
.active-filters{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  margin:0 auto 18px;
  width:calc(100% - 32px);
}

.active-filter-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 8px 6px 14px;
  border-radius:50px;
  background:var(--bg-card);
  box-shadow:0 2px 8px rgba(0,0,0,0.08);
  font-size:14px;
  line-height:1.2;
  color:var(--text-primary);
}

.active-filter-remove{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:20px;
  height:20px;
  border:none;
  border-radius:50%;
  background:rgba(0,0,0,0.06);
  color:#757575;
  font-size:16px;
  line-height:1;
  cursor:pointer;
  transition:background .15s, color .15s;
}

.active-filter-remove:hover{
  background:var(--main-color);
  color:#fff;
}

.active-filters-reset{
  border:none;
  background:none;
  padding:6px 4px;
  color:var(--main-color);
  font-size:14px;
  text-decoration:underline;
  cursor:pointer;
}

[data-theme="dark"] .active-filter-remove{
  background:rgba(255,255,255,0.12);
  color:#bbb;
}

@media (max-width:768px){
  .active-filters{
    width:auto;
    margin:0 16px 14px;
  }
}

/* ==================================================
   ↔ ПОДСКАЗКА ПРОКРУТКИ У ПОЛОСЫ ТАБОВ
   На телефоне полоса шире экрана и «Истекают» обрезан. Градиент справа
   показывает, что есть продолжение; класс is-scrolled-end снимает его,
   когда долистали до конца (ставит custom.js).
================================================== */
.filter-tabs-wrap{
  position:relative;
}

.filter-tabs-wrap::after{
  content:"";
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:36px;
  pointer-events:none;
  background:linear-gradient(to right, rgba(255,255,255,0), var(--bg-card));
  opacity:0;
  transition:opacity .2s;
}

.filter-tabs-wrap.is-scrollable:not(.is-scrolled-end)::after{
  opacity:1;
}

/* ==================================================
   🦶 ПОДВАЛ: ссылки и раскрытие о партнёрских ссылках
   Дописано 04.08.2026 — до этого в подвале были только логотип,
   слоган и копирайт. Разметка в template-parts/dynamic-footer.php.
================================================== */
/* Тема раскладывает подвал как `flex ... space-between` — с включённым
   подвалом это разбрасывало логотип, ссылки и копирайт по краям.
   Собираем в одну колонку по центру. */
#site-footer .footer-inner{
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  gap:4px;
}

/* Логотип отдаётся размером 400×400 — в подвале это половина экрана. */
#site-footer .site-logo img,
#site-footer .site-logo .custom-logo{
  width:72px;
  height:auto;
  max-width:72px;
}

/* Размеров в подвале ровно два: 15px — то, что читают (слоган и ссылки
   рубрик), 13px — служебное (правовые ссылки и копирайт). Раньше было
   четыре почти неразличимых (24/15/14/13), и подвал выглядел разнобоем.
   Иерархию держим цветом и расстоянием, а не размером шрифта. */
#site-footer .site-description{
  font-size:15px;
  line-height:1.55;
  max-width:44ch;
  color:var(--text-secondary);
  opacity:1;
  margin:0 auto;
}

#site-footer .copyright{
  margin-top:0;
  font-size:13px;
  color:var(--text-muted);
  opacity:1;
}

/* Рубрики и правовые страницы разведены на два ряда: раньше они шли одним
   потоком, и «Подборки» с «О сайте» слипались в одну строку — читалось как
   случайный набор. */
.fh-footer-nav{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px 24px;
  margin:20px 0 0;
  padding:0 8px;
}

.page-content .fh-footer-link,
.fh-footer-link{
  color:var(--text-primary);
  font-size:15px;
  line-height:1.4;
  text-decoration:none;
  opacity:.9;
  transition:opacity .15s, color .15s;
}

.fh-footer-link:hover{
  color:var(--main-color);
  opacity:1;
}

/* Правовые ссылки — своим рядом под рубриками, служебным размером.
   Ряд отделён тонкой линией: это конец страницы, а не продолжение навигации. */
.fh-footer-legal{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:6px 18px;
  margin:16px auto 0;
  padding:14px 8px 0;
  max-width:min(560px, 100%);
  border-top:1px solid var(--border-color);
}

.fh-footer-link-legal{
  font-size:13px;
  color:var(--text-muted);
  opacity:1;
}

@media (max-width:768px){
  .fh-footer-nav{
    gap:10px 18px;
  }
  /* Слоган и ссылки — одним размером, иначе снова разнобой на глаз. */
  #site-footer .site-description,
  .fh-footer-link{
    font-size:14px;
  }
  #site-footer .site-description{
    max-width:34ch;
  }
  .fh-footer-link-legal{
    font-size:13px;
  }
  .fh-footer-legal{
    gap:4px 16px;
  }
}

/* Длинные слова в заголовках.
   «Политика конфиденциальности» на телефоне не влезала в 390px, слово
   выезжало за экран и тянуло за собой горизонтальную прокрутку всей
   страницы. Касается любых длинных заголовков, включая названия акций. */
h1, h2, h3,
.entry-title,
.post-card-title{
  overflow-wrap:break-word;
  word-break:break-word;
}

/* Закрытая модалка поиска стоит за нижним краем, но при появлении
   прокрутки растягивалась шире экрана и усугубляла её. */
.search-modal{
  max-width:100vw;
}

/* ==================================================
   🔢 ПАГИНАЦИЯ АРХИВОВ
   Рядом с кнопкой «Показать ещё», а не вместо неё: кнопка удобна
   человеку, ссылки нужны поисковику. Разметку даёт the_posts_pagination()
   в template-parts/feed-layout.php.
================================================== */
.fh-archive-pagination{
  margin:28px auto 8px;
  width:calc(100% - 32px);
}

.fh-archive-pagination .nav-links{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:8px;
}

.fh-archive-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 10px;
  border-radius:10px;
  background:var(--bg-card);
  box-shadow:0 2px 8px rgba(0,0,0,0.06);
  color:var(--main-color);
  font-size:15px;
  text-decoration:none;
  transition:background .15s, color .15s;
}

.fh-archive-pagination .page-numbers:hover{
  background:var(--main-color);
  color:#fff;
}

.fh-archive-pagination .page-numbers.current{
  background:var(--main-color);
  color:#fff;
  font-weight:600;
}

.fh-archive-pagination .page-numbers.dots{
  background:none;
  box-shadow:none;
  color:var(--text-muted);
  min-width:auto;
  padding:0 2px;
}

@media (max-width:768px){
  .fh-archive-pagination{
    width:auto;
    margin:22px 16px 8px;
  }

  .fh-archive-pagination .page-numbers{
    min-width:34px;
    height:34px;
    font-size:14px;
  }
}

/* Промокод в тёмной теме.
   `.promo-box` имел жёстко зашитый светлый фон #f5f7fb, а `.promo-code`
   цвет текста не задавал и наследовал светлый из тёмной палитры —
   получалось светлое на светлом, контраст 1.23 (проверено 04.08.2026).
   Промокод ради которого и приходят, был нечитаем. */
.promo-code{
  color:#1a1a1a;
}

[data-theme="dark"] .promo-box{
  background:#252538;
  border-color:#5b9cff;
}

[data-theme="dark"] .promo-code{
  color:#f0f0f0;
}

/* ==================================================
   📖 РАЗДЕЛ «ГИД» — статьи и обзоры
   Верстка сознательно не такая, как у ленты акций:
   там поток коротких карточек, здесь журнальный список.
================================================== */

.fh-nav{
  margin-left:auto;
}
.fh-nav-list{
  display:flex;
  align-items:center;
  gap:22px;
  list-style:none;
  margin:0;
  padding:0;
}
.fh-nav-list a{
  color:var(--text-secondary);
  text-decoration:none;
  font-size:15px;
  font-weight:600;
  padding:6px 0;
  border-bottom:2px solid transparent;
  transition:color .15s,border-color .15s;
  white-space:nowrap;
}
.fh-nav-list a:hover{
  color:var(--main-color);
}
.fh-nav-list .current-menu-item a{
  color:var(--main-color);
  border-bottom-color:var(--main-color);
}
/* На телефоне шапка — один ряд без переносов, и мест в нём мало:
   логотип, название, меню, кнопка темы, кнопка поиска. После появления меню
   названию не хватило ширины, и «financehacks» разрывалось посреди слова.
   Поэтому меню здесь компактное, а само название не переносится. */
@media (max-width:767px){
  .fh-nav{margin-left:4px;}
  .fh-nav-list{gap:12px;}
  .fh-nav-list a{font-size:13px;padding:4px 0;}

.elementor-element-9dd8aab img{width:34px;height:34px;}

  .elementor-element-dae253b .elementor-heading-title{
    font-size:16px;
    white-space:nowrap;
  }
  /* Название длиннее свободного места — пусть обрежется многоточием,
     а не рвётся по буквам. */
  .elementor-element-dae253b{
    overflow:hidden;
    text-overflow:ellipsis;
  }
  .elementor-element-9046708 .elementor-heading-title{font-size:11px;line-height:1.25;}
}

.guide-main{
  max-width:1100px;
  margin:0 auto;
  padding:0 16px 60px;
}

.guide-header{
  padding:32px 0 8px;
}
.guide-header-lead{
  max-width:62ch;
  color:var(--text-secondary);
  font-size:16px;
  line-height:1.6;
  margin-top:10px;
}

/* --- вкладки тем: тот же приём, что у ленты --- */
.guide-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:18px 0 20px;
  scrollbar-width:none;
}
.guide-tabs::-webkit-scrollbar{display:none;}
.guide-tab{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 16px;
  border:1px solid var(--border-tag);
  border-radius:999px;
  background:var(--bg-tag);
  color:var(--text-secondary);
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  white-space:nowrap;
  transition:background .15s,border-color .15s,color .15s;
}
.guide-tab:hover{
  background:var(--bg-tag-hover);
  border-color:var(--main-color);
  color:var(--main-color);
}
.guide-tab-active{
  background:var(--main-color);
  border-color:var(--main-color);
  color:#fff;
}
.guide-tab-active:hover{
  background:var(--main-color-hover);
  border-color:var(--main-color-hover);
  color:#fff;
}
.guide-tab-count{
  font-size:12px;
  opacity:.75;
  font-variant-numeric:tabular-nums;
}

/* На телефоне темы гида тоже должны помещаться целиком, без обрезки. */
@media (max-width:767px){
  .guide-tabs{gap:6px;padding:14px 0 16px;}
  .guide-tab{padding:7px 11px;font-size:13px;}
}

/* --- список статей --- */
/* Карточка как в ленте акций: обложка сверху во всю ширину, текст под ней.
   Горизонтальная раскладка (колонка 260px + текст) не годилась — обложки тут
   баннеры и скриншоты разных пропорций, и в фиксированную колонку они либо
   обрезались, либо болтались с пустыми полями по краям. */
/* Ширина как у ленты акций на главной (~690px). Шире делать нельзя: обложки
   статей — баннеры небольшого разрешения, на всю ширину раздела (1100px) они
   растягиваются и мылят. Прижат влево, как заголовок раздела и вкладки тем:
   по центру список расходился с ними по вертикали. */
.guide-list{
  display:flex;
  flex-direction:column;
  gap:20px;
  max-width:700px;
}
.guide-card{
  display:flex;
  flex-direction:column;
  background:var(--bg-card);
  border:1px solid var(--border-color);
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:box-shadow .2s,transform .2s;
}
.guide-card:hover{
  box-shadow:var(--shadow-card-hover);
  transform:translateY(-2px);
}
/* Обложки — баннеры и скриншоты с текстом, а не фотографии. Высоту им не
   навязываем: задаём ширину, высота считается по пропорции. Так любая
   картинка занимает карточку целиком — без обрезанных краёв (object-fit:cover)
   и без пустых полей вокруг (object-fit:contain). Ровно как в ленте акций. */
.guide-card-image{
  display:block;
}
.guide-card-image img{
  width:100%;
  height:auto;
  display:block;
}
.guide-card-body{
  padding:20px 22px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:0;
  flex:1;
}
.guide-card-topic{
  align-self:flex-start;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--main-color);
  background:var(--bg-light);
  border-radius:999px;
  padding:4px 12px;
  text-decoration:none;
}
.guide-card-title{
  font-size:22px;
  line-height:1.3;
  font-weight:700;
  margin:0;
}
.guide-card-title a{
  color:var(--text-primary);
  text-decoration:none;
}
.guide-card-title a:hover{
  color:var(--main-color);
}
.guide-card-excerpt{
  color:var(--text-secondary);
  font-size:15px;
  line-height:1.6;
  margin:0;
}
.guide-card-meta{
  display:flex;
  gap:14px;
  align-items:center;
  color:var(--text-muted);
  font-size:13px;
  margin-top:auto;
}
.guide-card-reading::before{
  content:'·';
  margin-right:14px;
}

@media (max-width:700px){

  .guide-card-body{padding:18px;}
  .guide-card-title{font-size:19px;}
}

/* --- пустой раздел --- */
.guide-empty{
  background:var(--bg-card);
  border:1px dashed var(--border-color);
  border-radius:14px;
  padding:36px 24px;
  text-align:center;
  color:var(--text-secondary);
}
.guide-empty p{margin:0 0 8px;}

/* --- страница статьи --- */
.guide-article{
  max-width:760px;
  margin:0 auto;
}
.guide-breadcrumbs{
  padding:20px 0 0;
  font-size:13px;
  color:var(--text-muted);
}
.guide-article-header{
  padding:18px 0 22px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.guide-article-header .entry-title{
  font-size:34px;
  line-height:1.22;
  font-weight:700;
  margin:0;
  text-wrap:balance;
}
.guide-article-meta{
  display:flex;
  gap:16px;
  color:var(--text-muted);
  font-size:14px;
}
.guide-article-image{
  border-radius:14px;
  overflow:hidden;
  margin-bottom:26px;
}
.guide-article-image img{
  width:100%;
  height:auto;
  display:block;
}
.guide-article-body{
  font-size:17px;
  line-height:1.72;
  color:var(--text-primary);
}
.guide-article-body > * + *{margin-top:1.1em;}
.guide-article-body h2{
  font-size:26px;
  line-height:1.3;
  font-weight:700;
  margin-top:1.8em;
  text-wrap:balance;
}
.guide-article-body h3{
  font-size:21px;
  line-height:1.35;
  font-weight:700;
  margin-top:1.5em;
}
.guide-article-body ul,
.guide-article-body ol{
  padding-left:1.3em;
  display:flex;
  flex-direction:column;
  gap:.45em;
}
.guide-article-body a{
  color:var(--main-color);
}
.guide-article-body img{
  max-width:100%;
  height:auto;
  border-radius:10px;
}
.guide-article-body blockquote{
  border-left:3px solid var(--main-color);
  background:var(--bg-light);
  padding:14px 18px;
  border-radius:0 10px 10px 0;
  color:var(--text-secondary);
}
/* Таблицы сравнения — главный элемент обзоров, на телефоне должны
   прокручиваться сами, а не растягивать страницу. */
.guide-article-body table{
  width:100%;
  border-collapse:collapse;
  font-size:15px;
  display:block;
  overflow-x:auto;
  white-space:nowrap;
}
.guide-article-body table th,
.guide-article-body table td{
  border:1px solid var(--border-color);
  padding:10px 12px;
  text-align:left;
  vertical-align:top;
}
.guide-article-body table th{
  background:var(--bg-secondary);
  font-weight:700;
}
@media (min-width:900px){
  .guide-article-body table{white-space:normal;display:table;}
}
@media (max-width:700px){
  .guide-article-header .entry-title{font-size:26px;}
  .guide-article-body{font-size:16px;}
  .guide-article-body h2{font-size:22px;}
}

/* --- акции по теме статьи --- */
.guide-promos{
  max-width:760px;
  margin:44px auto 0;
  padding-top:28px;
  border-top:1px solid var(--border-color);
}
.guide-promos-title{
  font-size:22px;
  font-weight:700;
  margin:0 0 18px;
}
.guide-promos-list{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:14px;
}
.guide-promo{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px;
  background:var(--bg-card);
  border:1px solid var(--border-color);
  border-radius:12px;
  text-decoration:none;
  transition:border-color .15s,box-shadow .15s;
}
.guide-promo:hover{
  border-color:var(--main-color);
  box-shadow:var(--shadow-card);
}
.guide-promo-image{
  flex:none;
  width:64px;
  height:64px;
  border-radius:8px;
  overflow:hidden;
  background:var(--bg-secondary);
}
.guide-promo-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.guide-promo-body{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.guide-promo-title{
  color:var(--text-primary);
  font-size:14px;
  font-weight:600;
  line-height:1.35;
}
.guide-promo-expiry{
  color:var(--text-muted);
  font-size:12px;
}
.guide-promos-all{
  display:inline-block;
  margin-top:18px;
  color:var(--main-color);
  font-weight:600;
  text-decoration:none;
}
.guide-promos-all:hover{text-decoration:underline;}

/* ==================================================
   📖 БЛОК «ИЗ ГИДА» В ЛЕНТЕ ГЛАВНОЙ
   Полоса статей между карточками акций. Выглядит иначе, чем карточка
   акции, — иначе читается как ещё одна акция и теряется.
================================================== */
.fh-home-guide{
  background:var(--bg-light);
  border:1px solid var(--border-color);
  border-radius:14px;
  padding:18px 20px 20px;
}

.fh-home-guide-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.fh-home-guide-title{
  font-size:18px;
  font-weight:700;
  margin:0;
  color:var(--text-primary);
}

.fh-home-guide-all{
  font-size:14px;
  color:var(--main-color);
  text-decoration:none;
  white-space:nowrap;
}
.fh-home-guide-all:hover{text-decoration:underline;}

.fh-home-guide-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.fh-home-guide-item{
  display:flex;
  gap:12px;
  align-items:center;
  padding:10px;
  background:var(--bg-card);
  border:1px solid var(--border-color);
  border-radius:10px;
  text-decoration:none;
  transition:border-color .15s, box-shadow .15s;
}
.fh-home-guide-item:hover{
  border-color:var(--main-color);
  box-shadow:var(--shadow-card);
}

.fh-home-guide-image{
  flex:none;
  width:62px;
  height:62px;
  border-radius:8px;
  overflow:hidden;
  background:var(--bg-secondary);
}
.fh-home-guide-image img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.fh-home-guide-body{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}

.fh-home-guide-topic{
  font-size:11px;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--main-color);
}

.fh-home-guide-name{
  font-size:15px;
  font-weight:600;
  line-height:1.35;
  color:var(--text-primary);
}

.fh-home-guide-time{
  font-size:12px;
  color:var(--text-muted);
}

@media (max-width:600px){
  .fh-home-guide{padding:16px 14px 18px;}
  .fh-home-guide-name{font-size:14px;}
}

/* ==================================================
   📖 КАРТОЧКА СТАТЬИ В ЛЕНТЕ
   Статьи идут в общем потоке с акциями, но выглядят иначе: у статьи нет
   срока, промокода и партнёрской ссылки — вместо них пометка формата,
   описание и время чтения.
================================================== */
.post-card-guide{
  border-left:3px solid var(--main-color);
}

.post-card-guide .post-card-body{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.post-card-guide-label{
  align-self:flex-start;
  font-size:11px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--main-color);
  background:var(--bg-light);
  border-radius:999px;
  padding:4px 12px;
}

.post-card-guide-excerpt{
  margin:0;
  color:var(--text-secondary);
  font-size:15px;
  line-height:1.6;
}

.post-card-guide-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  color:var(--text-muted);
  font-size:13px;
}

.post-card-guide-more{
  color:var(--main-color);
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
}
.post-card-guide-more:hover{text-decoration:underline;}

.post-card-guide .post-card-image{display:block;}

/* ==================================================
   🧭 СОДЕРЖАНИЕ СТАТЬИ
   Собирается из заголовков H2 (см. fh_toc_add_to_content).
   Цвета берём из общих переменных, чтобы блок читался как часть статьи,
   а не как вставка со стороны.
================================================== */
.toc{
  margin:0 0 28px;
  padding:16px 20px 18px;
  background:var(--bg-light);
  border:1px solid var(--border-color);
  border-radius:12px;
}

.toc-title{
  margin:0 0 10px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:var(--text-muted);
}

.toc ul{
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:7px;
  counter-reset:toc;
}

.toc li{
  counter-increment:toc;
  display:flex;
  gap:9px;
  align-items:baseline;
  line-height:1.45;
}

.toc li::before{
  content:counter(toc) ".";
  color:var(--text-muted);
  font-size:13px;
  font-variant-numeric:tabular-nums;
  flex:none;
  min-width:1.1em;
}

.toc a{
  color:var(--text-primary);
  text-decoration:none;
  border-bottom:1px solid transparent;
}

.toc a:hover{
  color:var(--main-color);
  border-bottom-color:currentColor;
}

/* Шапка на телефоне липкая — без запаса заголовок уезжает под неё
   при переходе по якорю. */
.guide-article-body h2{
  scroll-margin-top:90px;
}

@media (max-width:600px){
  .toc{padding:14px 16px 16px;}
  .toc ul{gap:9px;}
}
