/* =========================================
   shared-styles.css — Единые стили для всех страниц
   Охвати.рф — финансовый маркетплейс для бизнеса
   ========================================= */

/* === ГЛОБАЛЬНЫЙ RESET И BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito Sans', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === СКРЫТИЕ СТАРЫХ ХЕДЕРОВ (до загрузки shared-nav.js) === */
header.header,
#t-header {
  display: none !important;
}

/* Tilda T396 фиксированные артборды-навигации (стартовая и др.) */
.t-rec:has(.t396__artboard[data-artboard-pos="fixed"]) {
  display: none !important;
}

/* Fallback: прямой ID для стартовой страницы */
#rec1272943781 {
  display: none !important;
}


/* =========================================
   ФУТЕР — Единые стили
   ========================================= */
.footer {
  background: #fff;
  width: 100%;
  position: relative;
  padding: 40px 0 24px;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 80px;
  margin-bottom: 32px;
}

.footer-brand-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.footer-brand-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: fit-content;
}

.footer-brand-wrap:hover {
  transform: translateX(4px);
}

.footer-logo {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(245, 44, 68, 0.1) 0%, rgba(220, 20, 60, 0.1) 100%);
  border-radius: 12px;
  padding: 8px;
  transition: all 0.3s ease;
}

.footer-brand-wrap:hover .footer-logo {
  background: linear-gradient(135deg, rgba(245, 44, 68, 0.15) 0%, rgba(220, 20, 60, 0.15) 100%);
  transform: scale(1.05);
}

.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-brand {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1.625rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #000000 !important;
  line-height: 1.2;
}

.footer-brand .brand-word {
  display: inline-block;
  padding: 2px 5px;
  border: 2px solid #F52C44;
  background-color: #F52C44;
  color: #ffffff !important;
  border-radius: 15px;
  margin-left: 2px;
}

.footer-tagline {
  font-size: 1rem;
  font-weight: 500;
  color: #64748b !important;
  line-height: 1.6;
  max-width: 320px;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #475569 !important;
  font-size: 1.05rem;
  font-weight: 600;
  transition: all 0.3s ease;
  width: fit-content;
}

.footer-contact-item:hover {
  color: #1e293b !important;
  transform: translateX(4px);
}

.footer-contact-icon {
  width: 20px;
  height: 20px;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.footer-contact-item:hover .footer-contact-icon {
  opacity: 1;
}

.footer-nav-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 48px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-nav-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #0f172a !important;
  margin-bottom: 4px;
  position: relative;
  padding-bottom: 12px;
}

.footer-nav-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background: linear-gradient(90deg, #F52C44 0%, #DC143C 100%);
  border-radius: 2px;
}

.footer-nav-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: #475569 !important;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding-left: 0;
  width: fit-content;
}

.footer-nav-link::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  width: 4px;
  height: 4px;
  background: #64748b;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-nav-link:hover {
  color: #1e293b !important;
  padding-left: 16px;
}

.footer-nav-link:hover::before {
  transform: translateY(-50%) scaleX(1);
}

.footer-bottom {
  padding-top: 24px;
  padding-bottom: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-copyright {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b !important;
}

.footer-legal-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-legal-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b !important;
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

.footer-legal-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: #475569;
  transition: width 0.3s ease;
}

.footer-legal-link:hover {
  color: #1e293b !important;
}

.footer-legal-link:hover::after {
  width: 100%;
}

/* --- Футер: Адаптивность --- */
@media (max-width: 1200px) {
  .footer-main {
    gap: 60px;
  }
  .footer-nav-section {
    gap: 40px;
  }
}

@media (max-width: 1024px) {
  .footer {
    padding: 60px 0 20px;
  }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 48px;
    margin-bottom: 24px;
  }
  .footer-nav-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 28px 0 20px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
  }
  .footer-container {
    padding: 0 20px;
  }
  .footer-main {
    gap: 40px;
    margin-bottom: 24px;
  }
  .footer-brand-section {
    gap: 20px;
  }
  .footer-brand {
    font-size: 1.5rem;
  }
  .footer-nav-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
  .footer-nav-col {
    gap: 16px;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    padding-top: 20px;
  }
  .footer-legal-links {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 40px 0 16px;
  }
  .footer-container {
    padding: 0 16px;
  }
  .footer-nav-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-brand {
    font-size: 1.375rem;
  }
  .footer-tagline {
    font-size: 0.95rem;
  }
  .footer-contact-item {
    font-size: 1rem;
  }
}


/* =========================================
   TILDA FEED — Единые стили табов и popup
   (t915 блок новостей/блога на всех страницах)
   ========================================= */

/* Табы фильтрации */
.t-feed__parts-switch-btn {
  border: 1px solid #000000;
  border-radius: 40px;
  color: #000000;
  font-weight: 400;
}

.t-feed__parts-switch-btn span,
.t-feed__parts-switch-btn a {
  color: #000000;
  padding: 6px 18px 6px;
  border-radius: 40px;
}

.t-feed__parts-switch-btn.t-active {
  background-color: #000000;
}

.t-feed__parts-switch-btn.t-active span,
.t-feed__parts-switch-btn.t-active a {
  color: #ffffff !important;
}

/* Popup-слайдер */
.t-feed__post-popup__cover-wrapper .t-slds__arrow {
  background-color: rgba(255, 255, 255, 1);
}

.t-feed__post-popup__cover-wrapper .t-slds__bullet_active .t-slds__bullet_body,
.t-feed__post-popup__cover-wrapper .t-slds__bullet:hover .t-slds__bullet_body {
  background-color: #222 !important;
}

/* Описание секции */
.t-section__descr {
  max-width: 560px;
}


/* =========================================
   НОВОСТНОЙ БЛОК (t915) — Центровка и единый layout
   ========================================= */

/* Обеспечиваем центровку контейнера внутри t915 */
[data-record-type="915"] {
  width: 100%;
}

[data-record-type="915"] .t915 {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

[data-record-type="915"] .t-container {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

[data-record-type="915"] .t-feed {
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Заголовок секции новостей — всегда по центру */
[data-record-type="915"] .t-section__title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 90px;
}

@media (max-width: 960px) {
  [data-record-type="915"] .t-section__title {
    margin-bottom: 45px;
  }
}

/* Табы фильтрации — центровка */
[data-record-type="915"] .t-feed__parts-switch {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}


/* =========================================
   ЦВЕТОВЫЕ ТОКЕНЫ (CSS Custom Properties)
   ========================================= */
:root {
  --ox-brand: #F52C44;
  --ox-brand-dark: #DC143C;
  --ox-brand-hover: #c5303c;
  --ox-text: #1a1a1a;
  --ox-text-secondary: #666;
  --ox-text-muted: #999;
  --ox-bg: #ffffff;
  --ox-bg-light: #f5f5f5;
  --ox-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --ox-shadow-md: 0 6px 20px rgba(0, 0, 0, 0.14);
  --ox-radius-sm: 8px;
  --ox-radius-md: 12px;
  --ox-radius-lg: 20px;
  --ox-container: 1400px;
  --ox-font: 'Nunito Sans', Arial, sans-serif;
}


/* =========================================
   СКРЫТИЕ ЭЛЕМЕНТОВ TILDA (preview, watermark)
   ========================================= */

/* Кнопка «Вернуться к редактированию» */
#t-page-preview-back,
[id*="t-page-preview"],
a[href*="tilda.cc/page"] {
  display: none !important;
}

/* Tilda watermark / label */
.t-tildalabel,
.t-tildalabel__wrapper,
.t-tildalabel__link,
.t-body_loading::after {
  display: none !important;
}

/* Tilda zoomer (остатки после очистки) */
.t-zoomer__wrapper {
  display: none !important;
}

/* Tilda phone mask overlay */
.t-input-phonemask__options-wrap[data-nosnippet] {
  display: none !important;
}

/* Tilda preloader / loading indicators */
[data-record-type="915"] .t-feed__container_loading,
[data-record-type="915"] .t-feed__preloader-wrapper,
[data-record-type="915"] .t-preloader,
[data-record-type="915"] .t-feed__post-popup,
[data-record-type="915"] [class*="preloader"] {
  display: none !important;
}

/* Tilda статистика и аналитика */
[src*="tilda-stat"],
[src*="tilda-upwidget"] {
  display: none !important;
}


/* =========================================
   ОБЩИЕ КОМПОНЕНТЫ (кнопки, карточки)
   ========================================= */

/* Единый стиль кнопки «Загрузить ещё» */
.ox-load-more {
  display: block;
  margin: 32px auto;
  padding: 14px 40px;
  background: var(--ox-text);
  color: #fff;
  border: none;
  border-radius: var(--ox-radius-sm);
  font-family: var(--ox-font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.ox-load-more:hover {
  background: #333;
}

/* Единый стиль карточки */
.ox-card {
  background: #fff;
  border-radius: var(--ox-radius-md);
  overflow: hidden;
  box-shadow: var(--ox-shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.ox-card:hover {
  box-shadow: var(--ox-shadow-md);
  transform: translateY(-2px);
}
