/* ===== ПРОТОКОЛЫ С ПРЕВЬЮ ===== */
.protocols-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 32px;
}

.protocol-item {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #eae8e2;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.protocol-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--c6);
}

.protocol-preview {
  position: relative;
  width: 100%;
  height: 260px;
  background: var(--bg-light);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.protocol-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.protocol-item:hover .protocol-preview img {
  transform: scale(1.03);
}

/* ===== МИНИМАЛИСТИЧНЫЙ КРЕСТ В УГЛУ (для декора) ===== */
.protocol-close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 300;
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  line-height: 1;
  padding: 0;
  pointer-events: none;
}

/* Бейдж PDF поверх изображения в протоколах */
.protocol-pdf-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(231, 76, 60, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
}

/* Иконка PDF (если нет превью) */
.protocol-pdf-icon {
  font-size: 56px;
  color: #e74c3c;
  background: #fef9f7;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #e74c3c;
  font-weight: 700;
}

.protocol-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--c2);
  padding: 18px 20px 6px;
  line-height: 1.4;
}

.protocol-type {
  font-size: 13px;
  color: #999;
  padding: 0 20px 18px;
}

/* ===== МОДАЛЬНОЕ ОКНО ДЛЯ ИЗОБРАЖЕНИЙ (НА ВЕСЬ ЭКРАН) ===== */
.media-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.93);
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.media-modal.show {
  display: flex;
}

.media-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: auto;
}

.media-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.media-modal-body {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.media-image-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
}

.media-image-container:active {
  cursor: grabbing;
}

.media-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  transition: none;
  transform-origin: center center;
  will-change: transform;
  pointer-events: auto;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

/* ===== ПОДСКАЗКА ===== */
.media-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  padding: 10px 24px;
  border-radius: 24px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.06);
  animation: hintFade 4s forwards;
  pointer-events: none;
}

@keyframes hintFade {
  0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
  15% { opacity: 1; transform: translateX(-50%) translateY(0); }
  85% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* ===== ОТЗЫВЫ С ПРЕВЬЮ ===== */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.review-item {
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  border-left: 4px solid var(--c6);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.review-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--c6);
}

.review-preview {
  position: relative;
  width: 100%;
  height: 180px;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-light);
  flex-shrink: 0;
}

.review-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.review-item:hover .review-preview img {
  transform: scale(1.03);
}

/* Бейдж PDF поверх изображения в отзывах */
.review-pdf-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(231, 76, 60, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
}

.review-item .text {
  font-size: 16px;
  font-style: italic;
  color: #333;
  line-height: 1.8;
  flex: 1;
}

.review-item .author {
  margin-top: 16px;
  font-weight: 600;
  color: var(--c2);
  font-size: 15px;
}

.review-pdf-label {
  font-size: 13px;
  color: #999;
  margin-top: 14px;
  border-top: 1px dashed #ddd;
  padding-top: 12px;
  font-style: normal;
  transition: color 0.3s;
}

.review-item:hover .review-pdf-label {
  color: var(--c6);
}

/* ===== ВАРИАНТ B: ЦИФРЫ + ДОКУМЕНТ ===== */
.protocols-grid-variant-b {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 860px;
  margin: 0 auto;
}

/* Левая колонка — статистика */
.protocol-stats {
  background: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
  border: 1px solid #eae8e2;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-culture {
  font-size: 13px;
  color: #888;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eae8e2;
  font-weight: 500;
}

.stat-item {
  margin-bottom: 16px;
}
.stat-item:last-of-type {
  margin-bottom: 0;
}

.stat-number {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--c6);
  line-height: 1.1;
}

.stat-label {
  font-size: 15px;
  color: #555;
}

.stat-context {
  display: block;
  font-size: 13px;
  color: #999;
  margin-top: 2px;
}

.stat-divider {
  height: 1px;
  background: #eae8e2;
  margin: 12px 0;
}

.stat-note {
  font-size: 13px;
  color: #999;
  margin-top: 16px;
  font-style: italic;
}

/* ===== КНОПКА "ИЗУЧИТЬ ПРОТОКОЛ"  ===== */
.protocol-stats-btn {
  margin-top: 20px;
  padding: 14px 34px;
  background: transparent;
  color: var(--c6);
  border: 2px solid rgba(131, 142, 87, 0.4);
  border-radius: 40px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.protocol-stats-btn::before {
  content: '';
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  border-radius: 50px;
  background: radial-gradient(circle, rgba(131, 142, 87, 0.15) 0%, transparent 70%);
  z-index: -1;
  filter: blur(15px);
  transition: all 0.4s ease;
  animation: pulseOuterGlow 3s ease-in-out infinite;
}

.protocol-stats-btn:hover {
  border-color: var(--c6);
  background: rgba(131, 142, 87, 0.08);
  transform: translateY(-2px);
  box-shadow: 
    0 0 30px rgba(131, 142, 87, 0.15),
    0 0 60px rgba(131, 142, 87, 0.08),
    0 0 100px rgba(131, 142, 87, 0.04);
}

.protocol-stats-btn:hover::before {
  background: radial-gradient(circle, rgba(131, 142, 87, 0.25) 0%, transparent 70%);
  filter: blur(20px);
}

.protocol-stats-btn:active {
  transform: translateY(0);
}

/* ===== ПУЛЬСАЦИЯ ВНУТРЕННЕЙ ТЕНИ ===== */
@keyframes pulseGlow {
  0% {
    box-shadow: 
      0 0 20px rgba(131, 142, 87, 0.08),
      0 0 40px rgba(131, 142, 87, 0.04);
  }
  50% {
    box-shadow: 
      0 0 30px rgba(131, 142, 87, 0.2),
      0 0 60px rgba(131, 142, 87, 0.1);
  }
  100% {
    box-shadow: 
      0 0 20px rgba(131, 142, 87, 0.08),
      0 0 40px rgba(131, 142, 87, 0.04);
  }
}


/* ===== ПУЛЬСАЦИЯ ВНЕШНЕГО СВЕЧЕНИЯ ===== */
@keyframes pulseOuterGlow {
  0% {
    opacity: 0.6;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  100% {
    opacity: 0.6;
    transform: scale(0.95);
  }
}

/* Правая колонка — карточка PDF */
.protocols-grid-variant-b .protocol-item {
  display: flex;
  flex-direction: column;
}

.protocols-grid-variant-b .protocol-preview {
  height: 280px;
  width: 100%;
  flex-shrink: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
}

.protocols-grid-variant-b .protocol-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.protocols-grid-variant-b .protocol-name {
  padding: 14px 18px 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c2);
  flex-shrink: 0;
}

.protocols-grid-variant-b .protocol-type {
  padding: 0 18px 18px;
  font-size: 13px;
  color: #999;
  flex-shrink: 0;
}

.protocols-grid-variant-b .protocol-pdf-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
  .protocols-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .protocols-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .protocol-preview {
    height: 200px;
  }
  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .review-preview {
    height: 140px;
  }
  .review-item {
    padding: 24px;
  }
  .media-modal-close {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  .media-hint {
    bottom: 30px;
    font-size: 12px;
    padding: 8px 16px;
  }

  /* Адаптив для варианта B */
  .protocols-grid-variant-b {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  .protocols-grid-variant-b .protocol-preview {
    height: 220px;
  }
  .protocol-stats {
    padding: 28px 24px;
  }
  .stat-number {
    font-size: 30px;
  }
  .protocol-stats-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .protocols-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .protocol-preview {
    height: 150px;
  }
  .protocol-name {
    font-size: 13px;
    padding: 12px 14px 4px;
  }
  .protocol-type {
    font-size: 11px;
    padding: 0 14px 14px;
  }
  .protocol-pdf-icon {
    font-size: 36px;
    width: 56px;
    height: 56px;
  }
  .protocol-close-btn {
    width: 20px;
    height: 20px;
    font-size: 12px;
    top: 4px;
    right: 6px;
  }
  .protocol-pdf-badge {
    font-size: 9px;
    padding: 3px 10px;
    top: 8px;
    right: 8px;
  }
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .review-preview {
    height: 110px;
  }
  .review-item {
    padding: 18px;
  }
  .review-item .text {
    font-size: 14px;
  }
  .review-item .author {
    font-size: 13px;
  }
  .review-pdf-label {
    font-size: 11px;
  }
  .review-pdf-badge {
    font-size: 9px;
    padding: 3px 10px;
    top: 8px;
    right: 8px;
  }
  .media-modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .media-hint {
    bottom: 20px;
    font-size: 11px;
    padding: 6px 14px;
  }

  /* Адаптив для варианта B (мобильный) */
  .protocols-grid-variant-b .protocol-preview {
    height: 180px;
  }
  .protocols-grid-variant-b .protocol-name {
    font-size: 14px;
    padding: 12px 14px 4px;
  }
  .protocols-grid-variant-b .protocol-type {
    font-size: 12px;
    padding: 0 14px 14px;
  }
  .protocol-stats {
    padding: 20px 16px;
  }
  .stat-number {
    font-size: 26px;
  }
  .stat-label {
    font-size: 14px;
  }
  .protocol-stats-btn {
    padding: 10px 20px;
    font-size: 13px;
    width: 100%;
  }
}