@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap");

/* ============================================================
   DESIGN SYSTEM - "СВІТ ДОБРА" COZY WARM UKRAINIAN AESTHETICS
   ============================================================ */
:root {
  /* Colors from the provided images */
  --bg-primary: #fdfaf4; /* soft warm ivory/linen background */
  --bg-gradient: linear-gradient(180deg, #fffefa 0%, #faf1e1 100%);
  --brand-red: #b31a22; /* rich Kalyna red */
  --brand-red-hover: #8f0f15;
  --brand-gold: #d99629; /* sunflower gold */
  --brand-gold-dark: #875505;
  --brand-red-dark: #5b0802;
  --brand-gold-light: #fbeed9;

  --text-dark: #3a2728; /* dark espresso */
  --text-body: #4a3839;
  --text-muted: #806c6d;
  --white: #ffffff;

  --card-bg: #fffdfa;
  --border-color: #eddac2;
  --shadow-warm: 0 8px 24px rgba(179, 26, 34, 0.05);
  --shadow-hover: 0 16px 36px rgba(179, 26, 34, 0.1);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --gap: 20px;
  --max-width: 720px;
}

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

body {
  background-color: var(--bg-primary);
  background-image: var(--bg-gradient);
  color: var(--text-body);
  font-family:
    "Plus Jakarta Sans",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--brand-red);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
  color: var(--brand-gold);
}

h1,
h2,
h3,
.site-logo {
  font-family: "Playfair Display", Georgia, serif;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header {
  background: rgb(251 238 217 / 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  border-top: 6px solid var(--brand-red);
  padding: 0 var(--gap);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  font-size: 21px;
  font-weight: 800;
  color: var(--brand-red);
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-logo:hover {
  color: var(--brand-gold);
}

.site-logo svg {
  fill: currentColor;
  transition: fill 0.3s ease;
}

.site-nav {
  display: flex;
  gap: 6px;
}

.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all 0.25s ease;
  border: 1px solid var(--border-color);
  background: var(--brand-gold-light);
}

.site-nav a:hover {
  background: var(--brand-gold-light);
  color: var(--brand-red);
  border-color: var(--brand-gold);
}

.site-nav a.active {
  background: var(--brand-red);
  color: var(--white) !important;
  border-color: var(--brand-red);
  box-shadow: 0 4px 12px rgba(179, 26, 34, 0.15);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle .bar {
  width: 100%;
  height: 2px;
  background-color: var(--brand-red);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================================
   MAIN LAYOUT & BREADCRUMBS
   ============================================================ */
.page-wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px var(--gap) 60px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-red-dark);
  margin-bottom: 20px;
}

.breadcrumb a {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.breadcrumb a:hover {
  color: var(--brand-red);
}

.breadcrumb span {
  opacity: 0.6;
}

/* ARTICLE TYPOGRAPHY */
.page-title {
  font-size: 34px;
  font-weight: 800;
  font-style: italic; /* Style matching "Світ добра" logo */
  color: #000000;
  line-height: 1.3;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
  text-align: center;
  position: relative;
  padding-top: 20px;
  padding-bottom: 36px;
}

/* Now Bottom decor: Line with heart */
.page-title::before {
  content: "❤";
  color: var(--brand-red);
  font-size: 22px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  background: linear-gradient(
      to right,
      var(--brand-red) 0%,
      var(--brand-red) 35%,
      transparent 35%,
      transparent 65%,
      var(--brand-red) 65%,
      var(--brand-red) 100%
    )
    no-repeat center/100% 1px;
  opacity: 0.85;
}

/* Now Top decor: Short thick gold line */
.page-title::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 2px;
  background: var(--brand-gold);
  border-radius: 2px;
}

.intro-text {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-body);
  margin-bottom: 30px;
  border-left: 4px solid var(--brand-gold);
  padding: 16px 20px;
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-warm);
}

.inline-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-body);
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  padding: 24px calc(50vw - 50% + var(--gap));
  margin-top: 30px;
  margin-bottom: 30px;
}

/* ============================================================
   CARDS / PHOTOS
   ============================================================ */
.photo-block {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-warm);
  margin-bottom: 35px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand-gold);
}

.photo-block img {
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border-color);
  transition: transform 0.5s ease;
}

.photo-footer {
  padding: 16px 20px 0;
}

.photo-caption {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  line-height: 1.4;
}

/* SHARE ROW & BUTTONS */
.share-row {
  display: flex;
  gap: 12px;
  padding: 15px 20px 20px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  text-decoration: none !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.btn-viber {
  background: #7360f2;
  color: var(--white) !important;
  box-shadow: 0 4px 12px rgba(115, 96, 242, 0.15);
  text-decoration: none !important;
}

.btn-viber:hover {
  background: #5b4bc4;
  color: var(--white) !important;
  box-shadow: 0 6px 16px rgba(115, 96, 242, 0.25);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.btn-viber svg {
  fill: var(--white) !important;
}

.btn-download {
  background: var(--brand-red);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(179, 26, 34, 0.15);
}

.btn-download:hover {
  background: var(--brand-red-hover);
  box-shadow: 0 6px 16px rgba(179, 26, 34, 0.25);
  transform: translateY(-1px);
}

.btn-download svg {
  fill: var(--white);
  width: 24px;
  height: 24px;
}

/* ============================================================
   ASIDE / AD BLOCKS
   ============================================================ */
.ad-block {
  background: rgba(217, 150, 41, 0.04);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 35px;
  text-align: center;
}

/* ============================================================
   TAGS & RELATED SECTIONS
   ============================================================ */
.tags-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.tag-pill {
  background: var(--border-color);
  color: var(--brand-red);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--brand-gold-dark);
}

.tag-pill:hover {
  background: var(--brand-red);
  color: var(--white);
}

.related-section {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 25px;
  box-shadow: var(--shadow-warm);
}

.related-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-red);
  margin-bottom: 16px;
  text-align: center;
}

.related-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.related-list li a {
  display: block;
  padding: 10px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-weight: 600;
}

.related-list li a:hover {
  border-color: var(--brand-red);
  background: var(--white);
  color: var(--brand-red);
  transform: translateX(4px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #65635e;
  border-top: 1px solid var(--border-color);
  padding: 40px var(--gap);
  text-align: center;
}

.footer-links ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

.footer-links a:hover {
  color: var(--brand-gold-light);
}

.footer-links p {
  font-size: 13px;
  color: var(--white);
}

/* ============================================================
   RESPONSIVENESS
   ============================================================ */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(253, 250, 244, 0.96);
    border-bottom: 1px solid var(--border-color);
    padding: 15px var(--gap);
    gap: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  }

  .menu-toggle {
    display: flex;
  }

  .menu-open .site-nav {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  /* Анімація гамбургера у хрестик */
  .menu-open .menu-toggle .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--brand-red-hover);
  }
  .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(--brand-red-hover);
  }
}

/* ============================================================
   ЗМІСТ СТАТТІ (TABLE OF CONTENTS)
   ============================================================ */
.table-of-contents {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 30px;
  box-shadow: var(--shadow-warm);
  transition: all 0.3s ease;
}

.table-of-contents[open] {
  box-shadow: var(--shadow-hover);
}

.table-of-contents summary {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-red);
  cursor: pointer;
  list-style: none; /* прибираємо стандартну стрілку */
  display: flex;
  align-items: center;
  justify-content: space-between;
  outline: none;
  user-select: none;
}

/* Прибираємо стандартний маркер у Safari */
.table-of-contents summary::-webkit-details-marker {
  display: none;
}

/* Власна стрілка */
.table-of-contents summary::after {
  content: '▼';
  font-size: 12px;
  color: var(--brand-gold);
  transition: transform 0.3s ease;
}

.table-of-contents[open] summary::after {
  transform: rotate(180deg);
}

/* Список розділів */
.table-of-contents ul {
  margin-top: 16px;
  padding-left: 20px;
  border-top: 1px dashed var(--border-color);
  padding-top: 16px;
}

.table-of-contents li {
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
}

.table-of-contents li a {
  color: var(--text-dark);
}

.table-of-contents li a:hover {
  color: var(--brand-red);
  text-decoration: none;
}

/* ============================================================
   H2 ЗАГОЛОВКИ
   ============================================================ */
article h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 800;
  color: #000000;
  margin: 40px 0 24px;
  text-align: center;
  position: relative;
  padding-top: 20px;
  padding-bottom: 36px;
}

/* Верхня золота риска для H2 */
article h2::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--brand-gold);
  border-radius: 1.5px;
}

/* Нижня риска з сердечком для H2 */
article h2::before {
  content: '❤';
  color: var(--brand-red);
  font-size: 18px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  background: linear-gradient(to right, var(--brand-red) 0%, var(--brand-red) 35%, transparent 35%, transparent 65%, var(--brand-red) 65%, var(--brand-red) 100%) no-repeat center/100% 1px;
  opacity: 0.85;
}

