﻿:root {
  --bg: #f4f5f4;
  --surface: #ffffff;
  --surface-soft: #f8f8f8;
  --ink: #1f2630;
  --muted: #5f6672;
  --line: #d8dde3;
  --accent: #d76b1a;
  --accent-2: #213449;
  --ok: #1f7a5a;
  --site-bg-color: #2f343a;
  --site-grid-color: rgba(255, 255, 255, 0.02);
  --site-grid-step: 26px;
  --site-pattern-url: url("patterns/pattern-clear.svg?v=20260214-2");
  --site-pattern-size: 360px 360px;
  --site-photo-url: none;
  --site-photo-overlay: none;
  --site-photo-tail-gradient: none;
  --outside-heading-color: #15253a;
  --outside-subtitle-color: #5e6876;
  --outside-footer-color: #5f6672;
  --outside-link-color: #213449;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(20, 32, 45, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PT Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: var(--site-bg-color);
  background-image:
    var(--site-photo-tail-gradient),
    var(--site-photo-overlay),
    var(--site-photo-url),
    linear-gradient(var(--site-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--site-grid-color) 1px, transparent 1px),
    var(--site-pattern-url);
  background-size:
    100% 100%,
    cover,
    cover,
    var(--site-grid-step) var(--site-grid-step),
    var(--site-grid-step) var(--site-grid-step),
    var(--site-pattern-size);
  background-position: 0 0, center center, center center, 0 0, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, repeat;
  background-attachment: scroll, scroll, scroll, scroll, scroll, scroll;
  min-height: 100vh;
}

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

a {
  color: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 245, 244, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(5px);
}

.nav-wrap {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  font-size: clamp(1.05rem, 1.7vw, 1.35rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

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

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--line);
  background: #fff;
  outline: none;
}

.header-quick-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.header-phone-link {
  text-decoration: none;
  font-weight: 700;
  color: #1a2c40;
  border: 1px solid #d0d9e4;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  white-space: nowrap;
  background: #fff;
}

.header-callback-btn {
  min-height: 36px;
  padding: 0.5rem 0.78rem;
  white-space: nowrap;
}

.section {
  padding: clamp(2rem, 3.7vw, 3.3rem) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  align-items: stretch;
}

.hero-card,
.image-card,
.panel,
.widget,
.contacts-card,
.legal-card,
.seo-card,
.note-card,
.admin-panel {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: clamp(1rem, 2.2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

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

.chip {
  background: #edf2f7;
  color: #223246;
  border: 1px solid #d3dde7;
  border-radius: 999px;
  padding: 0.28rem 0.66rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-title {
  margin: 0;
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  line-height: 1.1;
  font-size: clamp(1.75rem, 4.1vw, 2.8rem);
  letter-spacing: 0.015em;
}

.hero-text {
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.15rem);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  text-decoration: none;
  padding: 0.68rem 0.95rem;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(20, 32, 45, 0.14);
  outline: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}

.btn-light {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.image-card {
  overflow: hidden;
  min-height: 290px;
  background: #dde3ea;
  position: relative;
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33, 52, 73, 0.05), rgba(33, 52, 73, 0.3));
  pointer-events: none;
}

.image-caption {
  margin: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.75rem 0.9rem;
  color: #ffffff;
  font-size: 0.9rem;
  line-height: 1.32;
  background: linear-gradient(180deg, rgba(17, 27, 40, 0), rgba(17, 27, 40, 0.72));
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.section-title {
  margin: 0;
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  font-size: clamp(1.2rem, 2.05vw, 1.8rem);
}

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

body:not(.admin-page) main .section-head .section-title {
  color: var(--outside-heading-color);
}

body:not(.admin-page) main .section-head .section-subtitle {
  color: var(--outside-subtitle-color);
}

.panel,
.widget,
.contacts-card,
.legal-card,
.seo-card,
.note-card,
.admin-panel {
  padding: 1rem;
}

.table-wrap {
  overflow-x: auto;
}

.prices-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.prices-table th,
.prices-table td {
  text-align: left;
  padding: 0.78rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.prices-table th {
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  font-size: 0.84rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--surface-soft);
}

.prices-table tr:last-child td {
  border-bottom: none;
}

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

.widget h3,
.seo-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  letter-spacing: 0.02em;
}

.widget p {
  margin-top: 0;
  margin-bottom: 0.7rem;
  color: var(--muted);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.62rem;
}

label {
  display: block;
  margin-bottom: 0.32rem;
  font-size: 0.89rem;
  font-weight: 700;
}

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

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c9d1db;
  border-radius: 9px;
  padding: 0.56rem 0.62rem;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

button {
  border: none;
  cursor: pointer;
}

.result {
  margin-top: 0.72rem;
  padding: 0.62rem;
  border-radius: 9px;
  background: #eef8f4;
  border: 1px solid #cfe8de;
  color: #1e5d47;
  font-weight: 700;
}

.result.warn {
  background: #fff3eb;
  border-color: #f2d4bf;
  color: #8f4212;
}

.seo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.keyword-list {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.34rem;
  max-height: 380px;
  overflow-y: auto;
}

.keyword-list li {
  line-height: 1.22;
}

.keyword-list li::marker {
  color: var(--accent);
}

.note-card {
  margin-top: 0.9rem;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.52rem;
}

.contact-list a,
.footer-link {
  color: var(--accent-2);
  font-weight: 700;
}

.inline-note {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  padding: 1.2rem 0 2rem;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.94rem;
}

body:not(.admin-page) .site-footer .footer-wrap {
  color: var(--outside-footer-color);
}

.footer-link {
  text-decoration: none;
}

body:not(.admin-page) .site-footer .footer-link {
  color: var(--outside-link-color);
}

body.modal-open {
  overflow: hidden;
}

.callback-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.callback-modal[hidden] {
  display: none;
}

.callback-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 19, 29, 0.68);
  border: none;
}

.callback-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  border-radius: var(--radius);
  border: 1px solid #d5dbe3;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(9, 17, 28, 0.26);
  padding: 1rem;
}

.callback-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d2d8e1;
  background: #f5f8fb;
  font-size: 1.35rem;
  line-height: 1;
  color: #243244;
}

.callback-form {
  display: grid;
  gap: 0.56rem;
  margin-top: 0.35rem;
}

.callback-form .btn {
  margin-top: 0.3rem;
}

.callback-status {
  margin-top: 0.6rem;
}

.appear {
  opacity: 0;
  transform: translateY(8px);
  animation: appear 0.4s ease forwards;
}

.appear-delay-1 {
  animation-delay: 0.08s;
}

.appear-delay-2 {
  animation-delay: 0.14s;
}

@keyframes appear {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Admin page */
.admin-page .container {
  width: min(1060px, calc(100% - 2rem));
}

.admin-main {
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 0 1.9rem;
}

.admin-panel h2 {
  margin-top: 0;
  font-family: "Oswald", "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.66rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-actions .btn {
  min-width: 170px;
}

.fuel-rows {
  display: grid;
  gap: 0.62rem;
}

.fuel-row {
  display: grid;
  gap: 0.58rem;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.58rem;
  background: var(--surface-soft);
}

.fuel-row .checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.fuel-row .checks label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 400;
}

.fuel-row input[type="checkbox"] {
  width: auto;
}

.status {
  margin: 0;
  font-weight: 700;
}

.admin-page.auth-locked {
  overflow: hidden;
}

.admin-page.auth-locked .admin-main {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(21, 30, 43, 0.64);
  backdrop-filter: blur(3px);
}

.auth-gate[hidden] {
  display: none;
}

.auth-card {
  width: min(500px, 100%);
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.auth-card .section-title {
  margin-top: 0;
}

@media (max-width: 1080px) {
  .hero-grid,
  .grid-3,
  .seo-grid,
  .contacts-grid {
    grid-template-columns: 1fr;
  }

  .image-card {
    min-height: 230px;
  }

  .nav-wrap {
    flex-wrap: wrap;
    row-gap: 0.55rem;
  }

  .nav-links {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1140px, calc(100% - 1.1rem));
  }

  .nav-wrap {
    min-height: auto;
    padding: 0.5rem 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .header-quick-actions {
    width: 100%;
    margin-left: 0;
    justify-content: space-between;
  }

  .header-phone-link {
    flex: 1;
    text-align: center;
  }

  .header-callback-btn {
    width: auto;
  }

  .field-grid,
  .admin-grid,
  .fuel-row {
    grid-template-columns: 1fr;
  }

  .prices-table {
    min-width: 540px;
  }

  .admin-actions .btn {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 430px) {
  .hero-title {
    font-size: clamp(1.5rem, 8vw, 2.2rem);
  }

  .btn {
    width: 100%;
  }

  .header-quick-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-phone-link {
    width: 100%;
  }

  .prices-table {
    min-width: 500px;
  }

  .callback-dialog {
    padding: 0.9rem;
  }
}
