/* ── Fix HTML hidden attribute being overridden by display rules ── */
[hidden] { display: none !important; }

/* ── Layout ─────────────────────────────────────────────── */
.feed-layout {
    display: flex;
    flex-direction: column;
    max-width: 860px;
}

/* filter-bar lives outside feed-layout — no max-width */

.feed-heading {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1f2933;
}

.feed-empty {
    color: #9ca3af;
    font-size: 15px;
    margin-top: 32px;
}

/* ── Filter bar ──────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

/* Shared visual style */
.fb-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: #ffffff;
    border: 1.5px solid #c8d9ea;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #1f2933;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, background 0.15s;
    font-family: inherit;
    line-height: 1.4;
    flex-shrink: 0;
}
/* Native <select> — display:inline-block behaves reliably across browsers */
.fb-select {
    display: inline-block;
    width: auto;
    padding: 7px 28px 7px 12px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    border: 1.5px solid #c8d9ea;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #1f2933;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, background-color 0.15s;
    font-family: inherit;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    flex-shrink: 0;
}
.fb-btn:hover,
.fb-select:hover {
    border-color: #0B1F33;
    background-color: #ffffff;
}
.fb-btn--active,
.fb-select--active {
    border-color: #0B1F33;
    background-color: #ffffff;
}
.fb-arrow {
    color: #9ca3af;
    margin-left: 4px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Wrapper with dropdown */
.fb-item {
    position: relative;
    flex-shrink: 0;
}

.fb-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1.5px solid #d5e3f0;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 6px 0;
    z-index: 300;
    max-height: 260px;
    overflow-y: auto;
}

.fb-panel--geo {
    min-width: 384px;
    padding: 12px;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    overflow-y: visible;
    background: #f8fafc;
}
.fb-panel--geo:not([hidden]) {
    display: flex;
}

.fb-panel__select-all {
    display: block;
    width: 100%;
    padding: 6px 12px;
    background: none;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #0B1F33;
    cursor: pointer;
    margin-bottom: 4px;
    font-family: inherit;
}
.fb-panel__select-all:hover { background: #f0f4f8; }

.fb-panel__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: #1f2933;
    cursor: pointer;
    user-select: none;
}
.fb-panel__option:hover { background: #f0f4f8; }
.fb-panel__option--active {
    font-weight: 600;
    color: #0B1F33;
    background: #eef3fa;
}
.fb-panel__option input { accent-color: #0B1F33; cursor: pointer; flex-shrink: 0; }

/* Cascade pill — select + × inside the border */
.fb-cascade-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}
.fb-select--clearable {
    padding-right: 32px;
}
.fb-no-arrow {
    background-image: none !important;
}
.fb-x {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 3px;
    line-height: 1;
    transition: color 0.15s;
}
.fb-x:hover { color: #1f2933; }

/* Small separator before action buttons */
.fb-sep {
    display: inline-block;
    width: 12px;
}

.fb-geo-row {
    position: relative;
    display: flex;
    align-items: center;
}
.fb-geo-select {
    width: 100%;
    padding: 7px 28px 7px 12px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px 12px;
    border: 1.5px solid #c8d9ea;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #1f2933;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, background-color 0.15s;
    font-family: inherit;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}
.fb-geo-select:hover { border-color: #0B1F33; background-color: #ffffff; }
.fb-geo-select:focus { outline: none; border-color: #0B1F33; background-color: hsl(0, 0%, 100%); }
.fb-geo-select.fb-select--active { border-color: #0B1F33; background-color: #ffffff; }
.fb-geo-select--clearable { padding-right: 32px; }

/* Apply / Reset */
.fb-apply {
    padding: 7px 18px;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    white-space: nowrap;
}
.fb-apply:hover { background: #ea6c0b; }

.fb-reset {
    padding: 7px 12px;
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
    border-radius: 20px;
    transition: color 0.15s;
    white-space: nowrap;
}
.fb-reset:hover { color: #0B1F33; }

/* ── Post card ──────────────────────────────────────────── */
.feed-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    flex-direction: row;
    height: 255px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.feed-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-1px);
}

/* Body: title + excerpt + meta + footer */
.feed-card__body {
    flex: 1;
    min-width: 0;
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
}

/* Post photo — right column, 4:3 */
/* card height=255px, padding=10px → inner height=225px → width=225*4/3≈286px */
.feed-card__images {
    flex: 0 0 auto;
    align-self: center;
    padding: 15px 15px 15px 0;
}
.feed-card__img {
    width: 300px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 15px;
}

/* Title */
.feed-card__title {
    margin: 0 0 4px;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.25;
}
.feed-card__title a {
    color: #1f2933;
    text-decoration: none;
    transition: color 0.15s;
}
.feed-card__title a:hover { color: #0B1F33; }

/* Excerpt — max-height prevents overlap */
.feed-card__excerpt {
    margin: 10px 0 0;
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(15px * 1.5 * 3);
}

/* Info row: avatar · name · boat photo · boat name */
.feed-card__info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    overflow: hidden;
}
.feed-card__author-avatar-wrap {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}
.feed-card__info-avatar {
    width: 25px;
    height: 25px;
    border-radius: 6px;
    object-fit: cover;
    display: block;
}
.feed-card__info-avatar--placeholder {
    background: #0B1F33;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}
.feed-card__author {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}
.feed-card__author:hover { color: #0B1F33; }
.feed-card__subject-thumb {
    flex-shrink: 0;
    display: block;
    text-decoration: none;
}
.feed-card__subject-img {
    height: 25px;
    width: auto;
    aspect-ratio: 16 / 9;
    border-radius: 5px;
    object-fit: cover;
    display: block;
}
.feed-card__subject-img--placeholder {
    height: 25px;
    aspect-ratio: 16 / 9;
    border-radius: 5px;
    background: #e4ecf4;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feed-card__boat-name {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}
.feed-card__boat-name:hover { color: #0B1F33; }

.feed-card__read-more {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #0B1F33;
    text-decoration: none;
    transition: color 0.15s;
}
.feed-card__read-more:hover { color: #1a3a5c; }

/* Footer: stats */
.feed-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    margin-top: auto;
    flex-wrap: nowrap;
    overflow: hidden;
}
.feed-card__stats {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.feed-card__draft-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 500;
    color: #c2410c;
    background: #fff7ed;
    border-radius: 6px;
    padding: 2px 8px;
    pointer-events: none;
}
.feed-card__stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #9ca3af;
}.feed-card__time {
    font-size: 12px;
    color: #9ca3af;
}
.feed-card__category {
    font-size: 12px;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 6px;
    padding: 2px 8px;
}

/* ── Load more ──────────────────────────────────────────── */
.feed-more-wrap {
    display: flex;
    justify-content: center;
    margin: 8px 0 32px;
}
.feed-more-btn {
    padding: 10px 32px;
    background: #e4ecf4;
    border: 1.5px solid #c8d9ea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.feed-more-btn:hover { background: #d5e3f0; border-color: #a8c4dc; }
.feed-more-btn:disabled { opacity: 0.6; cursor: default; }
