/* «Открытое право» — общие стили сайта */

:root {
  --bg: #f8f5f0;
  --card: #ffffff;
  --card-soft: rgba(255, 255, 255, 0.82);
  --ink: #333a45;
  --ink-strong: #232933;
  --muted: #75798a;
  --accent: #d97c1e;
  --accent-dark: #b8650f;
  --accent-soft: #f7e8d4;
  --sky: #e3edf4;
  --line: #e6dfd3;
  --shadow: 0 10px 30px rgba(60, 50, 30, 0.08);
  --radius: 14px;
  --wrap: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(248, 245, 240, 0.90), rgba(248, 245, 240, 0.96)),
    url("/assets/img/bg-basil.jpg");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 800px) {
  body { background-attachment: scroll; }
}

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink-strong);
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 2.2rem; margin-bottom: 0.6em; }
h2 { font-size: 1.55rem; margin: 1.6em 0 0.6em; }
h3 { font-size: 1.2rem; margin: 1.2em 0 0.4em; }

p { margin: 0 0 1em; }
ul { margin: 0 0 1em 1.2em; }
li { margin-bottom: 0.35em; }

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

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

.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

.site-nav a {
  color: var(--ink);
  font-size: 0.98rem;
  padding: 8px 13px;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover { background: var(--accent-soft); text-decoration: none; }

.site-nav a[aria-current="page"] {
  color: var(--accent-dark);
  font-weight: 600;
  background: var(--accent-soft);
}

.site-nav a.lang {
  border: 1px solid var(--line);
  margin-left: 8px;
  font-weight: 600;
  color: var(--muted);
}

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    width: 42px;
    height: 38px;
    cursor: pointer;
    position: relative;
  }
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.2s;
  }
  .nav-toggle span { top: 18px; }
  .nav-toggle span::before { top: -6px; }
  .nav-toggle span::after { top: 6px; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav a.lang { margin-left: 0; text-align: center; }
}

/* ---------- Контент ---------- */

main { flex: 1; }

.page {
  background: var(--card-soft);
  border: 1px solid rgba(230, 223, 211, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 48px;
  margin: 34px auto 48px;
}

@media (max-width: 700px) {
  .page { padding: 26px 20px; margin-top: 20px; }
}

.lead { font-size: 1.15rem; color: var(--ink-strong); }

.breadcrumbs { font-size: 0.88rem; color: var(--muted); margin-bottom: 1.2em; }

/* ---------- Главная ---------- */

.hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin: 34px 0 0;
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(252, 250, 246, 0.96) 0%, rgba(252, 250, 246, 0.88) 45%, rgba(252, 250, 246, 0.35) 100%),
    url("/assets/img/bg-basil.jpg") right -40px center / cover no-repeat;
}

.hero-inner {
  position: relative;
  padding: 72px 48px;
  max-width: 640px;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 0.4em; }

.hero p { font-size: 1.18rem; color: var(--ink); max-width: 34em; }

.hero .actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }

.btn-ghost { border: 1px solid var(--accent); color: var(--accent-dark); background: rgba(255,255,255,0.7); }
.btn-ghost:hover { background: var(--accent-soft); text-decoration: none; }

@media (max-width: 700px) {
  .hero-inner { padding: 44px 24px; }
  .hero h1 { font-size: 1.9rem; }
  .hero::before {
    background:
      linear-gradient(rgba(252, 250, 246, 0.93), rgba(252, 250, 246, 0.93)),
      url("/assets/img/bg-basil.jpg") center / cover no-repeat;
  }
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 1.4em 0 0.4em;
}

@media (max-width: 800px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
}

.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.fact b {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.7rem;
  color: var(--accent-dark);
  margin-bottom: 2px;
}

.fact span { color: var(--muted); font-size: 0.95rem; line-height: 1.4; display: block; }

/* ---------- Практики ---------- */

.practices-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 1.4em;
}

.practice-list { display: flex; flex-direction: column; gap: 6px; }

.practice-btn {
  text-align: left;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.practice-btn:hover { background: var(--accent-soft); }

.practice-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.practice-panels { min-width: 0; }

.practice-panel {
  display: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 30px;
}

.practice-panel.active { display: block; }

.practice-panel h2 { margin-top: 0; font-size: 1.4rem; }

@media (max-width: 800px) {
  .practices-layout { display: block; }
  .practice-list { gap: 8px; }
  .practice-btn { width: 100%; }
  .practice-btn.active { border-radius: 10px 10px 0 0; }
  /* панель, перемещённая под кнопку скриптом */
  .practice-list .practice-panel.active {
    display: block;
    border-radius: 0 0 10px 10px;
    border-top: none;
    margin-bottom: 2px;
  }
}

/* ---------- Клиенты ---------- */

.clients-section h2 {
  border-bottom: 2px solid var(--accent);
  display: inline-block;
  padding-bottom: 4px;
  margin-bottom: 0.8em;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 14px;
  margin-bottom: 0.6em;
}

.client-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 128px;
  transition: box-shadow 0.15s, transform 0.15s;
}

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

.client-card .logo-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.client-card img { max-height: 62px; max-width: 100%; width: auto; object-fit: contain; }

.client-card figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.3;
}

/* ---------- Отзывы ---------- */

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 1.2em;
}

.feedback-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  cursor: zoom-in;
  transition: box-shadow 0.15s, transform 0.15s;
}

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

.feedback-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feedback-card figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  color: var(--ink);
  line-height: 1.35;
}

/* Лайтбокс */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(35, 41, 51, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px 16px 16px;
  flex-direction: column;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: min(920px, 96vw);
  max-height: 84vh;
  border-radius: 6px;
  background: #fff;
}

.lightbox .lb-caption { color: #f2f2f2; margin-top: 12px; font-size: 0.95rem; text-align: center; }

.lightbox .lb-close {
  position: absolute;
  top: 14px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox .lb-prev, .lightbox .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  cursor: pointer;
}

.lightbox .lb-prev { left: 12px; }
.lightbox .lb-next { right: 12px; }

@media (max-width: 700px) {
  .lightbox .lb-prev, .lightbox .lb-next { width: 38px; height: 52px; font-size: 1.5rem; }
}

/* ---------- Контакты ---------- */

.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 30px;
  align-items: start;
  margin-top: 1.2em;
}

@media (max-width: 800px) {
  .contacts-layout { display: block; }
  .contacts-map { margin-top: 22px; }
}

.contact-item { margin-bottom: 1.1em; }
.contact-item .label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}
.contact-item .value { font-size: 1.08rem; color: var(--ink-strong); }

.contacts-map iframe {
  width: 100%;
  height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: block;
  background: var(--sky);
}

/* ---------- Подвал ---------- */

.site-footer {
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--line);
  padding: 30px 0 24px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-inner a { color: var(--muted); text-decoration: underline; }
.footer-inner a:hover { color: var(--accent-dark); }

.footer-col { max-width: 46ch; }
