/* ==========================================================
   DachSolid — стили сайта
   01. Переменные и базовые элементы
   02. Шапка и навигация
   03. Главный экран
   04. Преимущества и услуги
   05. О компании и галерея
   06. Виды работ и отзывы
   07. География работ
   08. Контакты и форма
   09. Подвал, фотопросмотр и быстрые кнопки
   10. Адаптация под планшеты и телефоны
   ========================================================== */

/* 01. Цвета, общие размеры и базовая типографика */
:root {
  --ink: #18272d;
  --green: #193b32;
  --lime: #d9ed8b;
  --paper: #f7f8f3;
  --muted: #68756e;
  --border: #dce1d7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 16px/1.6 Arial, sans-serif;
}

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

button,
input,
textarea,
select {
  font: inherit;
}

button,
a,
input,
textarea,
select,
summary {
  outline-offset: 4px;
}

:focus-visible {
  outline: 3px solid #819e3d;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

section {
  padding-block: 85px;
}

h1 {
  margin: 24px 0;
  font-size: clamp(42px, 5.8vw, 72px);
  line-height: 1.04;
  letter-spacing: -3px;
}

h2 {
  margin: 14px 0 20px;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1.15;
  letter-spacing: -1.5px;
}

h3 {
  line-height: 1.25;
}

.eyebrow {
  color: #6d824a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 12px 23px;
  border: 0;
  border-radius: 5px;
  background: var(--lime);
  color: var(--green);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.btn.dark {
  background: var(--green);
  color: #fff;
}

.btn.outline {
  border: 1px solid #ffffff77;
  background: transparent;
  color: #fff;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

/* 02. Уведомление, логотип, ссылки и мобильное меню */
.notice {
  padding: 7px 16px;
  background: #e9eddf;
  font-size: 12px;
  text-align: center;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--border);
  background: var(--paper);
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.brand {
  flex-shrink: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
}

.brand span {
  color: #688936;
}

.links {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 14px;
  font-weight: 700;
}

.links > a:not(.btn) {
  padding-block: 11px;
}

.menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 27px;
  cursor: pointer;
}

/* 03. Первый экран: текст, фотография, переключатель слайдов */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--green);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 580px;
}

.hero-copy {
  min-width: 0;
  padding: 80px 35px 70px 0;
}

.hero .eyebrow,
.pricing .eyebrow,
.direct-contact .eyebrow {
  color: var(--lime);
}

h1 em {
  color: var(--lime);
  font-style: normal;
}

.hero p {
  max-width: 420px;
  color: #c6d5ce;
  font-size: 17px;
}

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

.hero-photo {
  position: relative;
  min-height: 320px;
  background: #6c7b69 url("assets/dekarz.webp") 45% center / cover no-repeat;
}

.hero-photo::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--green), transparent 35%);
  content: "";
}

.slide-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 35px;
}

.dot {
  width: 35px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dot::after {
  display: block;
  width: 100%;
  height: 4px;
  background: #ffffff44;
  content: "";
}

.dot.active::after {
  background: var(--lime);
}

/* 04. Преимущества, карточки услуг и призыв к оценке */
.benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 25px;
  padding-block: 28px;
  border-bottom: 1px solid var(--border);
}

.benefits b {
  display: block;
  font-size: 17px;
}

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

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 36px;
}

.section-head p {
  max-width: 380px;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 18px;
}

.service-cards {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.card {
  min-width: 0;
  padding: 28px;
  border: 1px solid #e0e5da;
  border-radius: 8px;
  background: #fff;
}

.number {
  color: #729344;
  font-size: 13px;
}

.card h3 {
  margin: 20px 0 15px;
  font-size: 22px;
}

.card p {
  color: var(--muted);
  font-size: 14px;
}

.card a {
  font-size: 13px;
  font-weight: 700;
}

.service-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 15px;
  border-top: 1px solid #e0e5da;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.service-details summary::-webkit-details-marker {
  display: none;
}

.service-details .read-less,
.service-details[open] .read-more {
  display: none;
}

.service-details[open] .read-less {
  display: inline;
}

.expand-icon {
  font-size: 24px;
  line-height: 1;
}

.service-details[open] .expand-icon {
  transform: rotate(45deg);
}

.service-description {
  padding-top: 10px;
}

.service-description ul {
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.service-description li {
  margin-bottom: 9px;
}

.service-description .free-estimate {
  padding: 14px;
  border-radius: 5px;
  background: #eef3df;
  color: var(--green);
}

.service-description a.btn {
  margin-top: 8px;
}

.estimate-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 24px;
  padding: 28px;
  border-radius: 8px;
  background: #e8edde;
}

.estimate-banner b {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

.estimate-banner p {
  max-width: 700px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.estimate-banner .btn {
  flex-shrink: 0;
}

/* 05. О компании и фотографии проектов */
.about,
.reviews,
.contact-section {
  background: #e8edde;
}

.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 65px;
}

.photo {
  display: block;
  width: 100%;
  height: 410px;
  border-radius: 8px;
  background: #bbc7b0;
  object-fit: cover;
}

.check {
  padding: 0;
  list-style: none;
}

.check li {
  padding: 8px 0;
  border-bottom: 1px solid #ced8c5;
}

.check li::before {
  margin-right: 12px;
  color: #618237;
  content: "✓";
}

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

.tile {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #dce3d3;
  text-align: left;
  cursor: pointer;
}

.tile img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.25s;
}

.tile:hover img {
  transform: scale(1.04);
}

.tile span {
  display: block;
  padding: 15px;
  background: #fff;
  font-weight: 700;
}

/* 06. Предложения по работам и демонстрационные отзывы */
.pricing {
  background: var(--green);
  color: #fff;
}

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

.package {
  min-width: 0;
  padding: 30px;
  border: 1px solid #ffffff33;
  border-radius: 8px;
}

.package.featured {
  background: var(--lime);
  color: var(--green);
}

.package ul {
  padding-left: 19px;
  font-size: 14px;
  line-height: 2;
}

.tag {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pricing-note {
  color: #c6d5ce;
  font-size: 13px;
}

.review-disclaimer {
  max-width: 780px;
  margin-bottom: 28px;
  color: #53634f;
  font-size: 14px;
}

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

.review-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  border: 1px solid #d8e0ce;
  border-radius: 10px;
  background: #fff;
}

.review-sample {
  align-self: flex-start;
  padding: 5px 9px;
  border-radius: 4px;
  background: #edf1e4;
  color: #526246;
  font-size: 11px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.review-stars {
  margin-top: 18px;
  color: #b38a22;
  font-size: 23px;
  letter-spacing: 3px;
}

.review-card blockquote {
  flex: 1;
  margin: 14px 0 26px;
  font-size: 15px;
  line-height: 1.75;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.review-avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e8edde;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

/* 07. Зона обслуживания, карта и ссылки Google Maps */
.coverage-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 60px;
}

.coverage-lead {
  color: #53634f;
  font-size: 19px;
}

.coverage-facts {
  display: flex;
  gap: 35px;
  margin: 24px 0;
  padding: 22px 0;
  border-block: 1px solid var(--border);
}

.coverage-facts b {
  display: block;
  font-size: 27px;
  letter-spacing: -1px;
}

.coverage-facts span {
  color: var(--muted);
  font-size: 12px;
}

.coverage-map {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 40px #193b320c;
}

.map-heading {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 22px 24px;
}

.map-heading b {
  font-size: 19px;
}

.coverage-map iframe {
  display: block;
  width: 100%;
  height: 390px;
  border: 0;
}

.map-footer {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
  padding: 18px 24px;
}

.map-footer span {
  color: var(--muted);
  font-size: 12px;
}

.map-footer a {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* 08. Форма (демо), телефон и WhatsApp */
.contact-intro {
  max-width: 720px;
  margin-bottom: 36px;
}

.contact-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #ced8c5;
  border-radius: 12px;
}

.form {
  min-width: 0;
  padding: 42px;
  background: #fff;
}

.contact-split h2 {
  margin-top: 14px;
  font-size: clamp(29px, 3vw, 36px);
}

.form label {
  display: block;
  margin-top: 15px;
  font-size: 13px;
  font-weight: 700;
}

.form input,
.form select,
.form textarea {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #ccd4c8;
  border-radius: 4px;
  background: #fafbf8;
}

.form textarea {
  min-height: 110px;
  resize: vertical;
}

.form .btn {
  width: 100%;
  margin-top: 20px;
}

.direct-contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 42px;
  background: var(--green);
  color: #fff;
}

.direct-contact p,
.direct-contact .muted {
  color: #c6d5ce;
}

.phone-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 24px 0 6px;
  font-size: clamp(22px, 2.7vw, 36px);
  font-weight: 700;
  letter-spacing: -1px;
  overflow-wrap: anywhere;
}

.whatsapp-link {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
  padding: 18px 22px;
  border-radius: 6px;
  background: var(--lime);
  color: var(--green);
  font-weight: 700;
}

.whatsapp-link svg {
  flex-shrink: 0;
}

.whatsapp-link span:last-child {
  margin-left: auto;
}

.whatsapp-link:hover {
  background: #e6f4b8;
}

.direct-contact .direct-note {
  margin-top: 20px;
  font-size: 13px;
}

/* 09. Подвал, окно для фото, плавающие кнопки */
footer {
  padding: 35px 0;
  background: #112c24;
  color: #c4d4ca;
  font-size: 13px;
}

footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

dialog {
  z-index: 100;
  max-width: min(920px, calc(100vw - 24px));
  padding: 15px;
  border: 0;
  border-radius: 8px;
}

dialog::backdrop {
  background: #000b;
}

dialog img {
  display: block;
  max-width: 100%;
  max-height: 75dvh;
  object-fit: contain;
}

dialog button {
  display: block;
  margin: 0 0 12px auto;
}

.error-img {
  background: linear-gradient(145deg, #76876b, #bac8aa);
}

.floating-contact {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.floating-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 6px 22px #112c2433;
  transition: transform 0.18s, box-shadow 0.18s;
}

.floating-button svg {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
}

.floating-whatsapp {
  background: var(--lime);
  color: var(--green);
}

.floating-phone {
  background: var(--green);
  color: #fff;
}

.floating-label {
  position: absolute;
  right: 70px;
  padding: 9px 13px;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(5px);
  transition: opacity 0.18s, transform 0.18s;
}

.floating-button:hover,
.floating-button:focus-visible {
  box-shadow: 0 8px 26px #112c2450;
  transform: translateY(-2px);
}

.floating-button:hover .floating-label,
.floating-button:focus-visible .floating-label {
  opacity: 1;
  transform: none;
}

/* 10. Планшеты: меню-кнопка, более просторные колонки */
@media (max-width: 900px) {
  .nav {
    min-height: 72px;
  }

  .menu {
    display: flex;
  }

  .links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    max-height: calc(100dvh - 90px);
    padding: 14px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 0 0 9px 9px;
    background: var(--paper);
    box-shadow: 0 15px 24px #112c2422;
  }

  .links.open {
    display: flex;
  }

  .links > a {
    padding: 11px 13px;
  }

  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* Узкие планшеты: длинные текстовые блоки идут один под другим */
@media (max-width: 820px) {
  .hero-grid,
  .two,
  .coverage-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 60px 0 48px;
  }

  .hero-photo {
    min-height: 300px;
    margin-inline: -24px;
  }

  .hero-photo::after {
    background: linear-gradient(var(--green), transparent 35%);
  }

  .two,
  .coverage-layout {
    gap: 30px;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    max-width: 680px;
  }
}

/* Телефоны: одна колонка, крупные элементы управления */
@media (max-width: 650px) {
  html {
    scroll-padding-top: 85px;
  }

  body {
    /* Место снизу, чтобы фиксированная панель не закрывала контент. */
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .wrap {
    width: calc(100% - 32px);
  }

  section {
    padding-block: 55px;
  }

  .nav {
    min-height: 68px;
  }

  .brand {
    font-size: 21px;
  }

  h1 {
    font-size: clamp(38px, 10vw, 54px);
    letter-spacing: -2px;
  }

  h2 {
    font-size: clamp(29px, 8vw, 39px);
  }

  .hero-copy {
    padding: 48px 0 40px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-photo {
    min-height: 240px;
    margin-inline: -16px;
  }

  .service-cards,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .review-card {
    padding: 24px;
  }

  .estimate-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 24px;
  }

  .estimate-banner .btn {
    width: 100%;
  }

  .photo {
    height: 280px;
  }

  .tile img {
    height: 205px;
  }

  .coverage-map iframe {
    height: 310px;
  }

  .form,
  .direct-contact {
    padding: 27px 22px;
  }

  .contact-split h2 {
    font-size: 30px;
  }

  footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  /* На телефоне две контактные кнопки образуют нижнюю панель. */
  .floating-contact {
    left: calc(10px + env(safe-area-inset-left));
    right: calc(10px + env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 7px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 4px 26px #112c2430;
  }

  .floating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: 51px;
    height: auto;
    padding: 7px 5px;
    border: 0;
    border-radius: 8px;
  }

  .floating-button svg {
    width: 22px;
    height: 22px;
  }

  .floating-label {
    position: static;
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 12px;
    line-height: 1.2;
    white-space: normal;
    opacity: 1;
    transform: none;
  }
}

/* Маленькие телефоны: галерея и кнопки помещаются в 320 px. */
@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }

  .tile img {
    height: 220px;
  }

  .benefits {
    gap: 16px;
  }

  .benefits b {
    font-size: 15px;
  }

  .actions .btn {
    width: 100%;
  }

  .phone-link {
    font-size: clamp(20px, 6.3vw, 28px);
  }

  .whatsapp-link {
    gap: 10px;
    padding: 15px 12px;
    font-size: 14px;
  }

  .coverage-facts {
    gap: 24px;
  }
}

/* Уважение системной настройки уменьшения анимации. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tile img,
  .floating-button,
  .floating-label {
    transition: none;
  }
}
