/* ==========================================
   legal.css — Правові сторінки
   (Політика конфіденційності, Публічна оферта)
   ========================================== */

/* ==========================================
   LAYOUT
   ========================================== */
.legal-section {
  padding: 72px 0 88px;
  background: var(--white);
}
.legal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 56px;
  align-items: start;
}

/* ==========================================
   TABLE OF CONTENTS (sidebar)
   ========================================== */
.legal-toc {
  position: sticky;
  top: 96px;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-light);
}
.legal-toc-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-light);
}
.legal-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 20px;
}
.legal-toc-link {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--gray-text);
  padding: 7px 10px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: var(--transition);
  line-height: 1.4;
  text-decoration: none;
  display: block;
}
.legal-toc-link:hover,
.legal-toc-link.active {
  color: var(--blue-dark);
  background: var(--blue-pale);
  border-left-color: var(--blue-mid);
}
.legal-toc-date {
  font-family: var(--font-head);
  font-size: 0.75rem;
  color: var(--gray-mid);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-light);
}

/* ==========================================
   ARTICLE CONTENT
   ========================================== */
.legal-content { min-width: 0; }

.legal-block {
  margin-bottom: 52px;
  padding-bottom: 52px;
  border-bottom: 1px solid var(--gray-light);
}
.legal-block:last-of-type {
  border-bottom: none;
  margin-bottom: 32px;
  padding-bottom: 0;
}

.legal-block h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--blue-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.2;
}
.legal-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--blue-dark);
  color: var(--white);
  border-radius: 10px;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.legal-block p {
  font-size: 0.97rem;
  color: var(--gray-text);
  line-height: 1.85;
  margin-bottom: 16px;
}
.legal-block p:last-child { margin-bottom: 0; }
.legal-block a {
  color: var(--blue-mid);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: var(--transition);
}
.legal-block a:hover { text-decoration-color: var(--blue-mid); }
.legal-block strong { color: var(--blue-dark); font-weight: 700; }

/* Lists */
.legal-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.legal-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--gray-text);
  line-height: 1.7;
}
.legal-list li i {
  color: var(--blue-mid);
  font-size: 0.7rem;
  margin-top: 6px;
  flex-shrink: 0;
}
.legal-list--definition li {
  flex-direction: column;
  gap: 4px;
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 14px 16px;
  border-left: 3px solid var(--blue-mid);
}
.legal-list--definition li strong { color: var(--blue-dark); }

/* Info cards */
.legal-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.legal-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--gray-light);
}
.legal-card-icon {
  width: 40px; height: 40px;
  background: var(--blue-pale);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--blue-mid);
  flex-shrink: 0;
}
.legal-card strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--blue-dark);
  margin-bottom: 5px;
}
.legal-card p {
  font-size: 0.82rem;
  color: var(--gray-text);
  line-height: 1.6;
  margin: 0 !important;
}

/* Notes */
.legal-note {
  display: flex;
  gap: 14px;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  align-items: flex-start;
}
.legal-note--blue { background: var(--blue-pale); border-left: 4px solid var(--blue-mid); }
.legal-note--gold { background: rgba(245,200,66,0.1); border-left: 4px solid var(--gold-dark); }
.legal-note i { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.legal-note--blue i { color: var(--blue-mid); }
.legal-note--gold i { color: var(--gold-dark); }
.legal-note p { font-size: 0.88rem; color: var(--gray-text); line-height: 1.7; margin: 0 !important; }
.legal-note a { color: var(--blue-mid); font-weight: 600; }

/* Rights grid */
.legal-rights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 20px 0;
}
.legal-right {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--gray-light);
  transition: var(--transition);
}
.legal-right:hover { border-color: var(--blue-light); box-shadow: var(--shadow); }
.legal-right-icon {
  width: 36px; height: 36px;
  background: var(--blue-pale);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: var(--blue-mid);
  flex-shrink: 0;
}
.legal-right strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--blue-dark);
  margin-bottom: 4px;
}
.legal-right p {
  font-size: 0.8rem;
  color: var(--gray-text);
  line-height: 1.5;
  margin: 0 !important;
}

/* Budget bars */
.legal-budget {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-light);
}
.legal-budget-item { }
.legal-budget-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--blue-dark);
  margin-bottom: 6px;
}
.legal-budget-label strong { font-weight: 800; color: var(--blue-mid); }
.legal-budget-bar {
  height: 8px;
  background: var(--gray-light);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.legal-budget-bar::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--w, 0%);
  background: linear-gradient(90deg, var(--blue-mid), var(--blue-light));
  border-radius: 4px;
  transition: width 1s ease;
}

/* Contact block */
.legal-contact-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--gray-light);
}
.legal-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--blue-dark);
}
.legal-contact-item i {
  width: 20px;
  text-align: center;
  color: var(--blue-mid);
  flex-shrink: 0;
}
.legal-contact-item a {
  color: var(--blue-mid);
  font-weight: 600;
}

/* Date footer */
.legal-footer-date {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--gray-mid);
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-light);
}
.legal-footer-date strong { color: var(--blue-dark); }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 960px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .legal-toc nav { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .legal-cards { grid-template-columns: 1fr; }
  .legal-rights { grid-template-columns: 1fr; }
  .legal-toc nav { grid-template-columns: 1fr; }
  .legal-block h2 { font-size: 1.15rem; }
  .legal-section { padding: 48px 0 64px; }
}
