/* blog-pixel.css — пиксельный стиль для блога */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body, .bg-white {
  background: #fff !important;
}

.pixel-dots-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #e5e7eb 1.5px, transparent 1.5px), radial-gradient(circle, #e5e7eb 1.5px, transparent 1.5px);
  background-size: 32px 32px;
  background-position: 0 0, 16px 16px;
  opacity: 0.7;
}

.typewriter-pixel {
  font-family: 'Press Start 2P', monospace;
  color: #2d014d;
  overflow: hidden;
  border-right: 0.15em solid #2d014d;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.04em;
  animation: typing 2.5s steps(4, end), blink-caret 0.7s step-end infinite alternate;
}

@keyframes typing {
  from { width: 0 }
  to { width: 4ch }
}
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #2d014d; }
}

.blog-pixel-desc, .blog-pixel-title, .blog-pixel-meta, .blog-pixel-text, .blog-pixel-btn {
  font-family: 'Press Start 2P', monospace !important;
  letter-spacing: 0.01em;
}

.blog-pixel-title {
  color: #2d014d;
  font-size: 1.1em;
  font-weight: bold;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
  display: block;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  max-width: 100%;
  height: auto;
  min-height: auto;
  flex-shrink: 0;
  flex-grow: 1;
  min-width: 0;
  width: 100%;
}
.blog-pixel-meta {
  color: #a78bfa;
  font-size: 0.8em;
}
.blog-pixel-text {
  color: #232136;
  font-size: 0.95em;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.blog-pixel-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 0.5em;
  box-shadow: none;
  font-family: 'Press Start 2P', monospace;
  margin-bottom: 0.5em;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  min-height: fit-content;
  height: auto;
  flex: 1 1 auto;
  overflow: visible;
  min-width: 0;
  max-width: none;
}
.blog-pixel-btn {
  display: inline-block;
  background: #2d014d;
  color: #fff;
  border: 2px solid #a78bfa;
  border-radius: 0.2em;
  padding: 0.4em 1.2em;
  font-size: 0.9em;
  text-decoration: none;
  font-family: 'Press Start 2P', monospace;
  letter-spacing: 0.01em;
  transition: background 0.2s, color 0.2s;
  box-shadow: none;
}
.blog-pixel-btn:hover {
  background: #a78bfa;
  color: #2d014d;
}

/* Стили для сетки карточек */
.grid {
  align-items: stretch;
  grid-template-rows: auto;
  width: 100%;
  min-width: 0;
}

.grid > div {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: auto;
  grid-row: auto;
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

/* Принудительный перенос для длинных заголовков */
.blog-pixel-title {
  break-inside: avoid;
  page-break-inside: avoid;
  orphans: 2;
  widows: 2;
  overflow-wrap: anywhere;
  word-break: break-all;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .blog-pixel-title {
    font-size: 1em;
    line-height: 1.4;
    width: 100%;
    min-width: 0;
  }
  
  .blog-pixel-text {
    font-size: 0.9em;
    width: 100%;
    min-width: 0;
  }
  
  .blog-pixel-btn {
    font-size: 0.8em;
    padding: 0.3em 1em;
  }
  
  .blog-pixel-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .blog-pixel-title {
    font-size: 0.9em;
    line-height: 1.5;
    width: 100%;
    min-width: 0;
  }
  
  .blog-pixel-text {
    font-size: 0.85em;
    width: 100%;
    min-width: 0;
  }
  
  .blog-pixel-btn {
    font-size: 0.75em;
    padding: 0.25em 0.8em;
  }
  
  .blog-pixel-card {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
} 