/* ──────────── CALCULATOR ──────────── */
.cases-section {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

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

.case-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(23, 38, 34, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.case-card:hover {
  transform: translateY(-3px);
  border-color: #b8cec3;
  box-shadow: var(--shadow);
}

.case-photo {
  min-height: 210px;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 33, 31, 0.08), rgba(227, 107, 37, 0.12)),
    repeating-linear-gradient(135deg, #f3f6f2 0 12px, #e9f0ea 12px 24px);
  background-color: #edf2ed;
  background-size: cover;
  background-position: center;
}

.case-photo.has-image::before,
.case-photo.has-image::after,
.case-photo.has-image span {
  display: none;
}

.case-photo-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 0;
}

.case-photo.has-image .case-photo-image {
  display: block;
}

.case-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 999px;
  background: rgba(31, 33, 31, 0.58);
  color: #fff;
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.case-carousel-btn:hover {
  background: rgba(31, 33, 31, 0.78);
  border-color: #fff;
}

.case-carousel-prev {
  left: 12px;
}

.case-carousel-next {
  right: 12px;
}

.case-carousel-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  border-radius: 999px;
  background: rgba(31, 33, 31, 0.66);
  color: #fff;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.case-carousel-btn[hidden],
.case-carousel-count[hidden] {
  display: none;
}

.case-photo::before {
  content: '';
  position: absolute;
  inset: 18px;
  border: 1px dashed rgba(63, 118, 101, 0.34);
  border-radius: 8px;
  z-index: 1;
}

.case-photo::after {
  content: '';
  width: 54px;
  height: 38px;
  border: 3px solid rgba(63, 118, 101, 0.38);
  border-radius: 8px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -58%);
  z-index: 1;
}

.case-photo span {
  position: relative;
  z-index: 2;
  margin-top: 64px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(63, 118, 101, 0.18);
  border-radius: 999px;
  padding: 6px 12px;
}

.case-content {
  padding: 22px;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.case-tags span {
  color: var(--green);
  background: var(--teal-light);
  border: 1px solid rgba(63, 118, 101, 0.14);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.case-card h3 {
  color: var(--dark);
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: 10px;
}

.case-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
  margin-bottom: 18px;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 0;
}

.case-meta div {
  background: #f8faf7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.case-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 2px;
}

.case-meta dd {
  color: var(--dark);
  font-size: 16px;
  font-weight: 900;
  margin: 0;
}

.reviews-section {
  background: #f7f8f4;
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
}

.reviews-carousel {
  position: relative;
  display: grid;
  gap: 16px;
}

.reviews-viewport {
  overflow: hidden;
  padding: 4px 2px 20px;
  margin: -4px -2px -20px;
}

.reviews-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.reviews-grid::-webkit-scrollbar {
  display: none;
}

.review-card {
  flex: 0 0 clamp(300px, 31vw, 380px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(23, 38, 34, 0.04);
  display: flex;
  flex-direction: column;
  min-height: 250px;
  scroll-snap-align: start;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  border-color: #b8cec3;
  box-shadow: var(--shadow);
}

.review-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.review-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
}

.review-profile {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.review-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  overflow: hidden;
  border: 1px solid rgba(23, 38, 34, 0.12);
  border-radius: 50%;
  background: #dfe3e1 var(--review-avatar-image, url("/images/review-avatar-1.png")) center / cover no-repeat;
  box-shadow: 0 4px 12px rgba(23, 38, 34, 0.08);
}

.review-avatar img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-object-photo {
  height: 150px;
  overflow: hidden;
  background: #edf2ed;
  border-bottom: 1px solid var(--line);
}

.review-object-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.review-card h3 {
  color: var(--dark);
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 4px;
}

.review-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.review-meta-row span,
.review-proof {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.review-meta-row span {
  border: 1px solid rgba(63, 118, 101, 0.14);
  border-radius: 999px;
  background: #f7fbf9;
  padding: 4px 8px;
}

.review-rating {
  color: var(--amber);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.review-text {
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

.review-object {
  width: fit-content;
  max-width: 100%;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid rgba(63, 118, 101, 0.16);
  border-radius: 999px;
  background: var(--teal-light);
}

.review-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.review-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid rgba(227, 107, 37, 0.24);
  border-radius: 999px;
  background: #fff7f0;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.reviews-carousel-btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(63, 118, 101, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--green);
  display: grid;
  place-items: center;
  font: inherit;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(23, 38, 34, 0.1);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.reviews-carousel-prev {
  left: -20px;
}

.reviews-carousel-next {
  right: -20px;
}

.reviews-carousel-btn:hover {
  background: var(--green);
  color: #fff;
}

.reviews-carousel-btn:disabled {
  opacity: 0.38;
  cursor: default;
}

.reviews-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.reviews-dots button {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: #cbdad1;
  padding: 0;
  cursor: pointer;
}

.reviews-dots button.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--green);
}

.review-source:hover {
  color: var(--orange);
}

.review-object-photo[hidden],
.review-meta-row span[hidden],
.review-object[hidden],
.review-proof[hidden],
.review-source[hidden],
.reviews-carousel-btn[hidden],
.reviews-dots[hidden] {
  display: none;
}

.calculator-section {
  background: #f2f6f4;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.calculator-section::before {
  content: none;
}

.calculator-section .kicker {
  background: var(--teal-light);
  color: var(--green);
}

.calculator-section .section-title {
  color: var(--dark);
}

.calculator-section .section-subtitle {
  color: var(--muted);
}

.calc-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--calc-panel-width, 410px);
  gap: 32px;
  align-items: start;
  position: relative;
  z-index: 1;
}

.calc-services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.calc-service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  min-height: 210px;
  display: flex;
  flex-direction: column;
}

.calc-service-card:hover {
  border-color: #f0b68b;
  background: #fffaf6;
}

.calc-service-card.active {
  border-color: var(--orange);
  background: var(--orange-light);
  box-shadow: 0 10px 24px rgba(23, 38, 34, 0.08);
}

.calc-service-card.active .calc-badge {
  margin-right: 32px;
}

.calc-service-card::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--orange);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.calc-service-card.active::before,
.calc-service-card:hover::before {
  opacity: 1;
}

.calc-service-card.active::after {
  content: '✓';
  position: absolute;
  top: 14px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

.calc-service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.calc-service-icon {
  width: 86px;
  height: 86px;
  border-radius: 0;
  background: transparent;
  color: var(--orange);
  display: grid;
  place-items: center;
  overflow: visible;
  box-shadow: none;
}

.calc-service-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.calc-service-icon .ui-icon {
  width: 24px;
  height: 24px;
}

.calc-service-card.active .calc-service-icon {
  background: transparent;
  color: var(--orange);
  box-shadow: none;
}

.calc-badge {
  color: var(--green);
  border: 1px solid rgba(63, 118, 101, 0.22);
  background: #f7fbf9;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.calc-service-card h4 {
  color: var(--dark);
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.calc-service-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.calc-card-footer {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.calc-service-card .calc-price-from {
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.calc-service-card .calc-price-value {
  color: var(--dark);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.calc-service-card .calc-price-unit {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.calc-panel {
  background: #ffffff;
  border: 1px solid #d9e4dc;
  border-radius: 10px;
  padding: 28px;
  color: var(--dark);
  position: sticky;
  top: var(--calc-panel-top, 100px);
  backdrop-filter: blur(10px);
  box-shadow: 0 22px 52px rgba(23, 38, 34, 0.11);
  scroll-margin-top: 96px;
  overflow: hidden;
}

.calc-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: -28px -28px 22px;
  padding: 24px 28px 22px;
  background: #f7faf6;
  border-bottom: 1px solid #dfe8e0;
}

.calc-panel-head > span {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--orange);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 900;
}

.calc-panel h3 {
  font-size: 24px;
  margin-bottom: 5px;
  line-height: 1.2;
}

.calc-panel-head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.calc-field {
  margin-bottom: 14px;
  padding: 13px 15px 12px;
  background: #f8faf7;
  border: 1px solid #dfe8e0;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.calc-field label {
  display: block;
  color: #60756b;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.calc-field input,
.calc-field select {
  width: 100%;
  height: 34px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--dark);
  font-size: 16px;
  font-weight: 800;
  padding: 0;
  outline: none;
  transition: color 0.2s ease;
  font-family: inherit;
}

.calc-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 5.25L7 8.75L10.5 5.25' stroke='%2360756B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 2px center;
  background-repeat: no-repeat;
  caret-color: transparent;
  cursor: pointer;
  padding-right: 24px;
}

.calc-field input::placeholder {
  color: #8a9891;
  font-weight: 700;
}

.calc-field:focus-within {
  border-color: var(--orange);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(227, 107, 37, 0.1);
}

.calc-field input:focus,
.calc-field select:focus {
  background: transparent;
  box-shadow: none;
}

.calc-field select option {
  background: #fff;
  color: var(--text);
}

.calc-field-error {
  border-color: #dc2626;
  background: #fff5f5;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.calc-result {
  background: linear-gradient(135deg, #fffaf6 0%, #fff0e6 100%);
  border: 1px solid #f2cdb7;
  border-radius: 10px;
  padding: 22px 22px 20px;
  text-align: left;
  margin: 18px 0 20px;
  box-shadow: inset 4px 0 0 var(--orange);
}

.calc-result-label {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.calc-result-value {
  color: var(--dark);
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
}

.calc-result-breakdown {
  color: #4f655c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  margin-top: 8px;
}

.calc-result-note {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}

.calc-includes {
  display: grid;
  gap: 10px;
  margin: 0 0 24px;
  padding: 4px 0 0;
}

.calc-includes div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2b3a42;
  font-size: 14px;
  font-weight: 800;
}

.calc-includes span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--teal-light);
  color: var(--green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 900;
}

.calc-panel .btn-primary { width: 100%; }
