:root {
  --bg: #f6f0e6;
  --bg-soft: #eee2d1;
  --paper: #fffaf3;
  --text: #1f1a15;
  --muted: #71675c;
  --brand: #cba56c;
  --brand-dark: #7a4e24;
  --dark: #17110c;
  --line: rgba(31, 26, 21, .12);
  --shadow: 0 20px 55px rgba(42, 32, 22, .14);
  --radius: 22px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 250, 243, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.site-logo {
  width: auto;
  height: 58px;
  max-width: 190px;
  padding: 8px 12px;
  border-radius: 16px;
  background: #fff;
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(31, 26, 21, .1);
}

.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.nav a:hover { color: var(--brand-dark); }

.header-contacts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--dark);
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.hero-picture,
.hero-picture img,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-picture img {
  object-fit: cover;
  object-position: center 38%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(19, 12, 7, .88), rgba(19, 12, 7, .34)),
    linear-gradient(0deg, rgba(19, 12, 7, .22), rgba(19, 12, 7, .22));
}

.hero-content {
  position: relative;
  max-width: 790px;
  padding: 110px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .13em;
}

h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -.035em;
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(43px, 7vw, 84px);
}

h2 {
  margin: 0;
  font-size: clamp(34px, 4.8vw, 56px);
}

h3 {
  margin: 0;
  line-height: 1.25;
}

.hero-text {
  max-width: 690px;
  margin: 0;
  color: rgba(255,255,255,.84);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--brand);
  color: #1e1409;
  box-shadow: 0 14px 30px rgba(203, 165, 108, .36);
}

.btn-outline {
  border: 1px solid rgba(255,255,255,.54);
  color: #fff;
  background: rgba(255,255,255,.08);
}

.section {
  padding: 86px 0;
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading.center {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-heading p:not(.eyebrow),
.lead {
  color: var(--muted);
  font-size: 18px;
}

.intro,
.reviews,
.care {
  background: linear-gradient(180deg, #fbf7f0, var(--bg));
}

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

.service-card,
.benefit,
.work-card,
.review-card,
.care-card,
.process-grid article,
.form {
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}

.service-card {
  overflow: hidden;
}

.service-card picture,
.service-card img {
  width: 100%;
  height: 230px;
}

.service-card img {
  object-fit: cover;
}

.service-card div {
  padding: 24px;
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
}

.benefits,
.works {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}

.benefits-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: center;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.benefit {
  min-height: 150px;
  padding: 28px;
}

.benefit strong {
  display: block;
  margin-bottom: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
}

.benefit span {
  color: var(--muted);
}

.section-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}

.section-row .section-heading {
  margin-bottom: 0;
}

.slider-controls {
  display: flex;
  gap: 12px;
}

.slider-btn {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--dark);
  box-shadow: 0 12px 26px rgba(31,26,21,.16);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.slider-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 4px 24px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: rgba(90,78,64,.48) rgba(90,78,64,.14);
}

.slider-track::-webkit-scrollbar {
  height: 8px;
}

.slider-track::-webkit-scrollbar-track {
  background: rgba(90,78,64,.14);
  border-radius: 999px;
}

.slider-track::-webkit-scrollbar-thumb {
  background: rgba(90,78,64,.48);
  border-radius: 999px;
}

.work-card {
  flex: 0 0 420px;
  overflow: hidden;
  scroll-snap-align: start;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 210px;
}

.before-after figure {
  position: relative;
  margin: 0;
}

.before-after figure + figure {
  border-left: 3px solid #fff;
}

.before-after img {
  width: 100%;
  height: 235px;
  object-fit: cover;
}

.before-after span {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 6px 12px;
  color: #fff;
  background: rgba(20,15,10,.75);
  font-size: 12px;
  font-weight: 900;
}

.work-body {
  padding: 20px;
}

.work-body h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.work-body p {
  margin: 0;
  color: var(--muted);
}

.process {
  background: #fbf7f0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.process-grid article {
  padding: 24px;
}

.process-grid span {
  display: inline-flex;
  margin-bottom: 22px;
  color: var(--brand-dark);
  font-weight: 900;
}

.process-grid h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.process-grid p {
  margin: 0;
  color: var(--muted);
}

.review-card {
  flex: 0 0 320px;
  padding: 24px;
  scroll-snap-align: start;
}

.stars {
  color: #f0a41a;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.review-card p {
  margin: 0 0 20px;
}

.review-card footer {
  color: var(--muted);
  font-weight: 800;
}

.care-card {
  flex: 0 0 360px;
  overflow: hidden;
  scroll-snap-align: start;
}

.care-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.care-card div {
  padding: 22px;
}

.care-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.care-card p {
  margin: 0;
  color: var(--muted);
}

.contacts {
  padding: 86px 0;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(25, 17, 10, .94), rgba(91, 57, 25, .88)),
    url('../img/hero-restauro.jpg') center/cover no-repeat;
}

.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: 50px;
  align-items: center;
}

.contacts-info p {
  max-width: 660px;
  color: rgba(255,255,255,.78);
  font-size: 18px;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
}

.contact-list a,
.contact-list span {
  font-weight: 900;
  color: #fff;
}

.form {
  padding: 28px;
  color: var(--text);
}

.form label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.form input,
.form textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  outline: 0;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--brand);
}

.checkbox {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
}

.checkbox input {
  width: auto;
  margin-top: 4px;
}

.form-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  padding: 28px 0;
  background: var(--dark);
  color: rgba(255,255,255,.72);
}

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

.footer-logo {
  filter: none;
}

@media (max-width: 1100px) {
  .header-contacts { display: none; }

  .service-grid,
  .benefits-layout,
  .contacts-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .container {
    width: min(100% - 32px, 1220px);
  }

  .site-logo {
    height: 48px;
    max-width: 155px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav {
    position: absolute;
    top: 78px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 10px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 13px;
  }

  .hero {
    min-height: 610px;
  }

  .hero-content {
    padding: 86px 0;
  }

  h1 {
    font-size: clamp(39px, 12vw, 58px);
  }

  .section {
    padding: 62px 0;
  }

  .section-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .benefits-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .work-card,
  .review-card,
  .care-card {
    flex-basis: 84vw;
  }

  .before-after img {
    height: 190px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hero-actions .btn {
    width: 100%;
  }

  .service-card picture,
  .service-card img {
    height: 200px;
  }

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

  .before-after figure + figure {
    border-left: 0;
    border-top: 3px solid #fff;
  }

  .before-after img {
    height: 210px;
  }

  .form {
    padding: 22px;
  }
}

.lightbox-card {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.lightbox-card:hover {
  transform: translateY(-4px);
}

.lightbox-card:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 4px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 6, .84);
  backdrop-filter: blur(8px);
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  justify-items: center;
  gap: 12px;
}

.lightbox-image {
  width: 100%;
  max-height: calc(100vh - 170px);
  object-fit: contain;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.lightbox-close,
.lightbox-nav {
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #1b130a;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0,0,0,.28);
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 32px;
  line-height: 1;
  z-index: 3;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  transform: translateY(-50%);
  font-size: 38px;
  line-height: 1;
  z-index: 2;
}

.lightbox-prev {
  left: -26px;
}

.lightbox-next {
  right: -26px;
}

.lightbox-caption,
.lightbox-counter {
  color: #fff;
  text-align: center;
}

.lightbox-caption {
  font-weight: 800;
}

.lightbox-counter {
  color: rgba(255,255,255,.72);
  font-size: 14px;
}

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .lightbox { padding: 16px; }

  .lightbox-close {
    top: 8px;
    right: 8px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 54px;
    transform: none;
  }

  .lightbox-prev { left: 22px; }
  .lightbox-next { right: 22px; }

  .lightbox-image {
    max-height: calc(100vh - 190px);
  }
}


.faq-section {
  background: linear-gradient(180deg, #fbf7f0, var(--bg));
}

.faq-list {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.faq-item {
  border-radius: 22px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 28px;
  font-size: 20px;
  font-weight: 800;
  position: relative;
}

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

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 30px;
  color: var(--brand-dark);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item div {
  padding: 0 28px 24px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 820px) {
  .faq-item summary {
    padding: 20px 22px;
    font-size: 18px;
  }

  .faq-item div {
    padding: 0 22px 22px;
  }
}


.seo-section {
  background: linear-gradient(180deg, #fbf7f0, var(--bg));
}

.seo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 34px;
  align-items: start;
}

.seo-main,
.seo-aside,
.faq-item {
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius);
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
}

.seo-main {
  padding: 34px;
}

.seo-main h2 {
  margin-bottom: 22px;
}

.seo-main p {
  color: var(--muted);
  margin: 0 0 16px;
}

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

.seo-aside {
  padding: 28px;
}

.seo-aside h3 {
  margin-bottom: 16px;
  font-size: 22px;
}

.seo-aside ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.seo-aside li + li {
  margin-top: 10px;
}

.faq-section {
  background: var(--bg);
}

.faq-list {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 58px 24px 28px;
  font-size: 20px;
  font-weight: 800;
  position: relative;
}

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

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand-dark);
  font-size: 30px;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item div {
  padding: 0 28px 24px;
  color: var(--muted);
  line-height: 1.7;
}

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

@media (max-width: 820px) {
  .seo-main,
  .seo-aside {
    padding: 24px;
  }

  .faq-item summary {
    padding: 20px 54px 20px 22px;
    font-size: 18px;
  }

  .faq-item div {
    padding: 0 22px 22px;
  }
}


/* Header phone / hero CTA adjustments */
.mobile-call {
  display: none;
}

.btn-hero-main {
  min-height: 62px;
  padding: 18px 34px;
  font-size: 18px;
}

@media (min-width: 821px) {
  .header-contacts span {
    display: block;
    cursor: default;
    color: inherit;
  }
}

@media (max-width: 820px) {
  .mobile-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    margin-left: auto;
    border-radius: 999px;
    background: var(--brand);
    color: #1e1409;
    font-size: 14px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(203, 165, 108, .28);
  }

  .nav-toggle {
    margin-left: 8px;
  }

  .btn-hero-main {
    width: 100%;
    min-height: 64px;
    font-size: 18px;
  }
}


/* ==========================================================
   CURRENT SERVICE PAGES FIX
   Fixes live pages like:
   /restavraciya-vikon/
   /restavraciya-parketu/
   Uses classes: .content-grid, .card, .side-card,
   .gallery-grid, .related-grid, .related-card
   ========================================================== */

.service-page .section.soft,
.service-page .section.alt,
.service-page #content.section {
  padding: 84px 0;
}

.service-page .section.soft,
.service-page #content.section {
  background: linear-gradient(180deg, #fbf7f0, var(--bg, #f6f0e6));
}

.service-page .section.alt {
  background: #fbf7f0;
}

/* Main archive service content */
.service-page .content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 24px;
  align-items: stretch;
}

.service-page .content-grid > .card,
.service-page .content-grid > .side-card {
  min-width: 0;
}

.service-page .card,
.service-page .side-card {
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius, 22px);
  background: rgba(255,255,255,.82);
  box-shadow: var(--shadow, 0 20px 55px rgba(42, 32, 22, .14));
}

.service-page .content-grid .card,
.service-page .content-grid .side-card {
  padding: 28px;
}

.service-page .content-grid .card h3,
.service-page .content-grid .side-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
}

.service-page .content-grid .card p {
  margin: 0 0 14px;
  color: var(--muted, #71675c);
  font-size: 17px;
  line-height: 1.75;
}

.service-page .content-grid .card p:last-child {
  margin-bottom: 0;
}

.service-page .content-grid ul,
.service-page .side-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted, #71675c);
}

.service-page .content-grid li,
.service-page .side-card li {
  margin: 0 0 10px;
  line-height: 1.6;
}

.service-page .content-grid li:last-child,
.service-page .side-card li:last-child {
  margin-bottom: 0;
}

/* Make the first text card wider when there are several cards */
.service-page .content-grid > .card:first-child {
  grid-column: span 1;
}

/* Gallery */
.service-page .gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.service-page .gallery-grid picture,
.service-page .gallery-grid img {
  width: 100%;
  height: 230px;
}

.service-page .gallery-grid img {
  object-fit: cover;
  border-radius: 18px;
  box-shadow: var(--shadow, 0 20px 55px rgba(42, 32, 22, .14));
}

/* Related services */
.service-page .related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-page .related-card {
  display: flex;
  align-items: center;
  min-height: 86px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--radius, 22px);
  background: rgba(255,255,255,.82);
  color: var(--brand-dark, #7a4e24);
  font-weight: 900;
  line-height: 1.35;
  box-shadow: var(--shadow, 0 20px 55px rgba(42, 32, 22, .14));
  transition: transform .2s ease, box-shadow .2s ease;
}

.service-page .related-card:hover {
  transform: translateY(-3px);
}

/* Hero safety for service pages */
.service-page .hero {
  min-height: 620px;
}

.service-page .hero-content {
  max-width: 850px;
}

.service-page .hero .btn-primary {
  min-height: 58px;
  padding: 16px 30px;
  font-size: 17px;
}

/* Headings */
.service-page .section-heading.center {
  max-width: 880px;
}

.service-page .section-heading .eyebrow:empty {
  display: none;
}

/* Contacts on service pages */
.service-page .contacts .form textarea {
  min-height: 110px;
}

/* Mobile */
@media (max-width: 1100px) {
  .service-page .content-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .service-page .section.soft,
  .service-page .section.alt,
  .service-page #content.section {
    padding: 62px 0;
  }

  .service-page .hero {
    min-height: 590px;
  }

  .service-page .content-grid .card,
  .service-page .content-grid .side-card {
    padding: 22px;
  }

  .service-page .gallery-grid,
  .service-page .related-grid {
    grid-template-columns: 1fr;
  }

  .service-page .gallery-grid picture,
  .service-page .gallery-grid img {
    height: 250px;
  }

  .service-page .related-card {
    min-height: 74px;
  }

  .service-page .hero .btn-primary {
    width: 100%;
  }
}
