@charset "UTF-8";
/*
 * Повторювані блоки: картки, форми, слайдери, акордеон, модалка, типографіка тексту.
 * Підключається на всіх сторінках разом із main.css.
 */

/* --------------------------------------------------------------- cards ---- */

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--c-bg);
  border-radius: 16px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-card);
}

.card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--c-line);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card__media img {
  transform: scale(1.04);
}

.card__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--c-line) 0%, var(--c-surface) 100%);
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  flex: 1 1 auto;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-family: var(--f-ui);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--c-muted);
}

.card__tag {
  color: var(--c-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card__title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 21px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card__title a:hover {
  color: var(--c-accent);
}

.card__excerpt {
  font-size: 15px;
  line-height: 1.5;
  color: var(--c-body);
}

/* Картка-плитка з фото на весь блок і підписом поверх (категорії, ЖК). */

.tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--c-line);
  isolation: isolate;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.tile:hover img {
  transform: scale(1.05);
}

/* Затемнення тільки в нижній смузі — щоб підпис читався, а фото лишалось чистим. */
.tile::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 80px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 100%);
  pointer-events: none;
}

.tile__label {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 72px;
  padding: 16px;
  color: #fff;
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.12;
}

.tile__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.tile:hover .tile__arrow {
  background: rgba(255, 255, 255, 0.3);
  transform: translateX(3px);
}

.tile__arrow svg {
  width: 16px;
  height: 11px;
  color: #fff;
}

@media (max-width: 640px) {
  .tile {
    aspect-ratio: 4 / 3;
  }

  .tile__label {
    padding: 16px;
  }
}

/* ------------------------------------------------------------- sliders ---- */

/*
 * Горизонтальні каруселі зроблено на scroll-snap: на мобільному це рідний свайп,
 * на десктопі стрілки просто прокручують контейнер. Жодної бібліотеки.
 */

.slider {
  position: relative;
  /*
   * Місце під стрілки з обох боків. Раніше вони стояли на -8px від краю треку:
   * зліва лягали на першу картку, а справа зависали в порожнечі, бо картки
   * не заповнювали трек до кінця. У макеті стрілки винесені в поля секції.
   */
  padding-inline: var(--slider-gutter, 56px);
}

.slider__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--slide-w, 300px);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.slider__track::-webkit-scrollbar {
  display: none;
}

.slider__track > * {
  scroll-snap-align: start;
}

.slider__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--c-line-strong);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #564e4a;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.slider__nav:hover {
  background: #fff;
}

.slider__nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.slider__nav--prev {
  left: 0;
  transform: translateY(-50%);
}

.slider__nav--next {
  right: 0;
  transform: translateY(-50%);
}

.slider__nav svg {
  width: 11px;
  height: 20px;
}

@media (max-width: 1023px) {
  .slider__nav {
    display: none;
  }

  /* Без стрілок поля не потрібні — гортається свайпом. */
  .slider {
    padding-inline: 0;
  }
}

/* --------------------------------------------------------------- forms ---- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field__label {
  font-family: var(--f-ui);
  font-size: 13px;
  color: var(--c-muted);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--c-line);
  font-family: var(--f-ui);
  font-size: 15px;
  color: var(--c-ink);
  transition: box-shadow 0.2s ease;
}

.textarea {
  border-radius: 20px;
  min-height: 110px;
  resize: vertical;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px #e6ddc5, 0 0 0 3px rgba(230, 221, 197, 0.4);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--c-muted);
  opacity: 1;
}

.form-note {
  font-size: 13px;
  line-height: 1.4;
  color: var(--c-muted);
}

/* Contact Form 7 — прибираємо його дефолтні відступи, лишаємо наші поля. */

.wpcf7 form .wpcf7-response-output {
  margin: 12px 0 0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border-width: 1px;
  font-size: 14px;
}

.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--c-line);
  font-family: var(--f-ui);
  font-size: 15px;
}

.wpcf7 textarea {
  border-radius: 20px;
}

.wpcf7 input[type="submit"] {
  min-height: 52px;
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--c-navy);
  color: #fff;
  font-family: var(--f-ui);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.wpcf7 input[type="submit"]:hover {
  background: var(--c-navy-hover);
}

/* --------------------------------------------------------------- modal ---- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 27, 48, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal__dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  border-radius: 24px;
  background: var(--c-surface);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4);
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #454545;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

@media (max-width: 480px) {
  .modal__dialog {
    padding: 32px 20px;
  }
}

/* ----------------------------------------------------------- accordion ---- */

.accordion {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--c-line);
}

.accordion__item {
  border-bottom: 1px solid var(--c-line);
}

.accordion__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 64px;
  padding: 18px 0;
  border: 0;
  background: transparent;
  font-family: var(--f-display);
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
  color: var(--c-ink);
}

.accordion__trigger:hover {
  color: var(--c-accent);
}

.accordion__icon {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.accordion__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.accordion__trigger[aria-expanded="true"] .accordion__icon::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(0deg);
}

.accordion__panel {
  padding: 0 0 24px;
  max-width: 74ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-body);
}

/* ---------------------------------------------------------- pagination ---- */

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.pagination__list a,
.pagination__list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 50%;
  font-family: var(--f-ui);
  font-size: 14px;
  color: var(--c-ink);
  transition: background 0.2s ease, color 0.2s ease;
}

.pagination__list a:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--c-accent);
}

.pagination__list .current {
  background: var(--c-navy);
  color: #fff;
}

/* --------------------------------------------------------------- prose ---- */

.prose {
  max-width: 74ch;
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-body);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--f-display);
  font-weight: 400;
  color: var(--c-ink);
  line-height: 1.2;
  margin-top: 1.8em;
}

.prose h2 {
  font-size: clamp(24px, 2.4vw, 34px);
}

.prose h3 {
  font-size: clamp(20px, 1.8vw, 26px);
}

.prose a {
  color: var(--c-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--c-ink);
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose img,
.prose figure {
  border-radius: 16px;
  overflow: hidden;
}

.prose blockquote {
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--c-accent);
  font-family: var(--f-display);
  font-size: 1.15em;
  line-height: 1.4;
  color: var(--c-ink);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-line);
  text-align: left;
}

/* ------------------------------------------------------------ утиліти ----- */

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  text-align: center;
  max-width: 60ch;
  margin-inline: auto;
}

.section-head--left {
  align-items: flex-start;
  text-align: left;
  max-width: none;
  margin-inline: 0;
}

/* Заголовок ліворуч, підзаголовок праворуч на одному рядку — як у секціях макета. */
.section-head--split {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 32px;
  max-width: none;
  margin-inline: 0;
  text-align: left;
}

/* Спільний стиль заголовків секцій головної. */
.section-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--c-navy);
  text-wrap: balance;
}

.section-subtitle {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.48;
  color: var(--c-navy);
}

.text-muted {
  color: var(--c-muted);
}

.empty-state {
  padding: 48px 24px;
  border: 1px dashed var(--c-line-strong);
  border-radius: 16px;
  text-align: center;
  color: var(--c-muted);
}

/* ------------------------------------------------------------------ CTA --- */

.home-cta {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 72px 64px 62px;
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background: var(--c-navy);
}

.home-cta__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(5, 27, 48, 0.82) 0%, rgba(5, 27, 48, 0.45) 100%);
}

.home-cta__title {
  max-width: 20ch;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.home-cta__title em {
  font-style: italic;
  color: var(--c-accent-pale);
}

.home-cta__text {
  max-width: 52ch;
  font-size: clamp(15px, 1.2vw, 17px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
}

.home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  margin-top: 24px;
}

.home-cta__form {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

/* Поля всередині CTA — скляні, на темному фото. */
.home-cta__form .wpcf7 form,
.home-cta__form .wpcf7-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.home-cta__form .wpcf7 p {
  margin: 0;
}

.home-cta__form .wpcf7 input[type="tel"],
.home-cta__form .wpcf7 input[type="text"] {
  width: 227px;
  min-height: 58px;
  border-radius: 43px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  color: #efefef;
}

.home-cta__form .wpcf7 input::placeholder {
  color: rgba(239, 239, 239, 0.8);
}

.home-cta__form .wpcf7 input[type="submit"] {
  min-width: 224px;
  min-height: 58px;
  background: #f9f6ef;
  color: #141414;
  box-shadow: var(--shadow-cta);
}

.home-cta__form .wpcf7 input[type="submit"]:hover {
  background: #fff;
}

/* Приховані технічні поля не мають лишати порожній рядок. */
.home-cta__form .wpcf7 p:has(> .wpcf7-form-control-wrap input[type="hidden"]) {
  display: none;
}

.home-cta__link {
  display: inline-flex;
  align-items: center;
  gap: 21px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 45px;
  background: rgba(0, 0, 0, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24), 0 5px 12px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  transition: background 0.25s ease;
}

.home-cta__link:hover {
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
}

.home-cta__link svg {
  width: 16px;
  height: 11px;
}

@media (max-width: 1023px) {
  .home-cta {
    padding: 48px 28px;
  }
}

@media (max-width: 640px) {
  .home-cta {
    padding: 36px 20px;
    border-radius: 20px;
  }

  .home-cta__form .input {
    min-width: 0;
    flex: 1 1 100%;
  }

  .home-cta__form .btn {
    width: 100%;
  }
}


/* --------------------------------------------- спільні дрібні блоки ------- */

/* Заголовок сторінки блогу — той самий стиль на «Контактах». */
.blog-title {
  font-family: var(--f-display);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.1;
  text-align: center;
  color: var(--c-navy);
}

/* Заглушка, поки не задано токен Mapbox (етап 2). */
.catalog__map-stub {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--c-muted);
  background: repeating-linear-gradient(45deg, #e8e6e1 0 12px, #edebe7 12px 24px);
}

/* Підпис про згоду під формою — дрібний, не сперечається з кнопкою. */
.form-consent {
  margin: 10px 0 0;
  font-family: var(--f-ui);
  font-size: 12px;
  line-height: 1.45;
  color: rgba(37, 37, 37, 0.6);
}

.form-consent a {
  color: inherit;
  text-decoration: underline;
}
