/* =====================================================
   ОЗЕРО ДРУЗЕЙ — blog.css (участники и мини-блоги)
   ===================================================== */

.people-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.person {
    display: flex; flex-direction: column; align-items: center;
    gap: .5rem; text-align: center;
}
.person-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1.3rem;
}
.person-avatar.big { width: 84px; height: 84px; font-size: 1.7rem; margin: 0 auto .6rem; }
.person-role { color: var(--muted); font-size: .9rem; }

.blog { max-width: 800px; padding: 2rem 0 1rem; }
.blog-post { padding: 1.6rem; margin-bottom: 1.6rem; }
.blog-head {
    display: flex; justify-content: space-between; gap: 1rem;
    flex-wrap: wrap; align-items: baseline;
}
.blog-meta { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.vis-badge {
    background: var(--turquoise-light); color: var(--turquoise-dark);
    border-radius: 999px; padding: .15rem .7rem;
    font-size: .8rem; font-weight: 700;
}
.blog-img {
    border-radius: 12px; margin: 1rem 0;
    width: 100%; max-height: 480px; object-fit: cover;
}
.blog-video { margin: 1rem 0; aspect-ratio: 16 / 9; }
.blog-video iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; }

.wide-form { max-width: 720px; }
textarea.input { resize: vertical; min-height: 140px; }
/* ---------- Вложения внутри текста (обтекание) ---------- */
.bm {
    display: block;
    margin: .8rem 0;
}

.bm img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

.bm iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
}

.bm-full {
    display: block;
    width: 100%;
}

.bm-half {
    width: 48%;
}

.bm-quarter {
    width: 25%;
}

.bm-left {
    float: left;
    margin: .3rem 1rem .6rem 0;
}

.bm-right {
    float: right;
    margin: .3rem 0 .6rem 1rem;
}

.bm-center {
    margin-left: auto;
    margin-right: auto;
}

.blog-text::after {
    content: "";
    display: block;
    clear: both;
}

/* Круглое медиа (аватар) */
.bm-avatar {
    display: inline-block;
    float: none;
    vertical-align: middle;
    margin: .25rem .5rem .25rem 0;
}

.bm-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Круглое медиа (аватар) */
.bm-avatar {
    display: inline-block;
    float: none;
    vertical-align: middle;
    margin: .25rem .5rem .25rem 0;
}

.bm-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* ---------- Слоты медиа (редактор) ---------- */
.slot {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
}
.slot legend {
    font-weight: 700;
    color: var(--turquoise-dark);
    padding: 0 .4rem;
    background: var(--bg);
}
.slot-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: end;
    margin-top: .5rem;
}
.slot-row .field { min-width: 130px; flex: 1; }

@media (max-width: 640px) {
    .bm-half, .bm-quarter { width: 100%; float: none; margin: .8rem 0; }
}
/* ----------  Страница «Для своих» ---------- */
.own-form { margin-bottom: 1.6rem; }
.own-post { padding: 1.2rem 1.4rem; margin-bottom: 1rem; }
.own-head { display: flex; gap: .7rem; align-items: center; margin-bottom: .6rem; }
/* ---------- Две колонки на «Для своих» ---------- */
.own-two-cols {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .own-two-cols { grid-template-columns: 1fr; }
}
.own-form { position: sticky; top: 90px; }

/* ---------- Новости на главной ---------- */
.news-section { background: var(--turquoise-light); }
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}
.news-item { padding: 1.2rem; }
.news-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: .8rem;
}
.news-meta { margin: .5rem 0; font-size: .85rem; }
.news-excerpt { color: var(--muted); font-size: .95rem; margin-bottom: .8rem; }
.own-sidebar { position: sticky; top: 90px; }
.own-feed { display: flex; flex-direction: column; gap: 1rem; }
.own-actions { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--border); }

@media (max-width: 900px) {
    .own-two-cols { grid-template-columns: 1fr; }
    .own-sidebar { position: static; }
}
/* ========== СТРАНИЦА "ДЛЯ СВОИХ" — НОВЫЙ LAYOUT ========== */

.own-two-cols {
    display: grid;
    grid-template-columns: 380px 1fr; /* Левая колонка фиксированная, правая гибкая */
    gap: 1.5rem;
    align-items: start;
}

/* Левая колонка — компактная форма */
.own-sidebar {
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.own-sidebar .card {
    padding: 1.2rem;
}

.own-sidebar h2 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.own-sidebar .field {
    margin-bottom: 0.8rem;
}

.own-sidebar .field span {
    font-size: 0.9rem;
}

.own-sidebar textarea.input {
    min-height: 100px;
    font-size: 0.95rem;
}

.own-sidebar .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
}

/* Правая колонка — широкая лента */
.own-feed {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.own-post {
    padding: 1.5rem;
}

.own-post .blog-text {
    font-size: 1rem;
    line-height: 1.7;
}

/* Адаптация для мобильных */
@media (max-width: 900px) {
    .own-two-cols {
        grid-template-columns: 1fr;
    }
    
    .own-sidebar {
        position: static;
        max-height: none;
    }
}
/* ========== СТРАНИЦА "ДЛЯ СВОИХ" ========== */

.own-head {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.own-head .chat-avatar {
    flex-shrink: 0;
}

.own-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.blog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
