@charset "utf-8";
/* CSS Document */

/* Базовые стили */
.infographic {
    max-width: 900px;
    margin: 32px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', sans-serif;
}

.infographic h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 40px;
}

.chart-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

/* SVG диаграмма */
.pie-chart {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

/* Легкая CSS-анимация для сегментов - только transform и opacity */
.pie-chart circle {
    transform-origin: center;
    will-change: transform;
}

/* Анимация появления сегментов */
.pie-chart circle.segment {
    stroke-dasharray: 0 754;
    animation: drawSegment 1.2s ease-out forwards;
}

.pie-chart circle.segment:nth-of-type(1) {
    animation-delay: 0.1s;
}

.pie-chart circle.segment:nth-of-type(2) {
    animation-delay: 0.3s;
}

.pie-chart circle.segment:nth-of-type(3) {
    animation-delay: 0.5s;
}

.pie-chart circle.segment:nth-of-type(4) {
    animation-delay: 0.7s;
}

@keyframes drawSegment {
    from {
        stroke-dasharray: 0 754;
        opacity: 0.3;
    }
    to {
        stroke-dasharray: var(--dash-array);
        opacity: 1;
    }
}

/* Hover эффект - только transform */
.pie-chart circle.segment {
    transition: transform 0.2s ease;
    cursor: pointer;
}

.pie-chart circle.segment:hover {
    transform: scale(1.02);
}

/* Центральный текст - УВЕЛИЧЕНА ДЛИТЕЛЬНОСТЬ АНИМАЦИИ */
.chart-total,
.chart-label {
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

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

.chart-total {
    font-size: 42px;
    font-weight: 700;
    fill: #2C5F9D;
}

.chart-label {
    font-size: 16px;
    fill: #6b7280;
    font-weight: 500;
}

/* Текстовое описание для SEO */
.infographic-desc {
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    color: #4b5563;
    margin: 32px auto;
    max-width: 700px;
}

/* Легенда */
.chart-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 300px;
}

.chart-legend li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    animation: slideIn 0.4s ease-out forwards;
}

.chart-legend li:nth-child(1) {
    animation-delay: 0.2s;
}

.chart-legend li:nth-child(2) {
    animation-delay: 0.35s;
}

.chart-legend li:nth-child(3) {
    animation-delay: 0.5s;
}

.chart-legend li:nth-child(4) {
    animation-delay: 0.65s;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.chart-legend li:hover {
    transform: translateX(4px);
    transition: transform 0.2s ease;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.legend-text {
    font-size: 16px;
    color: #374151;
    font-weight: 500;
    flex-grow: 1;
}

.legend-percent {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    min-width: 45px;
    text-align: right;
}

/* Отключение анимации для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .chart-wrapper {
        flex-direction: column;
        gap: 30px;
    }

    .infographic h2 {
        font-size: 24px;
    }

    .pie-chart {
        max-width: 320px;
    }

    .chart-legend {
        min-width: 100%;
    }

    /* Упрощенная анимация на мобильных */
    .pie-chart circle.segment {
        animation-duration: 0.8s;
    }

    .chart-legend li {
        animation-duration: 0.3s;
    }
}

/* Состояние до загрузки JS */
.no-js .pie-chart circle.segment {
    stroke-dasharray: var(--dash-array) !important;
    opacity: 1 !important;
    animation: none !important;
}

.no-js .chart-total,
.no-js .chart-label,
.no-js .chart-legend li {
    opacity: 1 !important;
    animation: none !important;
}



.contact-infographic {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 var(--space-20);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 24px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--color-card-border);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.contact-icon {
  margin-bottom: 16px;
  flex-shrink: 0;
}

.contact-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-heading);
  margin: 8px 0;
}

.contact-value {
  font-size: var(--font-size-base);
  color: var(--color-text);
  margin: 4px 0;
  word-break: break-word;
}

.contact-link {
  font-size: var(--font-size-base);
  color: var(--color-primary);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}



/* Адаптивность */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .contact-card {
    padding: 24px 20px;
  }
}

/* Отключение анимации для пользователей с prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .contact-card {
    transition: none;
  }
}

/* Черный цвет для ссылок телефона и email - добавить в конец style.css */
a.contact-link,
a.contact-mail {
  color: #171717 !important;
  text-decoration: none !important;
}

a.contact-link:visited,
a.contact-mail:visited {
  color: #171717 !important;
}

a.contact-link:hover,
a.contact-mail:hover {
  color: #171717 !important;
  text-decoration: underline !important;
  opacity: 0.7;
}

a.contact-link:active,
a.contact-mail:active {
  color: #171717 !important;
}



