/**
 * @file: blog-cards.css
 * @description: Стилі для карток статей блогу
 * @created: 2025-12-18
 * @version: 1.0.0
 */

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG CARD STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.gotuimo-blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gotuimo-blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Image */
.gotuimo-blog-card__image-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #f5f5f5;
}

.gotuimo-blog-card__image-link::before,
.gotuimo-blog-card__image-link::after {
  display: none !important;
  content: none !important;
}

.gotuimo-blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  opacity: 1 !important;
}

.gotuimo-blog-card:hover .gotuimo-blog-card__image {
  transform: scale(1.05);
}

/* Remove any overlays from parent theme */
.gotuimo-blog-card .post-thumbnail::before,
.gotuimo-blog-card .post-thumbnail::after,
.gotuimo-blog-card a::before,
.gotuimo-blog-card a::after,
.gotuimo-blog-card__image-link .overlay,
.gotuimo-blog-card__image-link > *:not(img):not(.gotuimo-blog-card__category):not(svg) {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.gotuimo-blog-card__image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  color: #bbb;
}

/* Category Badge */
.gotuimo-blog-card__category {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

/* Content */
.gotuimo-blog-card__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

/* Meta */
.gotuimo-blog-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
}

.gotuimo-blog-card__date,
.gotuimo-blog-card__reading-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: #888;
}

.gotuimo-blog-card__date svg,
.gotuimo-blog-card__reading-time svg {
  color: #bbb;
}

/* Title */
.gotuimo-blog-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px 0;
}

.gotuimo-blog-card__title a {
  color: #1a1a1a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.gotuimo-blog-card__title a:hover {
  color: #e53935;
}

/* Excerpt */
.gotuimo-blog-card__excerpt {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #666;
  margin: 0 0 20px 0;
  flex: 1;
}

/* Footer */
.gotuimo-blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f0f0f0;
}

/* Author */
.gotuimo-blog-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gotuimo-blog-card__author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.gotuimo-blog-card__author-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
}

/* CTA Button */
.gotuimo-blog-card__cta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.gotuimo-blog-card__cta:hover {
  background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
  transform: translateX(4px);
  color: #fff;
}

.gotuimo-blog-card__cta svg {
  transition: transform 0.2s ease;
}

.gotuimo-blog-card__cta:hover svg {
  transform: translateX(4px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BLOG GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.gotuimo-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  margin-top: 48px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY HEADER
   ═══════════════════════════════════════════════════════════════════════════ */

.gotuimo-category-header {
  text-align: center;
  margin-bottom: 48px;
  padding: 48px 20px;
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.05) 0%, rgba(211, 47, 47, 0.02) 100%);
  border-radius: 20px;
}

.gotuimo-category-header__title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

.gotuimo-category-header__description {
  color: #666;
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

.gotuimo-category-header__count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 20px;
  background: #fff;
  border-radius: 30px;
  font-size: 0.9375rem;
  color: #666;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.gotuimo-category-header__count strong {
  color: #e53935;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */

.gotuimo-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid #eee;
}

.gotuimo-pagination .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  transition: all 0.2s ease;
}

.gotuimo-pagination .page-numbers:hover {
  background: #f5f5f5;
  border-color: #d0d0d0;
}

.gotuimo-pagination .page-numbers.current {
  background: linear-gradient(135deg, #e53935 0%, #d32f2f 100%);
  border-color: transparent;
  color: #fff;
}

.gotuimo-pagination .prev,
.gotuimo-pagination .next {
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .gotuimo-blog-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .gotuimo-category-header {
    padding: 32px 16px;
  }
  
  .gotuimo-category-header__title {
    font-size: 1.75rem;
  }
  
  .gotuimo-blog-card__content {
    padding: 20px;
  }
  
  .gotuimo-blog-card__title {
    font-size: 1.125rem;
  }
  
  .gotuimo-blog-card__footer {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .gotuimo-blog-card__cta {
    width: 100%;
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE
   ═══════════════════════════════════════════════════════════════════════════ */

.bb-dark-theme .gotuimo-blog-card {
  background: #2a2a2a;
}

.bb-dark-theme .gotuimo-blog-card__title a {
  color: #f5f5f5;
}

.bb-dark-theme .gotuimo-blog-card__excerpt {
  color: #aaa;
}

.bb-dark-theme .gotuimo-blog-card__author-name {
  color: #ccc;
}

.bb-dark-theme .gotuimo-blog-card__footer {
  border-top-color: #444;
}

.bb-dark-theme .gotuimo-category-header {
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.1) 0%, rgba(211, 47, 47, 0.05) 100%);
}

.bb-dark-theme .gotuimo-category-header__title {
  color: #f5f5f5;
}

.bb-dark-theme .gotuimo-category-header__description {
  color: #aaa;
}

.bb-dark-theme .gotuimo-category-header__count {
  background: #333;
  color: #ccc;
}

.bb-dark-theme .gotuimo-pagination .page-numbers {
  background: #333;
  border-color: #444;
  color: #ccc;
}

.bb-dark-theme .gotuimo-pagination .page-numbers:hover {
  background: #444;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FULL-WIDTH BLOG POST (без сайдбару)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Full-width content area for blog posts */
.gotuimo-full-width-post {
  width: 100%;
  max-width: 100%;
  flex: 0 0 100%;
}

/* When sidebar is removed, content takes full width */
.single-post .gotuimo-full-width-post + #secondary,
.single-post .gotuimo-full-width-post ~ #secondary,
.single-post .gotuimo-full-width-post ~ .sidebar,
.single-post .gotuimo-full-width-post ~ aside {
  display: none !important;
}

/* Adjust site content wrapper for full-width */
body.single-post .site-content-grid {
  display: block;
}

body.single-post .gotuimo-full-width-post .entry-content-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Entry content comfortable reading width */
body.single-post .gotuimo-full-width-post .entry-content {
  max-width: 100%;
}

/* Related posts and recipes blocks - wider */
body.single-post .gotuimo-full-width-post .post-related-posts,
body.single-post .gotuimo-full-width-post .gotuimo-related-recipes {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
}

/* Comments section */
body.single-post .gotuimo-full-width-post #comments {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POST NAVIGATION (Попередня / Наступна стаття)
   ═══════════════════════════════════════════════════════════════════════════ */

.gotuimo-post-navigation {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 20px;
}

.gotuimo-post-nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.gotuimo-post-nav-link {
  position: relative;
}

.gotuimo-post-nav-link.gotuimo-post-nav-empty {
  display: block;
  min-height: 100px;
  background: #fafafa;
}

.gotuimo-post-nav-link a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-height: 100%;
  border: 2px solid transparent;
}

.gotuimo-post-nav-link a:hover {
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.05) 0%, rgba(211, 47, 47, 0.02) 100%);
}

.gotuimo-post-nav-prev a {
  border-right: 1px solid #f0f0f0;
}

.gotuimo-post-nav-next a {
  text-align: right;
  justify-content: flex-end;
}

.gotuimo-post-nav-link .nav-arrow {
  font-size: 1.75rem;
  font-weight: 300;
  color: #e53935;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.gotuimo-post-nav-prev a:hover .nav-arrow {
  transform: translateX(-6px);
}

.gotuimo-post-nav-next a:hover .nav-arrow {
  transform: translateX(6px);
}

.gotuimo-post-nav-link .nav-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.gotuimo-post-nav-link .nav-subtitle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gotuimo-post-nav-link .nav-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.gotuimo-post-nav-link a:hover .nav-title {
  color: #e53935;
}

/* Responsive */
@media (max-width: 768px) {
  .gotuimo-post-nav-links {
    grid-template-columns: 1fr;
    gap: 0;
  }
  
  .gotuimo-post-nav-prev a {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .gotuimo-post-nav-next a {
    text-align: left;
    justify-content: flex-start;
  }
  
  .gotuimo-post-nav-link a {
    padding: 20px;
  }
  
  .gotuimo-post-nav-link .nav-arrow {
    font-size: 1.5rem;
  }
  
  .gotuimo-post-nav-link.gotuimo-post-nav-empty {
    display: none;
  }
}

/* Dark mode */
.bb-dark-theme .gotuimo-post-nav-links {
  background: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bb-dark-theme .gotuimo-post-nav-prev a {
  border-right-color: #444;
}

.bb-dark-theme .gotuimo-post-nav-link a:hover {
  background: linear-gradient(135deg, rgba(229, 57, 53, 0.1) 0%, rgba(211, 47, 47, 0.05) 100%);
}

.bb-dark-theme .gotuimo-post-nav-link .nav-subtitle {
  color: #999;
}

.bb-dark-theme .gotuimo-post-nav-link .nav-title {
  color: #f5f5f5;
}

.bb-dark-theme .gotuimo-post-nav-link.gotuimo-post-nav-empty {
  background: #252525;
}

