:root {
  --bg: #eef1ed;
  --surface: rgba(255, 255, 252, 0.94);
  --surface-strong: #ffffff;
  --text: #16211d;
  --muted: #66736d;
  --accent: #2f6f5f;
  --accent-deep: #17483d;
  --line: rgba(22, 33, 29, 0.1);
  --shadow: 0 24px 60px rgba(20, 55, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Montserrat", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(47, 111, 95, 0.18), transparent 30%),
    linear-gradient(180deg, #f8faf7 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

main {
  flex: 1;
}

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

.hero__topline,
.section-row,
.dashboard-card__top,
.dashboard-card__actions {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.hero__inner,
.detail-card {
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 32px;
  background: linear-gradient(135deg, rgba(255, 255, 252, 0.98), rgba(236, 243, 239, 0.88));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
.detail-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.96;
}

.hero__text,
.detail-subtitle,
.muted,
.panel p {
  color: var(--muted);
  line-height: 1.6;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.75rem;
}

.filters--panel {
  padding: 1rem;
  border: 1px solid rgba(47, 111, 95, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(238, 244, 240, 0.78));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 18px 40px rgba(20, 55, 47, 0.08);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
}

.field span {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.field--wide {
  grid-column: span 2;
}

.field--actions {
  justify-content: end;
}

.field input,
.field select {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(47, 111, 95, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field--metric input {
  padding-right: 4.6rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 246, 243, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 24px rgba(20, 55, 47, 0.06);
}

.field__suffix {
  position: absolute;
  right: 1rem;
  bottom: 1.05rem;
  color: var(--accent-deep);
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 700;
  opacity: 0.82;
  pointer-events: none;
}

.field--select::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 1.2rem;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid rgba(23, 72, 61, 0.7);
  border-bottom: 2px solid rgba(23, 72, 61, 0.7);
  transform: rotate(45deg);
  pointer-events: none;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.8rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(242, 246, 243, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 24px rgba(20, 55, 47, 0.06);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(47, 111, 95, 0.36);
  box-shadow:
    0 0 0 4px rgba(47, 111, 95, 0.08),
    0 12px 28px rgba(20, 55, 47, 0.08);
  transform: translateY(-1px);
}

.filter-button {
  width: 100%;
  min-height: 3.5rem;
  margin-top: auto;
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(23, 72, 61, 0.16);
}

.content,
.detail-page {
  padding-bottom: 3rem;
}

.results-head {
  margin-bottom: 1rem;
}

.results-head h2,
.panel h2 {
  margin: 0;
  font-size: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 252, 0.98), rgba(244, 248, 245, 0.92));
  box-shadow: 0 20px 44px rgba(20, 55, 47, 0.1);
}

.card__media {
  min-height: 13.5rem;
  padding: 1.05rem;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(22, 33, 29, 0.02), rgba(22, 33, 29, 0.28)),
    linear-gradient(135deg, #b9c8c1 0%, #eef3ef 46%, #d8e3de 100%);
  display: flex;
  align-items: end;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.card__badges span {
  display: inline-flex;
  padding: 0.48rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 252, 0.94);
  color: var(--accent-deep);
  font-size: 0.82rem;
  font-weight: 800;
}

.card__meta,
.facts,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.card__meta--single {
  margin-top: -0.05rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  box-shadow: inset 0 0 0 1px rgba(22, 33, 29, 0.04);
}

.chip--warm {
  background: rgba(47, 111, 95, 0.12);
  color: var(--accent-deep);
}

.card__title {
  margin: 0;
  font-size: 1.34rem;
  line-height: 1.16;
  letter-spacing: 0;
}

.card__subtitle,
.card__summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card__pricing {
  display: grid;
  gap: 0.35rem;
  padding-top: 0;
  margin-top: -0.2rem;
}

.project-price {
  margin-top: 0.35rem;
  font-size: 1.42rem;
  line-height: 1.05;
  color: var(--accent-deep);
}

.project-technology {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.facts span {
  color: var(--muted);
  font-size: 0.92rem;
}

.card__link,
.back-link,
.primary-button {
  display: inline-flex;
  width: fit-content;
  color: var(--accent-deep);
  font-weight: 700;
}

.card__link {
  margin-top: auto;
  padding-top: 0.7rem;
}

.primary-button {
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}

.primary-button--ghost {
  background: rgba(47, 111, 95, 0.08);
  color: var(--accent-deep);
}

.detail-page {
  padding-top: 2rem;
}

.detail-cover {
  min-height: 18rem;
  margin-bottom: 1.25rem;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  box-shadow: 0 20px 44px rgba(20, 55, 47, 0.1);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumbs a {
  color: var(--accent-deep);
  font-weight: 800;
}

.breadcrumbs strong {
  color: var(--text);
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.panel {
  padding: 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.5);
}

.characteristics-panel {
  background: rgba(255, 255, 255, 0.66);
}

.characteristics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.characteristic-card {
  display: grid;
  gap: 0.28rem;
  min-height: 4.6rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(47, 111, 95, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.characteristic-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.characteristic-card strong {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.25;
}

.characteristic-card--price {
  border-color: rgba(47, 111, 95, 0.24);
  background: rgba(47, 111, 95, 0.1);
}

.characteristic-card--price strong {
  color: var(--accent-deep);
  font-size: 1.24rem;
}

.company-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(47, 111, 95, 0.14);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 34px rgba(20, 55, 47, 0.08);
}

.company-panel__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.company-panel h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.65rem;
  line-height: 1.1;
}

.company-panel__region {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  background: rgba(47, 111, 95, 0.08);
}

.company-panel__region span,
.company-panel__empty {
  color: var(--muted);
  font-size: 0.92rem;
}

.company-panel__region strong {
  color: var(--accent-deep);
  font-size: 1.05rem;
}

.company-panel__count {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  color: var(--muted);
}

.company-panel__count strong {
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
}

.company-panel__count span {
  font-size: 0.95rem;
}

.company-panel__actions {
  display: grid;
  gap: 0.65rem;
}

.company-panel__button,
.company-panel__link {
  width: 100%;
}

.company-panel__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid rgba(47, 111, 95, 0.18);
  border-radius: 16px;
  background: rgba(47, 111, 95, 0.08);
  color: var(--accent-deep);
  font-weight: 800;
  text-align: center;
}

.detail-gallery-panel {
  margin-top: 1rem;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.detail-gallery__item {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 28px rgba(20, 55, 47, 0.08);
}

.detail-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0 1rem;
  border-top: 1px solid rgba(22, 33, 29, 0.1);
  background: rgba(255, 255, 252, 0.58);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1rem;
}

.site-footer strong {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text);
  font-size: 1.1rem;
}

.site-footer p {
  max-width: 24rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.site-footer__nav a {
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 800;
}

.site-footer__bottom {
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 33, 29, 0.1);
  color: var(--muted);
  font-size: 0.86rem;
}

.similar-panel {
  margin-top: 1rem;
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.similar-card {
  overflow: hidden;
  border: 1px solid rgba(47, 111, 95, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.similar-card__media {
  display: block;
  min-height: 8.5rem;
  background-color: rgba(47, 111, 95, 0.08);
  background-position: center;
  background-size: cover;
}

.similar-card__body {
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem;
}

.similar-card__body span,
.similar-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.similar-card__body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
}

.similar-card__body a {
  color: var(--text);
}

.project-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-form textarea,
.project-form input,
.project-form select {
  width: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(47, 111, 95, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font: inherit;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.dashboard-card {
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.company-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(47, 111, 95, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 34px rgba(20, 55, 47, 0.08);
}

.company-card h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
}

.company-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-card h2 {
  margin: 0;
  font-size: 1.3rem;
}

.dashboard-card__actions {
  justify-content: flex-start;
  margin-top: 1rem;
}

.detail-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.8;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 2rem;
  border-radius: 24px;
  background: var(--surface-strong);
  text-align: center;
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid rgba(47, 111, 95, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.pagination:empty {
  display: none;
}

.pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.pagination__controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.pagination button {
  min-width: 2.45rem;
  min-height: 2.45rem;
  border: 1px solid rgba(47, 111, 95, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

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

.pagination button:disabled {
  cursor: default;
  opacity: 0.42;
}

.pagination__gap {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  padding: 0 0.15rem;
}

@media (max-width: 960px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .filters,
  .detail-grid,
  .project-form {
    grid-template-columns: 1fr;
  }

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

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

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

  .field--wide {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: calc(100% - 1rem);
  }

  .hero {
    padding: 0.75rem 0 1rem;
  }

  .hero__inner,
  .detail-card {
    padding: 1rem;
    border-radius: 22px;
  }

  h1,
  .detail-title {
    font-size: clamp(1.6rem, 8vw, 2.4rem);
  }

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

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

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

  .detail-cover {
    min-height: 12rem;
    border-radius: 22px;
  }

  .field input,
  .field select,
  .project-form input,
  .project-form select,
  .project-form textarea {
    font-size: 16px;
  }

  .hero__topline,
  .section-row,
  .dashboard-card__top,
  .form-actions,
  .pagination,
  .site-footer__inner,
  .site-footer__nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination__controls {
    justify-content: flex-start;
  }
}
