:root {
  --bg: #f5f8fc;
  --bg-alt: #e6eef8;
  --text: #1b2533;
  --muted: #556274;
  --accent: #1f5fa8;
  --accent-dark: #174a85;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 4px 18px rgba(20, 45, 90, .09);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 1em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: .8em 1.4em;
  border-radius: 999px;
  transition: background .2s;
}
.btn:hover, .btn:focus-visible { background: var(--accent-dark); }
.btn--big { font-size: 1.1rem; padding: 1em 1.8em; }
.btn--ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: var(--accent); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
button.btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }

/* Hero */
.hero { padding: 48px 0; background: linear-gradient(160deg, var(--bg) 0%, var(--bg-alt) 100%); }
.hero__inner { display: grid; gap: 32px; align-items: center; }
.hero__eyebrow { color: var(--accent); font-weight: 600; font-size: .95rem; }
.hero__lead { font-size: 1.15rem; color: var(--muted); }
.hero__note { color: var(--muted); font-size: .9rem; margin-top: 1em; }
.hero__logo { margin: 0 auto; width: 100%; max-width: 260px; }

/* Sections */
.section { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.card { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card__icon { font-size: 2rem; display: block; margin-bottom: .3em; }
.cards--problems p { color: var(--muted); }
.problems { display: grid; gap: 16px; }
.problems__img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 20%; border-radius: var(--radius); }
.services__note { color: var(--muted); margin: -1em 0 1.5em; }

.price { display: flex; flex-direction: column; }
.price p { color: var(--muted); }
.price__meta { font-size: .9rem; margin-top: auto; }
.price__value { font-size: 1.5rem; font-weight: 700; color: var(--text) !important; }
.price--accent { outline: 2px solid var(--accent); }

/* About */
.about { display: grid; gap: 32px; align-items: center; }
.gallery__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track img { flex: 0 0 100%; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; }
.gallery__dots { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.gallery__dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--muted); opacity: .35; cursor: pointer; }
.gallery__dots button[aria-current="true"] { background: var(--accent); opacity: 1; }

/* Reviews */
.review blockquote { margin: 0 0 1em; font-style: italic; }
.review__author { color: var(--muted); font-weight: 600; }
.review__stars { color: var(--accent); letter-spacing: 2px; margin-bottom: .5em; }
.reviews-summary { color: var(--accent); font-weight: 700; font-size: 1.15rem; margin: -1em 0 1.5em; }
.reviews-summary:empty { display: none; }
.reviews-empty { color: var(--muted); list-style: none; }
.reviews-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Review form */
.review-form { display: grid; gap: 16px; max-width: 640px; }
.review-form label { display: grid; gap: 6px; font-weight: 600; }
.review-form input:not([type="radio"]):not([type="checkbox"]), .review-form textarea {
  font: inherit; padding: .7em .9em; border: 1px solid #c9d5e4; border-radius: 10px; background: #fff; color: var(--text);
}
.review-form textarea { resize: vertical; }
.review-form .review-form__consent { display: flex; gap: 8px; align-items: start; font-weight: 400; color: var(--muted); }
.review-form__consent input { margin-top: .35em; }
.review-form__trap { position: absolute; left: -9999px; }
.review-form__status { margin: 0; color: var(--muted); }
.review-form__status:empty { display: none; }
.review-form .btn { justify-self: start; }

.rating { border: 0; margin: 0; padding: 0; }
.rating legend { font-weight: 600; padding: 0; margin-bottom: 6px; }
.rating__stars { display: inline-flex; flex-direction: row-reverse; }
.rating__stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating__stars label { font-size: 2.2rem; line-height: 1; color: #c9d5e4; cursor: pointer; padding: 0 2px; }
.rating__stars input:checked ~ label,
.rating__stars label:hover,
.rating__stars label:hover ~ label { color: var(--accent); }
.rating__stars input:focus-visible + label { outline: 2px solid var(--accent); border-radius: 4px; }

/* Topbar (reviews page) */
.topbar { padding: 12px 0; background: var(--bg); border-bottom: 1px solid var(--bg-alt); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar__home { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; text-decoration: none; }
.topbar__home img { width: 36px; height: auto; }
.topbar__title { display: none; }
.topbar__phone { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Admin */
.admin__list { margin-bottom: 32px; }
.admin__actions { display: flex; gap: 8px; }

/* CTA */
.cta { text-align: center; }
.cta__area { color: var(--muted); margin-top: 1.2em; }

.footer { padding: 24px 0 96px; color: var(--muted); font-size: .9rem; text-align: center; }

/* Floating call button (mobile) */
.call-fab {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  text-align: center;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 14px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}

@media (min-width: 600px) {
  .topbar__title { display: inline; }
  .cards--problems, .cards--services, .cards--reviews { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .hero { padding: 88px 0; }
  .hero__inner { grid-template-columns: 1.2fr 1fr; }
  .hero__logo { max-width: 420px; }
  .problems { grid-template-columns: 400px 1fr; }
  .problems__img { height: 100%; aspect-ratio: auto; object-position: 55% 50%; }
  .cards--problems { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--services { grid-template-columns: repeat(3, 1fr); }
  .about { grid-template-columns: 360px 1fr; }
  .call-fab { display: none; }
  .footer { padding-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .gallery__track { scroll-behavior: auto; }
}
