/*
Theme Name: Blocksy Child
Template: blocksy
*/


/* Анімація появи */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Сітка інструментів */
.tool-item {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-item:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}


.tool-thumb {
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
  text-align: center;
}

.tool-thumb img.tool-image {
  max-height: 100%;
  max-width: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  display: block;
}


.tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  transition: color 0.2s ease;
  margin: 0;
}

.tool-title-link:hover .tool-title {
  color: #2f63ff;
}

.tool-meta {
  font-size: 0.9rem;
  color: #666;
  margin-top: auto;
  padding-top: 1rem;
}

.tool-category {
  font-size: 0.85rem;
  color: #2f63ff;
  font-weight: 500;
  margin-bottom: 0.25rem;
}


/* розмір самої карточки */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}
@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Контейнер контенту та сайдбару */
.content-with-sidebar {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.main-content {
  flex: 3;
  min-width: 0;
}
.sidebar {
  flex: 1;
  min-width: 280px;
}

/* Кастомна пагінація */
.custom-pagination {
  margin-top: 3rem;
  text-align: center;
}
.custom-pagination .page-numbers {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 6px;
  margin: 0 4px;
  background: #f2f2f2;
  color: #333;
  text-decoration: none;
  transition: 0.3s ease;
}
.custom-pagination .page-numbers.current,
.custom-pagination .page-numbers:hover {
  background: #2f63ff;
  color: #fff;
}

/* Заголовки "варто прочитати" */
.related-title {
  font-size: 1.05rem;
  color: #111;
  margin: 0 0 0.5rem;
  transition: color 0.3s;
}
.related-title:hover {
  color: #2f63ff !important;
}

/* Кнопка "читати далі" */
/* Кнопка "читати далі" */
.read-more-button {
  display: inline-block;
  padding: 6px 12px;
  background-color: #2f63ff;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background-color 0.3s;

  /* Додано для десктопу — вирівнює кнопки */
  width: auto;
  max-width: 100%;
  white-space: nowrap;
  margin-bottom: 12px;
}

.read-more-button:hover {
  background-color: #1e4ce0;
}


/* ✅ Fix для Safari на iPhone */
@media (max-width: 768px) {
  .content-with-sidebar {
    display: block !important;
  }
  .main-content,
  .sidebar {
    width: 100% !important;
    display: block !important;
  }
  .sidebar {
    margin-top: 2rem;
    margin-bottom: 3rem;
  }
  .custom-pagination {
    margin-top: 2rem;
    padding-top: 1rem;
    position: relative;
    z-index: 1;
  }
}
