/* ============================================================
   WATER BODIES — Каталог и детальная страница
   ============================================================ */

/* ---------- Каталог ---------- */
.wb-catalog {
    padding: 40px 0 80px;
}

.wb-catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}
.wb-catalog-header h1 {
    margin-bottom: 8px;
}
.wb-catalog-header p {
    color: var(--color-text-soft);
    font-size: 1.05rem;
}

.wb-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 28px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
.wb-filter-bar .input,
.wb-filter-bar .select {
    padding: 10px 14px;
    font-size: 0.95rem;
}
.wb-filter-bar input[type="search"] {
    flex: 1;
    min-width: 200px;
}

.wb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.wb-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    transition: transform .2s, border-color .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
}
.wb-card:hover {
    transform: translateY(-3px);
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}

.wb-card-cover {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, var(--color-water) 0%, var(--color-water-deep) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}
.wb-card-cover .placeholder {
    font-size: 2.5rem;
    opacity: 0.4;
}
.wb-card-type {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: rgba(15, 26, 20, 0.8);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--color-text);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 600;
}

.wb-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.wb-card-name {
    font-family: 'Lora', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-heading);
    line-height: 1.3;
}
.wb-card-meta {
    font-size: 0.85rem;
    color: var(--color-text-soft);
}
.wb-card-stats {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
    font-size: 0.82rem;
    color: var(--color-text-soft);
    font-family: 'JetBrains Mono', monospace;
}
.wb-card-stats span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.wb-card-stats .rating { color: var(--color-ochre); }

.wb-empty {
    padding: 80px 24px;
    text-align: center;
    border: 1px dashed var(--color-border-strong);
    border-radius: 4px;
    background: var(--color-surface);
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 32px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    color: var(--color-text-soft);
    text-decoration: none;
    font-size: 0.92rem;
    transition: all .15s;
}
.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}
.pagination .current {
    background: var(--color-accent);
    color: var(--color-forest-deep);
    border-color: var(--color-accent);
    font-weight: 600;
}
.pagination .disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- Страница водоёма ---------- */
.wb-detail {
    padding: 32px 0 80px;
}

.wb-hero {
    margin-bottom: 32px;
}
.wb-hero-cover {
    aspect-ratio: 4/1.4;
    background: linear-gradient(135deg, var(--color-water) 0%, var(--color-water-deep) 100%);
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.wb-hero-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,26,20,0.7) 0%, transparent 50%);
}
.wb-hero-info {
    position: absolute;
    left: 32px;
    bottom: 24px;
    right: 32px;
    z-index: 1;
}
.wb-hero-info h1 {
    color: #f0e8d2;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    margin-bottom: 8px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.wb-hero-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    color: #d4c8a8;
    font-size: 0.95rem;
    font-family: 'JetBrains Mono', monospace;
}
.wb-hero-meta span {
    background: rgba(15,26,20,0.6);
    padding: 4px 10px;
    border-radius: 2px;
    backdrop-filter: blur(4px);
}

.wb-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: -16px 0 24px;
}

.wb-vote {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
    background: var(--color-bg-soft);
}
.wb-vote button {
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.92rem;
    transition: background .15s, color .15s;
}
.wb-vote button:hover { background: var(--color-accent-soft); }
.wb-vote button.up.active { color: var(--color-leaf-bright); background: rgba(123,160,91,0.15); }
.wb-vote button.down.active { color: #c97766; background: rgba(201,119,102,0.15); }
.wb-vote .sep { width: 1px; background: var(--color-border); align-self: stretch; }
.wb-vote svg { width: 16px; height: 16px; }

.wb-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

.wb-main h2 {
    font-size: 1.4rem;
    margin: 32px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}
.wb-main h2:first-child { margin-top: 0; }

.wb-description {
    color: var(--color-text);
    font-size: 1.05rem;
    line-height: 1.75;
}

.wb-species-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 24px;
}
.wb-species-pill {
    padding: 6px 12px;
    background: var(--color-accent-soft);
    color: var(--color-accent);
    border-radius: 14px;
    font-size: 0.88rem;
    border: 1px solid var(--color-border);
    text-decoration: none;
    transition: all .15s;
}
.wb-species-pill:hover {
    background: var(--color-leaf);
    color: var(--color-forest-deep);
}

/* Боковая колонка */
.wb-aside {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wb-map-mini {
    aspect-ratio: 1;
    background: var(--color-water-deep);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}
.wb-map-mini iframe,
.wb-map-mini #miniMap {
    width: 100%;
    height: 100%;
    border: none;
}

.wb-info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 20px;
}
.wb-info-card h3 {
    font-size: 0.8rem;
    color: var(--color-ochre);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 14px;
    font-family: 'Manrope', sans-serif;
}
.wb-info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.92rem;
}
.wb-info-row:last-child { border-bottom: none; }
.wb-info-label { color: var(--color-text-soft); }
.wb-info-value { color: var(--color-heading); font-weight: 500; font-family: 'JetBrains Mono', monospace; }

/* Уловы на водоёме */
.wb-catches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}
.wb-catch-row {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    align-items: center;
}
.wb-catch-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-leaf), var(--color-ochre));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-forest-deep);
    flex-shrink: 0;
}
.wb-catch-info {
    flex: 1;
    min-width: 0;
}
.wb-catch-user {
    font-weight: 600;
    color: var(--color-heading);
    font-size: 0.92rem;
}
.wb-catch-detail {
    font-size: 0.82rem;
    color: var(--color-text-soft);
}
.wb-catch-weight {
    font-family: 'Lora', serif;
    color: var(--color-ochre);
    font-weight: 600;
}

/* Комментарии */
.comment-form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 24px;
}
.comment-form textarea {
    min-height: 80px;
    margin-bottom: 12px;
}
.comment-form .auth-prompt {
    color: var(--color-text-soft);
    font-size: 0.92rem;
    text-align: center;
    padding: 16px;
}
.comment-form .auth-prompt a {
    color: var(--color-accent);
    font-weight: 600;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.comment {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-moss), var(--color-ochre));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-forest-deep);
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-head {
    display: flex;
    gap: 12px;
    align-items: baseline;
    margin-bottom: 4px;
}
.comment-name { font-weight: 600; color: var(--color-heading); }
.comment-date { color: var(--color-text-muted); font-size: 0.82rem; }
.comment-text { color: var(--color-text); line-height: 1.6; }

@media (max-width: 900px) {
    .wb-body { grid-template-columns: 1fr; }
    .wb-aside { position: static; }
    .wb-hero-info { left: 16px; right: 16px; bottom: 16px; }
}
