/* CSS is how you can add style to your website, such as colors, fonts, and positioning of your
   HTML content. To learn how to do something, just try searching Google for questions like
   "how to change link color." */

h1 {
  text-align: center;
  margin: 0.5em 0;
}

/* 🌸 Адаптивне sticky-меню */
.sticky-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8em 1.5em;
  background-color: #fff8f4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Центрований заголовок */
.nav-title {
  flex: 1;
  text-align: center;
  font-weight: bold;
  font-size: 1.2rem;
  color: #a05e4e;
}

.nav-links {
  display: flex;
  gap: 1em;
}

.nav-links a {
  background-color: #e9c3b1;
  color: #5a2f26;
  padding: 0.6em 1em;
  border-radius: 8px;
  margin: 0.3em 0;
  text-decoration: none;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s ease;
}

.nav-links a:hover {
  text-decoration: underline;
  background-color: #c59d88;
}

/* 🌙 Перемикач теми */
.theme-toggle {
  background: #d8b4a0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  color: white;
  transition: background 0.3s ease;
}
.theme-toggle:hover {
  background: #c59d88;
}
.dark .theme-toggle {
  background: #8b6653;
}

/* Зробимо кнопку і бургер по краях */
.theme-toggle {
  background: #d8b4a0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  cursor: pointer;
  color: white;
  transition: background 0.3s ease;
}

/* 🍔 Бургер-кнопка */
.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  margin-left: auto;
}
.burger div {
  width: 25px;
  height: 3px;
  background-color: #a05e4e;
  border-radius: 2px;
}

/* 📱 Адаптація для мобільних */
@media (max-width: 768px) {
  
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 60px;
    right: 1em;
    background: #fff8f4;
    border-radius: 12px;
    padding: 1em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: calc(100% - 2em);
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }

  .burger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
  }

  .burger div {
    width: 25px;
    height: 3px;
    background-color: #a05e4e;
    border-radius: 2px;
  }
}

.blog-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
  margin-bottom: 1.5em;
  justify-content: center;
}
.blog-filter button {
  background-color: #e9c3b1;
  border: none;
  padding: 0.5em 1.2em;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}
.blog-filter button:hover {
  background-color: #c59d88;
  transform: translateY(-2px);
}

.blog-post {
  background: #fffdfb;
  border: 1px solid #eee3dc;
  border-radius: 12px;
  padding: 1.2em;
  margin-bottom: 1.5em;
  box-shadow: 0 0 10px rgba(168, 144, 125, 0.1);
  transition: transform 0.3s;
}
.blog-post:hover {
  transform: translateY(-3px);
}

.read-more-button {
  background-color: #c87b63;
  color: white;
  border: none;
  padding: 0.5em 1.2em;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.9em;
  transition: background-color 0.3s ease, transform 0.15s ease;
  margin-top: 0.8em;
  display: inline-block;
  text-decoration: none;
}
.read-more-button:hover {
  background-color: #ae8472;
  transform: translateY(-2px);
}

.full-post {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease, margin-top 0.5s ease, padding 0.5s ease;
  margin-top: 0;
  padding: 0 1em;
}
.full-post.open {
  margin-top: 1em;
  padding: 1em;
  opacity: 1;
}

.filter-button.active {
  background-color: #c59d88;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  body {
    padding: 0 1em;
    font-size: 16px;
    line-height: 1.6;
  }

  h1, h2, h3 {
    font-size: 1.2em;
    line-height: 1.3;
  }

  .blog-post {
    padding: 1em;
  }

  .read-more-button,
  .filter-button {
    width: 100%;
    font-size: 1rem;
    text-align: center;
  }

  .blog-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8em;
  }

  .full-post {
    padding: 0.8em;
  }

  .nav-links {
    width: 80%;
    right: 10%;
  }
}

#toTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #c87b63;
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  display: none;
  z-index: 9999; /* поверх меню */
  transition: background-color 0.3s ease;
}

#toTop:hover {
  background-color: #ae8472;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1em;
  margin: 2em 0;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background-color: #e9c3b1;
  color: #333;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
}

.contact-button i {
  font-size: 1.2em;
}

.contact-button:hover {
  background-color: #d6b0a0;
  transform: scale(1.05);
}

footer {
  width: 100%;
  background-color: #f8f0e3;
  color: #333;
  text-align: center;
  padding: 2em 1em;
  box-sizing: border-box;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  margin: 0 auto;
  max-width: 600px; /* Додатково для центрування */
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  background-color: #e9c3b1;
  color: #333;
  padding: 0.6em 1.2em;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s ease;
}

.contact-button i {
  font-size: 1.2em;
}

.contact-button:hover {
  background-color: #d6b0a0;
  transform: scale(1.05);
}