﻿:root {
  --cms-border: rgba(17, 17, 17, 0.08);
  --cms-text: #171717;
  --cms-muted: rgba(23, 23, 23, 0.68);
  --cms-bg: #f7f4ee;
  --cms-card: #ffffff;
  --cms-gold: #d0aa67;
}

.cms-wrap {
  background: linear-gradient(180deg, #fbfaf7 0%, #f4efe6 100%);
  padding: 132px 0 84px;
}

.cms-container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.cms-hero {
  padding: 148px 0 72px;
  background:
    linear-gradient(135deg, rgba(14, 14, 14, 0.72), rgba(14, 14, 14, 0.36)),
    radial-gradient(circle at top right, rgba(208, 170, 103, 0.34), transparent 44%),
    #141414;
  color: #fff;
}

.cms-hero-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.cms-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 22px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.58);
}

.cms-breadcrumb a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: color 0.25s ease;
}

.cms-breadcrumb a:hover {
  color: var(--cms-gold);
}

body[data-page="cases"] .nav-links a,
body[data-page="cases"] .mobile-menu a {
  text-decoration: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

body[data-page="cases"] .nav-links a::after,
body[data-page="cases"] .mobile-menu a::after {
  background: var(--gold) !important;
}

body[data-page="cases"] .nav-links a.active {
  color: var(--gold) !important;
}

body[data-page="cases"] .nav-links a.active::after {
  width: 100% !important;
}

body[data-page="cases"] .nav-links a:not(.active)::after {
  width: 0 !important;
}

.cms-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
}

.cms-hero-title {
  margin: 26px 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.cms-hero-title span {
  color: var(--cms-gold);
}

.cms-hero-sub {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
  line-height: 1.9;
}

.cms-grid {
  display: grid;
  gap: 28px;
}

.cms-grid.products {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cms-grid.cases {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cms-card {
  display: block;
  background: var(--cms-card);
  border: 1px solid var(--cms-border);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(22, 19, 12, 0.08);
  color: inherit;
  text-decoration: none;
}

.cms-card-media {
  position: relative;
  aspect-ratio: 1 / 0.82;
  overflow: hidden;
  background: #f2ede2;
}

.cms-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cms-card-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  font-size: 12px;
}

.cms-card-body {
  padding: 24px;
}

.cms-card-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.cms-card-desc {
  margin: 0;
  color: var(--cms-muted);
  line-height: 1.9;
}

.cms-meta-row,
.cms-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cms-tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #f4efe4;
  color: #5f4a25;
  font-size: 13px;
}

.cms-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
}

.cms-panel {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--cms-border);
  border-radius: 32px;
  padding: 34px;
  box-shadow: 0 20px 48px rgba(22, 19, 12, 0.06);
}

.cms-side-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--cms-border);
  border-radius: 28px;
  padding: 24px;
}

.cms-side-card h3 {
  margin: 0 0 18px;
  font-size: 20px;
}

.cms-side-list,
.cms-text-list {
  display: grid;
  gap: 16px;
}

.cms-text-list a,
.cms-side-list a {
  color: inherit;
  text-decoration: none;
}

.cms-text-item {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.cms-text-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cms-text-item h4 {
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.55;
}

.cms-text-item span {
  color: var(--cms-muted);
  font-size: 13px;
}

.cms-filter-panel {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--cms-border);
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 28px;
}

.cms-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 34px;
}

.cms-pagination a,
.cms-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--cms-border);
  background: #fff;
  color: inherit;
  text-decoration: none;
}

.cms-pagination .active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.cms-article {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--cms-border);
  border-radius: 36px;
  padding: 42px;
  box-shadow: 0 20px 58px rgba(22, 19, 12, 0.07);
}

.cms-article-cover {
  margin-bottom: 28px;
  border-radius: 28px;
  overflow: hidden;
  background: #eee7d8;
}

.cms-article-cover img {
  width: 100%;
  display: block;
}

.cms-article-title {
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.cms-article-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 26px;
  color: var(--cms-muted);
  font-size: 14px;
}

.cms-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 16px;
  margin-bottom: 28px;
}

.cms-gallery-main,
.cms-gallery-thumbs img {
  border-radius: 24px;
  overflow: hidden;
}

.cms-gallery-main img,
.cms-gallery-thumbs img {
  width: 100%;
  display: block;
}

.cms-gallery-thumbs {
  display: grid;
  gap: 12px;
}

.cms-rich {
  color: var(--cms-text);
  line-height: 1.95;
}

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

.cms-nav-pager {
  display: grid;
  gap: 14px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
  color: var(--cms-muted);
}

.cms-nav-pager a {
  color: inherit;
  text-decoration: none;
}

.cms-empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--cms-muted);
}

@media (max-width: 1024px) {
  .cms-grid.products,
  .cms-grid.cases,
  .cms-shell {
    grid-template-columns: 1fr;
  }

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

  .cms-gallery-thumbs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .cms-wrap {
    padding: 108px 0 62px;
  }

  .cms-container,
  .cms-hero-inner {
    width: min(100% - 28px, 1180px);
  }

  .cms-hero {
    padding: 124px 0 56px;
  }

  .cms-panel,
  .cms-article {
    padding: 24px 18px;
    border-radius: 24px;
  }

  .cms-grid.products,
  .cms-grid.cases {
    gap: 20px;
  }

  .cms-card-title {
    font-size: 20px;
  }
}
