/* =========================================================
   NeFin Solutions — global stylesheet
   Used by legal pages AND homepage
   ========================================================= */

.policies {
  margin-bottom: 80px;
  padding-top: 20px;
  padding-bottom: 20px;
  border-radius: 16px;
  --text: #1a1f2b;
  --muted: #6b7280;
  --border: #e6e6e6;
  --bg: #ffffff;
  --primary: #0a6cff;
  --accent: #00c2a8;
  --card: #fafbfc;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.policies a {
  color: var(--primary);
  text-decoration: none
}

.policies a:hover {
  text-decoration: underline
}

.policies .container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px
}

/* Headings & layout */
.policies .header {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.policies .header h1 {
  margin: 8px 0;
  font-size: 32px;
  line-height: 1.15
}

.policies h2 {
  margin: 24px 0 16px;
  font-size: 24px;
}

.policies ul {
  margin: 16px 0;
  padding-left: 40px;
  list-style: disc;
}

.policies .header .meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px
}

.policies .lead {
  margin-top: 20px;
  color: #2a3141
}

/** ---> **/

/* Clickable brand for legal pages */
.policies .legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 4px;
  text-decoration: none;
  color: inherit;
}

.policies .legal-brand img {
  height: 24px; /* аккуратно и ненавязчиво */
  width: auto;
  display: block;
}

.policies .legal-brand span {
  font-weight: 700;
  letter-spacing: .2px;
}

@media print {
  .policies .legal-brand {
    margin-top: 0
  }
}

/* Live Rates */
.policies .live-rates {
  overflow: hidden
}

.policies .lr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px
}

.policies .lr-status {
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  background: #fff
}

.policies .lr-grid {
  display: grid;
  grid-template-columns:1fr
}

.policies .lr-row {
  display: grid;
  grid-template-columns:160px 1fr 120px 120px;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border)
}

.policies .lr-header {
  background: #f8f9fa;
  font-weight: 600;
  border-top: none;
  border-radius: 8px 8px 0 0
}

.policies .lr-cell {
  display: flex;
  align-items: center;
  gap: 6px
}

.policies .lr-dir {
  margin-left: 6px;
  font-size: 12px
}

.policies .lr-chg.up {
  color: #0a8f5b
}

.policies .lr-chg.down {
  color: #b00020
}

.policies .lr-dir.up {
  color: #0a8f5b
}

.policies .lr-dir.down {
  color: #b00020
}

.policies .lr-foot {
  margin-top: 8px;
  font-size: 12px
}

@media (max-width: 860px) {
  .policies .lr-row {
    grid-template-columns:120px 1fr 100px 90px
  }
}

@media (max-width: 620px) {
  .policies .lr-header {
    display: none
  }

  .policies .lr-row {
    grid-template-columns:1fr 1fr
  }

  .policies #row-btc .lr-cell:nth-child(1)::after,
  .policies #row-eth .lr-cell:nth-child(1)::after {
    content: ''
  }

  /* stack: Asset + Price on first line; Change + time on second */
  .policies #row-btc .lr-cell:nth-child(3),
  .policies #row-btc .lr-cell:nth-child(4),
  .policies #row-eth .lr-cell:nth-child(3),
  .policies #row-eth .lr-cell:nth-child(4) {
    justify-content: flex-start
  }
}

/* Cards & blocks */
.policies .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

/** .summary{font-size:16px;margin:0 0 8px} **/
.policies .summary {
  display: block;
  color: var(--muted);
  font-style: italic;
  margin: 4px 0 14px
}

.policies .muted {
  color: var(--muted)
}

.policies .note {
  background: #f7f9ff;
  border: 1px dashed #d9e4ff;
  border-radius: 10px;
  padding: 10px
}

/* Buttons (used on homepage and forms) */
.policies .btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  cursor: pointer;
  background: #fff;
  color: var(--primary);
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}

.policies .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 108, 255, .12)
}

.policies .btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary)
}

.policies .btn-secondary {
  background: #fff;
  color: var(--primary)
}

/* Tables for Legal_Documents_Index */
.policies table.table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed
}

.policies table.table th,
.policies table.table td {
  padding: .6em .8em;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
  text-align: left;
  word-wrap: break-word
}

.policies table.table th {
  background-color: #f8f9fa;
  font-weight: 600
}

.policies table.table th:nth-child(1),
.policies table.table td:nth-child(1) {
  width: 25%
}

.policies table.table th:nth-child(2),
.policies table.table td:nth-child(2) {
  width: 60%
}

.policies table.table th:nth-child(3),
.policies table.table td:nth-child(3) {
  width: 15%;
  text-align: center
}

/* =========================
   Homepage-specific styles
   ========================= */

.policies .topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0
}

.policies .brand {
  display: flex;
  align-items: center;
  gap: 16px
}

.policies .brand img {
  height: 28px;
  width: auto;
  display: block
}

.policies .brand .name {
  font-weight: 700;
  letter-spacing: .2px
}

.policies .hero {
  padding: 32px 0 64px
}

.policies .hero-grid {
  display: grid;
  grid-template-columns:1.2fr .8fr;
  gap: 24px;
  align-items: center;
  position: relative
}

.policies .hero h1 {
  font-size: 36px;
  margin: 0 0 12px
}

.policies .hero p {
  max-width: 720px;
  margin: 0 0 20px
}

.policies .cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

/* Phone image + animation */
.policies .hero-visual {
  position: relative;
  isolation: isolate
}

.policies .phone {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .15));
  opacity: 0;
  transform: translateY(12px) scale(.985);
  animation: phoneIn .9s ease-out .2s forwards
}

@keyframes phoneIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

/* SVG background "charts" */
.policies .chart-bg {
  position: absolute;
  inset: -30px -20px -30px -40px;
  z-index: -1;
  opacity: .65;
  pointer-events: none
}

.policies .chart-bg svg {
  width: 100%;
  height: 100%
}

.policies .chart-bg .pulse {
  animation: pulse 4s ease-in-out infinite
}

@keyframes pulse {
  0%, 100% {
    opacity: .25
  }
  50% {
    opacity: .45
  }
}

/* Features */
.policies .features .grid {
  display: grid;
  grid-template-columns:repeat(3, 1fr);
  gap: 16px
}

.policies .features .card {
  height: 100%
}

/* Partners logos */
.policies .partners-grid {
  display: grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap: 28px;
  justify-items: center;
  align-items: center;
  padding: 20px 0
}

.policies .partners-grid img {
  max-height: 50px;
  width: auto;
  opacity: 0;
  transform: scale(.96);
  transition: opacity .6s ease, transform .6s ease, filter .3s ease;
  filter: grayscale(0%) brightness(1)
}

.policies .partners-grid img.show {
  opacity: 1;
  transform: scale(1)
}

.partners-grid img:hover {
  filter: grayscale(0%) brightness(1.1);
  transform: scale(1.05)
}

/* Forms (Sign Up / Start Conversation) */
.policies .form {
  max-width: 760px;
  margin: 0 auto
}

.policies .row {
  display: grid;
  grid-template-columns:1fr 1fr;
  gap: 12px
}

.policies .field {
  display: flex;
  flex-direction: column;
  margin-bottom: 12px
}

.policies .field label {
  font-weight: 600;
  margin-bottom: 6px
}

.policies .field input,
.policies .field textarea,
.policies .field select {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px
}

.policies .field textarea {
  min-height: 140px;
  resize: vertical
}

.policies .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap
}

.policies .hint {
  font-size: 12px;
  color: var(--muted)
}

.policies .error {
  color: #b00020;
  font-size: 14px;
  margin: 6px 0
}

/* Responsive & accessibility */
@media (max-width: 980px) {
  .policies .hero-grid {
    grid-template-columns:1fr
  }

  .policies .hero-visual {
    order: -1
  }

  .policies .chart-bg {
    inset: -10px
  }

  .policies .features .grid {
    grid-template-columns:1fr
  }

  .policies .row {
    grid-template-columns:1fr
  }
}

@media (prefers-reduced-motion: reduce) {
  .policies .phone {
    animation: none;
    opacity: 1;
    transform: none
  }

  .policies .chart-bg .pulse {
    animation: none
  }

  .policies .partners-grid img:hover {
    transform: none
  }
}

.policies .footer {
  margin: 36px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted)
}
