/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

/* ============================================================
   SERVICE SECTION - GRID LAYOUT & MOUSETRAIL (Vanilla JS Version)
   ============================================================ */

.service__tile-list {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
}

.service-item {
  position: relative;
  padding: var(--space-l) 0;
  cursor: pointer;
  border-bottom: 1px solid var(--bricks-color-grey-200);
  transition: border-color 0.3s ease;
}

/* EN: Hide original images on desktop */
/* UA: Ховаємо оригінальні картинки на десктопі */
@media (min-width: 768px) {
  .service-item__image-wrapper {
    display: none !important;
  }
}

/* ============================================================
   DESKTOP LAYOUT (Grid with display: contents)
   ============================================================ */
@media (min-width: 768px) {
  .service-item__content {
    display: grid !important;
    /* Пропорції: Заголовок (1 частина), Опис (1.5 частини), Іконка (авто) */
    grid-template-columns: 1fr 1.5fr auto !important; 
    gap: var(--space-xl) !important;
    align-items: center !important;
    width: 100% !important;
  }

  /* ПРИМУСОВО "розпаковуємо" хедер, перебиваючи налаштування Bricks */
  .service-item__header {
    display: contents !important; 
  }

  /* Жорстко фіксуємо всі елементи на першому рядку */
  .service-item__title {
    grid-column: 1 !important;
    grid-row: 1 !important; /* Утримує на одній лінії */
    margin: 0 !important;
  }

  .service-item__description {
    grid-column: 2 !important;
    grid-row: 1 !important; /* Утримує на одній лінії */
    padding-right: var(--space-xl) !important;
    margin: 0 !important;
  }

  .service-item__icon {
    grid-column: 3 !important;
    grid-row: 1 !important; /* Утримує на одній лінії */
    margin: 0 !important;
  }
}

/* ============================================================
   MOBILE LAYOUT
   ============================================================ */
@media (max-width: 767px) {
  .service-item__content {
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
  }
  
  .service-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .service-item__image-wrapper {
    width: 100%;
    margin-bottom: var(--space-m);
  }

  .service-item__image-wrapper img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
  }
}

/* ============================================================
   TYPOGRAPHY & ELEMENTS STYLING
   ============================================================ */
.service-item__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem); 
  font-weight: 400; /* Зняли жирність, як на скріншоті */
  margin: 0;
  color: var(--bricks-color-grey-800);
  transition: color 0.3s ease;
  pointer-events: none; 
}

.service-item__description {
  font-family: 'Roboto', sans-serif; /* Або твій базовий шрифт */
  font-size: 1rem;
  line-height: 1.6;
  color: var(--bricks-color-grey-600);
  margin: 0;
  pointer-events: none; 
  transition: color 0.3s ease;
}

/* EN: Icon wrapper styling for the hover effect */
/* UA: Стилізація обгортки іконки для ефекту при наведенні */
.service-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px; 
  height: 56px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--bricks-color-grey-800); /* Колір самої стрілки */
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

/* ============================================================
   HOVER STATES (Triggers via JS .is-active class)
   ============================================================ */

/* Ефект для стрілочки: круглий фон і зміна кольору іконки на білий */
.service-item.is-active .service-item__icon {
  background-color: #B8860B; /* Твій золотий колір */
  color: #ffffff;
  transform: scale(1.05); /* Легке збільшення */
}

/* За бажанням: легка зміна кольору тексту при наведенні */
.service-item.is-active .service-item__title {
  color: #B8860B;
}
.service-item.is-active .service-item__description {
  color: var(--bricks-color-grey-800);
}

/* ============================================================
   FLOATING IMAGE (Mousetrail logic)
   ============================================================ */
.mouse-trail-image {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 420px;
  object-fit: cover;
  border-radius: 12px;
  pointer-events: none; 
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -50%) scale(0.5);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.mouse-trail-image.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/*CTA FLUENT FORM HOME*/
/* ================================================================
   CTA FORM SECTION — Bricks Builder + FluentForm v2
   Pixel-perfect button + full animation system
   ================================================================ */

/* ─── 1. СЕКЦІЯ ─────────────────────────────────────────────── */

.cta-form__section {
  padding: 80px 0;
  overflow: hidden;
}

/* ─── 2. FLEX-ОБГОРТКА ──────────────────────────────────────── */

.cta-form__wrap-content {
  display: flex;
  align-items: stretch;
  gap: 48px;
}

/* ─── 3. БЛОК ЗОБРАЖЕННЯ ────────────────────────────────────── */

.cta-form__wrap-img {
  flex: 0 0 40%;
  max-width: 40%;
}

.cta-form__inner-img {
  border-radius: 20px;
  overflow: hidden;
  height: 100%;
  position: relative;
}

.cta-form__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.cta-form__inner-img:hover .cta-form__img {
  transform: scale(1.04);
}

/* ─── 4. БЛОК ФОРМИ ─────────────────────────────────────────── */

.cta-form__wrap-content-form {
  flex: 1;
  min-width: 0;
}

.cta-form__wrap-inner-form {
  background: var(--primary-l-4);
  border-radius: 24px;
  padding: 48px 52px 52px;
  height: 100%;
  box-sizing: border-box;
  position: relative;
}

/* ─── 5. ЗАГОЛОВОК ──────────────────────────────────────────── */

.cta-form__title {
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 32px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.cta-form__title .italik {
  font-style: italic;
  color: var(--primary);
  font-weight: 600;
}

/* ─── 6. FLUENT FORM — ЗАГАЛЬНИЙ РЕСЕТ ──────────────────────── */

.cta-form__form .fluentform,
.cta-form__form .ff-default,
.cta-form__form .ffs_default_wrap {
  width: 100%;
}

.cta-form__form .ff-el-form-hide_label .ff-el-input--label,
.cta-form__form .ff-el-input--label {
  display: none !important;
}

.cta-form__form .ff-el-group {
  margin-bottom: 0;
  width: 100%;
}

.cta-form__form .ff-t-container.ff-column-container {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.cta-form__form .ff-t-cell {
  min-width: 0;
  flex: 1 1 0;
}

/* ─── 7. ПОЛЯ ВВОДУ ─────────────────────────────────────────── */

.cta-form__form .ff-el-form-control {
  width: 100% !important;
  background: #ffffff;
  border: 1.5px solid #e2e2e2;
  border-radius: 50px;
  padding: 13px 22px;
  font-size: 15px;
  line-height: 1.5;
  color: #2c2c2c;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition:
    border-color   0.25s ease,
    box-shadow     0.25s ease,
    transform      0.2s  cubic-bezier(0.34, 1.56, 0.64, 1),
    background     0.2s  ease;
}

.cta-form__form .ff-el-form-control::placeholder {
  color: #ababab;
  font-size: 14px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cta-form__form .ff-el-form-control:hover {
  border-color: var(--primary);
  background: #fefef9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cta-form__form .ff-el-form-control:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow:
    0 0 0 4px rgba(180, 142, 60, 0.14),
    0 2px 8px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
}

.cta-form__form .ff-el-form-control:focus::placeholder {
  opacity: 0;
  transform: translateX(6px);
}

.cta-form__form textarea.ff-el-form-control {
  border-radius: 16px;
  resize: none;
  min-height: 140px;
  padding: 16px 22px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.cta-form__form textarea.ff-el-form-control:focus {
  transform: translateY(-2px);
}

.cta-form__form select.ff-el-form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  padding-right: 44px;
  cursor: pointer;
}

.cta-form__form select.ff-el-form-control:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23c9a84c' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ─── 8. ITI PHONE ──────────────────────────────────────────── */

.cta-form__form .iti {
  width: 100%;
  display: block;
}

.cta-form__form .iti__tel-input {
  width: 100% !important;
  border-radius: 50px !important;
}

.cta-form__form .iti--allow-dropdown input {
  padding-left: 50px !important;
}

/* ================================================================
   ─── 9. КНОПКА SUBMIT — PIXEL-PERFECT ───────────────────────────
   Структура: [  Надіслати повідомлення  (→)  ]
   Текст зліва, біле коло зі стрілкою справа впритул до краю
   ================================================================ */

.cta-form__form .ff_submit_btn_wrapper {
  margin-top: 8px;
}

/* Скидаємо ВСІ дефолтні fluent form стилі кнопки */
.cta-form__form .ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style,
.cta-form__form .ff-btn-submit {
  /* Скидання */
  all: unset;
  box-sizing: border-box;

  /* Flex — текст зліва, коло справа */
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  /* Кольори */
  background-color: var(--primary, #c9a84c);
  color: #ffffff;

  /* Форма — пілюля */
  border-radius: 50px;

  /* Padding: зліва — простір під текст, справа — впритул до кола */
  padding: 9px 9px 9px 28px;

  /* Мінімальна ширина відповідно до дизайну */
  min-width: 260px;

  /* Типографіка */
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.2px;
  white-space: nowrap;
  line-height: 1;

  cursor: pointer;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;

  /* Анімація */
  transition:
    background-color 0.3s ease,
    transform        0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow       0.3s ease;
}

/* ── БІЛЕ КОЛО ЗІ СТРІЛКОЮ ────────────────────────────────────
   ::after = білий круг 42×42px з темною стрілкою всередині
   ─────────────────────────────────────────────────────────── */
.cta-form__form .ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style::after,
.cta-form__form .ff-btn-submit::after {
  content: "→";

  /* Розміри кола — рівно 42×42px (кнопка 60px, padding 9px вгорі/внизу) */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;

  /* Стиль кола */
  background-color: #ffffff;
  border-radius: 50%;

  /* Стрілка */
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;

  /* Анімація стрілки */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── HOVER ── */
.cta-form__form .ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style:hover,
.cta-form__form .ff-btn-submit:hover {
  background-color: var(--primary-dark, #b8942e);
  transform: translateY(-3px);
  box-shadow:
    0 10px 28px rgba(180, 142, 60, 0.42),
    0 3px  8px  rgba(180, 142, 60, 0.25);
}

/* Стрілка зсувається вправо при hover */
.cta-form__form .ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style:hover::after,
.cta-form__form .ff-btn-submit:hover::after {
  transform: translateX(4px);
}

/* ── ACTIVE (click) ── */
.cta-form__form .ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style:active,
.cta-form__form .ff-btn-submit:active {
  transform: translateY(0) scale(0.96);
  box-shadow:
    0 3px 10px rgba(180, 142, 60, 0.3),
    0 1px 3px  rgba(180, 142, 60, 0.15);
  transition-duration: 0.1s;
}

/* Стрілка повертається при click */
.cta-form__form .ff-btn.ff-btn-submit.ff-btn-md.ff_btn_style:active::after,
.cta-form__form .ff-btn-submit:active::after {
  transform: translateX(1px);
}

/* ── LOADING стан ── */
.cta-form__form .ff-btn-submit.ff-loading,
.cta-form__form .ff-btn-submit[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.cta-form__form .ff-btn-submit.ff-loading::after {
  content: "";
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: ff-spin 0.7s linear infinite;
  background: transparent;
  font-size: 0;
}

@keyframes ff-spin {
  to { transform: rotate(360deg); }
}

/* ─── 10. СТАНИ ВАЛІДАЦІЇ ────────────────────────────────────── */

.cta-form__form .ff-el-is-error .ff-el-form-control {
  border-color: #d94f4f !important;
  box-shadow:
    0 0 0 3px rgba(217, 79, 79, 0.13),
    0 1px 3px rgba(0, 0, 0, 0.04) !important;
  animation: ff-shake 0.35s ease;
}

.cta-form__form .error.text,
.cta-form__form .ff-field__help {
  color: #d94f4f;
  font-size: 12px;
  margin-top: 5px;
  padding-left: 14px;
  display: block;
  animation: ff-fadeInDown 0.2s ease;
}

.cta-form__form .ff-message-success {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 16px;
  padding: 24px 28px;
  border-left: 4px solid var(--primary);
  color: #2c2c2c;
  font-size: 15px;
  animation: ff-fadeInUp 0.4s ease;
}

/* ─── 11. KEYFRAMES ─────────────────────────────────────────── */

@keyframes ff-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}

@keyframes ff-fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes ff-fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── 12. АДАПТИВНІСТЬ ──────────────────────────────────────── */

@media (max-width: 991px) {
  .cta-form__wrap-content {
    flex-direction: column;
    gap: 32px;
  }
  .cta-form__wrap-img {
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 380px;
    border-radius: 20px;
    overflow: hidden;
  }
  .cta-form__wrap-inner-form {
    padding: 36px 36px 40px;
  }
}

@media (max-width: 640px) {
  .cta-form__section {
    padding: 48px 0;
  }
  .cta-form__wrap-inner-form {
    padding: 28px 20px 32px;
    border-radius: 16px;
  }
  .cta-form__form .ff-t-container.ff-column-container {
    flex-direction: column;
    gap: 12px;
  }
  .cta-form__form .ff-t-cell {
    flex-basis: 100% !important;
    width: 100% !important;
  }
  .cta-form__form .ff-btn-submit {
    width: 100%;
    min-width: unset;
  }
  .cta-form__title {
    font-size: 28px;
    margin-bottom: 24px;
  }
}

/*----------------- 13 button hero--------------------------*/
/* =================================================
   CTA Buttons — Hover Animations
   .btn__round-arrow  (Контакти)
   .btn__round-call   (Зателефонувати зараз)
   ================================================= */

/* -------------------------------------------------
   ЗАГАЛЬНА BASE — transition для обох
   ------------------------------------------------- */

.btn.brxe-button {
  position: relative !important;
  overflow: hidden !important;
  transition:
    background-color .3s ease,
    border-color .3s ease,
    color .3s ease,
    transform .2s ease,
    box-shadow .3s ease !important;
}

/* SVG іконка — transition для плавного руху */
.btn.brxe-button svg {
  transition: transform .35s cubic-bezier(.34,1.56,.64,1) !important;
  flex-shrink: 0;
}

/* Shimmer-ефект (спільний) */
.btn.brxe-button::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 70%
  ) !important;
  background-size: 200% 100% !important;
  background-position: -100% 0 !important;
  transition: background-position .55s ease !important;
  border-radius: inherit !important;
  pointer-events: none !important;
}

.btn.brxe-button:hover::before {
  background-position: 200% 0 !important;
}

/* -------------------------------------------------
   КНОПКА 1 — .btn__round-arrow (Контакти)
   Базові стилі: border grey-100, bg secondary (#0b2b1b)
   ------------------------------------------------- */

.btn__round-arrow.brxe-button:hover {
  background-color: #c79855 !important;   /* gold при hover */
  border-color: #c79855 !important;
  color: #0b2b1b !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(199, 152, 85, 0.30) !important;
}

/* Стрілка — зсув вправо */
.btn__round-arrow.brxe-button:hover svg {
  transform: translateX(5px) !important;
}

/* Active */
.btn__round-arrow.brxe-button:active {
  transform: translateY(0) !important;
  box-shadow: 0 4px 14px rgba(199, 152, 85, 0.18) !important;
}

/* -------------------------------------------------
   КНОПКА 2 — .btn__round-call (Зателефонувати зараз)
   Базові стилі: bg grey-100 (світла кнопка)
   ------------------------------------------------- */

.btn__round-call.brxe-button {
  transition:
    background-color .3s ease,
    color .3s ease,
    transform .2s ease,
    box-shadow .3s ease !important;
}

.btn__round-call.brxe-button:hover {
  background-color: #0b2b1b !important;   /* dark green при hover */
  color: #c79855 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(11, 43, 27, 0.22) !important;
}

/* Іконка телефону — лёгке покачування */
.btn__round-call.brxe-button:hover svg {
  transform: rotate(-15deg) scale(1.1) !important;
}

/* Active */
.btn__round-call.brxe-button:active {
  transform: translateY(0) !important;
  box-shadow: 0 4px 14px rgba(11, 43, 27, 0.14) !important;
}

/* -------------------------------------------------
   ІКОНКИ — колір при hover (SVG path)
   ------------------------------------------------- */

.btn__round-arrow.brxe-button svg path {
  transition: fill .3s ease !important;
}

.btn__round-arrow.brxe-button:hover svg path {
  fill: #0b2b1b !important;
}

.btn__round-call.brxe-button svg path {
  transition: fill .3s ease !important;
}

.btn__round-call.brxe-button:hover svg path {
  fill: #c79855 !important;
}

/*---------- 14 Contacts block ----------*/
/* =================================================
   Contact List — Hover Animations
   .list__contact — сайдбар сторінки статті
   ================================================= */

/* -------------------------------------------------
   РЯДОК — transition для всього li
   ------------------------------------------------- */

.list__contact li .content {
  transition: transform .25s ease !important;
}

.list__contact li a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  text-decoration: none !important;
  transition:
    color .25s ease,
    gap .3s ease !important;
}

/* -------------------------------------------------
   ІКОНКА — підсвічування при hover
   ------------------------------------------------- */

.list__contact .icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1) !important;
}

.list__contact .icon svg path {
  transition: fill .25s ease !important;
}

/* -------------------------------------------------
   HOVER на a — колір + зсув
   ------------------------------------------------- */

.list__contact li a:hover {
  color: #c79855 !important;
  gap: 4px !important;
}

.list__contact li a:hover .icon {
  transform: scale(1.2) rotate(-8deg) !important;
}

.list__contact li a:hover .icon svg path {
  fill: #e8b06a !important;   /* трохи світліший gold */
}

/* Текст посилання */
.list__contact li a .title {
  transition:
    color .25s ease,
    transform .25s ease !important;
  display: inline-block !important;
}

.list__contact li a:hover .title {
  transform: translateX(3px) !important;
  color: #c79855 !important;
}

/* -------------------------------------------------
   SEPARATOR — золота лінія при hover
   ------------------------------------------------- */

.list__contact li .separator {
  display: block !important;
  height: 1px !important;
  background: currentColor !important;
  opacity: .12 !important;
  transition:
    opacity .3s ease,
    background-color .3s ease !important;
}

.list__contact li:hover .separator {
  opacity: .30 !important;
  background: #c79855 !important;
}

/* -------------------------------------------------
   Рядок без посилання (.title без a) — не анімуємо
   ------------------------------------------------- */

.list__contact li .content > .title {
  transition: none !important;
  transform: none !important;
}