﻿:root {
  --page-bg: #f5f1ea;
  --surface: rgba(255, 251, 246, 0.92);
  --surface-strong: #fffaf2;
  --ink: #111827;
  --muted: #5a6475;
  --soft: #8a93a3;
  --orange: #ff6a00;
  --orange-soft: rgba(255, 106, 0, 0.12);
  --border: rgba(17, 24, 39, 0.1);
  --border-orange: rgba(255, 106, 0, 0.2);
  --shadow: 0 22px 70px rgba(24, 34, 53, 0.11);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.legal-page {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 106, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 106, 0, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 16% 8%, rgba(255, 148, 77, 0.18), transparent 32%),
    var(--page-bg);
  background-size: 56px 56px, 56px 56px, auto, auto;
  color: var(--ink);
  font-family: "Manrope", "Noto Sans Georgian", system-ui, sans-serif;
  line-height: 1.65;
}

.legal-main {
  width: min(1100px, calc(100% - 32px));
  margin: 132px auto 64px;
}

.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding: 42px;
  border: 1px solid var(--border-orange);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 6px var(--orange-soft);
}

.legal-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

.legal-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
}

.legal-updated {
  min-width: 210px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.legal-updated strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
}

.legal-toc span {
  color: var(--soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc a {
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.legal-toc a:hover {
  background: var(--orange-soft);
  color: var(--ink);
}

.legal-content {
  display: grid;
  gap: 16px;
}

.legal-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.84);
}

.legal-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.25;
}

.legal-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15.5px;
  font-weight: 600;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card ul {
  margin: 10px 0 0;
  padding-left: 22px;
  color: var(--muted);
  font-size: 15.5px;
  font-weight: 600;
}

.legal-card li + li {
  margin-top: 8px;
}

.legal-note {
  padding: 18px 20px;
  border: 1px solid var(--border-orange);
  border-radius: 16px;
  background: rgba(255, 106, 0, 0.08);
  color: var(--ink);
  font-weight: 700;
}

.legal-contact {
  color: var(--orange);
  font-weight: 800;
  text-decoration: none;
}

.legal-contact:hover {
  text-decoration: underline;
}

.legal-page .container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

body.privacy-page footer,
body.terms-page footer {
  margin: 64px 0 0;
  padding: 48px 0 32px;
  border: 1px solid rgba(38, 52, 50, 0.10);
  background: rgba(255, 251, 246, 0.86);
  box-shadow: 0 24px 50px rgba(88, 73, 53, 0.08);
  backdrop-filter: blur(16px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--ink);
  text-decoration: none;
}

.footer-brand .brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  overflow: visible;
  position: relative;
}

.footer-brand .brand-icon img {
  width: auto;
  max-width: min(320px, 34vw);
  height: 54px;
  object-fit: contain;
  display: block;
}

.footer-brand .brand-text {
  display: none;
}

.footer-desc {
  max-width: 260px;
  margin: 12px 0 0;
  color: #5d6a67;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

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

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

.footer-col-title {
  margin-bottom: 4px;
  color: #1f2625;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.footer-col a {
  color: #6d7874;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #2c433f;
}

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

.footer-copy {
  color: #6d7874;
  font-size: 12.5px;
  font-weight: 600;
}

.footer-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-meta a {
  color: #6d7874;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-meta a:hover {
  color: #2c433f;
}

body.privacy-page .legal-main,
body.terms-page .legal-main {
  width: min(1440px, calc(100% - 48px));
  margin-top: 112px;
}

body.privacy-page .legal-layout,
body.terms-page .legal-layout {
  display: block;
  margin-top: 0;
}

body.privacy-page .legal-content,
body.terms-page .legal-content {
  grid-template-columns: 1fr;
  gap: 18px;
}

body.privacy-page #giko-fab,
body.terms-page #giko-fab,
body.privacy-page #giko-toggle-btn,
body.terms-page #giko-toggle-btn {
  right: 24px !important;
  left: auto !important;
  bottom: 24px !important;
}

body.privacy-page #giko-window,
body.terms-page #giko-window {
  right: 24px !important;
  left: auto !important;
  bottom: 92px !important;
  max-width: calc(100vw - 48px) !important;
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
}

body.privacy-page #giko-header,
body.terms-page #giko-header {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(59, 130, 246, 0.12)) !important;
  border-bottom-color: rgba(255, 255, 255, 0.07) !important;
}

body.privacy-page .giko-header-name,
body.terms-page .giko-header-name,
body.privacy-page #giko-input,
body.terms-page #giko-input {
  color: #f1f5f9 !important;
}

body.privacy-page .giko-msg--bot,
body.terms-page .giko-msg--bot {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.07) !important;
  color: #e2e8f0 !important;
}

body.privacy-page .giko-msg--user,
body.terms-page .giko-msg--user {
  color: #f1f5f9 !important;
}

body.privacy-page #giko-input-area,
body.terms-page #giko-input-area {
  background: rgba(0, 0, 0, 0.15) !important;
  border-top-color: rgba(255, 255, 255, 0.07) !important;
}

body.privacy-page #giko-input,
body.terms-page #giko-input {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

body.privacy-page #giko-input::placeholder,
body.terms-page #giko-input::placeholder {
  color: #94a3b8 !important;
}

@media (max-width: 860px) {
  .legal-main {
    width: min(100% - 24px, 720px);
    margin-top: 112px;
  }

  .legal-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    gap: 28px;
  }

  body.privacy-page .legal-main,
  body.terms-page .legal-main {
    width: min(100% - 24px, 720px);
    margin-top: 112px;
  }

  body.privacy-page .legal-content,
  body.terms-page .legal-content {
    grid-template-columns: 1fr;
  }

  body.privacy-page #giko-fab,
  body.terms-page #giko-fab,
  body.privacy-page #giko-toggle-btn,
  body.terms-page #giko-toggle-btn {
    right: 16px !important;
    bottom: 16px !important;
  }

  body.privacy-page #giko-window,
  body.terms-page #giko-window {
    right: 16px !important;
    bottom: 88px !important;
    max-width: calc(100vw - 32px) !important;
  }

}

@media (max-width: 520px) {
  .legal-main {
    width: calc(100% - 18px);
    margin-top: 100px;
  }

  .legal-hero,
  .legal-card {
    padding: 22px;
    border-radius: 16px;
  }

  body.privacy-page .legal-main,
  body.terms-page .legal-main {
    width: calc(100% - 18px);
    margin-top: 100px;
  }

  body.privacy-page footer,
  body.terms-page footer {
    padding: 28px 0 24px;
  }

  .legal-page .container {
    padding: 0 16px;
  }

  .footer-links,
  .footer-meta {
    flex-direction: column;
    gap: 18px;
  }
}
