/* Header mobile + logo */
.logo-img {
    height: 32px; width: auto; max-width: 160px; object-fit: contain; display: block;
}
.logo { gap: 8px; }
.mobile-search-btn { display: none !important; }
.mobile-search-form {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-input); border: 1px solid #333; border-radius: 40px;
    padding: 8px 14px; margin-bottom: 8px;
}
.mobile-search-form i { color: var(--text-muted); }
.mobile-search-form input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text-primary); font-size: 0.95rem; font-family: inherit;
}

@media (max-width: 767px) {
    .header-search { display: none !important; }
    .mobile-search-btn { display: inline-flex !important; align-items: center; justify-content: center; }
    .header-actions { gap: 10px; }
    .header-login { padding: 5px 12px; font-size: 0.8rem; }
    .logo-img { height: 28px; max-width: 120px; }
    .logo { font-size: 1.15rem; }
    .user-avatar { width: 30px; height: 30px; font-size: 0.8rem; }
    .burger-btn span { width: 22px; }

    /* Sections mobile */
    .sections-hero { padding: 16px; }
    .sections-hero h1 { font-size: 1.15rem; }
    .sections-hero-stats { gap: 10px; }
    .sections-hero-stats strong { font-size: 1rem; }
    .sections-toolbar { flex-direction: column; align-items: stretch; }
    .sections-toolbar-actions { width: 100%; }
    .sections-toolbar-actions .btn { flex: 1; justify-content: center; }
    .section-group-header { flex-direction: column; align-items: flex-start; }
    .sg-totals { width: 100%; justify-content: space-between; flex-wrap: wrap; }
    .sg-new-btn span { display: inline; }
    .rich-row {
        grid-template-columns: 40px 1fr !important;
        gap: 10px !important;
    }
    .sub-stats {
        grid-column: 2;
        justify-content: flex-start;
    }
    .sub-last {
        grid-column: 1 / -1;
        text-align: left !important;
        min-width: 0 !important;
        padding-left: 50px;
    }
    .last-row { justify-content: flex-start; }

    /* Topic mobile extras */
    .topic-header-rich { padding: 14px !important; }
    .topic-header-rich h1 { font-size: 1.15rem; }
    .topic-meta { font-size: 0.78rem; gap: 8px 12px !important; }
    .topic-toolbar { gap: 10px; }
    .topic-toolbar .action-btn { font-size: 0.75rem; }
    .post-rich { padding: 12px !important; }
    .post-footer { gap: 10px 12px !important; }
    .quick-reply-rich { padding: 14px !important; }
    .reply-hint { display: none; }
    .main-grid { gap: 16px !important; }
    .sidebar { margin-top: 8px; }
}

@media (max-width: 480px) {
    .header-inner { gap: 6px; }
    .logo span { /* keep Hub visible if no logo img */ }
    .container { padding: 0 10px; }
    .sg-new-btn { padding: 6px 10px !important; font-size: 0.72rem; }
}
