/* ==========================================
   СТИЛИ ДЛЯ ДОКУМЕНТОВ (контент из админки)
   ========================================== */

/* Типографика внутри документов */
.doc-content h1 { font-size: 1.875rem; font-weight: 800; margin: 1.5rem 0 1rem; color: #111827; }
.doc-content h2 { font-size: 1.5rem; font-weight: 700; margin: 1.5rem 0 0.75rem; color: #1f2937; }
.doc-content h3 { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 0.5rem; color: #374151; }
.doc-content p { margin-bottom: 1rem; line-height: 1.7; }
.doc-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.doc-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.doc-content li { margin-bottom: 0.375rem; }
.doc-content strong, .doc-content b { font-weight: 700; color: #111827; }
.doc-content a { color: #2563eb; text-decoration: underline; }

/* 🔴 Красный жирный */
.doc-red { color: #dc2626; font-weight: 700; }

/* 🔴 Красный на розовом фоне */
.doc-red-bg { color: #991b1b; font-weight: 700; background: #fee2e2; padding: 0.125rem 0.375rem; border-radius: 0.25rem; }

/* 🔴🔠 Красный + крупный */
.doc-red-large { color: #dc2626; font-size: 1.25em; font-weight: 800; }

/* 🟡 Жёлтый маркер */
.doc-yellow { background: #fef08a; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-weight: 600; }

/* 🟢 Зелёный */
.doc-green { color: #16a34a; font-weight: 700; }

/* ⚫ Просто жирный */
.doc-bold { font-weight: 800; }

/* 🔠 Крупнее обычного */
.doc-large { font-size: 1.25em; font-weight: 700; }

/* 🚨 Красный блок-предупреждение */
.doc-alert { background: #fef2f2; border-left: 4px solid #dc2626; padding: 1rem 1.25rem; border-radius: 0 0.5rem 0.5rem 0; color: #991b1b; font-weight: 600; margin: 1.5rem 0; }

/* ℹ️ Синий инфо-блок */
.doc-alert-info { background: #eff6ff; border-left: 4px solid #2563eb; padding: 1rem 1.25rem; border-radius: 0 0.5rem 0.5rem 0; color: #1e40af; margin: 1.5rem 0; }

/* ✅ Зелёный блок */
.doc-alert-success { background: #f0fdf4; border-left: 4px solid #16a34a; padding: 1rem 1.25rem; border-radius: 0 0.5rem 0.5rem 0; color: #14532d; margin: 1.5rem 0; }

/* ==========================================
   РАЗМЕРЫ ФОТО В ДОКУМЕНТАХ
   ========================================== */

.img-wide { width: 100%; height: auto; }

.img-half { max-width: 36rem; width: 100%; height: auto; }

/* Вертикальное: ограничили и ширину, и ВЫСОТУ */
.img-portrait {
    max-width: 280px;
    max-height: 480px;   /* ← вот ограничение высоты */
    width: auto;
    height: auto;
}

.img-small {
    max-width: 220px;
    max-height: 320px;
    width: auto;
    height: auto;
}
/* ==========================================
   ЛАЙТБОКС: увеличение фото по клику
   ========================================== */

/* Фото в документе: курсор и эффект при наведении */
.doc-photo {
    cursor: zoom-in;
    transition: transform 0.2s, box-shadow 0.2s;
}

.doc-photo:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Тёмный оверлей на весь экран */
.doc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.doc-lightbox.active {
    display: flex;
}

/* Крупное фото */
.doc-lightbox img {
    max-width: 95vw;
    max-height: 92vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    animation: docZoomIn 0.2s ease;
}

@keyframes docZoomIn {
    from { transform: scale(0.9); opacity: 0.5; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Крестик закрытия */
.doc-lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    transition: transform 0.15s;
}

.doc-lightbox-close:hover {
    transform: scale(1.2);
}

/* ==========================================
   ЗАЩИТА ОТ ДЛИННЫХ СЛОВ В ОПИСАНИИ ФОТО
   ========================================== */
.doc-caption {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    min-width: 0;      /* ← разрешает flex-блоку сжиматься */
    max-width: 100%;
}
/* ==========================================
   СОХРАНЯЕМ ПЕРЕНОСЫ СТРОК КАК В АДМИНКЕ
   ========================================== */
.doc-content {
    white-space: pre-line;
}