/*
  Стили сайта «Рибне Господарство».
  Основа — дизайн из исходного index.html (был сжат в одну строку, здесь разложен
  по блокам). Помечено «НОВОЕ» то, чего в оригинале не было.
*/

/* ── Цвета и база ─────────────────────────────────────────────────────────── */
:root {
  --navy: #071c2c;
  --navy2: #0d3043;
  --teal: #43d6c2;
  --cream: #f4f7f5;
  --ink: #102c3b;
  --muted: #627681;
  --line: #dfe8e6;
  --white: #fff;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: Manrope, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.container {
  width: min(1160px, calc(100% - 40px));
  margin: auto;
}
/* НОВОЕ: плагин сжатия фото оборачивает <img> в <picture>.
   display: contents — чтобы <picture> не мешал картинке растянуться на блок. */
picture {
  display: contents;
}

/* ── Верхняя полоса и шапка ───────────────────────────────────────────────── */
.topbar {
  background: #041522;
  color: #b6cbd1;
  font-size: 12px;
  padding: 10px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}
.nav {
  background: rgba(7, 28, 44, 0.97);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid #244250;
}
.navinner {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.brandmark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--teal);
  display: grid;
  place-items: center;
  color: #062433;
  flex-shrink: 0;
}
.brandmark svg {
  width: 25px;
}
.brand small {
  display: block;
  color: #9bb5bd;
  font-size: 10px;
  letter-spacing: 1.8px;
  font-weight: 600;
  margin-top: 2px;
}
.links {
  display: flex;
  gap: 25px;
  color: #d4e0e3;
  font-size: 13px;
}
.links a:hover {
  color: var(--teal);
}
.navactions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Мобильное меню. В оригинале стиль кнопки был, а самой кнопки в разметке нет.
   НОВОЕ: кнопка и выпадающий список ссылок (открывает main.js). */
.mobilemenu {
  display: none;
}
.mobilenav a {
  display: block;
  padding: 13px 0;
  color: #d4e0e3;
  font-size: 15px;
  border-bottom: 1px solid #16364a;
}
.mobilenav .btn {
  display: flex;
  margin-top: 14px;
  padding: 14px 21px;
  width: 100%;
  border-bottom: 0;
  font-size: 13px;
  color: #052637;
}
.mobilenav .container {
  padding: 4px 0 18px;
}

/* ── Кнопки ───────────────────────────────────────────────────────────────── */
.btn {
  border: 0;
  border-radius: 999px;
  padding: 14px 21px;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-primary {
  background: var(--teal);
  color: #052637;
}
.btn-outline {
  border: 1px solid #6b8993;
  color: white;
  background: transparent;
}
.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* ── Первый экран ─────────────────────────────────────────────────────────── */
.hero {
  background: var(--navy);
  color: white;
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(7, 28, 44, 0.98) 0%,
    rgba(7, 28, 44, 0.86) 44%,
    rgba(7, 28, 44, 0.18) 100%
  );
  pointer-events: none;
}
/* В оригинале фото было CSS-фоном. Теперь это <img>: его можно сменить
   в админке («Головний екран») и оно сжимается при сборке. */
.heroimg {
  position: absolute;
  inset: 0 0 0 32%;
  opacity: 0.88;
}
.heroimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero .container {
  position: relative;
  z-index: 1;
  padding: 100px 0 94px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: #57dfce;
  display: flex;
  align-items: center;
  gap: 10px;
}
.eyebrow:before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}
.hero h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -3px;
  max-width: 680px;
  margin: 24px 0 20px;
}
.hero h1 span {
  color: var(--teal);
}
.hero p {
  font-size: 16px;
  line-height: 1.8;
  color: #c1d2d8;
  max-width: 520px;
}
.heroactions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.herofoot {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 52px;
  color: #bdd0d5;
  font-size: 12px;
}
.herofoot strong {
  display: block;
  color: white;
  font-size: 19px;
  margin-bottom: 4px;
}

/* ── Общее для секций ─────────────────────────────────────────────────────── */
.section {
  padding: 86px 0;
}
/* НОВОЕ: при переходе по меню заголовок секции не прячется под липкой шапкой */
section[id] {
  scroll-margin-top: 78px;
}
/* Секция сразу после другой секции того же цвета (было style="padding-top:20px") */
.section-tight {
  padding-top: 20px;
}
.sectionhead {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 35px;
}
.kicker {
  color: #168f87;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -1.7px;
  line-height: 1.12;
  margin: 12px 0;
}
.sectionhead p {
  max-width: 440px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

/* ── Каталог ──────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.product {
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  transition: 0.25s;
}
.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px #12384b12;
}
.productimg {
  height: 205px;
  position: relative;
  background: #dbe9e6;
}
.productimg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tag {
  position: absolute;
  left: 16px;
  top: 16px;
  background: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase; /* в данных метка пишется обычным регистром */
}
.productbody {
  padding: 22px;
}
.productbody h3 {
  font-size: 20px;
  margin: 0 0 9px;
  letter-spacing: -0.5px;
}
.productbody p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  min-height: 42px;
}
/* НОВОЕ: метка наличия из админки */
.availability {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 800;
  background: #e3f5f1;
  color: #127a72;
}
.availability[data-status="Під замовлення"] {
  background: #eef2f4;
  color: #4d6672;
}
.availability[data-status="Немає в наявності"] {
  background: #fbeee6;
  color: #a5481a;
}
.price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 18px;
  gap: 10px;
}
.price strong {
  font-size: 14px;
}
.price span {
  font-size: 11px;
  color: var(--muted);
}
.smallbtn {
  border: 1px solid #c9d9d7;
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.smallbtn:hover {
  background: var(--navy);
  color: white;
}

/* ── Про нас (тёмная полоса) ──────────────────────────────────────────────── */
.band {
  background: var(--navy2);
  color: white;
}
.bandinner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.band h2 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin: 14px 0;
}
.band p {
  color: #bfd0d5;
  line-height: 1.8;
  font-size: 14px;
}
.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
}
.check {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: #e1ecee;
  align-items: flex-start;
}
.check b {
  color: var(--teal);
  font-size: 17px;
}
.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.stat {
  border: 1px solid #315466;
  background: #12384b;
  border-radius: 18px;
  padding: 23px;
}
.stat strong {
  display: block;
  font-size: 28px;
  color: var(--teal);
  margin-bottom: 8px;
}
.stat span {
  font-size: 12px;
  line-height: 1.6;
  color: #c0d1d6;
}

/* ── Галерея ──────────────────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  grid-template-rows: 190px 190px;
  grid-auto-rows: 190px; /* НОВОЕ: если фото больше пяти, следующие ряды той же высоты */
  gap: 14px;
}
.gallery a {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #d9e5e3;
}
.gallery a:first-child {
  grid-row: span 2;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: 0.4s;
}
.gallery a:hover img {
  transform: scale(1.05);
}
.gallery span {
  position: absolute;
  left: 15px;
  bottom: 15px;
  background: #061c2bdc;
  color: white;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 11px;
}

/* ── Отзывы ───────────────────────────────────────────────────────────────── */
.reviews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.review {
  background: white;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 20px;
}
.stars {
  color: #d89e31;
  letter-spacing: 3px;
}
.review p {
  font-size: 13px;
  line-height: 1.8;
  color: #526873;
}
.review strong {
  font-size: 13px;
}
.review small {
  display: block;
  color: #87979e;
  margin-top: 5px;
}

/* ── НОВОЕ: вопросы и ответы ──────────────────────────────────────────────── */
.faq {
  display: grid;
  gap: 12px;
  max-width: 860px;
}
.faq details {
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px 22px;
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary:after {
  content: "+";
  color: #168f87;
  font-size: 20px;
  line-height: 1;
}
.faq details[open] summary:after {
  content: "–";
}
.faq p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  white-space: pre-line; /* переносы строк из админки сохраняются */
}

/* ── НОВОЕ: документы ─────────────────────────────────────────────────────── */
.documents {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.document {
  display: block;
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}
.docimg {
  aspect-ratio: 3 / 4;
  background: #eef4f2;
}
.docimg img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.docbody {
  padding: 16px 18px;
  font-size: 13px;
}
.docbody small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}

/* ── Контакты и форма ─────────────────────────────────────────────────────── */
.contact {
  background: #e7efec;
}
.contactgrid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 35px;
  align-items: start;
}
.contactinfo {
  background: var(--navy);
  color: white;
  padding: 32px;
  border-radius: 24px;
}
.contactinfo h3 {
  font-size: 25px;
  margin: 10px 0;
}
.contactinfo p {
  color: #bed0d5;
  font-size: 13px;
  line-height: 1.7;
}
.contactrow {
  border-top: 1px solid #284656;
  padding: 17px 0;
  display: flex;
  gap: 13px;
  font-size: 13px;
}
.contactrow b {
  color: var(--teal);
}
.contactrow a {
  color: var(--teal);
}
.contactactions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
form {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  scroll-margin-top: 100px; /* НОВОЕ: липкая шапка не закрывает форму */
}
.formtitle {
  margin: 0 0 7px;
  font-size: 23px;
}
.formlead {
  color: #71838a;
  font-size: 12px;
  line-height: 1.6;
  margin: 0 0 22px;
}
.formgrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}
.field label {
  font-size: 11px;
  font-weight: 800;
}
.field input,
.field select,
.field textarea {
  border: 1px solid #d8e3e0;
  border-radius: 11px;
  padding: 13px 14px;
  background: #fbfdfc;
  outline: none;
  font-size: 13px;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #1a9c91;
}
.field textarea {
  min-height: 90px;
  resize: vertical;
}
.formsubmit {
  width: 100%;
}
/* НОВОЕ: ловушка для спам-ботов — поле спрятано от людей */
.hp {
  position: absolute;
  left: -9999px;
}
/* НОВОЕ: сообщение после отправки формы */
.formstatus {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
}
.formstatus:empty {
  display: none;
}
.formstatus[data-state="ok"] {
  color: #127a72;
}
.formstatus[data-state="error"] {
  color: #b42318;
}
.mapblock {
  margin-top: 35px;
}
.mapblock h3 {
  margin: 10px 0;
}
.mapblock p {
  font-size: 12px;
  color: #6a7e85;
}
.map {
  margin-top: 20px;
  border: 0;
  width: 100%;
  height: 220px;
  border-radius: 18px;
  filter: grayscale(0.2);
}

/* ── Подвал ───────────────────────────────────────────────────────────────── */
footer {
  background: #041522;
  color: #a9c0c7;
  padding: 28px 0;
  font-size: 11px;
}
.footerinner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footerinner strong {
  color: white;
}

/* ── Планшет ──────────────────────────────────────────────────────────────── */
@media (max-width: 850px) {
  .links {
    display: none;
  }
  .mobilemenu {
    display: block;
    background: transparent;
    color: white;
    border: 1px solid #56717b;
    border-radius: 10px;
    padding: 9px 12px;
    cursor: pointer;
  }
  .navinner {
    height: 68px;
  }
  .hero .container {
    padding: 75px 0;
  }
  .heroimg {
    left: 10%;
    opacity: 0.55;
  }
  .hero:after {
    background: linear-gradient(
      90deg,
      rgba(7, 28, 44, 0.97),
      rgba(7, 28, 44, 0.65)
    );
  }
  .grid,
  .reviews {
    grid-template-columns: repeat(2, 1fr);
  }
  .documents {
    grid-template-columns: repeat(3, 1fr);
  }
  .bandinner,
  .contactgrid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .gallery {
    grid-template-rows: 160px 160px;
    grid-auto-rows: 160px;
  }
}
/* На широком экране выпадающее меню не нужно, даже если его открыли */
@media (min-width: 851px) {
  .mobilenav {
    display: none;
  }
}

/* ── Телефон ──────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .container {
    width: min(100% - 28px, 1160px);
  }
  .topbar .container {
    font-size: 10px;
  }
  /* НОВОЕ: в шапке остаются логотип и кнопка меню, «Залишити заявку» — внутри меню */
  .navcta {
    display: none;
  }
  .hero h1 {
    letter-spacing: -1.7px;
  }
  .hero .container {
    padding: 62px 0;
  }
  .herofoot {
    gap: 20px;
  }
  .section {
    padding: 60px 0;
  }
  .section-tight {
    padding-top: 10px;
  }
  .sectionhead {
    display: block;
  }
  .grid,
  .reviews {
    grid-template-columns: 1fr;
  }
  .documents {
    grid-template-columns: repeat(2, 1fr);
  }
  .productimg {
    height: 220px;
  }
  .checks {
    grid-template-columns: 1fr;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 180px 130px 130px;
    grid-auto-rows: 130px;
  }
  .gallery a:first-child {
    grid-row: auto;
    grid-column: span 2;
  }
  .formgrid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  form {
    padding: 20px;
  }
  .contactinfo {
    padding: 24px;
  }
  .bandinner {
    gap: 24px;
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 17px;
  }
  .stat strong {
    font-size: 24px;
  }
}
