:root { --nudge-fade-ms: 240ms; }
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: "Times New Roman", serif;
    font-size: 20px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.2px;
    color: #2a2a2a;
    background-color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #dddbda; /* Щоб бачити зазори, якщо вони будуть */
    box-sizing: border-box;
}

a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
}

a:hover {
    color: #9D5248;
}

header {
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #ffffff;
    backdrop-filter: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    box-sizing: border-box;
    transition: transform 0.3s ease-in-out, background-color 0.4s ease-in-out, backdrop-filter 0.4s ease-in-out;
    border-bottom: none; /* Видаляємо білу лінію */
}


.navigation-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 1;
  gap: 18px;
  padding: 0 10px;
}

.nav-link {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  color: #9d5248;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #6e3d34;
}

.navigation-container .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 12px;
}

.navigation-container .logo img {
  height: 65px;
  width: auto;
}

header.transparent {
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

/* Вирівнюємо всі елементи header */
header .container {
    display: flex;
    width: 100%;
    max-width: 1200px; /* Обмеження ширини */
    margin: 0 auto;
    align-items: center;
    justify-content: space-between;
}

/* Центруємо логотип */
.logo {
    display: flex;
    justify-content: center;
    flex-grow: 1;
}

.logo a {
    display: inline-block;
    height: 100%;
}

.logo img {
    display: block; /* Це ключове! */
    height: 65px;
    width: auto;
}

/* Вирівнюємо мовну іконку */
.language {
    transition: transform 0.15s ease, filter 0.15s ease;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Запобігає збільшенню */
}


.language.active {
    transform: scale(0.92);
    filter: brightness(0.8);
}


.language img {
    width: 100%;
    height: 100%;
    max-width: 45px;
    max-height: 45px;
    object-fit: contain; /* Запобігає розтягуванню */
}

/* Виправляємо menu */
.menu {
    display: none;
    position: relative;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 1100;
}

.menu div {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 3.38px;
    background-color: #9d5248;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform: translate(-50%, -50%);
    transform-origin: center;
}

/* ─ Верхня паличка ─ */
.menu div:nth-child(1) {
    transform: translate(-50%, -18px);
}

/* ─ Середня ─ */
.menu div:nth-child(2) {
    transform: translate(-50%, -50%);
}

/* ─ Нижня ─ */
.menu div:nth-child(3) {
    transform: translate(-50%, 14px);
}

/* ─ АКТИВНИЙ СТАН ─ */
.menu.active div:nth-child(1),
.menu.active div:nth-child(3) {
    width: 51px; /* ⬅ діагональ 36x36 */
    transform: translate(-50%, -50%) rotate(45deg);
}

.menu.active div:nth-child(2) {
    opacity: 0;
}

.menu.active div:nth-child(3) {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Фіксуємо main під header */
main {
    margin: 0;
    padding: 80px 0 0 0; /* ↑ тільки зверху */
    background-color: #dddbda;
    min-height: 50vh;
    position: relative;
    z-index: 1;
}


.main-content {
    margin-top: 4vh;
}

.simple-title {
    text-align: center;
    font-family: "Times New Roman", serif;
    font-size: 2rem;
    color: #9D5248;
    margin-top: 30px;
    margin-bottom: -10px;
  }

/* #ccbbb0;*/
/* Футер */
footer.footer {
    position: relative;
    height: 80px;
    background-color: #ffffff;
    font-family: "Times New Roman", serif;
    color: #9D5248;
    border-top: 1px solid #ccc;
    padding: 0 12px;
    display: flex;
    align-items: center;         /* ⬅️ вертикальне центрування */
    justify-content: center;     /* ⬅️ горизонтальне центрування */
    box-sizing: border-box;
    font-size: 1.10rem;          /* ⬅️ на ще 5% більше */
  }
  
  footer.footer p {
    margin: 0;
    line-height: 1;
    display: inline-block;
  }
  
  .footer-icons {
    display: flex;
    gap: 10px;
    margin-left: 25px;
  }
  
  footer.footer .social-icon img {
    width: 18px;       /* ⬅️ ще на 5% більше */
    height: 18px;
    filter: grayscale(100%);
    transition: transform 0.3s ease, filter 0.3s ease;
    vertical-align: middle;
    position: relative;
    top: -2.3px;         /* ⬅️ легке коригування вниз */
  }
  
  footer.footer .social-icon:hover img {
    transform: scale(1.15);
    filter: none;
  }
  

.language-menu li a {
    display: block;
    padding: 13px 20px 11px 20px; /* ↑ верх трішки більше, низ трішки менше */
    font-size: 22px;
    font-weight: bold;
    color: #333;
    font-family: "Times New Roman", serif;
    transition: background 0.4s ease;
    height: auto;           /* ❗ скасовуємо жорстке 48px */
    line-height: normal;    /* ❗ повертаємо нормальну висоту */
}

.side-menu li a {
    text-align: right;
    display: block;
    padding: 13px 20px 11px 20px; /* ↑ верх трішки більше, низ трішки менше */
    font-size: 22px;
    font-weight: bold;
    color: #333;
    font-family: "Times New Roman", serif;
    transition: background 0.4s ease;
    height: auto;           /* ❗ скасовуємо жорстке 48px */
    line-height: normal;    /* ❗ повертаємо нормальну висоту */
}


.side-menu li a:hover,
.language-menu li a:hover {
    color: #965248;
    cursor: pointer;
}

/* Потемнення фону */
.side-menu-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    height: calc(100% - 80px);
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 999;
}

/* Меню збоку */
.side-menu {

    position: fixed;
    top: 80px; /* після header */
    right: -100%;
    width: 30%;
    height: calc(100% - 80px);
    background-color: #fff;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    transition: right 0.4s ease;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}


.side-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.side-menu li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    position: relative;
}

.side-menu li::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #5b5a57;
    opacity: 0.5;
}


.side-menu a {
    color: #000000;
    font-size: 22px;
    font-weight: bold;
}

/* Активний стан */
.side-menu.open {
    right: 0;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.language-menu {
    position: fixed;
    top: 80px; /* під header */
    left: -100%;
    width: 30%;
    height: calc(100% - 80px);
    background-color: #fff;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: left 0.4s ease;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.language-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-menu li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    position: relative;
}

.language-menu li::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #5b5a57;
    opacity: 0.5;
}

.language-menu a {
    color: #000000;
    font-size: 22px;
    font-weight: bold;
}

/* Активний стан */
.language-menu.open {
    left: 0;
}

  header.lock-scroll,
  main.lock-scroll,
  footer.lock-scroll {
    width: calc(100% - var(--scrollbar-width));
  }
  
  header, main, footer {
    width: 100%;
    box-sizing: border-box;
  }
  
body.lock-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: var(--scroll-position);
  }
  

/* Ефект при наведенні в бургер-меню */
.side-menu a:hover,
.language-menu a:hover {
    color: #9D5248;
}

.fake-scrollbar {
    position: fixed;
    margin: 0; /* ✅ залишай так */
    top: 0;
    right: 0;
    height: 100%;
    background-color: #ffffff;
    z-index: 999;
    display: none;
    pointer-events: none;
    width: var(--scrollbar-width);
    font-size: 0;
    z-index: 2000; /* вище за overlay */
}

.fake-scrollbar.active {
    display: block;
}

  .fake-space {
    height: 5vh; /* змінюй як треба — наприклад, 150vh або 300vh */
    visibility: hidden;
    pointer-events: none;
  }
  
/*--------------------------*/

.product-showcase {
    display: flex;
    flex-direction: column;
    gap: 40px; /* було 60px */
    padding: 40px 0px 0px 0px;
    max-width: 1440px;
    margin: auto;
  }
  
  .product-block {
    display: flex;
    align-items: center; /* центрує по вертикалі */
    justify-content: space-between;
    flex-wrap: wrap;
    background-color: #ffffff;
    min-height: 420px; /* 🧩 це — мінімум! */
  }
  
  
  
  .product-block.reverse {
    flex-direction: row-reverse;
  }
  
  .product-image {
    flex: 1 1 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    max-height: 100%;
  }
  
  .product-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 100%; /* адаптується в межах блоку */
  }
  
  
  
  .product-text {
    flex: 1 1 45%;
    text-align: center;
    padding: 20px;
    font-family: "Times New Roman", serif;
    color: #9D5248; /* ← коричневий */
  }
  
  .product-text h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 20px;
    font-family: "Times New Roman", serif;
    color: #9D5248;
  }
  
  .product-text p {
    font-size: 1.3rem;
    margin-bottom: 0;
    line-height: 1.6;
    font-family: "Times New Roman", serif;
    color: #9D5248;
  }
  
  /* ❌ повністю прибираємо кнопку */
  .btn-learn {
    display: none;
  }

  .product-btn {
    display: inline-block;
    margin-top: 25px;
    margin-bottom: 25px;
    padding: 10px 24px;
    font-size: 16px;
    font-family: "Times New Roman", serif;
    color: #8a635e; /* основний коричневий */
    background-color: transparent;
    border: 1.9px solid #9D5248;
    text-decoration: none;
    transition: all 0.2s ease;
  }
  
  .product-btn:hover {
    background-color: rgba(156, 108, 101, 0.192);
    color: #6e3d34;
    cursor: pointer;
  }
  
  
  .product-btn.square {
    border-radius: 0;
  }
  
  .header-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-center .logo {
  margin: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-center .logo img {
  height: 65px;
  width: auto;
}

.nav-link {
    text-align: right;
    display: block;
    padding: 13px 20px 11px 20px;
    font-size: 22px;
    font-weight: bold;
    color: #9d5248;
    font-family: "Times New Roman", serif;
    transition: background 0.4s ease;
    height: auto;
    line-height: normal;
    text-decoration: none;
    white-space: nowrap;
}


.nav-link:hover {
    color: #333;
}


/* === Progressive reveal (static layout) === */
.product-block {
  position: relative;
  opacity: 0;
  transform: translateY(12vh);
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), opacity 600ms ease-out;
  pointer-events: none;
}

.product-block.in-view {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* First block is visible immediately */
.product-block:first-child {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

@media (max-width: 768px) {
  .product-block { transform: translateY(8vh); }
}

/* === Scroll Nudge (brown circle with down arrow) === */
.scroll-nudge {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 0 0;
  pointer-events: none;
}

.scroll-nudge__btn {
  pointer-events: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #9D5248; /* коричнева оправа */
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: transform 150ms ease;
  animation: nudge-bob 5s ease-in-out infinite;
}

.scroll-nudge__btn:active { transform: translateY(1px); }

.scroll-nudge__btn svg { width: 22px; height: 22px; display: block; }
.scroll-nudge__btn svg path { stroke: #9D5248; }

@keyframes nudge-bob {
  0%, 86%, 100% { transform: translateY(0); }
  88% { transform: translateY(3px); }
  92% { transform: translateY(-3px); }
  96% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-nudge__btn { animation: none; }
}


@media (max-width: 1024px) {
    .nav-link {
        display: none !important;
    }
}

@media (max-width: 1024px) {
  .menu {
    display: block;
  }
}
  

  @media screen and (max-width: 1024px) {
    .product-block {
      flex-direction: column;
      text-align: center;
    }
  
    .product-block.reverse {
      flex-direction: column;
    }
  
    .product-image,
    .product-text {
      flex: 1 1 100%;
      max-width: 100%;
      padding: 0px;
    }
  
    .product-text h2 {
      font-size: 1.8rem;
    }
  
    .product-text p {
      font-size: 1rem;
      padding: 0px 0px 30px 10px;
    }
  
    .btn-learn {
      font-size: 1rem;
      padding: 8px 25px;
    }
  }
  
  @media screen and (max-width: 600px) {
    .product-showcase {
      padding: 40px 0%;
      gap: 40px;
    }
  
    .product-text h2 {
      font-size: 1.5rem;
    }
  
    .product-text p {
      font-size: 0.95rem;
    }
  
    .btn-learn {
      font-size: 0.95rem;
      padding: 7px 20px;
    }
  }
  

@media screen and (max-width: 1024px) {
    .side-menu,
    .language-menu {
        width: 50%;
    }
}



/* === Scroll reveal + sticky stack (added by assistant) === */
.product-showcase {
  position: relative;
  /* creates a stacking context for sticky children */
}

.product-block {
  position: sticky;
  top: 92px; /* header (80px) + small gap */
  transform: translateY(40vh);
  opacity: 0;
  transition: transform 800ms ease, opacity 600ms ease;
  will-change: transform, opacity;
  /* Prevent mouse events before reveal to avoid weird hovers */
  pointer-events: none;
}

/* When a card becomes visible (half-screen), animate it into place */
.product-block.in-view {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Optional: subtle elevation for the card that is currently sticking */
.product-block.in-view {
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* Make sure later cards slide from under previous ones */
.product-block {
  /* z-index will be set from JS for proper stacking */
}

/* On small screens, keep a simple reveal without sticky to avoid scroll jank */
@media (max-width: 768px) {
  .product-block {
    position: static;
    transform: translateY(24px);
    opacity: 0;
  }
  .product-block.in-view {
    transform: translateY(0);
    opacity: 1;
  }
}
/* === End scroll reveal + sticky stack === */


/* === Progressive reveal (static layout) — override === */
.product-block {
  position: relative;            /* cancel sticky */
  top: auto;                     /* cancel sticky */
  opacity: 0;
  transform: translateY(12vh);   /* gentle slide */
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), opacity 600ms ease-out;
  pointer-events: none;
}

.product-block.in-view {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* First block is visible immediately */
.product-block:first-child {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Remove any accidental box-shadow carry-over */
.product-block.in-view {
  box-shadow: none;
}

/* Mobile keeps the same logic, just smaller offset */
@media (max-width: 768px) {
  .product-block {
    position: relative;
    transform: translateY(8vh);
  }
}
/* === End override === */


/* === Nudge fade states === */
.scroll-nudge {
  opacity: 0;
  transition: opacity var(--nudge-fade-ms) ease;
}

.scroll-nudge.is-visible {
  opacity: 1;
}

.scroll-nudge, .scroll-nudge * {
  will-change: opacity, transform;
}
