/* Стили для journey - эстетика тишины, света, эха */

.journey-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--content);
}

.journey-page h2:not(.metaphors-subtitle) {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* Стили для страницы 404 */
.error-actions {
  margin: 3rem 0;
  padding: 2rem;
  background-color: var(--entry);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevation-low);
}

.error-actions h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 500;
}

.error-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background-color: var(--theme);
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-elevation-low);
}

.error-link:hover {
  background-color: var(--entry);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevation-medium);
  color: var(--primary);
}

.error-link.primary {
  background-color: var(--primary);
  color: var(--theme);
  border-color: var(--primary);
  font-weight: 600;
}

.error-link.primary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevation-medium);
}

/* Мобильные стили для journey-page */
@media (max-width: 768px) {
  .journey-page {
    padding: 2rem 1rem;
    font-size: 1rem;
    line-height: 1.7;
  }
  
  .journey-page h2:not(.metaphors-subtitle) {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }
}

.journey-page p {
  margin-bottom: 1.5rem;
}

/* Цитата в journey страницах */
.journey-quote {
  margin: 4rem 0;
  padding: 2rem;
  background-color: var(--entry);
  border-radius: 10px;
  text-align: center;
  border: 1px solid var(--border);
}

.journey-quote p {
  font-style: italic;
  color: var(--secondary);
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.7;
}

/* Финальный параграф в journey страницах */
.journey-final {
  margin-top: 3rem;
  font-size: 1.1rem;
  color: var(--secondary);
  line-height: 1.8;
}

/* Информационный блок для статей блога */
.post-content .info-block {
  margin: 2rem 0;
  padding: 1.5rem;
  background-color: var(--entry);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  color: var(--content);
  line-height: 1.7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-content .info-block strong {
  color: var(--primary);
  font-weight: 600;
}

/* Оглавление для статей блога */
.post-toc {
  margin: 2rem 0 3rem 0;
  padding: 1.5rem;
  background-color: var(--entry);
  border-radius: 8px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevation-low);
}

.post-toc .toc-title {
  margin: 0 0 1rem 0;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--primary);
}

.post-toc .toc-content {
  color: var(--content);
  font-size: 0.95rem;
  line-height: 1.8;
}

.post-toc .toc-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.post-toc .toc-content > ul {
  padding-left: 0;
}

.post-toc .toc-content ul li {
  margin: 0.5rem 0;
  padding-left: 0;
}

.post-toc .toc-content ul li ul {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
}

.post-toc .toc-content a {
  color: var(--content);
  text-decoration: none;
  transition: color 0.2s ease;
  display: block;
  padding: 0.25rem 0;
}

.post-toc .toc-content a:hover {
  color: var(--primary);
}

/* Кнопка "Наверх" */
#scroll-to-top,
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: var(--entry);
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevation-medium);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
}

#scroll-to-top:hover,
.scroll-to-top:hover {
  background-color: var(--primary);
  color: var(--theme);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevation-high);
  border-color: var(--primary);
}

#scroll-to-top:active,
.scroll-to-top:active {
  transform: translateY(0);
}

#scroll-to-top svg,
.scroll-to-top svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

@media (max-width: 768px) {
  #scroll-to-top,
  .scroll-to-top {
    width: 2.75rem;
    height: 2.75rem;
    bottom: 1.5rem;
    right: 1.5rem;
  }
  
  #scroll-to-top svg,
  .scroll-to-top svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

.clarity-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.clarity-page h2 {
  font-size: 2.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.clarity-page p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--content);
}

.button-container {
  margin: 3rem 0;
}

.clarity-button {
  display: inline-block;
  padding: 1.8rem 4rem;
  background-color: #3d62f7;
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(61, 98, 247, 0.4);
  border: 3px solid transparent;
  letter-spacing: 0.5px;
}

.clarity-button:hover {
  background-color: #2a4fc7;
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(61, 98, 247, 0.5);
  border-color: #1a3aa8;
}

.journey-single {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

/* Breadcrumbs для journey страниц */
.journey-single .breadcrumbs {
  margin-bottom: 2rem;
  font-size: 0.95rem;
  padding: 0;
}

.journey-single .breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
}

.journey-single .breadcrumbs li {
  display: inline;
  color: var(--secondary);
}

.journey-single .breadcrumbs li:not(:last-child)::after {
  content: " / ";
  margin: 0 0.5rem;
  color: var(--secondary);
  opacity: 0.6;
}

.journey-single .breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s;
}

.journey-single .breadcrumbs a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.journey-header {
  margin-bottom: 4rem;
  text-align: center;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--border);
}

.journey-header h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1.2;
}

.journey-description {
  font-size: 1.3rem;
  color: var(--secondary);
  font-style: italic;
  margin-top: 1rem;
  line-height: 1.6;
}

.journey-content {
  font-size: 1.15rem;
  line-height: 1.9;
  margin-bottom: 4rem;
  color: var(--content);
}

.journey-content p {
  margin-bottom: 1.5rem;
}

.metaphors-gallery {
  margin: 4rem 0;
  padding: 3rem 2rem;
  background: var(--entry);
  border-radius: 16px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.metaphors-gallery h2 {
  margin-bottom: 1rem;
  font-size: 2.5rem;
  text-align: center;
  font-weight: 300;
  color: var(--primary);
}

.metaphors-subtitle,
.metaphors-gallery .metaphors-subtitle,
.journey-page .metaphors-subtitle {
  text-align: center;
  font-size: 1.5rem !important;
  font-weight: 500 !important;
  color: var(--primary);
  margin-bottom: 3rem;
  line-height: 1.6;
  position: relative;
  padding-bottom: 1rem;
}

/* Переопределяем стили .journey-page h2 для .metaphors-subtitle */
.journey-page .metaphors-subtitle {
  font-size: 1.5rem !important;
  font-weight: 500 !important;
}

.metaphors-subtitle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: var(--primary);
  opacity: 0.6;
}

.metaphors-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  margin-top: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.metaphor-card {
  padding: 2.5rem 2rem;
  background: var(--theme);
  border-radius: 12px;
  border: 2px solid var(--border);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.metaphor-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.4s;
}

.metaphor-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

.metaphor-card:hover::before {
  opacity: 1;
}

.metaphor-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
}

.metaphor-card p {
  color: var(--secondary);
  margin: 1rem 0 0 0;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 500px;
}

.metaphor-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 1.5rem;
  opacity: 0.9;
  transition: all 0.4s ease;
  filter: grayscale(20%);
}

.metaphor-card:hover .metaphor-icon {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}

.related-tools {
  margin: 4rem 0;
  padding: 3rem 2.5rem;
  background: var(--entry);
  border-radius: 16px;
  border: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.related-tools h2 {
  margin-bottom: 2rem;
  font-size: 1.9rem;
  color: var(--primary);
  font-weight: 500;
  text-align: center;
}

.related-tools ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin: 0;
  max-width: 100%;
}

.related-tools li {
  margin: 0;
}

.related-tools a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: var(--primary);
  color: var(--theme);
  text-decoration: none;
  border-radius: 10px;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  border: 2px solid transparent;
  min-height: 52px;
}

.related-tools a:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  border-color: var(--primary);
}

.journey-navigation {
  margin: 4rem 0;
  text-align: center;
  padding-top: 3rem;
  border-top: 2px solid var(--border);
}

.btn-next,
.btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 2.5rem;
  background: var(--primary);
  color: var(--theme);
  text-decoration: none;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-next:hover,
.btn-prev:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: var(--code-bg);
  border-color: var(--primary);
}

.tool-card {
  display: block;
  padding: 1.5rem;
  background: var(--entry) !important;
  color: var(--primary) !important;
  text-decoration: none;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 1rem;
}

.tool-card * {
  color: var(--primary) !important;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  color: var(--primary);
  text-decoration: none;
}

/* Исправление для .tool-name - убираем фон и padding из старого правила .tool-level, .tool-name */
.tool-card .tool-name,
.related-tools .tool-name,
.tools-grid .tool-name,
.related-tools a .tool-name,
a.tool-card .tool-name {
  color: var(--primary) !important;
  font-weight: 500;
  display: inline-block;
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Переопределяем старое правило .tool-level, .tool-name для карточек */
.related-tools a.tool-card .tool-name {
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
}

.tool-card .tool-level-badge,
.related-tools .tool-card .tool-level-badge,
.tools-grid .tool-card .tool-level-badge {
  display: inline-block !important;
  padding: 0.25rem 0.75rem !important;
  background: var(--code-bg) !important;
  background-color: var(--code-bg) !important;
  color: var(--primary) !important;
  border-radius: 12px !important;
  font-size: 0.85rem !important;
  margin-left: 0.5rem !important;
  font-weight: 500 !important;
  opacity: 0.9 !important;
}

.tools-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.pdf-guide {
  margin: 4rem 0;
  padding: 3rem 2rem;
  background: var(--entry);
  border-radius: 12px;
  text-align: center;
  border: 2px solid var(--border);
}

.pdf-guide h2 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

.pdf-guide p {
  color: var(--secondary);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 2.5rem;
  background: #d32f2f;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(211, 47, 47, 0.3);
}

.btn-download:hover {
  background: #b71c1c;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

/* Tool styles */
.tool-single {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

.tool-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.tool-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.tool-level,
.tool-name {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--code-bg);
  color: var(--primary);
  border-radius: 4px;
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.tool-content {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
  color: var(--content);
}

.tool-checklist {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--entry);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tool-checklist h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.checklist-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--content);
}

.tool-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border);
  text-align: center;
}

/* Contact page styles */
.contact-card {
  text-align: center;
  padding: 4rem 2rem;
  max-width: 900px;
  margin: 2rem auto;
  font-family: inherit;
  background-color: var(--entry);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Стили для секций внутри contact-card */
.contact-card .contact-section {
  margin-bottom: 3rem;
  text-align: left;
}

.contact-card .contact-section:last-child {
  margin-bottom: 0;
}

.contact-card .contact-section h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--primary);
  font-weight: 400;
  text-align: left;
}

.contact-card .contact-section h3 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
  color: var(--primary);
  font-weight: 400;
  text-align: left;
}

.contact-card .contact-section h3:first-of-type {
  margin-top: 0;
}

.contact-card .contact-section p {
  text-align: left;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.contact-card .contact-section ul {
  text-align: left;
  margin: 1rem 0 2rem;
  padding-left: 2rem;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
  .contact-card {
    padding: 1.5rem 1rem;
    margin: 0.5rem auto;
    border-radius: 12px;
  }
  
  .contact-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    text-align: left;
  }
  
  .contact-card h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.25rem;
    text-align: left;
  }
  
  .contact-card p {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    text-align: left;
  }
  
  .contact-card h3 + p {
    margin-bottom: 0.125rem;
    margin-top: 0;
  }
  
  .contact-card p + ul {
    margin-top: 0.125rem;
    margin-bottom: 0.5rem;
  }
  
  .contact-card ul {
    margin: 0.125rem auto 1rem;
    padding-left: 1.25rem;
    max-width: 100%;
    text-align: left;
  }
  
  /* Уменьшаем отступ между H3 и списком на мобильных */
  .contact-card h3 {
    margin-bottom: 0.5rem;
  }
  
  .contact-card h3 + p {
    margin-bottom: 0.25rem;
  }
  
  .contact-card ul li {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    padding-left: 1rem;
  }
  
  .contact-links {
    margin: 2rem 0;
  }
  
  .contact-links a {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .contact-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
  }
}

.contact-card h2 {
  margin-bottom: 2rem;
  font-size: 2.5rem;
  color: var(--primary);
  font-weight: 300;
}

.contact-card p {
  font-size: 1.3rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: var(--content);
}

.contact-card h3 + p {
  margin-bottom: 0.125rem;
  margin-top: 0;
}

.contact-card strong {
  color: var(--primary);
  font-weight: 600;
}

.contact-card ul {
  text-align: left;
  max-width: 500px;
  margin: 0.125rem auto 2rem;
  padding-left: 2rem;
  list-style: none;
}

.contact-card p + ul {
  margin-top: 0.125rem;
}

.contact-card ul li {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  padding-left: 1.5rem;
  position: relative;
  color: var(--content);
}

.contact-card ul li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--secondary);
}

.contact-links {
  margin: 3rem 0;
  text-align: center;
}

.contact-links a {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: var(--theme);
  text-decoration: none;
  border-radius: 4px;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin: 0.5rem;
}

.contact-links a:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-section {
  margin-bottom: 3rem;
  text-align: left;
}

.contact-section:last-child {
  margin-bottom: 0;
}

.contact-section h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--primary);
  font-weight: 400;
  text-align: left;
}

.contact-section h3 {
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 400;
  text-align: left;
}

.contact-section h3:first-of-type {
  margin-top: 2rem;
}

.contact-section p {
  text-align: left;
  margin-bottom: 1.5rem;
}

.contact-section ul {
  text-align: left;
  margin: 1rem 0;
}

.contact-card h3 {
  margin-top: 3rem;
  margin-bottom: 0.25rem;
  font-size: 1.8rem;
  color: var(--primary);
  font-weight: 400;
}

.contact-card h3:first-of-type {
  margin-top: 2rem;
}

.contact-footer {
  margin-top: 4rem;
  font-size: 1.1rem;
  color: var(--secondary);
}

.contact-footer a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

.contact-footer a:hover {
  text-decoration: underline;
  opacity: 0.8;
}

.contact-footer span {
  color: var(--secondary);
}

/* Telegram CTA кнопка */
.btn-telegram-cta {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary);
  color: var(--theme);
  text-decoration: none;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 600;
  min-height: 56px;
  line-height: 1.5;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 2px solid transparent;
  text-align: center;
  margin-top: 1.5rem;
}

.btn-telegram-cta:hover,
.btn-telegram-cta:focus {
  background-color: var(--secondary);
  color: var(--theme);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-color: var(--primary);
}

.btn-telegram-cta:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .btn-telegram-cta {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    box-sizing: border-box;
  }
  
  .contact-card {
    max-width: 100%;
    padding: 1.5rem 1rem;
  }
  
  .contact-section {
    max-width: 100%;
    width: 100%;
  }
  
  .contact-section .btn-telegram-cta {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Инструменты - сетка */
.intro-instruments {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.intro-instruments h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.intro-instruments p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--content);
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
  text-align: center;
}

.tool-grid a {
  display: block;
  padding: 1.5rem;
  background-color: var(--entry);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tool-grid a:hover {
  background-color: var(--code-bg);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
}

/* Адаптивность для journey страниц */
@media (max-width: 768px) {
  .journey-single {
    padding: 2rem 1rem;
  }

  /* Breadcrumbs на мобильных */
  .journey-single .breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    padding: 0;
  }
  
  .journey-single .breadcrumbs a {
    font-size: 0.95rem;
    color: var(--primary);
  }

  .journey-single .breadcrumbs ol {
    gap: 0.25rem;
  }

  .journey-single .breadcrumbs li:not(:last-child)::after {
    margin: 0 0.35rem;
  }

  .journey-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
  }

  .journey-header h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
  }

  .journey-description {
    font-size: 1.1rem;
  }

  .journey-content {
    font-size: 1.05rem;
    margin-bottom: 3rem;
  }

  .metaphors-gallery {
    margin: 3rem 0;
    padding: 2.5rem 1.5rem;
  }

  .metaphors-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
  }

  .metaphors-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }

  .metaphor-card {
    padding: 2rem 1.5rem;
  }

  .metaphor-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
  }

  .metaphor-card h3 {
    font-size: 1.35rem;
  }

  .metaphor-card p {
    font-size: 0.95rem;
  }

  .related-tools {
    padding: 2rem 1.5rem;
    margin: 3rem 0;
  }

  .related-tools h2 {
    font-size: 1.5rem;
  }

  .related-tools ul {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .related-tools a {
    width: 100%;
  }

  .journey-navigation {
    margin: 3rem 0;
    padding-top: 2rem;
  }

  .btn-next,
  .btn-prev {
    padding: 1rem 1.8rem;
    font-size: 1rem;
    width: 100%;
    justify-content: center;
  }

  .pdf-guide {
    padding: 2rem 1.5rem;
    margin: 3rem 0;
  }

  .pdf-guide h2 {
    font-size: 1.5rem;
  }

  .btn-download {
    width: 100%;
    justify-content: center;
    padding: 1rem 1.8rem;
    font-size: 1.1rem;
  }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
  .metaphors-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 100%;
  }

  .journey-single {
    padding: 2.5rem 1.5rem;
  }

  .related-tools ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Стили для пагинации блога - переопределяем стили темы */
.page-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Более специфичные селекторы для переопределения стилей темы */
nav.pagination,
.pagination {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 1rem !important;
  margin: 2rem 0 !important;
  padding: 1rem 0 !important;
  flex-wrap: wrap !important;
}

nav.pagination .prev,
nav.pagination .next,
nav.pagination a,
.pagination .prev,
.pagination .next,
.pagination a {
  display: inline-flex !important;
  align-items: center !important;
  padding: 0.75rem 1.5rem !important;
  background-color: var(--entry) !important;
  background: var(--entry) !important;
  color: var(--primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 1rem !important;
  line-height: 1.5 !important;
  transition: all 0.3s ease !important;
  box-shadow: var(--shadow-elevation-low) !important;
}

nav.pagination .prev:hover,
nav.pagination .next:hover,
nav.pagination a:hover,
.pagination .prev:hover,
.pagination .next:hover,
.pagination a:hover {
  background-color: var(--primary) !important;
  background: var(--primary) !important;
  color: var(--theme) !important;
  border-color: var(--primary) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--shadow-elevation-medium) !important;
}

nav.pagination .prev:active,
nav.pagination .next:active,
nav.pagination a:active,
.pagination .prev:active,
.pagination .next:active,
.pagination a:active {
  transform: translateY(0) !important;
}

@media (max-width: 768px) {
  nav.pagination,
  .pagination {
    gap: 0.75rem !important;
  }
  
  nav.pagination .prev,
  nav.pagination .next,
  nav.pagination a,
  .pagination .prev,
  .pagination .next,
  .pagination a {
    padding: 0.6rem 1.2rem !important;
    font-size: 0.9rem !important;
  }
  
  /* Мобильные стили для контейнеров страниц */
  .page-container-single {
    padding: 0 1rem !important;
  }
  
  /* Мобильные стили для оглавления */
  .post-toc {
    padding: 1rem !important;
    margin: 1.5rem 0 !important;
  }
  
  .post-toc .toc-title {
    font-size: 1.1rem !important;
    margin-bottom: 0.75rem !important;
  }
  
  /* Мобильные стили для info-block */
  .post-content .info-block {
    padding: 1rem !important;
    margin: 1.5rem 0 !important;
  }
  
  /* Мобильные стили для journey-quote */
  .journey-quote {
    margin: 2rem 0 !important;
    padding: 1.5rem 1rem !important;
  }
  
  .journey-quote p {
    font-size: 1rem !important;
  }
  
  /* Мобильные стили для tool-grid */
  .tool-grid {
    gap: 1rem !important;
  }
  
  .tool-grid a {
    padding: 0.8rem 1rem !important;
    font-size: 0.95rem !important;
  }
  
  /* Мобильные стили для заголовков статей - уменьшаем размер */
  .post-title,
  .post-header h1,
  .post-single h1,
  .post-single .post-header h1,
  article h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
    margin-top: 0.5rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Мобильные стили для post-header */
  .post-header {
    margin-bottom: 1.5rem !important;
  }
  
  .post-meta {
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Мобильные стили для заголовков в списке статей */
  .entry-title,
  article h2,
  .post-card h2,
  .post-card h3 {
    font-size: 1.4rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
  }
  
  /* Мобильные стили для навигации - улучшаем иерархию */
  .logo a,
  .site-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
  }
  
  #menu a,
  nav a {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
  }
  
  #menu a.active,
  nav a.active {
    font-weight: 600 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
  }
  
  /* Мобильные стили для карточек статей - равномерные отступы */
  article,
  .post-card,
  .entry-card {
    margin-bottom: 2rem !important;
    margin-top: 0 !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
  
  /* Мобильные стили для контактной карточки - улучшаем читаемость */
  .contact-card {
    line-height: 1.6 !important;
  }
  
  .contact-card p {
    font-size: 1rem !important; /* 16px - такой же размер как на блоге */
    line-height: 1.7 !important;
    margin-bottom: 1.25rem !important;
  }
  
  /* Мобильные стили для селектов - адаптируем для тапа */
  .filter-select {
    min-height: 44px !important;
    font-size: 1rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  /* Мобильные стили для кнопки сброса - делаем вторичной */
  .reset-btn {
    font-size: 0.95rem !important;
    padding: 0.7rem 1.5rem !important;
    min-height: 44px !important;
  }
  
  /* Мобильные стили для кнопки прокрутки - правильное позиционирование */
  #scroll-to-top,
  .scroll-to-top {
    z-index: 999 !important;
    bottom: 1.5rem !important;
    right: 1rem !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }
  
  /* Убеждаемся, что кнопка не перекрывает контент */
  .post-content,
  .contact-card,
  article {
    padding-bottom: 4rem !important;
  }
  
  /* Стили для страницы 404 */
  .error-actions {
    margin: 2rem 0 !important;
    padding: 1.5rem 1rem !important;
  }
  
  .error-actions h2 {
    font-size: 1.3rem !important;
    margin-bottom: 1.25rem !important;
  }
  
  .error-link {
    padding: 0.9rem 1.25rem !important;
    font-size: 0.95rem !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  /* Улучшаем touch targets для всех интерактивных элементов */
  a,
  button,
  input[type="button"],
  input[type="submit"],
  .btn,
  .button {
    min-height: 44px !important;
    min-width: 44px !important;
    touch-action: manipulation !important;
  }
  
  /* Улучшаем навигационные ссылки */
  #menu a,
  nav a,
  .nav a {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0.5rem 0.75rem !important;
  }
  
  /* Улучшаем ссылки в контенте */
  .post-content a,
  .entry-content a,
  article a {
    min-height: auto !important;
    min-width: auto !important;
    padding: 0.25rem 0 !important;
    word-break: break-word !important;
  }
  
  /* Предотвращаем горизонтальную прокрутку */
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Улучшаем читаемость текста на мобильных */
  body {
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
  }
  
  /* Улучшаем изображения */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Улучшаем таблицы (если есть) */
  table {
    width: 100% !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

/* ============================================
   Telegram Popup Styles
   ============================================ */

.telegram-popup {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 99999 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.3s ease-out;
  pointer-events: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.telegram-popup-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 1 !important;
  pointer-events: auto !important;
}

.telegram-popup-content {
  position: relative !important;
  background: var(--theme) !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  max-width: 500px !important;
  width: 100% !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  animation: slideUp 0.3s ease-out !important;
  border: 1px solid var(--border) !important;
  z-index: 2 !important;
  margin: 1rem !important;
  transform: translateZ(0) !important;
  will-change: transform !important;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.telegram-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  opacity: 0.7;
  transition: opacity 0.2s ease;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.telegram-popup-close:hover {
  opacity: 1;
  background: var(--hljs-bg);
}

.telegram-popup-close svg {
  width: 20px;
  height: 20px;
}

.telegram-popup-body {
  padding: 2.5rem 2rem 2rem;
  text-align: center;
}

.telegram-popup-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.telegram-popup-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--primary);
  line-height: 1.3;
}

.telegram-popup-description {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--secondary);
  margin: 0 0 1.5rem;
}

.telegram-popup-benefits {
  text-align: left;
  background: var(--hljs-bg);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.telegram-popup-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.telegram-popup-benefits li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: var(--secondary);
  line-height: 1.6;
}

.telegram-popup-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
}

.telegram-popup-button {
  display: inline-block;
  background: var(--accent);
  color: #ffffff !important;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.2s ease;
  margin: 1rem 0;
  border: 2px solid var(--accent);
}

.telegram-popup-button:hover {
  background: var(--accent);
  color: #ffffff !important;
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* В темной теме кнопка должна быть яркой */
[data-theme="dark"] .telegram-popup-button {
  background: #007bff !important;
  color: #ffffff !important;
  border-color: #007bff !important;
}

[data-theme="dark"] .telegram-popup-button:hover {
  background: #0056b3 !important;
  border-color: #0056b3 !important;
}

/* Светлая тема - гарантируем хорошую читаемость */
[data-theme="light"] .telegram-popup-content {
  background: #ffffff !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .telegram-popup-title {
  color: #1a1a1a !important;
}

[data-theme="light"] .telegram-popup-description {
  color: #4a4a4a !important;
}

[data-theme="light"] .telegram-popup-benefits {
  background: #f5f5f5 !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .telegram-popup-benefits li {
  color: #333333 !important;
}

[data-theme="light"] .telegram-popup-note {
  color: #666666 !important;
}

[data-theme="light"] .telegram-popup-close {
  color: #333333 !important;
}

[data-theme="light"] .telegram-popup-close:hover {
  background: rgba(0, 0, 0, 0.05) !important;
}

.telegram-popup-note {
  font-size: 0.875rem;
  color: var(--secondary);
  opacity: 0.7;
  margin: 1rem 0 0;
}

/* Мобильная версия */
@media (max-width: 768px) {
  .telegram-popup-content {
    max-width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
  }

  .telegram-popup-body {
    padding: 2rem 1.5rem 1.5rem;
  }

  .telegram-popup-title {
    font-size: 1.5rem;
  }

  .telegram-popup-description {
    font-size: 1rem;
  }

  .telegram-popup-icon {
    font-size: 3rem;
  }

  .telegram-popup-button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
  }

  .telegram-popup-benefits {
    padding: 1.25rem;
  }
}

/* Темная тема - дополнительные стили */
[data-theme="dark"] .telegram-popup-content {
  background: #2e2e33 !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .telegram-popup-overlay {
  background: rgba(0, 0, 0, 0.75);
}

/* Улучшенная читаемость текста в темной теме */
[data-theme="dark"] .telegram-popup-title {
  color: #ffffff !important;
}

[data-theme="dark"] .telegram-popup-description {
  color: #d4d4d4 !important;
}

[data-theme="dark"] .telegram-popup-benefits {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .telegram-popup-benefits li {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .telegram-popup-note {
  color: #b0b0b0 !important;
}

[data-theme="dark"] .telegram-popup-close {
  color: #ffffff !important;
  opacity: 0.8;
}

[data-theme="dark"] .telegram-popup-close:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  opacity: 1;
}
