/* ============================================
   BLOG LIST PAGE - Список постов блога
   ============================================ */

/* --- Карточка поста --- */
.blog.style-1 .inner-box {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-secondary, rgba(255,255,255,0.05));
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}

.blog.style-1 .inner-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.blog.style-1 .inner-box:focus-visible {
  box-shadow:
    0 12px 30px rgba(0,0,0,0.25),
    0 0 0 3px color-mix(in srgb, var(--accent-secondary, var(--color-primary, #32b8c6)) 65%, transparent);
  border-color: color-mix(in srgb, var(--accent-secondary, var(--color-primary, #32b8c6)) 55%, rgba(255,255,255,0.18));
  transform: translateY(-2px);
}

html[data-theme="light"] .blog.style-1 .inner-box,
html[data-theme="light_japan"] .blog.style-1 .inner-box {
  background: #fff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

html[data-theme="light"] .blog.style-1 .inner-box:hover,
html[data-theme="light_japan"] .blog.style-1 .inner-box:hover {
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

/* --- Контейнер картинки --- */
.blog.style-1 .image-box {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}

.blog.style-1 .image-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog.style-1 .inner-box:hover .image-box img {
  transform: scale(1.08);
}

.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(var(--accent-primary-rgb, 201, 24, 43), 0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 2;
}

/* --- Информация о посте --- */
.blog.style-1 .author-box {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog.style-1 .author-box .detail {
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-muted, rgba(255,255,255,0.6));
  font-weight: 500;
}

.blog.style-1 .author-box .detail p {
  margin: 0;
}

.blog.style-1 .author-box .detail i {
    margin-right: 4px;
}

.blog.style-1 .author-box h4 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px 0;
  color: var(--text-primary, #fff);
  /* Ограничение строк */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

html[data-theme="light"] .blog.style-1 .author-box h4,
html[data-theme="light_japan"] .blog.style-1 .author-box h4 {
  color: var(--text-primary, #1a1a1a);
}

.blog.style-1 .author-box h5 {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  color: var(--text-muted, rgba(255,255,255,0.6));
}

.blog.style-1 .author-box h5 i {
    margin-right: 4px;
}

/* --- Сайдбар: Популярное --- */
.blog-search,
.blog-sidebar .card-body {
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-secondary, rgba(255,255,255,0.05));
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.05);
}

.blog-search h5 {
    font-weight: 700;
    color: var(--text-primary, #fff);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

html[data-theme="light"] .blog-search h5,
html[data-theme="light_japan"] .blog-search h5 {
    color: var(--text-primary, #1a1a1a);
    border-bottom-color: rgba(0,0,0,0.1);
}

.popular-blogs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-blogs li {
  margin-bottom: 16px;
}

.popular-blogs li:last-child {
  margin-bottom: 0;
}

.popular-blogs a {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s ease;
  padding: 8px;
  border-radius: 12px;
}

.popular-blogs a:hover {
    background: rgba(255,255,255,0.03);
    transform: translateX(4px);
}

html[data-theme="light"] .popular-blogs a:hover,
html[data-theme="light_japan"] .popular-blogs a:hover {
    background: rgba(0,0,0,0.03);
}

.popular-blogs a:hover h6 {
  color: var(--accent-primary, #c9182b);
}

.popular-blogs img {
  width: 100px;
  height: 75px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.popular-blogs .content-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.popular-blogs .date {
  font-size: 11px;
  color: var(--text-muted, rgba(255,255,255,0.5));
  margin-bottom: 4px;
  font-weight: 500;
}

.popular-blogs h6 {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s ease;
  /* Ограничение строк */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary, #fff);
}

html[data-theme="light"] .popular-blogs h6,
html[data-theme="light_japan"] .popular-blogs h6 {
    color: var(--text-primary, #1a1a1a);
}

/* ============================================
   Адаптив блога
   ============================================ */
@media (max-width: 991px) {
    .blog.style-1 .col-lg-6 {
        margin-bottom: 24px;
    }
    
    .blog-search, .blog-sidebar .card-body {
        margin-top: 24px;
    }
}

@media (max-width: 576px) {
    .blog.style-1 .author-box {
        padding: 14px 16px;
    }
    
    .blog.style-1 .author-box h4 {
        font-size: 1.05rem;
    }
    
    .custom-pills .nav-link {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    .popular-blogs img {
        width: 80px;
        height: 60px;
    }
}

/* ============================================
   Блог - Категории (Табы)
   ============================================ */
.blog-categories {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.blog-categories::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.custom-pills {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    padding-bottom: 4px;
}

.custom-pills .nav-link {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
    border-radius: 20px;
    padding: 8px 20px;
    color: var(--text-secondary, rgba(255, 255, 255, 0.7));
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.custom-pills .nav-link:hover {
    color: var(--text-primary, #fff);
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.1));
}

.custom-pills .nav-link.active {
    background: var(--accent-primary, #c9182b);
    color: #fff;
    box-shadow: 0 4px 12px rgba(var(--accent-primary-rgb, 201, 24, 43), 0.3);
}

html[data-theme="light"] .custom-pills .nav-link,
html[data-theme="light_japan"] .custom-pills .nav-link {
    background: #f1f5f9;
    color: #475569;
}

html[data-theme="light"] .custom-pills .nav-link:hover,
html[data-theme="light_japan"] .custom-pills .nav-link:hover {
    background: #e2e8f0;
    color: #0f172a;
}

html[data-theme="light"] .custom-pills .nav-link.active,
html[data-theme="light_japan"] .custom-pills .nav-link.active {
    background: var(--accent-secondary, #7a1c1c);
    color: #fff;
}

/* ============================================
   NEON THEME - Blog List
   ============================================ */
html[data-theme="neon"] .blog.style-1 .inner-box {
  background: rgba(16, 19, 31, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html[data-theme="neon"] .blog.style-1 .inner-box:hover {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 212, 255, 0.15);
}

html[data-theme="neon"] .blog.style-1 .author-box h4 {
  color: rgba(255, 255, 255, 0.95);
}

html[data-theme="neon"] .blog.style-1 .inner-box:hover .author-box h4 {
  color: var(--color-primary, #00f3ff);
  text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

html[data-theme="neon"] .blog-sidebar .card-body {
  background: rgba(16, 19, 31, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.15);
}

html[data-theme="neon"] .popular-blogs h6 {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease;
}

html[data-theme="neon"] .popular-blogs a:hover h6 {
  color: var(--color-primary, #00f3ff);
  text-shadow: 0 0 8px rgba(0, 212, 255, 0.25);
}

html[data-theme="neon"] .blog-search input {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.25);
  color: #fff;
}

html[data-theme="neon"] .blog-search input:focus {
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

/* ============================================
   HARD JAPAN THEME - Blog List
   ============================================ */
html[data-theme="hard_japan"] .blog.style-1 .inner-box {
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

html[data-theme="hard_japan"] .blog.style-1 .inner-box:hover {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(196, 30, 58, 0.1);
}

html[data-theme="hard_japan"] .blog.style-1 .author-box h4 {
  color: rgba(255, 255, 255, 0.95);
}

html[data-theme="hard_japan"] .blog.style-1 .inner-box:hover .author-box h4 {
  color: var(--accent-secondary, #d4af37);
}

html[data-theme="hard_japan"] .blog-sidebar .card-body {
  background: rgba(18, 18, 18, 0.92);
  border: 1px solid rgba(212, 175, 55, 0.15);
}

html[data-theme="hard_japan"] .popular-blogs h6 {
  color: rgba(255, 255, 255, 0.9);
}

html[data-theme="hard_japan"] .popular-blogs a:hover h6 {
  color: var(--accent-secondary, #d4af37);
}

html[data-theme="hard_japan"] .blog-search input {
  background: rgba(212, 175, 55, 0.06);
  border-color: rgba(212, 175, 55, 0.2);
  color: #fff;
}

html[data-theme="hard_japan"] .blog-search input:focus {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

/* ============================================
   LIGHT JAPAN THEME - Blog List
   ============================================ */
html[data-theme="light_japan"] .blog.style-1 .inner-box {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

html[data-theme="light_japan"] .blog.style-1 .inner-box:hover {
  border-color: rgba(31, 107, 78, 0.25);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
}

html[data-theme="light_japan"] .blog.style-1 .author-box h4 {
  color: var(--text-primary, #0f172a);
}

html[data-theme="light_japan"] .blog.style-1 .inner-box:hover .author-box h4 {
  color: var(--accent-secondary, #7a1c1c);
}

html[data-theme="light_japan"] .blog.style-1 .author-box h5,
html[data-theme="light_japan"] .blog.style-1 .author-box .detail {
  color: var(--text-secondary, #334155);
}

html[data-theme="light_japan"] .blog-sidebar .card-body {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

html[data-theme="light_japan"] .blog-sidebar h5 {
  color: var(--text-primary, #0f172a);
}

html[data-theme="light_japan"] .popular-blogs h6 {
  color: var(--text-primary, #0f172a);
}

html[data-theme="light_japan"] .popular-blogs a:hover h6 {
  color: var(--accent-secondary, #7a1c1c);
}

html[data-theme="light_japan"] .popular-blogs .date {
  color: var(--text-muted, #64748b);
}

html[data-theme="light_japan"] .blog-search input {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text-primary, #0f172a);
}

html[data-theme="light_japan"] .blog-search input:focus {
  border-color: rgba(31, 107, 78, 0.4);
  box-shadow: 0 0 10px rgba(31, 107, 78, 0.1);
}

html[data-theme="light_japan"] .blog-search input::placeholder {
  color: var(--text-muted, #64748b);
}

