/* ============================================
   ЦВЕТОВАЯ ПАЛИТРА - ПАСТЕЛЬНЫЕ ТОНА
   ============================================ */
:root {
  --color-light-blue: #e1eff5;
  --color-blue-grey: #93a6b3;
  --color-lavender: #adb3cc;
  --color-taupe: #bfc3ce;
  --color-mauve: #e0d1db;
  --color-peach: #f0dfda;
  --color-white: #ffffff;
  --color-black: #000000;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4a4a4a;
  --color-text-muted: #6b7280;
  --color-accent: #e13e77;
  
  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, #e0d1db 0%, #f0dfda 100%);
  --gradient-secondary: linear-gradient(135deg, #e1eff5 0%, #adb3cc 100%);
  --gradient-accent: linear-gradient(135deg, #adb3cc 0%, #bfc3ce 100%);
  
  /* Тени минималистичные */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  
  /* Радиусы */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Отступы */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ - МИНИМАЛИЗМ
   ============================================ */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--color-white);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.chat-message-body {
  white-space: pre-line;
  word-break: break-word;
}

.chat-link {
  color: #0d6efd;
  text-decoration: underline;
}

.chat-link:hover {
  text-decoration: none;
}

/* Типографика */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-blue-grey);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-lavender);
}

/* ============================================
   НАВИГАЦИЯ - МИНИМАЛИСТИЧНАЯ
   ============================================ */
.navbar {
  background-color: var(--color-white) !important;
  border-bottom: 1px solid var(--color-taupe);
  padding: var(--spacing-sm) 0;
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 600;
  color: var(--color-text-primary) !important;
  letter-spacing: -0.02em;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--color-text-secondary) !important;
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm) !important;
  transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--color-accent) !important;
}

.navbar-toggler {
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-sm);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 26, 26, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================
   ГЛАВНАЯ СЕКЦИЯ - ГЕРОЙ
   ============================================ */
.hero-section-modern {
  background: var(--color-light-blue);
  color: var(--color-text-primary);
  padding: var(--spacing-xl) 0;
  position: relative;
  overflow: hidden;
}

.hero-section-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(225, 239, 245, 0.5) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(240, 223, 218, 0.3) 0%, transparent 50%);
  opacity: 0.6;
}

.hero-section-modern .container {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.hero-icon {
  position: relative;
}

.hero-icon i {
  font-size: 10rem;
  color: var(--color-lavender);
  opacity: 0.3;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* ============================================
   КНОПКИ - МИНИМАЛИСТИЧНЫЕ
   ============================================ */
.btn {
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-modern-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 0.875rem 2rem;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-modern-primary:hover {
  background: #c13566;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-modern-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 0.875rem 2rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-modern-outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  font-weight: 500;
}

.btn-primary:hover {
  background: #c13566;
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border: 1.5px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--color-accent);
  color: var(--color-white);
  border-color: var(--color-accent);
}

.btn-success {
  background: var(--color-mauve);
  color: var(--color-text-primary);
  border: none;
}

.btn-success:hover {
  background: var(--color-peach);
  color: var(--color-text-primary);
}

.btn-secondary {
  background: var(--color-taupe);
  color: var(--color-white);
  border: none;
}

.btn-secondary:hover {
  background: var(--color-blue-grey);
  color: var(--color-white);
}

/* ============================================
   КАРТОЧКИ - МИНИМАЛИСТИЧНЫЕ
   ============================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.card-header {
  background: var(--color-light-blue);
  border-bottom: 1px solid var(--color-taupe);
  padding: var(--spacing-md);
  font-weight: 600;
  color: var(--color-text-primary);
}

.card-body {
  padding: var(--spacing-md);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.card-text {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* Статистика */
.stat-card {
  padding: var(--spacing-lg);
  background: var(--color-white);
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  height: 100%;
  text-align: center;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.stat-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--color-white);
}

.stat-icon-1 {
  background: var(--color-mauve);
}

.stat-icon-2 {
  background: var(--color-lavender);
}

.stat-icon-3 {
  background: var(--color-peach);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

/* Преимущества */
.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xl);
  text-align: center;
  letter-spacing: -0.02em;
}

.feature-card {
  padding: var(--spacing-lg);
  background: var(--color-white);
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  height: 100%;
  text-align: center;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--spacing-md);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-white);
}

.feature-icon-1 {
  background: var(--color-mauve);
}

.feature-icon-2 {
  background: var(--color-lavender);
}

.feature-icon-3 {
  background: var(--color-peach);
}

/* Карточки статей */
.article-card {
  background: var(--color-white);
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--color-accent);
}

.article-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: var(--color-light-blue);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
}

.article-card:hover .article-image img {
  transform: scale(1.02);
}

.article-content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-summary {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-sm);
  line-height: 1.6;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-footer {
  margin-top: auto;
  padding-top: var(--spacing-sm);
}

.btn-modern-link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-modern-link:hover {
  color: #c13566;
  transform: translateX(4px);
}

/* ============================================
   БЕЙДЖИ И МЕТКИ
   ============================================ */
.badge {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
}

.badge.bg-primary {
  background: #ffffff !important;
  color: #c91a50 !important;
  border: 1px solid;
}

.badge.bg-success {
  background: var(--color-mauve) !important;
  color: var(--color-text-primary) !important;
}

.badge.bg-info {
  background: var(--color-lavender) !important;
  color: var(--color-white) !important;
}

.badge.bg-secondary {
  background: var(--color-taupe) !important;
  color: var(--color-white) !important;
}

.badge.bg-warning {
  background: var(--color-peach) !important;
  color: var(--color-text-primary) !important;
}

.badge.bg-gradient {
  background: var(--gradient-primary) !important;
  color: var(--color-text-primary) !important;
}

/* ============================================
   ФОРМЫ - МИНИМАЛИСТИЧНЫЕ
   ============================================ */
.form-control {
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--color-white);
  color: var(--color-text-primary);
}

.form-control:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(225, 62, 119, 0.1);
  outline: none;
}

.form-label {
  font-weight: 500;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.form-select {
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  background: var(--color-white);
  color: var(--color-text-primary);
}

.form-select:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(225, 62, 119, 0.1);
  outline: none;
}

/* ============================================
   АЛЕРТЫ
   ============================================ */
.alert {
  border-radius: var(--radius-md);
  border: 1px solid;
  padding: var(--spacing-md);
}

.alert-primary {
  background: rgba(225, 62, 119, 0.1);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.alert-success {
  background: var(--color-light-blue);
  border-color: var(--color-mauve);
  color: var(--color-text-primary);
}

.alert-danger {
  background: #fff5f5;
  border-color: #fc8181;
  color: #c53030;
}

.alert-warning {
  background: var(--color-peach);
  border-color: var(--color-mauve);
  color: var(--color-text-primary);
}

.alert-info {
  background: var(--color-light-blue);
  border-color: var(--color-lavender);
  color: var(--color-text-primary);
}

/* ============================================
   ТАБЛИЦЫ
   ============================================ */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: var(--color-light-blue);
  color: var(--color-text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--color-taupe);
  padding: var(--spacing-md);
}

.table tbody td {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--color-taupe);
}

.table tbody tr:hover {
  background: var(--color-light-blue);
}

/* ============================================
   ФУТЕР
   ============================================ */
footer {
  background: var(--color-light-blue);
  border-top: 1px solid var(--color-taupe);
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* ============================================
   УТИЛИТЫ
   ============================================ */
.text-primary {
  color: var(--color-accent) !important;
}

.text-secondary {
  color: var(--color-text-secondary) !important;
}

.text-muted {
  color: var(--color-text-muted) !important;
}

.bg-primary {
  background-color: var(--color-accent) !important;
}

.bg-light {
  background-color: var(--color-light-blue) !important;
}

.border-primary {
  border-color: var(--color-accent) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-icon i {
    font-size: 6rem;
  }
  
  .section-title {
    font-size: 1.75rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .hero-section-modern {
    padding: var(--spacing-lg) 0;
  }
  
  .btn-modern-primary,
  .btn-modern-outline {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .navbar-brand img {
    height: 32px;
  }
  
  .navbar-brand span {
    font-size: 0.9rem;
  }
}

/* ============================================
   СПЕЦИАЛЬНЫЕ СТИЛИ ДЛЯ ПРЕМИУМ КОНТЕНТА
   ============================================ */
/* Рекламные баннеры */
#bannerCarousel .carousel-item .card {
  border: none;
  background: var(--color-white);
  max-height: 400px;
  overflow: hidden;
}

#bannerCarousel .carousel-item {
  max-height: 400px;
}

#bannerCarousel .carousel-item .card .row {
  height: 100%;
  max-height: 400px;
}

#bannerCarousel .carousel-item .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  max-height: 400px;
  overflow-y: auto;
}

/* Лидеры категорий - золотая корона */
.fa-crown {
  color: #d4af37;
}

/* Карусель лидеров категорий */
#leadersCarousel .carousel-item {
  padding: 20px 0;
}

#leadersCarousel .carousel-control-prev,
#leadersCarousel .carousel-control-next {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
}

#leadersCarousel .carousel-control-prev {
  left: -25px;
}

#leadersCarousel .carousel-control-next {
  right: -25px;
}

#leadersCarousel a:hover {
  transform: scale(1.05);
  transition: transform 0.2s;
}

#leadersCarousel a {
  transition: transform 0.2s;
}

/* Золотая галочка для проверенных специалистов */
.fa-check-circle[style*="#ffd700"] {
  color: #d4af37 !important;
}

/* ============================================
   ПРОГРЕСС БАРЫ
   ============================================ */
.progress {
  height: 8px;
  background: var(--color-taupe);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.progress-bar {
  background: var(--color-accent);
  transition: width 0.3s ease;
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА
   ============================================ */
.modal-content {
  border: 1px solid var(--color-taupe);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  background: var(--color-light-blue);
  border-bottom: 1px solid var(--color-taupe);
  padding: var(--spacing-md);
}

.modal-body {
  padding: var(--spacing-md);
}

.modal-footer {
  border-top: 1px solid var(--color-taupe);
  padding: var(--spacing-md);
}

/* Telegram баннер стили */
.telegram-banner {
    border-radius: 8px;
}

.telegram-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #4a83c7;
    margin: 0 auto;
}

.telegram-btn {
    background-color: #4a83c7;
    color: white;
    border: 2px solid #4a83c7;
    border-radius: 6px;
    padding: 8px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.telegram-btn:hover {
    background-color: white;
    color: #4a83c7;
    border-color: #4a83c7;
}
