/* ═══════════════════════════════════════════════════════════════
   MAESTRO NEWS — Единый CSS для Tilda
   
   УСТАНОВКА:
   1. Добавь CSS Class Name блока: uc-maestro-news
   2. Вставь ВЕСЬ этот CSS в поле "BLOCK CSS"
   3. Подключи шрифт в HTML сайта (Head Code):
      
   
   ПАЛИТРА: тёмная тема + золотые акценты
   ШРИФТ: Plus Jakarta Sans
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   1. СБРОС И БАЗОВЫЕ СТИЛИ
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news),
:where(.uc-maestro-news, .maestro-news) * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ═══════════════════════════════════════════════════════════════
   2. CSS-ПЕРЕМЕННЫЕ (ТОКЕНЫ)
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) {
  /* Цвета */
  --mn-dark: #0c0b09;
  --mn-card: rgba(12, 11, 9, 0.6);
  --mn-card-solid: rgba(18, 16, 13, 0.95);
  --mn-glass: rgba(255, 255, 255, 0.04);
  --mn-glass-border: rgba(255, 255, 255, 0.08);
  
  /* Текст */
  --mn-ink: #f8f6f2;
  --mn-ink-soft: rgba(248, 246, 242, 0.85);
  --mn-muted: rgba(248, 246, 242, 0.55);
  --mn-faint: rgba(248, 246, 242, 0.3);
  
  /* Акценты */
  --mn-gold: #c9a96e;
  --mn-gold-light: #e8d5a8;
  --mn-gold-deep: #a88b4a;
  --mn-gold-glow: rgba(201, 169, 110, 0.15);
  
  /* Дополнительные */
  --mn-sage: #8fa882;
  
  /* Тени */
  --mn-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
  --mn-shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.5);
  --mn-shadow-gold: 0 8px 32px rgba(201, 169, 110, 0.2);

  /* Шрифт */
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;

  /* Layout */
  position: relative;
  overflow: hidden;
  background: var(--mn-dark);
  color: var(--mn-ink);
  padding: clamp(64px, 8vw, 100px) 0;
}

/* ═══════════════════════════════════════════════════════════════
   3. ФОНОВЫЕ СЛОИ
   ═══════════════════════════════════════════════════════════════ */

/* Градиентный overlay */
:where(.uc-maestro-news, .maestro-news)::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(201, 169, 110, 0.06), transparent 50%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(143, 168, 130, 0.04), transparent 40%);
  pointer-events: none;
}

/* Верхняя линия-акцент */
:where(.uc-maestro-news, .maestro-news)::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: min(1100px, calc(100% - 48px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, 
    transparent, 
    rgba(201, 169, 110, 0.4) 30%, 
    rgba(201, 169, 110, 0.6) 50%, 
    rgba(201, 169, 110, 0.4) 70%, 
    transparent);
}

/* ═══════════════════════════════════════════════════════════════
   4. КОНТЕЙНЕР
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) .mn-wrap {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   5. ЗАГОЛОВОК СЕКЦИИ
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) .mn-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* Бейдж-метка */
:where(.uc-maestro-news, .maestro-news) .mn-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(201, 169, 110, 0.25);
  background: rgba(201, 169, 110, 0.06);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mn-gold-light);
}

/* Анимированная точка */
:where(.uc-maestro-news, .maestro-news) .mn-label-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mn-sage);
  box-shadow: 0 0 12px rgba(143, 168, 130, 0.6);
  animation: mnPulse 3s ease-in-out infinite;
}

@keyframes mnPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.4); }
}

/* Заголовок */
:where(.uc-maestro-news, .maestro-news) .mn-title {
  margin: 0 0 12px;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}

/* Градиентный акцент в заголовке */
:where(.uc-maestro-news, .maestro-news) .mn-title-accent {
  background: linear-gradient(135deg, var(--mn-gold-light), var(--mn-gold));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

/* Подзаголовок */
:where(.uc-maestro-news, .maestro-news) .mn-subtitle {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.7;
  color: var(--mn-muted);
}

/* ═══════════════════════════════════════════════════════════════
   6. СЕТКА КАРТОЧЕК
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) .mn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   7. КАРТОЧКА
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) .mn-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--mn-glass-border);
  background: var(--mn-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  box-shadow: var(--mn-shadow);
  transition: 
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease;
}

/* Верхний блик */
:where(.uc-maestro-news, .maestro-news) .mn-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  z-index: 2;
}

/* Hover glow */
:where(.uc-maestro-news, .maestro-news) .mn-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, 
    rgba(201, 169, 110, 0.04) 0%, 
    transparent 40%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* Hover эффект */
:where(.uc-maestro-news, .maestro-news) .mn-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--mn-shadow-lg);
  border-color: rgba(201, 169, 110, 0.2);
}

:where(.uc-maestro-news, .maestro-news) .mn-card:hover::after {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   8. РАСШИРЕННАЯ КАРТОЧКА (последняя)
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) .mn-card--expanded {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 360px;
}

/* ═══════════════════════════════════════════════════════════════
   9. ИЗОБРАЖЕНИЯ
   ═══════════════════════════════════════════════════════════════ */

/* Контейнер изображений */
:where(.uc-maestro-news, .maestro-news) .mn-card-images {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
}

/* Расширенная карточка: изображения вертикально */
:where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-images {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr 1fr;
}

/* Обёртка изображения */
:where(.uc-maestro-news, .maestro-news) .mn-card-img {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

/* Изображение */
:where(.uc-maestro-news, .maestro-news) .mn-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Zoom при hover */
:where(.uc-maestro-news, .maestro-news) .mn-card:hover .mn-card-img img {
  transform: scale(1.05);
}

/* Бейдж-счётчик фото */
:where(.uc-maestro-news, .maestro-news) .mn-card-photos {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  z-index: 2;
}

:where(.uc-maestro-news, .maestro-news) .mn-card-photos svg {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   10. СОДЕРЖИМОЕ КАРТОЧКИ
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) .mn-card-content {
  padding: clamp(20px, 2.5vw, 28px);
  display: flex;
  flex-direction: column;
}

:where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-content {
  padding: clamp(24px, 3vw, 36px);
  justify-content: center;
}

/* Дата */
:where(.uc-maestro-news, .maestro-news) .mn-card-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 100px;
  background: rgba(201, 169, 110, 0.1);
  border: 1px solid rgba(201, 169, 110, 0.15);
  font-size: 12px;
  font-weight: 600;
  color: var(--mn-gold-light);
}

:where(.uc-maestro-news, .maestro-news) .mn-card-date svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

/* Категория */
:where(.uc-maestro-news, .maestro-news) .mn-card-category {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mn-sage);
}

/* Заголовок карточки */
:where(.uc-maestro-news, .maestro-news) .mn-card-title {
  margin: 0 0 12px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  transition: color 0.3s ease;
}

:where(.uc-maestro-news, .maestro-news) .mn-card:hover .mn-card-title {
  color: var(--mn-gold-light);
}

:where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-title {
  font-size: clamp(24px, 2.5vw, 32px);
}

/* Текст карточки */
:where(.uc-maestro-news, .maestro-news) .mn-card-text {
  margin: 0 0 20px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--mn-muted);
  flex: 1;
}

:where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-text {
  font-size: 15px;
  max-width: 480px;
}

/* Теги */
:where(.uc-maestro-news, .maestro-news) .mn-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

:where(.uc-maestro-news, .maestro-news) .mn-tag {
  padding: 5px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  font-weight: 600;
  color: var(--mn-muted);
  transition: all 0.2s ease;
}

:where(.uc-maestro-news, .maestro-news) .mn-tag:hover {
  background: rgba(201, 169, 110, 0.1);
  border-color: rgba(201, 169, 110, 0.2);
  color: var(--mn-gold-light);
}

/* Подвал карточки */
:where(.uc-maestro-news, .maestro-news) .mn-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Ссылка "Подробнее" */
:where(.uc-maestro-news, .maestro-news) .mn-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--mn-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

:where(.uc-maestro-news, .maestro-news) .mn-card-link:hover {
  color: var(--mn-gold-light);
}

:where(.uc-maestro-news, .maestro-news) .mn-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

:where(.uc-maestro-news, .maestro-news) .mn-card-link:hover svg {
  transform: translateX(4px);
}

/* Просмотры */
:where(.uc-maestro-news, .maestro-news) .mn-card-views {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mn-faint);
}

:where(.uc-maestro-news, .maestro-news) .mn-card-views svg {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   11. СКРОЛЛБАР
   ═══════════════════════════════════════════════════════════════ */

:where(.uc-maestro-news, .maestro-news) ::-webkit-scrollbar {
  width: 6px;
}

:where(.uc-maestro-news, .maestro-news) ::-webkit-scrollbar-track {
  background: transparent;
}

:where(.uc-maestro-news, .maestro-news) ::-webkit-scrollbar-thumb {
  background: rgba(201, 169, 110, 0.3);
  border-radius: 3px;
}

/* ═══════════════════════════════════════════════════════════════
   12. АДАПТИВ — ДЕСКТОП
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {
  :where(.uc-maestro-news, .maestro-news) .mn-card-images {
    min-height: 240px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-images {
    min-height: 360px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   13. АДАПТИВ — ПЛАНШЕТ
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 641px) and (max-width: 1023px) {
  :where(.uc-maestro-news, .maestro-news) {
    padding: clamp(48px, 6vw, 72px) 0;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-grid {
    gap: 16px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card-images {
    min-height: 200px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   14. АДАПТИВ — МОБИЛЬНЫЙ
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  :where(.uc-maestro-news, .maestro-news) {
    padding: 48px 0 52px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-wrap {
    width: calc(100% - 32px);
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  /* Расширенная карточка → обычная на мобильном */
  :where(.uc-maestro-news, .maestro-news) .mn-card--expanded {
    grid-column: auto;
    display: block;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-images {
    grid-template-columns: 1fr 1fr;
    min-height: 180px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card-images {
    min-height: 180px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card {
    border-radius: 16px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card-title {
    font-size: 18px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card--expanded .mn-card-title {
    font-size: 22px;
  }
  
  :where(.uc-maestro-news, .maestro-news) .mn-card-content {
    padding: 18px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   15. ДОСТУПНОСТЬ
   ═══════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  :where(.uc-maestro-news, .maestro-news) * {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}