/* ============================================================
   ЗМІННІ — кольорова схема з kartynka.top (осучаснена)
   ============================================================ */
:root {
  --pink-light: #fdf0f1; /* фон сторінки */
  --pink-mid: #f2ced0; /* акцент, шапка */
  --pink-dark: #d4878e; /* кнопки, посилання-активні */
  --pink-deep: #b5626a; /* hover стани */
  --text: #2d2020; /* основний текст */
  --text-mid: #6b4a4d; /* вторинний текст */
  --text-light: #a07a7d; /* підписи, мета */
  --white: #ffffff;
  --border: #ead5d7;
  --shadow: rgba(180, 100, 110, 0.12);

  --viber: #7360f2; /* Viber фірмовий */
  --viber-hover: #5b4bc4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --gap: 16px;
  --max-width: 680px; /* вузька колонка як на оригіналі */
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--pink-light);
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--pink-deep);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  color: var(--pink-dark);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.site-header {
  background: var(--pink-mid);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--gap);
  position: sticky;
  top: 0;
  z-index: 100;
  transition:
    padding 0.25s ease,
    background 0.25s ease;
}

.header-inner {
  /* max-width: var(--max-width); */
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 12px;
  transition:
    height 0.25s ease,
    gap 0.25s ease,
    padding 0.25s ease;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-logo:hover {
  text-decoration: none;
  color: var(--pink-deep);
}

/* Кнопка гамбургер-меню */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 101;
}
.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease,
    background-color 0.22s ease;
}

/* Навігація — горизонтальний скрол на мобільному */
.site-nav {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    max-height 0.22s ease,
    visibility 0.22s,
    margin 0.22s ease,
    padding 0.22s ease;
  max-height: 250px;
  opacity: 1;
  visibility: visible;
}
.site-nav::-webkit-scrollbar {
  display: none;
}

/* Стан при прокручуванні (зменшення внутрішньої шапки на десктопі) */

.site-header.header-scrolled .header-inner {
  height: 42px;
  gap: 0;
}

.site-nav a {
  white-space: nowrap;
  font-size: 13px;
  font-family: system-ui, sans-serif;
  color: var(--text-mid);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition:
    background 0.15s,
    color 0.15s;
  text-decoration: none;
  flex-shrink: 0;
}
.site-nav a:hover,
.site-nav a.active {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

/* ============================================================
   ОБГОРТКА КОНТЕНТУ
   ============================================================ */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px var(--gap) 48px;
}

/* ============================================================
   ХЛІБНІ КРИХТИ
   ============================================================ */
.breadcrumb {
  font-size: 12px;
  font-family: system-ui, sans-serif;
  color: var(--text-light);
  margin-bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb a {
  color: var(--text-light);
}
.breadcrumb a:hover {
  color: var(--pink-deep);
}
.breadcrumb span {
  opacity: 0.5;
}

/* ============================================================
   ЗАГОЛОВОК СТОРІНКИ
   ============================================================ */
.page-title {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

/* ============================================================
   ВСТУПНИЙ ТЕКСТ
   ============================================================ */
.intro-text {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 28px;
  padding: 16px 18px;
  background: var(--white);
  border-left: 3px solid var(--pink-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ============================================================
   БЛОК ЗОБРАЖЕННЯ
   ============================================================ */
.photo-block {
  margin-bottom: 28px;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid var(--border);
}

.photo-block img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.photo-footer {
  padding: 12px 16px;
}

/* Підпис під фото */
.photo-caption {
  font-size: 14px;
  font-style: italic;
  color: var(--text-mid);
  margin-bottom: 12px;
  line-height: 1.55;
}

/* Кнопки поділитись */
.share-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition:
    background 0.18s,
    transform 0.12s,
    box-shadow 0.18s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
  text-decoration: none;
}
.btn:active {
  transform: translateY(0);
}

/* Viber */
.btn-viber {
  background: var(--viber);
  color: var(--white);
}
.btn-viber:hover {
  background: var(--viber-hover);
  color: var(--white);
}

/* Підтримка тегу <a> всередині кнопки .btn */
.btn:has(a) {
  padding: 0 !important;
}
.btn > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  color: inherit !important;
  text-decoration: none !important;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

/* Завантажити */
.btn-download {
  background: var(--pink-mid);
  color: var(--text);
}
.btn-download:hover {
  background: var(--pink-dark);
  color: var(--white);
}

/* SVG іконки в кнопках */
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: currentColor;
}

/* ============================================================
   ТЕКСТ МІЖ ФОТО
   ============================================================ */
.inline-text {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 28px;
}

/* ============================================================
   ТЕГИ
   ============================================================ */
.tags-section {
  margin: 32px 0 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-pill {
  display: inline-block;
  padding: 5px 13px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--border);
  font-size: 13px;
  font-family: system-ui, sans-serif;
  color: var(--text-mid);
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.tag-pill:hover {
  background: var(--pink-mid);
  border-color: var(--pink-dark);
  color: var(--text);
  text-decoration: none;
}

/* ============================================================
   СХОЖІ СТОРІНКИ
   ============================================================ */
.related-section {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.related-title {
  font-size: 13px;
  font-family: system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 14px;
}
.related-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.related-list a {
  display: block;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-mid);
  transition:
    background 0.15s,
    color 0.15s;
}
.related-list a:hover {
  background: var(--white);
  color: var(--pink-deep);
  text-decoration: none;
}

/* ============================================================
   ПІДВАЛ
   ============================================================ */
.site-footer {
  background: var(--pink-mid);
  border-top: 1px solid var(--border);
  padding: 24px var(--gap);
  font-size: 12px;
  font-family: system-ui, sans-serif;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.8;
}
.site-footer a {
  color: var(--text-mid);
}
.site-footer a:hover {
  color: var(--pink-deep);
}

/* ============================================================
   ЛАЙТБОКС
   ============================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 10, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 16px;
}
.lightbox.open {
  display: flex;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
  border: none;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   АДАПТИВНІСТЬ
   ============================================================ */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 50px;
    padding: 0;
    transition: height 0.22s ease;
  }
  .site-logo {
    font-size: 17px;
  }
  .menu-toggle {
    display: flex;
  }
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--pink-mid);
    border-bottom: 1px solid var(--border);
    padding: 4px var(--gap) 8px;
    gap: 4px;
    box-shadow: 0 8px 16px rgba(180, 100, 110, 0.15);
    z-index: 99;
  }
  .menu-open .site-nav {
    display: flex;
  }
  .site-nav a {
    width: 100%;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: var(--radius-sm);
  }
  .site-nav a.active {
    background: var(--pink-dark);
    color: var(--white) !important;
  }

  /* Анімація гамбургера */
  .menu-open .menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--pink-deep);
  }
  .menu-open .menu-toggle .bar:nth-child(2) {
    opacity: 0;
  }
  .menu-open .menu-toggle .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--pink-deep);
  }

  .site-header.header-scrolled:not(.menu-open) .site-nav {
    max-height: 0;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    visibility: hidden;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
  }

  .site-header.header-scrolled .header-inner {
    height: 42px;
  }
}

@media (max-width: 480px) {
  .share-row {
    gap: 6px;
  }
  .btn {
    padding: 8px 13px;
    font-size: 12px;
  }
  .photo-footer {
    padding: 10px 12px;
  }
  .page-wrap {
    padding: 16px 12px 40px;
  }
}
