:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #141414;
  --muted: #5c5c5c;
  --border: #e8e8e8;
  --accent: #1f5f4e;
  --accent-hover: #174a3d;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(20, 20, 20, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

a:hover {
  text-decoration: underline;
}

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

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
  color: var(--accent);
}

.logo__img {
  width: auto;
  height: 56px;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hero {
  padding: 2.5rem 0 1.5rem;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
  font-size: 1.05rem;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1rem;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-label {
  width: 100%;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: -0.25rem;
}

.filter-row--complex {
  margin-bottom: 0;
}

.filter-complex-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}

.social-channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.social-channel {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.social-channel:hover {
  border-color: #cfcfcf;
  color: var(--accent);
}

.social-channel:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.social-channel__icon {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
}

.social-channel__icon--brand,
.social-link__icon--brand {
  object-fit: contain;
  border-radius: 0.25rem;
}

.social-channel--max .social-channel__icon:not(.social-channel__icon--brand) {
  color: #5b4eff;
}

.social-channel--telegram .social-channel__icon {
  color: #26a5e4;
}

.social-channel--2gis .social-channel__icon {
  color: #2dbe2c;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}

.social-link:hover {
  color: var(--accent);
}

.social-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.social-link__icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
}

.social-link--whatsapp .social-link__icon {
  color: #25d366;
}

.social-link--telegram .social-link__icon {
  color: #26a5e4;
}

.social-link--max .social-link__icon:not(.social-link__icon--brand) {
  color: #5b4eff;
}

.social-link--vk .social-link__icon {
  color: #0077ff;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover {
  border-color: #cfcfcf;
}

.chip--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.chip--active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.5rem;
  padding-bottom: 3rem;
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(20, 20, 20, 0.08);
}

.card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e5e5e5;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  padding: 1.15rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card__title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.card__meta {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.card__summary {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

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

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

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

/* Case page */
.case-hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #2a2a2a;
}

.case-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.case-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
}

.case-hero__content {
  position: relative;
  z-index: 1;
  padding: 2.5rem 0 2rem;
  width: 100%;
}

.case-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.case-hero__meta {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.95;
}

.case-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.case-actions .btn--primary {
  background: #fff;
  color: var(--text);
}

.case-actions .btn--primary:hover {
  background: var(--bg);
}

.case-actions .btn--ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid #fff;
  text-decoration: none;
}

.case-actions .btn--ghost:hover {
  background: #f0f0f0;
  border-color: #f0f0f0;
  color: var(--text);
  text-decoration: none;
}

.case-hero__img {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  display: none;
}

.lightbox:not([hidden]) {
  display: flex;
}

.lightbox__img {
  max-width: 100%;
  max-height: calc(100vh - 5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.section {
  padding: 2.25rem 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.section p {
  margin: 0 0 1rem;
  color: var(--muted);
  max-width: 65ch;
}

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

.list-check {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.list-check li {
  margin-bottom: 0.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 1rem;
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.gallery figcaption {
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.video-block {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #111;
  aspect-ratio: 16 / 9;
  max-width: 800px;
}

.video-block iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-block video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.video-fallback {
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
}

.manager-toggle {
  margin: 2rem 0 1rem;
}

.manager-panel {
  display: none;
  background: #f3f6f4;
  border: 1px solid #d8e3de;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.manager-panel.is-visible {
  display: block;
}

.manager-panel h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.manager-panel pre {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--surface);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.footer-note {
  padding: 1rem 0 2rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.75rem 0 2rem;
  margin-top: auto;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.site-footer__brand strong {
  font-size: 1rem;
}

.site-footer__brand span {
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.site-footer__phone {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.site-footer__phone:hover {
  color: var(--accent);
}

.site-footer__messengers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.section--fit {
  padding-bottom: 2.5rem;
}

.list-check--fit li {
  line-height: 1.55;
}

.section-cta {
  margin: 1.5rem 0 0;
}

.page-404 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (max-width: 640px) {
  .site-header__inner {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .logo__img {
    height: 42px;
  }

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

  .gallery {
    grid-template-columns: 1fr;
  }

  .site-footer__top {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-row {
    gap: 0.4rem;
  }

  .chip {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  .case-hero {
    min-height: 50vh;
  }
}
