/* =========================================================
   Privacy & Cookies — wide, engaging, readable
   For template with: .policy-hero, .policy-layout, .policy-toc, .policy-main
   ========================================================= */

/* ----------- HERO ----------- */
.policy-hero{
  margin: 20px auto 28px;
  padding: 24px 28px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdfdff 0%, #f3f6ff 100%);
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  text-align: center;
  max-width: 1180px;
}
.policy-hero__icon{
  width: 60px; height: 60px; margin: 0 auto 12px;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.policy-hero__icon img{ width:100%; height:100%; object-fit:cover; }
.policy-hero__title{
  font-weight: 800;
  font-size: 1.6rem;
  margin: 0 0 6px;
  color:#1F252E;
  letter-spacing:.3px;
}
.policy-hero__subtitle{
  margin: 0 auto;
  color:#555e6c;
  font-size:1.05rem;
  max-width: 900px;
  line-height: 1.55;
}

/* ----------- LAYOUT (TOC + MAIN) ----------- */
.policy-layout{
  display:flex;
  align-items:flex-start;
  gap:28px;
  max-width:1180px;
  margin:0 auto 36px;
  padding:0 10px;
  box-sizing:border-box;
}

/* ----------- TOC (Sidebar) ----------- */
.policy-toc{
  flex:0 0 260px;
  position:sticky;
  top:88px; /* если есть фикс-хедер — регулируй тут */
  align-self:flex-start;

  background:#fff;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
  padding:16px 16px;

  max-height:calc(100vh - 120px);
  overflow:auto;
}

.policy-toc__title{
  display:flex; align-items:center; gap:8px;
  margin:2px 0 10px;
  font-weight:800;
  font-size:1rem;
  color:#1F252E;
}
.policy-toc__title::after{
  content:"";
  flex:1 1 auto;
  height:2px;
  background:linear-gradient(90deg,#4f46e5 0%, transparent 70%);
  border-radius:2px;
  opacity:.35;
}

/* Список ссылок */
.policy-toc__list{
  list-style:none;
  margin:0; padding:0;
}
.policy-toc__list li{ margin:4px 0; }

/* Ссылки TOC (используем .is-active, которое вешает твой JS) */
.policy-toc__list a{
  display:flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  color:#2f343f;
  font-size:.98rem;
  transition:background .15s ease, color .15s ease, box-shadow .15s ease;
}
.policy-toc__list a::before{
  content:"";
  width:8px; height:8px; border-radius:50%;
  background:#cfd3ff;
  box-shadow:0 0 0 2px #eef0ff inset;
  transition:transform .15s ease, background .15s ease;
}
.policy-toc__list a:hover{
  background:#f6f8ff;
  color:#111827;
}
.policy-toc__list a.is-active{
  background:#f3f6ff;
  color:#4f46e5;
  font-weight:700;
  box-shadow:0 0 0 1px #e6e9ff inset;
}
.policy-toc__list a.is-active::before{
  background:#4f46e5;
  transform:scale(1.15);
  box-shadow:0 0 0 2px #e6e9ff inset;
}

/* ----------- MAIN CONTENT ----------- */
.policy-main{
  flex:1 1 auto;
  min-width:0;
}

/* Карточка контента */
.policy-card.card{
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.08);
  overflow: hidden;
  background:#fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
.policy-card.card .card-body{
  padding: 28px 32px;
  font-size: 1.05rem;
  line-height: 1.65;
  color:#2f343f;
}

/* Разделы */
.policy-section + .policy-section{
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.05);
}
.policy-section h2{
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 10px;
  color:#0f172a;
  position: relative;
}
.policy-section h2::after{
  content:"";
  display:block;
  width:40px; height:3px;
  background:#4f46e5;
  border-radius:2px;
  margin-top:6px;
}
.policy-section p,
.policy-section ul{
  margin: 0 0 10px;
}
.policy-section ul{ padding-left: 1.2rem; }
.policy-section li{ margin: .35rem 0; }

/* Подсветки/примечания */
.policy-card strong{
  color:#111827;
  font-weight: 700;
}
.policy-note{
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 4px solid #4f46e5;
  border-radius: 8px;
  background: #f8f9ff;
  font-size: .98rem;
  color:#2f343f;
}

/* Ссылки и <code> */
.policy-card a{
  color:#4f46e5;
  font-weight: 600;
  text-decoration: none;
}
.policy-card a:hover{ text-decoration: underline; }
.policy-card code{
  background: #f6f8ff;
  border: 1px solid #e6e9ff;
  padding: .2rem .45rem;
  border-radius: 6px;
  font-size: .92rem;
}

/* Таблица cookies */
.policy-card .table{
  margin: 12px 0 16px;
  font-size: .95rem;
  border-color: rgba(0,0,0,.08);
}
.policy-card .table th,
.policy-card .table td{
  border-color: rgba(0,0,0,.08);
  padding: .6rem .75rem;
}
.policy-card .table thead th{
  background: #f3f6ff;
  color:#1F252E;
  font-weight: 700;
}
.policy-card .table tbody tr:nth-child(even){
  background: #fafbff;
}
.policy-card .table-responsive{
  border: 1px solid rgba(0,0,0,.05);
  border-radius: 10px;
  overflow: auto;
}

/* Мягкий плавный скролл по якорям */
html:has(.policy-toc){ scroll-behavior: smooth; }

/* ----------- RESPONSIVE ----------- */
@media (max-width: 1100px){
  .policy-layout{ gap:22px; padding:0 8px; }
  .policy-toc{ flex-basis:240px; }
  .policy-card.card .card-body{ padding:24px 26px; }
}
@media (max-width: 991px){
  .policy-layout{ flex-direction:column; gap:18px; }
  .policy-toc{
    position:relative; top:auto; max-height:none;
    border-radius:12px; padding:12px;
  }
  /* превращаем TOC в «плитку» */
  .policy-toc__list{
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:8px;
  }
  .policy-toc__list li{ margin:0; }
  .policy-toc__list a{ padding:10px 12px; }
}
@media (max-width: 768px){
  .policy-card.card .card-body{ padding: 20px; font-size: .98rem; line-height: 1.55; }
  .policy-section h2{ font-size: 1.15rem; }
  .policy-hero{ padding: 16px 18px; margin-bottom:22px; }
  .policy-hero__title{ font-size: 1.35rem; }
  .policy-hero__subtitle{ font-size: .95rem; }
}
@media (max-width: 576px){
  .policy-toc__list{ grid-template-columns:1fr; }
  .policy-toc{ padding:10px; }
  .policy-toc__list a{ padding:8px 10px; font-size:.95rem; }
}