/* ---------- Шрифты (лежат локально в static/fonts) ---------- */
@font-face {
  font-family: "Kavoon";
  src: url("../fonts/kavoon-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-300-normal.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

/* ---------- Цвета и размеры из макета ---------- */
:root {
  --panel: #d9af7e;
  --brown: #b1684f;
  --brown-dark: #874c39;
  --line: #a65c43;          /* цвет разделительных линий подобран на глаз */
  --green: #66b14f;
  --green-dark: #608739;
  --open: #2e8e13;
  --closed: #8b2727;
  --accent: #fb5656;
  --row: #f6e4c9;
  --row-cat: #e7c89b;
  --ink: #3b2a22;
  --radius-panel: 63px;
  --radius-btn: 7.5px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 60px;
  font-family: "Montserrat", Arial, sans-serif;
  color: #fff;
  background-color: #ffeeba;
  background-image:
    linear-gradient(180deg, rgba(0, 255, 229, 0.76) 0%, rgba(212, 179, 49, 0.76) 100%),
    url("../img/bg-tile.png");
  background-size: auto, 160px 160px;
  background-position: top left;
}

a { color: inherit; }

/* ---------- Панель (общий вид всех больших блоков) ---------- */
.panel {
  width: min(1277px, calc(100% - 32px));
  margin-inline: auto;
  background: var(--panel);
  border: 5px solid var(--brown);
  border-radius: var(--radius-panel);
  box-shadow: 0 12px 4px rgba(0, 0, 0, 0.6);
}

/* ---------- Плашка 18+ ---------- */
.banner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 40px 15px;
  background: var(--panel);
  border: 5px solid var(--brown);
  border-top: 0;
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
  text-align: center;
  font: 500 14px/17px "Montserrat", Arial, sans-serif;
  color: var(--closed);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 1px 16px 0;
  background: var(--brown);
  border-radius: var(--radius-btn);
  box-shadow: 0 3px 0 var(--brown-dark);
  font: 400 20px/1 "Kavoon", Georgia, serif;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--brown-dark); }
.btn:active { transform: translateY(3px); box-shadow: none; }
.btn[aria-current="page"] { background: #9c5740; box-shadow: 0 3px 0 #74402f; }

.btn-icon {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  background: var(--brown);
  border-radius: var(--radius-btn);
  box-shadow: 0 3px 0 var(--brown-dark);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.btn-icon:hover { transform: translateY(1px); box-shadow: 0 2px 0 var(--brown-dark); }
.btn-icon img { width: 42px; height: 42px; object-fit: contain; display: block; }

.btn-sfw {
  width: 65px;
  height: 45px;
  padding-top: 0;
  background: var(--green);
  box-shadow: 0 3px 0 var(--green-dark);
}
.btn-sfw:hover { box-shadow: 0 2px 0 var(--green-dark); }
.btn-flag img { width: 29px; height: 29px; }

/* ---------- Шапка ---------- */
.header {
  margin-top: 31px;
  min-height: 115px;
  padding: 0 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}
.brand__logo {
  width: 80px;
  height: 80px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.brand__text { display: flex; flex-direction: column; align-items: center; }
.brand__name { font: 400 28.7px/1.34 "Kavoon", Georgia, serif; white-space: nowrap; }
.brand__name span { color: var(--accent); }
.brand__tag { margin-top: -13px; font: 300 22.95px/1.3 "Montserrat", Arial, sans-serif; }

.socials { align-self: start; margin: 23px 0 0 9px; display: flex; gap: 9px; }
.header__right { align-self: start; justify-self: end; display: flex; align-items: center; gap: 19px; margin: 25px 34px 0 0; }

/* ---------- Навигация ---------- */
.nav {
  width: min(1196px, calc(100% - 32px));
  min-height: 57px;
  margin-top: 18px;
  padding: 5px 34px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.nav .btn { width: 133px; padding-inline: 0; }
.nav .btn--right { margin-left: auto; }

/* ---------- Блок приветствия ---------- */
.hero { margin-top: 48px; padding: 33px 40px 20px; text-align: center; }
.hero__lead { margin: 0; font: 400 32px/1.25 "Kavoon", Georgia, serif; }
.hero .rule { margin: 23px auto 12px; }
.rule {
  width: min(1095px, 100%);
  height: 3px;
  margin: 12px auto;
  background: var(--line);
  border-radius: 2px;
}
.hero__status { margin: 0; padding-bottom: 9px; font: 400 40px/1.2 "Kavoon", Georgia, serif; }
.hero__status .is-open { color: var(--open); }
.hero__status .is-closed { color: var(--closed); }
.hero__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 28px; }
.hero__links .btn--wide { width: 204px; padding-inline: 0; }
.hero__links .btn--narrow { width: 100px; padding-inline: 0; }

/* ---------- Секция с ценами и портфолио ---------- */
.section { margin-top: 40px; padding: 25px 86px 54px; }
.section__title { margin: 0; text-align: center; font: 400 36px/1.4 "Kavoon", Georgia, serif; }
.section__title + .rule { margin: 0 auto; }

.table-wrap { margin-top: 22px; overflow-x: auto; }
.prices {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font: 14px/1 Arial, Helvetica, sans-serif;
  color: var(--ink);
}
.prices th, .prices td { border: 1px solid var(--brown); }
.prices th {
  height: 27.5px;
  padding: 0 20px;
  background: var(--brown);
  color: #fff;
  text-align: left;
  font-weight: 700;
}
.prices td { height: 21.5px; padding: 0 20px; background: var(--row); }
.prices th:first-child, .prices td:first-child { width: 75%; }
.prices .cat td { height: 18.5px; background: var(--row-cat); font-weight: 700; }
.prices .price { text-align: right; padding-right: 22px; }

.portfolio-title { margin-top: 11px; }
.thumbs {
  margin-top: 17px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
}
.thumbs img {
  display: block;
  height: 121px;
  width: auto;
  max-width: 283px;
  object-fit: cover;
  border: 1px solid var(--brown);
  border-radius: 10px;
}
.empty { margin: 0; padding: 20px 0; text-align: center; font: 400 20px/1.3 "Kavoon", Georgia, serif; }
.section__more { margin-top: 22px; text-align: center; }
.section__more .btn { width: 247px; padding-inline: 0; }

/* ---------- Страницы галереи ---------- */
.page-section { margin-top: 40px; padding: 25px 86px 52px; }
.gallery-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.gallery-card { display: block; text-decoration: none; text-align: center; }
.gallery-card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 1px solid var(--brown);
  border-radius: 10px;
}
.gallery-card span { display: block; margin-top: 8px; font: 400 18px/1.3 "Kavoon", Georgia, serif; }

.detail { margin-top: 22px; text-align: center; }
.detail img {
  max-width: 100%;
  max-height: 80vh;
  border: 1px solid var(--brown);
  border-radius: 10px;
}
.detail__text { margin: 18px auto 0; max-width: 800px; font: 500 16px/1.5 "Montserrat", Arial, sans-serif; color: var(--ink); }
.back-link { margin-top: 22px; text-align: center; }

/* ---------- Узкие экраны ---------- */
@media (max-width: 1000px) {
  :root { --radius-panel: 36px; }
  .header { grid-template-columns: 1fr; justify-items: center; padding: 18px 20px; }
  .socials, .header__right { align-self: auto; margin: 0; }
  .header__right { justify-self: center; }
  .socials { flex-wrap: wrap; justify-content: center; }
  .nav { flex-wrap: wrap; justify-content: center; padding: 10px 16px 12px; }
  .nav .btn--right { margin-left: 0; }
  .hero { padding: 24px 20px 25px; }
  .hero__lead { font-size: 24px; }
  .hero__status { font-size: 28px; }
  .section, .page-section { padding: 20px 20px 36px; }
  .prices { min-width: 0; }
  .prices th, .prices td { padding-inline: 10px; }
  .prices th:first-child, .prices td:first-child { width: auto; }
  .prices .price { padding-right: 10px; }
  .section__title { font-size: 28px; }
  .banner { padding-inline: 20px; font-size: 12px; line-height: 15px; }
}
